Wikipedia tumwiki https://tum.wikipedia.org/wiki/Jani_likulu MediaWiki 1.47.0-wmf.11 first-letter Media Special Talk User User talk Wikipedia Wikipedia talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk TimedText TimedText talk Module Module talk Event Event talk UK 0 6800 117266 110112 2026-05-05T17:46:07Z en>Lijil 0 Reverted edits by [[Special:Contribs/~2026-27308-47|~2026-27308-47]] ([[User talk:~2026-27308-47|talk]]): vandalism ([[:en:WP:WikiShield|WS]]) 117266 wikitext text/x-wiki #REDIRECT [[United Kingdom]] {{Redirect category shell|1= {{R from initialism}} {{R mentioned in a hatnote}} {{R printworthy}} }} 0idoh74ren3deto9c1iaypnb7r104rv 117267 117266 2026-07-16T11:45:41Z Tumbuka Arch 6863 1 revision imported from [[:en:UK]] 117266 wikitext text/x-wiki #REDIRECT [[United Kingdom]] {{Redirect category shell|1= {{R from initialism}} {{R mentioned in a hatnote}} {{R printworthy}} }} 0idoh74ren3deto9c1iaypnb7r104rv United Kingdom 0 6801 117262 110033 2026-07-15T12:49:06Z en>RFBailey 0 /* Administrative divisions */ update re NI 117262 wikitext text/x-wiki {{Short description|Country in northwestern Europe}} {{Hatnote|"UK" redirects here. For other uses, see [[UK (disambiguation)]] and [[United Kingdom (disambiguation)]]. Not to be confused with [[England]] or [[Great Britain]].}} {{pp-sock|small=yes}} {{pp-move|small=yes}} {{Use British English|date=April 2012}} {{Use dmy dates|date=November 2025}} {{Infobox country | common_name = United Kingdom | linking_name = the United Kingdom<!--Note: "the" required here as this entry used to create wikilinks--> | conventional_long_name = United Kingdom of Great Britain and Northern Ireland | image_flag = Flag of the United Kingdom (1-2).svg | flag_type = [[Union Jack|Flag]] | alt_flag = A flag composed of a red cross edged in white and superimposed on a red saltire, also edged in white, superimposed on a white saltire on a blue background | image_coat = | other_symbol = [[File:Coat of arms of the United Kingdom (2022, both variants).svg|250px]]<br />Used in relation to [[Scotland]] (right) and elsewhere (left) | other_symbol_type = [[Coat of arms of the United Kingdom|Coat of arms]]: | national_anthem = "[[God Save the King]]"{{Efn|"God Save the King" is the [[national anthem]] by custom, not statute, and there is no authorised version. Typically only the first verse is usually sung, although the second verse is also often sung as well at state and public events.<ref>{{Cite web |title=National Anthem |url=https://www.royal.uk/encyclopedia/national-anthem |access-date=10 April 2024 |website=The Royal Family |archive-date=20 May 2024 |archive-url=https://web.archive.org/web/20240520130352/https://www.royal.uk/encyclopedia/national-anthem |url-status=live}}</ref> The words ''King, he, him, his'', used at present, are replaced by ''Queen, she, her'' when the monarch is female.}}<br /><div style="display:inline-block;margin-top:0.4em;">[[File:United States Navy Band - God Save the Queen.ogg|God Save the King / Queen <!-- Do not change file name due to computer error without ensuring that the file is playable. -->]]</div> | image_map = {{Switcher|[[File:Europe-UK (orthographic projection).svg|upright=1.15|frameless]]|Show globe|[[File:Europe-UK.svg|upright=1.15|frameless]]|Show map of Europe|[[File:United Kingdom (+overseas territories and crown dependencies) in the World (+Antarctica claims).svg|upright=1.15|frameless]]|Show [[British Overseas Territories]] and [[Crown Dependencies]]|[[File:Territorial waters - United Kingdom.svg|upright=1.15|frameless]]|Show [[Exclusive economic zone of the United Kingdom|their exclusive economic zones]]|default=1}} | map_caption = | capital = [[London]] | coordinates = {{Coord|51|30|N|0|7|W|type:city(9,100,000)_region:GB-LND}} | largest_city = capital | languages_type = [[National language]] | languages = [[English language|English]] <!--Note: Just English, don't add "British English".--> | languages2_type = Regional and minority languages{{Efn|Scots, Ulster Scots, Welsh, Cornish, Scottish Gaelic and Irish are classed as [[Regional language|regional]] or [[Minority language|minority]] languages under the [[Council of Europe]]'s [[European Charter for Regional or Minority Languages]].<ref name="reglang">{{Cite web |title=List of declarations made with respect to treaty No. 148 |url=http://conventions.coe.int/treaty/Commun/ListeDeclarations.asp?CL=ENG&NT=148&VL=1 |access-date=12 December 2013 |publisher=[[Council of Europe]] |archive-date=12 December 2013 |archive-url=https://web.archive.org/web/20131212175720/http://conventions.coe.int/treaty/Commun/ListeDeclarations.asp?CL=ENG&NT=148&VL=1 |url-status=dead}}</ref> These include defined obligations to promote those languages.<ref>{{Cite web |title=Welsh language on GOV.UK – Content design: planning, writing and managing content – Guidance |url=https://www.gov.uk/guidance/content-design/welsh-language-on-gov-uk |access-date=3 August 2018 |website=gov.uk |archive-date=4 August 2018 |archive-url=https://web.archive.org/web/20180804014121/https://www.gov.uk/guidance/content-design/welsh-language-on-gov-uk |url-status=live |postscript=;}} {{Cite news |title=Welsh language scheme |work=GOV.UK |url=https://www.gov.uk/government/organisations/department-for-transport/about/welsh-language-scheme |access-date=3 August 2018 |archive-date=4 August 2018 |archive-url=https://web.archive.org/web/20180804014119/https://www.gov.uk/government/organisations/department-for-transport/about/welsh-language-scheme |url-status=live |postscript=;}} {{Cite news |title=Welsh language scheme |work=GOV.UK |url=https://www.gov.uk/government/organisations/home-office/about/welsh-language-scheme |access-date=3 August 2018 |archive-date=2 August 2018 |archive-url=https://web.archive.org/web/20180802010917/https://www.gov.uk/government/organisations/home-office/about/welsh-language-scheme |url-status=live}}</ref> See also [[Languages of the United Kingdom]]. Welsh has limited ''[[de jure]]'' official status in Wales, as well as in the provision of national government services provided for Wales.}} | languages2 = {{Hlist <!--Anglic--> | [[Scots language|Scots]] | [[Ulster Scots dialects|Ulster Scots]] <!--Brittonic--> | [[Welsh language|Welsh]] | [[Cornish language|Cornish]] <!--Goidelic--> | [[Scottish Gaelic]]<!--Keep "Scottish Gaelic"; people will find "Gaelic" confusing, as the Irish language is also commonly called "Gaelic"--> | [[Irish language|Irish]] <!--BANZSL--> | [[British Sign Language]] }} | ethnic_groups = {{unbulleted list | 83.1% [[White people in the United Kingdom|White]] | 8.6% [[British Asian|Asian]] | 3.7% [[Black British|Black]] | 2.7% [[Mixed (United Kingdom ethnicity category)|Mixed]] | 2.0% [[Ethnic groups in the United Kingdom|other]] }} | ethnic_groups_year = 2021 | ethnic_groups_ref = {{Efn|name=UK-wide2021|Whereas the censuses of England and Wales and of Northern Ireland went ahead as planned in 2021, the census in Scotland was postponed until 2022. The Office for National Statistics reports that these UK-wide statistics "have been created to provide an image of how UK census data may have looked if the most recent UK censuses had been conducted with an aligned date of 21 March 2021".}}<ref name=Ethnicity2021>{{cite web|url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/censusbasedstatisticsuk2021|title=Table 06: UK06 - Ethnic group by sex by age, United Kingdom|work=Census-based statistics UK: 2021|publisher=Office for National Statistics|date=27 June 2025|access-date=28 March 2026}}</ref> | religion = {{unbulleted list | 46.6% [[Religion in the United Kingdom#Christianity|Christianity]] | 37.6% [[Irreligion in the United Kingdom|no religion]] | 6.0% [[Islam in the United Kingdom|Islam]] | 1.6% [[Hinduism in the United Kingdom|Hinduism]] | 2.2% [[Religion in the United Kingdom|other]] | 5.9% not stated }} | religion_year = 2021 | religion_ref = {{Efn|name=UK-wide2021}}<ref name=Religion2021>{{cite web|url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/censusbasedstatisticsuk2021|title=Table 07: UK07 - Religion by sex by age, United Kingdom|work=Census-based statistics UK: 2021|publisher=Office for National Statistics|date=27 June 2025|access-date=28 March 2026}}</ref> | demonym = {{hlist |[[British people|British]] |Briton |Brit (colloquial) }} | government_type = Unitary [[Westminster parliamentary system|parliamentary constitutional monarchy]]{{Efn|Although the United Kingdom has traditionally been seen as a [[unitary state]], an alternative description of the UK as a "union state", put forward by, amongst others, [[Vernon Bogdanor]],<ref>{{Cite book |last=Bradbury |first=Jonathan |url=https://books.google.com/books?id=c3QWEAAAQBAJ&q=%2522union+state%2522+UK+unitary&pg=PA19 |title=Constitutional Policy and Territorial Politics in the UK: Volume 1: Union and Devolution 1997–2012 |date=2021 |publisher=Policy Press |isbn=978-1-5292-0588-6 |pages=19–20 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204328/https://books.google.com/books?id=c3QWEAAAQBAJ&q=%2522union+state%2522+UK+unitary&pg=PA19#v=onepage&q=%2522union%20state%2522%20UK%20unitary&f=false |url-status=live}}</ref> has become increasingly influential since the adoption of devolution in the 1990s.<ref>{{Cite book |last=Leith |first=Murray Stewart |url=https://books.google.com/books?id=PeBvAAAAQBAJ&q=Uk+%2522unitary+state%2522&pg=PA39 |title=Political Discourse and National Identity in Scotland |date=2012 |publisher=Edinburgh University Press |isbn=978-0-7486-8862-3 |page=39 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204223/https://books.google.com/books?id=PeBvAAAAQBAJ&q=Uk+%2522unitary+state%2522&pg=PA39#v=onepage&q=Uk%20%2522unitary%20state%2522&f=false |url-status=live}}</ref> A union state is considered to differ from a unitary state in that while it maintains a central authority it also recognises the authority of historic rights and infrastructures of its component parts.<ref>{{Cite book |last1=Gagnon |first1=Alain-G. |url=https://books.google.com/books?id=g0ahE2fTxS0C&q=%2522union+state%2522+UK+unitary&pg=PA47 |title=Multinational Democracies |last2=Tully |first2=James |date=2001 |publisher=Cambridge University Press |isbn=978-0-521-80473-8 |page=47 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204329/https://books.google.com/books?id=g0ahE2fTxS0C&q=%2522union+state%2522+UK+unitary&pg=PA47#v=onepage&q=%2522union%20state%2522%20UK%20unitary&f=false |url-status=live |postscript=;}} {{Cite book |last=Bogdanor |first=Vernon |title=Constitutional Reform in the United Kingdom: Practice and Principles |date=1998 |publisher=Hart Publishing |isbn=978-1-901362-84-8 |editor-last=Beatson |editor-first=Jack |location=Oxford |page=18 |chapter=Devolution: the Constitutional Aspects |chapter-url=https://books.google.com/books?id=YEEgDsCYmbQC&q=%2522union+state%2522+UK+unitary&pg=PA18}}</ref>}} | leader_title1 = [[Monarchy of the United Kingdom|Monarch]] | leader_name1 = [[Charles III]] | leader_title2 = [[Prime Minister of the United Kingdom|Prime Minister]] | leader_name2 = [[Keir Starmer]] <!--Do NOT change the name to Sir Keir Starmer without discussion in the talk page, also don't change it to Andy Burham YET unless if many reliable sources are reporting him to be the new PM. --> | legislature = [[Parliament of the United Kingdom|Parliament]] | upper_house = [[House of Lords]] | lower_house = [[House of Commons of the United Kingdom|House of Commons]] | sovereignty_type = [[Formation of the United Kingdom of Great Britain and Northern Ireland|Formation]] | established_event1 = [[Laws in Wales Acts 1535 and 1542|Laws in Wales Acts]] | established_date1 = 1535 and 1542 | established_event2 = [[Union of the Crowns]] | established_date2 = 24 March 1603 | established_event3 = [[Treaty of Union]] | established_date3 = 22 July 1706 | established_event4 = [[Acts of Union 1707|Acts of Union of England and Scotland]] | established_date4 = 1 May 1707 | established_event5 = [[Acts of Union 1800|Acts of Union of Great Britain and Ireland]] | established_date5 = 1 January 1801 | established_event6 = [[Irish Free State Constitution Act 1922|Irish Free State Constitution Act]] | established_date6 = 6 December 1922 | area_label = Total{{efn|name=ONSArea|[[Office for National Statistics|ONS]] Standard Area Measurement, 'area to mean high water'. Excludes the [[Crown Dependencies]] and [[British Overseas Territories]].}} | area_km2 = 244376 | area_footnote = <ref name="ONS Standard Area Measurement">{{cite web |url=https://geoportal.statistics.gov.uk/datasets/ons::standard-area-measurements-for-administrative-areas-december-2023-in-the-uk/about |title=Standard Area Measurements for Administrative Areas (December 2023) in the UK |author=<!--Not stated--> |date=31 May 2024 |website=[[ONS Open Geography Portal|Open Geography Portal]] |publisher=Office for National Statistics |access-date=7 June 2024 |archive-date=7 June 2024 |archive-url=https://web.archive.org/web/20240607052407/https://geoportal.statistics.gov.uk/datasets/ons::standard-area-measurements-for-administrative-areas-december-2023-in-the-uk/about |url-status=live}}</ref> | area_rank = 78th | area_sq_mi = auto | area_label2 = Land{{efn|name=ONSLandArea|[[Office for National Statistics|ONS]] Standard Area Measurement, "area to mean high water excluding inland water". Excludes the [[Crown Dependencies]] and [[British Overseas Territories]].}} | area_data2 = {{convert|{{UK subdivision area|GSS=K02000001}}|km2|sqmi|abbr=on}}<ref name="ONS mid-year pop est" /> | percent_water = | population_estimate = {{IncreaseNeutral}} {{UK subdivision population|GSS=K02000001}}<ref name="ONS mid-year pop est">{{UK subdivision statistics citation}}</ref> | population_estimate_year = {{UK subdivision statistics year}} | population_estimate_rank = 20th | population_census = {{IncreaseNeutral}} 66,912,637{{Efn|name=UK-wide2021}}<ref name=Ethnicity2021/> | population_census_year = 2021 | population_census_rank = | population_density_km2 = {{UK subdivision density|GSS=K02000001}} | population_density_sq_mi = auto | population_density_rank = 48th | pop_den_footnote = <ref name="ONS mid-year pop est" /> | GDP_PPP = {{increase}} $4.721&nbsp;trillion<ref name="IMFWEO.UK">{{cite web |url=https://data.imf.org/en/Data-Explorer?datasetUrn=IMF.RES:WEO(9.0.0) |title=World Economic Outlook Database (April 2026 Edition) |publisher=[[International Monetary Fund]] |website=www.imf.org |date=14 April 2026 |access-date=18 April 2026}}</ref> | GDP_PPP_year = 2026 | GDP_PPP_rank = 10th | GDP_PPP_per_capita = {{increase}} $67,585<ref name="IMFWEO.UK" /> | GDP_PPP_per_capita_rank = 33rd | GDP_nominal = {{increase}} $4.265&nbsp;trillion<ref name="IMFWEO.UK" /> | GDP_nominal_year = 2026 | GDP_nominal_rank = 5th | GDP_nominal_per_capita = {{increase}} $61,056<ref name="IMFWEO.UK" /> | GDP_nominal_per_capita_rank = 21st | Gini = 35.4 | Gini_year = 2021 | Gini_change = decrease | Gini_ref = <ref>{{Cite web |title=Income inequality |url=https://data.oecd.org/inequality/income-inequality.htm |access-date=12 February 2024 |website=OECD Data |publisher=[[OECD]] |archive-date=1 July 2022 |archive-url=https://web.archive.org/web/20220701171540/https://data.oecd.org/inequality/income-inequality.htm |url-status=live}}</ref> | HDI = 0.946<!--number only--> | HDI_year = 2023<!-- Please use the year to which the data refers, not the publication year.--> | HDI_change = increase<!--increase/decrease/steady--> | HDI_ref = <ref name="UNHDR">{{Cite web |date=6 May 2025 |title=Human Development Report 2025 |url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf |url-status=live |archive-url=https://web.archive.org/web/20250506051232/https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf |archive-date=6 May 2025 |access-date=6 May 2025 |publisher=[[United Nations Development Programme]] |language=en}}</ref> | HDI_rank = 13th | currency = [[Pound&nbsp;sterling]]{{Efn|Some of the devolved countries, Crown Dependencies and British Overseas Territories issue their own sterling banknotes or currencies, or use another nation's currency. See [[List of British currencies]].}} ([[£]]) | currency_code = GBP | utc_offset = +0 | time_zone = [[Greenwich Mean Time|GMT]] | utc_offset_DST = +1 | time_zone_DST = [[British Summer Time|BST]]{{Efn|Also observed by the [[Crown Dependencies]]. For further information, see [[Time in the United Kingdom]].}} | DST_note = | date_format = {{Abbr|dd|day}}/{{Abbr|mm|month}}/{{Abbr|yyyy|year}} ([[Anno Domini|AD]]){{efn|The UK Government uses the [[ISO 8601]] format, {{Abbr|yyyy|year}}-{{Abbr|mm|month}}-{{Abbr|dd|day}}, for machine-readable dates and times.<ref>{{cite web |title=Formatting dates and times in data |url=https://www.gov.uk/government/publications/open-standards-for-government/date-times-and-time-stamps-standard |date=9 August 2022 |website=[[gov.uk]] |publisher=[[Government of the United Kingdom|HM Government]] |access-date=1 June 2024 |archive-date=9 May 2024 |archive-url=https://web.archive.org/web/20240509092813/https://www.gov.uk/government/publications/open-standards-for-government/date-times-and-time-stamps-standard |url-status=live}}</ref> See [[Date and time notation in the United Kingdom]].}} | calling_code = [[Telephone numbers in the United Kingdom|+44]]{{Efn|Excludes most overseas territories. See [[Telephone numbers in the United Kingdom#Telephone numbers in Overseas Territories]].}} | cctld = [[.uk]]{{Efn|The [[.gb]] domain is also reserved for the UK, but has been little used.}} }} The '''United Kingdom of Great Britain and Northern Ireland''', commonly known as the '''United Kingdom''' ('''UK''') or '''Britain''',<!--DO NOT CHANGE ORDER OF INTRO WITHOUT CONSENSUS-->{{Efn|Usage is mixed. ''[[The Guardian]]''<ref>{{Cite news |date=2021-04-23 |title=Guardian style guide: U |url=https://www.theguardian.com/guardian-style-guide-u |access-date=2025-12-29 |work=The Guardian |language=en-GB |issn=0261-3077}}</ref> and ''[[The Daily Telegraph|The Telegraph]]''<ref>{{Cite news |date=2025-07-25 |title=Places |url=https://www.telegraph.co.uk/style-book/places/ |access-date=2025-12-29 |work=The Telegraph |language=en-GB |issn=0307-1235 |archive-date=17 November 2025 |archive-url=https://web.archive.org/web/20251117111222/https://www.telegraph.co.uk/style-book/places/ |url-status=live }}</ref> use ''Britain'' as a synonym for the United Kingdom. The British [[Cabinet Office]]'s [[Government Digital Service]] style guide<ref>{{Cite web |title=Style guide - A to Z - Guidance - GOV.UK |url=https://www.gov.uk/guidance/style-guide/a-to-z#great-britain |access-date=2026-01-02 |website=www.gov.uk |language=en |archive-date=22 November 2024 |archive-url=https://web.archive.org/web/20241122222025/https://www.gov.uk/guidance/style-guide/a-to-z#great-britain |url-status=live }}</ref> for use on [[gov.uk]] recommends: "Use UK and United Kingdom in preference to Britain and British (UK business, UK foreign policy, ambassador and high commissioner). But British embassy, not UK embassy."}} is a country<!-- The term "country" was chosen as a result of a 2022 Request for Comment. Discuss potential changes on the talk page first. --> in [[northwestern Europe]], off the coast of [[European mainland|the continental mainland]]. It comprises [[England]], [[Scotland]], [[Wales]] and [[Northern Ireland]],{{efn|The [[Isle of Man]], [[Bailiwick of Guernsey|Guernsey]] and [[Jersey]] are [[Crown Dependencies]] and not part of the UK.}} with a population of over 69 million in 2024. The UK includes the island of [[Great Britain]], the north-eastern part of the island of [[Ireland]], and most of [[List of islands of the United Kingdom|the smaller islands]] within the [[British Isles]], covering {{Convert|244376|km2|sqmi|order=flip}}.{{efn|name=ONSArea}} It shares [[Republic of Ireland–United Kingdom border|a land border]] with the [[Republic of Ireland]] and is surrounded by the [[Atlantic Ocean]], the [[North Sea]], the [[English Channel]], the [[Celtic Sea]] and the [[Irish Sea]], while maintaining sovereignty over the [[Crown Dependencies]] and the [[British Overseas Territories]]. The capital and largest city of England and the UK is [[London]]; [[Edinburgh]], [[Cardiff]] and [[Belfast]] are the national capitals of Scotland, Wales and Northern Ireland, respectively. The British Isles have been continuously inhabited since the [[Neolithic]]. In AD&nbsp;43 the [[Roman conquest of Britain]] began. The [[end of Roman rule in Britain|Roman departure]] between 383 and 410 was followed by [[Anglo-Saxon settlement of Britain|Anglo-Saxon settlement]] beginning around 450. In 1066 the [[Norman Conquest|Normans conquered England]]. Over the 17th century the role of the [[British monarchy]] was reduced, particularly as a result of the [[English Civil War]]. In 1707 the Kingdom of England and the [[Kingdom of Scotland]] united under the [[Treaty of Union]] to create the [[Kingdom of Great Britain]]. The [[Acts of Union 1800]] incorporated the [[Kingdom of Ireland]] to create the [[United Kingdom of Great Britain and Ireland]] in 1801. Most of Ireland [[Partition of Ireland|seceded]] from the UK in 1922 as the [[Irish Free State]], and the [[Royal and Parliamentary Titles Act 1927]] created the present United Kingdom. The UK [[History of industrialisation#Industrial Revolution in Europe|became the first industrialised country]] and was the world's [[foremost power]] for the majority of the 19th and early 20th centuries, particularly during the ''[[Pax Britannica]]'' between 1815 and 1914. The [[British Empire]] was the leading [[economic power]] for most of the 19th century, a position supported by [[British Agricultural Revolution|its agricultural prosperity]], its role as a dominant [[trading nation]], a massive industrial capacity, [[List of British innovations and discoveries in the 19th century|significant technological achievements]], and the rise of [[19th-century London]] as the world's principal financial centre. At its height in the 1920s, the empire encompassed around a quarter of the world's landmass and population, and was the [[List of largest empires#Empires at their greatest extent|largest in history]]. However, [[History of the United Kingdom during the First World War|its involvement in the First World War]] and [[Military history of the United Kingdom during World War II|in the Second World War]] damaged [[Economy of the British Empire|Britain's economic power]], and a global wave of [[decolonisation]] led to the independence of most British colonies. The UK is a [[constitutional monarchy]] and [[parliamentary democracy]]{{Efn|The United Kingdom does not have a codified constitution but an unwritten one formed of Acts of Parliament, court judgments, traditions, and conventions.<ref>{{Citation |title=What is the UK Constitution? |date=9 August 2018 |url=https://www.ucl.ac.uk/constitution-unit/what-uk-constitution/what-uk-constitution |publisher=The Constitution Unit of UCL |access-date=6 February 2020 |archive-date=7 November 2018 |archive-url=https://web.archive.org/web/20181107060057/http://www.ucl.ac.uk/constitution-unit/whatis/uk-constitution |url-status=live}}</ref>}} with three distinct jurisdictions: [[English law|England and Wales]], [[Scots law|Scotland]], and [[Law of Northern Ireland|Northern Ireland]]. Scotland, Wales and Northern Ireland have their own governments and parliaments which control various [[Devolution in the United Kingdom|devolved]] matters. A [[developed country]] with [[Economy of the United Kingdom|an advanced economy]], the UK ranks amongst the [[List of countries by GDP (nominal)|largest economies by nominal GDP]] and is one of the world's [[List of countries by exports|largest exporters]] and [[List of countries by imports|importers]]. As a [[nuclear state]] with one of the [[List of countries by military expenditures|highest defence budgets]], the UK maintains [[British Armed Forces|one of the strongest militaries in Europe]]. [[Culture of the United Kingdom|British culture]] is globally influential, notably in the [[Anglosphere]] and [[Commonwealth of Nations|the Commonwealth]]; [[Anglicisation|its soft power influence]] is observable in the legal and political systems of many [[List of countries that have gained independence from the United Kingdom|former colonies]], and in its exports [[English-speaking world|of language]], [[British literature|literature]], [[Theatre of the United Kingdom|theatre]], [[Cinema of the United Kingdom|cinema]], [[Music of the United Kingdom|music]], [[Art of the United Kingdom|art]] and [[Sport in the United Kingdom|sport]]. A [[great power]], the UK is part of [[Foreign relations of the United Kingdom#International organisations|numerous international organisations]]. == Etymology and terminology == {{Anchor|Etymology}}<!--linked--> {{See also|Britain (place name)|Terminology of the British Isles}} The [[Acts of Union 1707]] declared that the [[Kingdom of England]] and the [[Kingdom of Scotland]] were "United into One Kingdom by the Name of Great Britain".{{Efn|Compare to section 1 of both of the 1800 [[Acts of Union (1800)|Acts of Union]] which reads: "the kingdoms of Great Britain and Ireland shall{{spaces}}... be united into one kingdom, by the name of the United Kingdom of Great Britain and Ireland".}}<ref name="Acts of Union 1707">{{Cite web |title=The Treaty (act) of the Union of Parliament 1706 |url=http://www.scotshistoryonline.co.uk/union.html |archive-url=https://web.archive.org/web/20190527074630/http://www.scotshistoryonline.co.uk/union.html |archive-date=27 May 2019 |access-date=23 August 2011 |publisher=Scots History Online |postscript=;}} {{Cite book |last1=Barnett, Hilaire |url=https://books.google.com/books?id=LYc1tSYonrQC&pg=PA165 |title=Constitutional & Administrative Law |last2=Jago, Robert |publisher=Routledge |year=2011 |isbn=978-0-415-56301-7 |edition=8th |location=Abingdon |page=165 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140722/https://books.google.com/books?id=LYc1tSYonrQC&pg=PA165 |url-status=live}}</ref> The term "United Kingdom" has occasionally been used for the former [[Kingdom of Great Britain]], although its official name from 1707 to 1800 was simply "Great Britain".<ref>"After the political union of England and Scotland in 1707, the nation's official name became 'Great Britain{{'"}}, ''The American Pageant, Volume 1'', Cengage Learning (2012); "From 1707 until 1801 ''Great Britain'' was the official designation of the kingdoms of England and Scotland". ''The Standard Reference Work: For the Home, School and Library, Volume 3'', Harold Melvin Stanford (1921); "In 1707, on the union with Scotland, 'Great Britain' became the official name of the British Kingdom, and so continued until the union with Ireland in 1801". ''United States Congressional serial set, Issue 10; Issue 3265'' (1895); {{Cite web |last=Gascoigne, Bamber |author-link=Bamber Gascoigne |title=History of Great Britain (from 1707) |url=http://www.historyworld.net/wrldhis/PlainTextHistories.asp?historyid=ab07 |access-date=18 July 2011 |publisher=History World |archive-date=27 May 2019 |archive-url=https://web.archive.org/web/20190527205230/http://www.historyworld.net/wrldhis/PlainTextHistories.asp?historyid=ab07 |url-status=live}}</ref> The [[Acts of Union 1800]] formed the [[United Kingdom of Great Britain and Ireland]]. Following the [[partition of Ireland]] and the independence of the [[Irish Free State]] in 1922, which left [[Northern Ireland]] as the only part of the island of Ireland within the United Kingdom, the name was changed in 1927 to the "United Kingdom of Great Britain and Northern Ireland".<ref>{{Cite book |last=Cottrell, P. |url=https://archive.org/details/irishcivilwar00cott_573 |title=The Irish Civil War 1922–23 |year=2008 |isbn=978-1-84603-270-7 |page=[https://archive.org/details/irishcivilwar00cott_573/page/n85 85] |publisher=Bloomsbury USA |url-access=limited}}</ref> Although the United Kingdom is a sovereign country, England, Scotland, Wales and Northern Ireland are widely referred to as [[Countries of the United Kingdom|countries]].<ref>{{Citation |last1=S. Dunn |title=An Alphabetical Listing of Word, Name and Place in Northern Ireland and the Living Language of Conflict |year=2000 |place=[[Lewiston, New York]] |publisher=[[Edwin Mellen Press]] |quote=One specific problem – in both general and particular senses – is to know what to call Northern Ireland itself: in the general sense, it is not a country, or a province, or a state – although some refer to it contemptuously as a statelet: the least controversial word appears to be jurisdiction, but this might change. |last2=H. Dawson |postscript=;}} {{Cite web |date=15 December 2011 |title=Changes in the list of subdivision names and code elements |url=http://www.iso.org/iso/iso_3166-2_newsletter_ii-3_2011-12-13.pdf |access-date=28 May 2012 |website=ISO 3166-2 |publisher=International Organization for Standardization |archive-date=19 September 2016 |archive-url=https://web.archive.org/web/20160919073956/http://www.iso.org/iso/iso_3166-2_newsletter_ii-3_2011-12-13.pdf |url-status=live}}</ref> The UK Prime Minister's website has used the phrase "countries within a country" to describe it.<ref name="page823">{{Cite web |date=10 January 2003 |title=Countries within a country |url=http://www.number10.gov.uk/Page823 |archive-url=http://webarchive.nationalarchives.gov.uk/20080909013512/http://www.number10.gov.uk/Page823 |archive-date=9 September 2008 |access-date=8 March 2015 |publisher=Prime Minister's Office}}</ref> Some statistical summaries, such as those for the twelve [[NUTS of the United Kingdom|NUTS 1 regions]], refer to Scotland, Wales and Northern Ireland as "regions".<ref>{{Cite web |title=Statistical bulletin: Regional Labour Market Statistics |url=http://www.ons.gov.uk/ons/dcp171778_346117.xml |archive-url=https://web.archive.org/web/20141224045523/http://www.ons.gov.uk/ons/dcp171778_346117.xml |archive-date=24 December 2014 |access-date=5 March 2014 |postscript=;}} {{Cite web |title=13.4% Fall In Earnings Value During Recession |url=http://www.gmb.org.uk/newsroom/fall-in-earnings-value-during-recession |archive-url=https://web.archive.org/web/20140103194604/http://www.gmb.org.uk/newsroom/fall-in-earnings-value-during-recession |archive-date=3 January 2014 |access-date=5 March 2014}}</ref> Northern Ireland is also referred to as a "province".<ref>{{Cite book |last1=Dunn, Seamus |title=An Alphabetical Listing of Word, Name and Place in Northern Ireland and the Living Language of Conflict |last2=Dawson, Helen |publisher=[[Edwin Mellen Press]] |year=2000 |isbn=978-0-7734-7711-7 |location=[[Lewiston, New York]] |postscript=;}} {{Cite book |last=Murphy, Dervla |title=[[A Place Apart (Murphy book)|A Place Apart]] |publisher=Penguin |year=1979 |isbn=978-0-14-005030-1 |location=London}}</ref> With regard to Northern Ireland, the descriptive name used "can be controversial, with the choice often revealing one's political preferences".<ref>{{Cite book |last1=Whyte |first1=John |title=Interpreting Northern Ireland |last2=FitzGerald |first2=Garret |publisher=Clarendon Press |year=1991 |isbn=978-0-19-827380-6 |location=Oxford |author-link=John Henry Whyte |author-link2=Garret FitzGerald}}</ref> The term "Great Britain" conventionally refers to the island of Great Britain, or politically to England, Scotland and Wales in combination.<ref>{{Cite news |date=19 December 2008 |title=Guardian Unlimited Style Guide |publisher=Guardian News and Media Limited |location=London |url=https://www.theguardian.com/styleguide/page/0,,184840,00.html |access-date=23 August 2011 |postscript=;}} {{Cite news |date=19 August 2002 |title=BBC style guide (Great Britain) |work=BBC News |url=http://news.bbc.co.uk/1/hi/programmes/radio_newsroom/1099593.stm#g |access-date=23 August 2011 |archive-date=15 February 2009 |archive-url=https://web.archive.org/web/20090215074832/http://news.bbc.co.uk/1/hi/programmes/radio_newsroom/1099593.stm#g |url-status=live |postscript=;}} {{Cite web |title=Key facts about the United Kingdom |url=http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012517 |archive-url=http://webarchive.nationalarchives.gov.uk/20121015000000/http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012517 |archive-date=15 October 2012 |access-date=8 March 2015 |website=Government, citizens and rights |publisher=HM Government}}</ref> It is sometimes used as a loose synonym for the United Kingdom as a whole.<ref>[[New Oxford American Dictionary]]: "Great Britain: England, Wales, and Scotland considered as a unit. The name is also often used loosely to refer to the United Kingdom."</ref> The word ''England'' is occasionally used incorrectly to refer to the United Kingdom as a whole, a mistake principally made by people from outside the UK.<ref>"When people say England, they sometimes mean Great Britain, sometimes the United Kingdom, sometimes the British Isles — but never England." — {{Citation |last=George Mikes |title=How To Be An Alien |year=1946 |publisher=Penguin}} {{ISBN|978-0-582-41686-4|postscript=;}} {{Cite web |title=England OR United Kingdom (UK)? {{!}} Vocabulary {{!}} EnglishClub |url=https://www.englishclub.com/vocabulary/cw-uk-england.htm |access-date=16 October 2022 |website=englishclub.com |archive-date=16 October 2022 |archive-url=https://web.archive.org/web/20221016192638/https://www.englishclub.com/vocabulary/cw-uk-england.htm |url-status=live}}</ref> The term "Britain" is used as a synonym for [[Great Britain]],<ref>{{Cite web |title=Britain Meaning in the Cambridge English Dictionary |url=https://dictionary.cambridge.org/dictionary/english/britain |website=dictionary.cambridge.org |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024348/https://dictionary.cambridge.org/dictionary/english/britain |url-status=live |postscript=;}} {{Cite web |title=Definition of Britain in English by Oxford Dictionaries |url=https://en.oxforddictionaries.com/definition/britain |archive-url=https://web.archive.org/web/20160926204707/https://en.oxforddictionaries.com/definition/britain |archive-date=26 September 2016 |website=Oxford Dictionaries – English}}</ref><ref name="Britain-Col">{{Cite web |title=Britain definition and meaning |url=https://www.collinsdictionary.com/dictionary/english/britain |website=collinsdictionary.com |publisher=Collins English Dictionary |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024837/https://www.collinsdictionary.com/dictionary/english/britain |url-status=live}}</ref> but also sometimes for the United Kingdom.<ref>{{Cite web |title=Britain – Definition for English-Language Learners |url=http://learnersdictionary.com/definition/Britain |website=learnersdictionary.com |publisher=Merriam-Webster's Learner's Dictionary |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024648/http://learnersdictionary.com/definition/Britain |url-status=live}}</ref><ref name="Britain-Col" /> Usage is mixed: the [[style guide]] of the [[Government of the United Kingdom|UK Government]] prefers the term "UK" rather than "Britain" or "British" (except when referring to embassies{{Efn|"UK" embassies became "British" embassies in 1961.<ref>{{Cite news |date=21 October 1961 |title='Cold U.K.' Becomes British |work=[[The Times]] |page=8}}</ref>}}),<ref>{{Cite web |date=21 November 2024 |orig-date=23 February 2016 |title=Style guide: A to Z |url=https://www.gov.uk/guidance/style-guide/a-to-z |url-status=live |archive-url=https://web.archive.org/web/20241122222025/https://www.gov.uk/guidance/style-guide/a-to-z |archive-date=22 November 2024 |publisher=UK Government}}</ref> while other government documents acknowledge that both terms refer to the United Kingdom and that elsewhere "British government" is used at least as frequently as "United Kingdom government".<ref name="PCGN-uk-guide">{{Cite web |last=Permanent Committee on Geographical Names |title=Toponymic guidelines for the United Kingdom |url=https://www.gov.uk/government/publications/toponymic-guidelines |website=gov.uk |date=17 May 2023 |publisher=UK Government |access-date=17 June 2018 |archive-date=17 June 2018 |archive-url=https://web.archive.org/web/20180617165832/https://www.gov.uk/government/publications/toponymic-guidelines |url-status=live}}</ref> The UK [[Permanent Committee on Geographical Names for British Official Use|Permanent Committee on Geographical Names]] recognises "United Kingdom", "UK" and "U.K." as shortened and abbreviated geopolitical terms for the United Kingdom of Great Britain and Northern Ireland in its toponymic guidelines; it does not list "Britain" but notes that "it is only the one specific nominal term 'Great Britain' which invariably excludes Northern Ireland".<ref name="PCGN-uk-guide" /> The [[BBC]] historically preferred to use "Britain" as shorthand only for Great Britain, though the present style guide does not take a position except that "Great Britain" excludes Northern Ireland.<ref>{{Cite web |title=BBC News style guide – Names |url=https://www.bbc.co.uk/academy/en/articles/art20130702112133537 |archive-url=https://web.archive.org/web/20191110082858/https://www.bbc.co.uk/academy/en/articles/art20130702112133537 |archive-date=10 November 2019 |access-date=9 November 2019 |website=BBC Academy |publisher=BBC |postscript=;}} {{Cite web |title=Alphabetical checklist |url=https://www.bbc.co.uk/academy/journalism/news-style-guide/article/art20130702112133551 |archive-url=https://web.archive.org/web/20180326162901/http://www.bbc.co.uk/academy/journalism/news-style-guide/article/art20130702112133551 |archive-date=26 March 2018 |access-date=17 June 2018 |website=BBC News |publisher=BBC}}</ref> The adjective "British" is commonly used to refer to matters relating to the United Kingdom and is used in law to refer to United Kingdom citizenship and [[British nationality law|nationality]].<ref>{{Cite book |last1=Bradley, Anthony Wilfred |url=https://books.google.com/books?id=HT_GS2zgN5QC&pg=PA36 |title=Constitutional and administrative law |last2=Ewing, Keith D. |publisher=Pearson Longman |year=2007 |isbn=978-1-4058-1207-8 |edition=14th |volume=1 |location=Harlow |page=36 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140723/https://books.google.com/books?id=HT_GS2zgN5QC&pg=PA36 |url-status=live}}</ref>{{Efn|Historically, the term ''British'' was used to refer to members and institutions within the British Empire and later Commonwealth and was not limited to the geographical British Isles. The UK Government adopted the term for its exclusive use only in 1961, but in recognition of its wider usage first sought the prior consent of Australia, Canada and New Zealand.<ref>{{Cite book |last1=Curran |first1=James |title=The Unknown Nation: Australia after Empire |last2=Ward |first2=Stuart |date=2010 |publisher=Melbourne University Publishing |isbn=978-0-522-85645-3 |location=Carlton, Vic |pages=26–7}}</ref><ref>{{Cite book |last=Ward |first=Stuart |title=Untied kingdom: A Global History of the End of Britain |date=2023 |publisher=Cambridge University Press |isbn=978-1-107-14599-3 |at=Chapter 1}}</ref>}} People of the United Kingdom use several different terms to describe their national identity and may identify themselves as being [[British people|British]], [[English people|English]], [[Scottish people|Scottish]], [[Welsh people|Welsh]], [[People of Northern Ireland|Northern Irish]] or [[Irish people|Irish]];<ref>{{Cite web |year=2010 |title=Which of these best describes the way you think of yourself? |url=http://www.ark.ac.uk/nilt/2010/Community_Relations/NINATID.html |access-date=1 July 2010 |website=Northern Ireland Life and Times Survey 2010 |publisher=ARK&nbsp;– Access Research Knowledge |archive-date=23 September 2015 |archive-url=https://web.archive.org/web/20150923175111/http://www.ark.ac.uk/nilt/2010/Community_Relations/NINATID.html |url-status=live}}</ref> or as having a combination of different national identities.<ref>{{Cite web |title=Ethnicity and National Identity in England and Wales |url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/ethnicity/articles/ethnicityandnationalidentityinenglandandwales/2012-12-11 |access-date=25 June 2020 |website=Office for National Statistics |archive-date=21 January 2022 |archive-url=https://web.archive.org/web/20220121012603/https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/ethnicity/articles/ethnicityandnationalidentityinenglandandwales/2012-12-11 |url-status=live |postscript=;}} {{Cite book |last=Schrijver, Frans |url=https://books.google.com/books?id=u8gZklxHTMUC&pg=PA275 |title=Regionalism after regionalisation: Spain, France and the United Kingdom |publisher=Amsterdam University Press |year=2006 |isbn=978-90-5629-428-1 |pages=275–277 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140905/https://books.google.com/books?id=u8gZklxHTMUC&pg=PA275#v=onepage&q&f=false |url-status=live}}</ref> == History == {{Main|Formation of the United Kingdom of Great Britain and Northern Ireland|History of the British Isles}} {{Further|History of the constitution of the United Kingdom|Timeline of British history}} === Prior to the Treaty of Union === {{Main|History of England|History of Wales|History of Scotland|History of Ireland}} {{further|Kingdom of England|Kingdom of Scotland}} [[File:Stonehenge2007 07 30.jpg|thumb|[[Stonehenge]] in [[Wiltshire]] is a ring of stones, each about {{Cvt|13|ft|0|order=flip}} high, {{Cvt|7|ft|0|order=flip}} wide and 25 [[tonne]]s, erected 2400–2200&nbsp;BC.]] Settlement by [[Cro-Magnons]] of what was to become the United Kingdom occurred in waves beginning by about 30,000 years ago.<ref>[http://news.bbc.co.uk/1/hi/wales/south_west/7069001.stm "Ancient skeleton was 'even older'] {{Webarchive|url=https://web.archive.org/web/20210213081240/http://news.bbc.co.uk/2/hi/uk_news/wales/south_west/7069001.stm |date=13 February 2021}}". [[BBC News]]. 30 October 2007. Retrieved 27 April 2011.</ref> The island has been continuously inhabited since the last retreat of ice around 11,500 years ago.<ref>{{Cite web |date=9 February 2018 |title=A 12,000-year story - revealing the history of settlers in Britain from the end of the Ice Age to the present day {{!}} University of Oxford |url=https://www.ox.ac.uk/news/2018-02-09-12000-year-story-revealing-history-settlers-britain-end-ice-age-present-day |access-date=6 July 2025 |website=ox.ac.uk |language=en }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> By the end of the [[Prehistoric Britain|region's prehistoric period]], the population is thought to have belonged largely to a culture termed [[Insular Celts|Insular Celtic]], comprising [[Britons (historical)|Brittonic Britain]] and [[Gaelic Ireland]].<ref>{{Cite book |last=Koch, John T. |url=https://archive.org/details/celticculturehis00koch_128 |title=Celtic culture: A historical encyclopedia |publisher=ABC-CLIO |year=2006 |isbn=978-1-85109-440-0 |location=Santa Barbara, CA |page=[https://archive.org/details/celticculturehis00koch_128/page/n1016 973] |url-access=limited}}</ref> The [[Roman conquest of Britain|Roman conquest]], beginning in AD 43, and the 400-year [[Roman Britain|rule of southern Britain]], was followed by an invasion by [[Germanic peoples|Germanic]] [[Anglo-Saxon]] settlers, reducing the Brittonic area mainly [[Wales#Post-Roman era|to what was to become Wales]], [[Cornwall]] and, until the latter stages of the Anglo-Saxon settlement, the [[Hen Ogledd]] (northern England and parts of southern Scotland).<ref>{{Cite book |title=[[Encyclopaedia of Wales|The Welsh Academy Encyclopaedia of Wales]] |publisher=University of Wales Press |year=2008 |isbn=978-0-7083-1953-6 |editor-last=Davies |editor-first=John |editor-link=John Davies (historian) |location=Cardiff |page=915 |editor-last2=Jenkins |editor-first2=Nigel |editor-link2=Nigel Jenkins |editor-last3=Baines |editor-first3=Menna |editor-last4=Lynch |editor-first4=Peredur I. |editor-link4=Peredur Lynch}}</ref> Most of the [[Anglo-Saxon England|region settled by the Anglo-Saxons]] became unified as the Kingdom of England in the 10th century.<ref>{{Cite magazine |title=Short Athelstan biography |url=https://www.bbc.co.uk/history/historic_figures/athelstan.shtml |magazine=BBC History |access-date=9 April 2013 |archive-date=13 February 2007 |archive-url=https://web.archive.org/web/20070213191353/http://www.bbc.co.uk/history/historic_figures/athelstan.shtml |url-status=live}}</ref> [[Dál Riata|Gaelic speakers in north-west Britain]] (with connections to the north-east of Ireland and traditionally supposed to have migrated from there in the 5th century)<ref>{{Cite book |last=Mackie, J.D. |url=https://archive.org/details/historyofscotlan00mack_0/page/18 |title=A History of Scotland |publisher=Penguin |year=1991 |isbn=978-0-14-013649-4 |location=London |pages=[https://archive.org/details/historyofscotlan00mack_0/page/18 18–19] |author-link=J.D. Mackie |postscript=;}} {{Cite book |last=Campbell |first=Ewan |title=Saints and Sea-kings: The First Kingdom of the Scots |publisher=Canongate |year=1999 |isbn=978-0-86241-874-8 |location=Edinburgh |pages=8–15}}</ref> united with the [[Picts]] to create the [[Kingdom of Scotland]] in the 9th century.<ref>{{Cite book |last=Haigh |first=Christopher |url=https://archive.org/details/cambridgehistori0000unse_a9n8/page/30 |title=The Cambridge Historical Encyclopedia of Great Britain and Ireland |publisher=Cambridge University Press |year=1990 |isbn=978-0-521-39552-6 |page=[https://archive.org/details/cambridgehistori0000unse_a9n8/page/30 30]}}</ref> [[File:Roman Baths in Bath Spa, England - July 2006.jpg|alt=Photograph of the Baths showing a rectangular area of greenish water surrounded by yellow stone buildings with pillars. In the background is the tower of the abbey.|thumb|The [[Roman Baths (Bath)|Roman Baths]] in [[Bath, Somerset]], are a well-preserved ''[[thermae]]'' from [[Roman Britain]].]] In 1066 the [[Normans]] invaded England from northern France. After [[Norman conquest of England|conquering England]] they seized [[Norman invasion of Wales|large parts of Wales]], [[Norman invasion of Ireland|conquered much of Ireland]] and were invited to settle in Scotland, bringing to each country [[feudalism]] on the Northern French model and [[Norman-French]] culture.<ref>{{Cite book |last=Ganshof, F.L. |url=https://archive.org/details/feudalism0000gans_j4b5 |title=Feudalism |publisher=University of Toronto |year=1996 |isbn=978-0-8020-7158-3 |page=165 |url-access=registration}}</ref> The [[Anglo-Normans|Anglo-Norman]] [[ruling class]] greatly influenced, but eventually assimilated with, the local cultures.<ref>{{Cite book |last=Chibnall, Marjorie |url=https://books.google.com/books?id=qJl5Jm-IndUC&pg=PA115 |title=The Debate on the Norman Conquest |publisher=Manchester University Press |year=1999 |isbn=978-0-7190-4913-2 |pages=115–122 |author-link=Marjorie Chibnall |access-date=20 March 2023 |archive-date=26 March 2023 |archive-url=https://web.archive.org/web/20230326164802/https://books.google.com/books?id=qJl5Jm-IndUC&pg=PA115 |url-status=live}}</ref> Subsequent [[House of Plantagenet|medieval English kings]] completed the [[conquest of Wales]] and tried unsuccessfully [[Wars of Scottish Independence|to annex Scotland]]. Asserting its independence in the 1320 [[Declaration of Arbroath]], Scotland maintained its independence thereafter, albeit in [[Anglo-Scottish Wars|near-constant conflict with England]].<ref>{{Cite web |date=3 June 2023 |title=The Declaration of Arbroath |url=https://www.nms.ac.uk/past-exhibitions/the-declaration-of-arbroath |access-date=6 July 2025 |website=NMS |language=en}}</ref> In 1215 [[Magna Carta]] was the first document to state that no government was above the law and that citizens have rights protecting them.<ref>{{Cite web |title=Magna Carta |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/ |access-date=27 May 2024 |publisher=parliament.uk}} {{Cite web |title=The contents of Magna Carta |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/magnacartaclauses/ |access-date=27 May 2024 |publisher=parliament.uk |archive-date=28 August 2022 |archive-url=https://web.archive.org/web/20220828101448/https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/magnacartaclauses/ |url-status=live}} {{Cite web |title=Magna Carta Key Facts |url=https://www.britannica.com/summary/Magna-Carta-Key-Facts |access-date=27 May 2024 |publisher=Britannica |archive-date=27 May 2024 |archive-url=https://web.archive.org/web/20240527191804/https://www.britannica.com/summary/Magna-Carta-Key-Facts |url-status=live}}</ref> The English monarchs, through inheritance of [[Angevin Empire|substantial territories in France]] and claims to the French crown, were also heavily involved in conflicts in France, most notably the [[Hundred Years' War]], while the [[List of Scottish monarchs|Kings of Scots]] were in [[Auld Alliance|an alliance with the French]] during this period.<ref>Keen, Maurice. [https://www.bbc.co.uk/history/british/middle_ages/hundred_years_war_01.shtml "The Hundred Years' War"] {{Webarchive|url=https://web.archive.org/web/20131214092949/http://www.bbc.co.uk/history/british/middle_ages/hundred_years_war_01.shtml |date=14 December 2013 }}. BBC History.</ref> [[Early modern Britain]] saw religious conflict resulting from the [[Reformation]] and the introduction of [[Protestant]] state churches in each country.<ref>[https://www.britannica.com/EBchecked/topic/479892/Protestantism/41558/The-Reformation-in-England-and-Scotland The Reformation in England and Scotland] {{Webarchive|url=https://web.archive.org/web/20150515015218/https://www.britannica.com/EBchecked/topic/479892/Protestantism/41558/The-Reformation-in-England-and-Scotland |date=15 May 2015 }} and [https://www.britannica.com/EBchecked/topic/293754/Ireland/22978/The-Reformation-period Ireland: The Reformation Period & Ireland under Elizabeth I] {{Webarchive|url=https://web.archive.org/web/20150521133445/http://www.britannica.com/EBchecked/topic/293754/Ireland/22978/The-Reformation-period |date=21 May 2015 }}, Encyclopædia Britannica Online.</ref> The [[English Reformation]] ushered in political, constitutional, social and cultural change in the 16th century and [[State religion|established]] the [[Church of England]]. It defined a national identity for England and slowly, but profoundly, changed people's religious beliefs.<ref>{{Cite web |title=English Reformation c1527-1590 |url=https://www.nationalarchives.gov.uk/education/resources/the-english-reformation-c1527-1590/ |access-date=20 January 2023 |website=The National Archives |archive-date=2 December 2022 |archive-url=https://web.archive.org/web/20221202002512/https://www.nationalarchives.gov.uk/education/resources/the-english-reformation-c1527-1590/ |url-status=live}}</ref> Wales was [[Laws in Wales Acts 1535 and 1542|fully incorporated into the Kingdom of England]],<ref>{{Cite magazine |date=5 November 2009 |title=British History in Depth&nbsp;– Wales under the Tudors |url=https://www.bbc.co.uk/history/british/tudors/wales_tudors_01.shtml |magazine=BBC History |access-date=21 September 2010 |archive-date=7 February 2012 |archive-url=https://web.archive.org/web/20120207145836/http://www.bbc.co.uk/history/british/tudors/wales_tudors_01.shtml |url-status=live}}</ref> and Ireland was constituted as a kingdom in personal union with the English crown.<ref>{{Cite book |last=Nicholls |first=Mark |url=https://archive.org/details/historyofmodernb0000nich |title=A history of the modern British Isles, 1529–1603: The two kingdoms |publisher=Blackwell |year=1999 |isbn=978-0-631-19334-0 |location=Oxford |pages=171–172 |url-access=registration}}</ref> During the [[Plantation of Ulster]] in the 17th century, the lands of the Catholic Gaelic nobility were confiscated by the Crown and granted to Protestant settlers from England and Scotland.<ref>{{Cite book |last=Canny |first=Nicholas P. |url=https://archive.org/details/makingirelandbri00cann |title=Making Ireland British, 1580–1650 |publisher=Oxford University Press |year=2003 |isbn=978-0-19-925905-2 |pages=189–200 |url-access=registration}}</ref> [[File:Bayeux Tapestry WillelmDux.jpg|thumb|The [[Bayeux Tapestry]] depicts the [[Battle of Hastings]], 1066, and the events leading to it.]] The [[Union of the Crowns]] occurred in 1603 when [[James VI of Scotland]] inherited the thrones of England and Ireland, subsequently moving his court from Edinburgh to London. Although unified under a single monarch, the three realms remained entirely separate political entities, preserving their respective parliaments, judicial systems, and established churches.<ref>Ross, D. (2002). ''[[iarchive:chronologyofscot0000ross|Chronology of Scottish History]]''. Glasgow: Geddes & Grosset. p. 56. {{ISBN|978-1-85534-380-1}}; Hearn, J. (2002). ''Claiming Scotland: National Identity and Liberal Culture''. Edinburgh University Press. p. 104. {{ISBN|978-1-902930-16-9}}.</ref> In the mid-17th century, all three kingdoms [[Wars of the Three Kingdoms|were involved in a series of connected wars]] (including the [[English Civil War]]) which led to the temporary overthrow of the monarchy, with [[Execution of Charles I|the execution]] of [[Charles I of England|King Charles I]], and the establishment of the short-lived [[unitary republic]] of the [[Commonwealth of England]], Scotland and Ireland.<ref>{{Cite encyclopedia |title=English Civil Wars |encyclopedia=Encyclopædia Britannica |url=https://www.britannica.com/EBchecked/topic/187936/English-Civil-Wars |access-date=28 April 2013 |archive-date=2 May 2015 |archive-url=https://web.archive.org/web/20150502204708/https://www.britannica.com/EBchecked/topic/187936/English-Civil-Wars |url-status=live}}; {{Cite web |date=14 March 2010 |title=Scotland and the Commonwealth: 1651–1660 |url=http://www.archontology.org/nations/uk/scotland/01_laws.php |access-date=9 March 2015 |publisher=Archontology.org |archive-date=16 July 2012 |archive-url=https://web.archive.org/web/20120716194016/http://www.archontology.org/nations/uk/scotland/01_laws.php |url-status=live}}</ref> Although the [[Restoration (1660)|monarchy was restored]], the [[Interregnum (1649–1660)|Interregnum]] along with the [[Glorious Revolution]] of 1688 and the subsequent [[Bill of Rights 1689]] in England and [[Claim of Right Act 1689]] in Scotland ensured that, unlike much of the rest of Europe, [[royal absolutism]] would not prevail, and a professed Catholic could never accede to the throne. The [[British constitution]] would develop on the basis of [[constitutional monarchy]] and the [[parliamentary system]].<ref>{{Cite book |last=Lodge |first=Richard |url=https://books.google.com/books?id=EBSpvBxGyqcC |title=The History of England&nbsp;– From the Restoration to the Death of William III (1660–1702) |publisher=Read Books |year=2007 |isbn=978-1-4067-0897-4 |page=8 |orig-date=1910 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140723/https://books.google.com/books?id=EBSpvBxGyqcC |url-status=live}}</ref> With the founding of the [[Royal Society]] in 1660, science was greatly encouraged. During this period, particularly in England, the development of [[English navy|naval power]] and the interest in [[Age of Discovery|voyages of discovery]] led to the acquisition and settlement of overseas colonies, particularly in North America and the Caribbean.<ref>{{Cite web |title=Tudor Period and the Birth of a Regular Navy |url=http://www.royal-navy.org/lib/index.php?title=Tudor_Period_and_the_Birth_of_a_Regular_Navy_Part_Two |archive-url=https://web.archive.org/web/20111103013901/http://www.royal-navy.org/lib/index.php?title=Tudor_Period_and_the_Birth_of_a_Regular_Navy_Part_Two |archive-date=3 November 2011 |access-date=8 March 2015 |website=Royal Navy History |url-status=usurped |publisher=Institute of Naval History}}; {{Cite book |last=Canny |first=Nicholas |url=https://books.google.com/books?id=eQHSivGzEEMC |title=The Origins of Empire, The Oxford History of the British Empire Volume I |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924676-2 |ref=refOHBEv1 |access-date=29 September 2020 |archive-date=11 January 2023 |archive-url=https://web.archive.org/web/20230111135256/https://books.google.com/books?id=eQHSivGzEEMC |url-status=live}}</ref> Though previous attempts at uniting the two kingdoms within Great Britain in 1606, 1667 and 1689 had proved unsuccessful, the attempt initiated in 1705 led to the [[Treaty of Union]] of 1706 being agreed and ratified by both parliaments. {{Clear left}} === Union of England and Scotland === {{Main|Treaty of Union|Kingdom of Great Britain}} [[File:Articles of Union between England and Scotland 28 Jan 1707.png|thumb|right|170px|The [[Treaty of Union]] which unified the [[Kingdom of England]] and [[Kingdom of Scotland]] on 1 May 1707]] On 1 May 1707 the Kingdom of Great Britain was formed, the result of the [[Acts of Union 1707]] between the [[Kingdom of England]] and [[Kingdom of Scotland]].<ref>{{Cite web |title=Articles of Union with Scotland 1707 |url=http://www.nationalarchives.gov.uk/pathways/citizenship/rise_parliament/docs/articles_union.htm |access-date=19 October 2008 |publisher=UK Parliament |archive-date=8 June 2012 |archive-url=https://web.archive.org/web/20120608152446/http://www.nationalarchives.gov.uk/pathways/citizenship/rise_parliament/docs/articles_union.htm |url-status=live}}; {{Cite web |title=Acts of Union 1707 |url=http://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny |access-date=6 January 2011 |publisher=UK Parliament |archive-date=27 December 2010 |archive-url=https://web.archive.org/web/20101227033859/http://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny/ |url-status=live}}; {{Cite web |title=Treaty (act) of Union 1706 |url=http://www.scotshistoryonline.co.uk/union.html |archive-url=https://web.archive.org/web/20190527074630/http://www.scotshistoryonline.co.uk/union.html |archive-date=27 May 2019 |access-date=3 February 2011 |publisher=Scottish History online}}</ref> In the 18th century cabinet government developed under [[Robert Walpole]], who is considered the ''[[de facto]]'' first [[Prime Minister of the United Kingdom|prime minister]] from 1721 to 1742. A series of [[Jacobite uprisings]] sought to remove the Protestant [[House of Hanover]] from the throne and restore the Catholic [[House of Stuart]]. In 1746, the Jacobites were defeated at the [[Battle of Culloden]], after which the [[Scottish Highlanders]] were forcibly assimilated into Scotland by revoking the feudal independence of [[Scottish clan chief|clan chiefs]]. The British colonies in North America that broke away in the [[American Revolutionary War|American War of Independence]] became the [[United States]]. British imperial ambition turned towards Asia, particularly to [[British Raj|India]].<ref>Library of Congress, [https://books.google.com/books?id=BQDgr_XvsHoC&pg=PA73 ''The Impact of the American Revolution Abroad''] {{Webarchive|url=https://web.archive.org/web/20240328140724/https://books.google.com/books?id=BQDgr_XvsHoC&pg=PA73 |date=28 March 2024 }}, p. 73.</ref> British merchants played a leading part in the [[Atlantic slave trade]], mainly between 1662 and 1807 when British or British-colonial [[slave ships]] transported nearly 3.3&nbsp;million slaves from Africa.<ref>{{Cite book |last=Morgan |first=Kenneth |url=https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA12 |title=Slavery and the British Empire: From Africa to America |publisher=Oxford University Press, USA |year=2007 |isbn=978-0-19-156627-1 |page=12 |access-date=5 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141229/https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA12#v=onepage&q&f=false |url-status=live}}</ref> The slaves were taken to [[Plantation economy|work on plantations]], principally [[History of the British West Indies|in the Caribbean]] but also [[British America|in North America]].<ref>{{Cite book |last=Morgan |first=Kenneth |url=https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA15 |title=Slavery and the British Empire: From Africa to America |publisher=Oxford University Press, US |year=2007 |isbn=978-0-19-156627-1 |page=15 |access-date=5 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141229/https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA15#v=onepage&q&f=false |url-status=live}}</ref> However, with pressure from the [[Abolitionism in the United Kingdom|abolitionist movement]], Parliament banned the trade in 1807, banned slavery in the British Empire in 1833, and Britain took a leading role in the movement to abolish slavery worldwide through the [[blockade of Africa]] and pressing other nations to end their trade with a series of treaties.<ref>[https://www.bbc.co.uk/devon/content/articles/2007/03/20/abolition_navy_feature.shtml Sailing against slavery] {{Webarchive|url=https://web.archive.org/web/20081103004954/https://www.bbc.co.uk/devon/content/articles/2007/03/20/abolition_navy_feature.shtml |date=3 November 2008 }}. BBC Devon. 2007.; {{Cite book |last=Lovejoy |first=Paul E. |url=https://archive.org/details/transformationsi0000love/page/290 |title=Transformations in Slavery: A History of Slavery in Africa |publisher=Cambridge University Press |year=2000 |isbn=978-0-521-78012-4 |edition=2nd |location=New York |page=[https://archive.org/details/transformationsi0000love/page/290 290]}}</ref> === United Kingdom of Great Britain and Ireland === {{Main|History of the United Kingdom|Acts of Union 1800|United Kingdom of Great Britain and Ireland}} [[File:Victoria in her Coronation robes.jpg|upright|thumb|[[Queen Victoria|Victoria]] reigned as [[Monarchy of the United Kingdom|Queen of the United Kingdom]] and [[Empress of India]] during the 19th century.]] In 1800, the parliaments of Great Britain and Ireland each passed an Act of Union, uniting the two kingdoms and creating the United Kingdom of Great Britain and Ireland on 1 January 1801.<ref>{{Cite web |title=The Act of Union |url=http://www.actofunion.ac.uk/actofunion.htm#act |archive-url=https://web.archive.org/web/20120415061235/http://www.actofunion.ac.uk/actofunion.htm#act |archive-date=15 April 2012 |access-date=15 May 2006 |publisher=Act of Union Virtual Library}}</ref> After the defeat of France at the end of the [[French Revolutionary Wars]] and [[Napoleonic Wars]] (1792–1815), the United Kingdom emerged as the principal naval and imperial power (with London the [[List of largest cities throughout history|largest city in the world from about 1830]]).<ref>Tellier, L.-N. (2009). ''Urban World History: an Economic and Geographical Perspective''. Quebec: PUQ. p. 463. {{ISBN|978-2-7605-1588-8}}.</ref> [[History of the Royal Navy (after 1707)#Pax Britannica, 1815–1914|Unchallenged at sea]], British dominance was later described as the ''[[Pax Britannica]]'' ("British Peace"), a period of [[International relations of the Great Powers (1814–1919)|relative peace amongst the great powers]] (1815–1914) during which the British Empire became the global [[hegemon]]<ref>{{Cite book |last=Mathias |first=P. |title=The First Industrial Nation: the Economic History of Britain, 1700–1914 |publisher=Routledge |year=2001 |isbn=978-0-415-26672-7 |location=London}}; {{Cite book |last=Ferguson |first=Niall |url=https://archive.org/details/empire00nial |title=Empire: The rise and demise of the British world order and the lessons for global power |publisher=Basic Books |year=2004 |isbn=978-0-465-02328-8 |location=New York |url-access=registration}}</ref><ref>{{Cite encyclopedia |title=20th-century international relations |encyclopedia=[[Encyclopædia Britannica]] |url=https://www.britannica.com/topic/20th-century-international-relations-2085155 |access-date=6 May 2023 |last=McDougall |first=Walter A. |date=4 May 2023 |author-link=Walter A. McDougall |archive-url=https://web.archive.org/web/20190712124130/https://www.britannica.com/topic/20th-century-international-relations-2085155 |archive-date=12 July 2019 |url-status=live}}</ref> and adopted the role of [[global policeman]].<ref>Sondhaus, L. (2004). ''Navies in Modern World History''. London: Reaktion Books. p. 9. {{ISBN|978-1-86189-202-7}}.</ref><ref>{{Cite book |last=Porter |first=Andrew |url=https://books.google.com/books?id=oo3F2X8IDeEC |title=The Nineteenth Century, The Oxford History of the British Empire Volume III |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924678-6 |page=332 |ref=refOHBEv3}}</ref> From 1853 to 1856 Britain took part in the [[Crimean War]], allied with the [[Ottoman Empire]] against [[Russian Empire|Tsarist Russia]].<ref>{{Cite journal |last=Benn |first=David Wedgwood |title=The Crimean War and its lessons for today |journal=[[International Affairs (journal)|International Affairs]] |volume=88 |issue=2 |date=March 2012 |pages=387–391 |jstor=41428613 |publisher=Oxford University Press |doi=10.1111/j.1468-2346.2012.01078.x}}</ref> Following the [[Indian Rebellion of 1857]] the British government led by [[Henry John Temple, 3rd Viscount Palmerston|Lord Palmerston]] assumed [[direct rule]] over [[British Raj|India]]. Alongside the formal control it exerted over its own colonies, British dominance of much of world trade meant that it [[Informal empire|effectively controlled]] the economies of regions such as [[East Asia]] and [[Latin America]].<ref>{{Cite book |last=Porter |first=Andrew |url=https://books.google.com/books?id=oo3F2X8IDeEC |title=The Nineteenth Century, The Oxford History of the British Empire Volume III |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924678-6 |page=8 |ref=refOHBEv3}}; {{Cite book |last=Marshall |first=P.J. |url=https://books.google.com/books?id=S2EXN8JTwAEC |title=The Cambridge Illustrated History of the British Empire |publisher=Cambridge University Press |year=1996 |isbn=978-0-521-00254-7 |pages=156–157 |ref=refMarshall |access-date=29 September 2020 |archive-date=16 January 2023 |archive-url=https://web.archive.org/web/20230116094154/https://books.google.com/books?id=S2EXN8JTwAEC |url-status=live}}</ref> Throughout the [[Victorian era]] (1837–1901) political attitudes favoured [[free trade]] and ''[[laissez-faire]]'' policies. Beginning with the [[Great Reform Act]] in 1832, Parliament gradually [[Reform Acts|widened the voting franchise]], with the [[Representation of the People Act 1884|1884 Reform Act]] championed by [[William Ewart Gladstone|William Gladstone]] granting [[suffrage]] to a majority of males for the first time. The British population increased at a dramatic rate, accompanied by rapid [[urbanisation]], causing significant social and economic stresses.<ref>{{Cite book |last=Tompson |first=Richard S. |url=https://books.google.com/books?id=H5kcJqmXk2oC&pg=PA63 |title=Great Britain: a reference guide from the Renaissance to the present |publisher=Facts on File |year=2003 |isbn=978-0-8160-4474-0 |location=New York |page=63}}</ref> By the late 19th century, [[Conservative Party (UK)|Conservative governments]] under [[Benjamin Disraeli]] and [[Robert Gascoyne-Cecil, 3rd Marquess of Salisbury|Lord Salisbury]] accelerated [[Scramble for Africa|imperial expansion in Africa]], sustained a foreign policy of "[[splendid isolation]]" from European alliances, and intensified strategic containment of the [[Russian Empire]] in [[Central Asia]], a competition known as the [[Great Game]].<ref>{{Cite journal |last=Fromkin |first=David |date=1980 |title=The Great Game in Asia |url=https://www.jstor.org/stable/20040512 |journal=Foreign Affairs |volume=58 |issue=4 |pages=936–951 |doi=10.2307/20040512 |jstor=20040512 |issn=0015-7120 |access-date=4 June 2023 |archive-date=12 April 2021 |archive-url=https://web.archive.org/web/20210412053528/https://www.jstor.org/stable/20040512 |url-status=live |url-access=subscription}}</ref> During this time, [[Canada]], [[Australia]] and [[New Zealand]] were granted self-governing [[dominion]] status.<ref>{{Cite book |last=Hosch, William L. |title=World War I: People, Politics, and Power |publisher=Britannica Educational Publishing |year=2009 |isbn=978-1-61530-048-8 |series=America at War |location=New York |page=21}}</ref> At the turn of the 20th century, Britain's industrial dominance became challenged by the [[German Empire]] and the [[United States]].<ref>{{Cite book |last=Zarembka |first=Paul |url=https://books.google.com/books?id=NSrwpggmHigC&pg=PP1 |title=Contradictions: Finance, Greed, and Labor Unequally Paid |date=2013 |publisher=Emerald Group Publishing |isbn=978-1-78190-670-5 |access-date=21 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141231/https://books.google.com/books?id=NSrwpggmHigC&pg=PP1#v=onepage&q&f=false |url-status=live}}</ref> The [[Edwardian era]] (1901–1910) saw [[Liberal welfare reforms|social reform]] and [[Irish Home Rule movement|home rule for Ireland]] become important domestic issues, while the [[Labour Party (UK)|Labour Party]] emerged from an alliance of [[Trade unions in the United Kingdom|trade unions]] and small socialist groups in 1900, and [[suffragettes]] campaigned for women's right to vote.<ref>Sophia A. Van Wingerden, ''The women's suffrage movement in Britain, 1866–1928'' (1999) ch 1.</ref> === World wars and partition of Ireland === {{Main|History of the United Kingdom during the First World War|Partition of Ireland|Interwar Britain|United Kingdom home front during the Second World War|Military history of the United Kingdom during World War II}} [[File:Wreaths Are Laid at the Cenotaph, London During Remembrance Sunday Service MOD 45152052.jpg|thumb|Wreaths being laid during the [[Remembrance Sunday]] service at the [[The Cenotaph|Cenotaph]] in [[Whitehall]], London]] [[File:Spitfire and Hurricane in the Battle of Britain Memorial Flight.jpg|thumb|A [[Supermarine Spitfire|Spitfire]] and a [[Hawker Hurricane|Hurricane]] as flown in the [[Battle of Britain]] during the [[Second World War]]]] Britain was one of the principal [[Allies of World War I|Allies]] that defeated the [[Central Powers]] in the [[First World War]] (1914–1918). Alongside their French, Russian and (after 1917) American counterparts,<ref>Turner, John (1988). ''Britain and the First World War''. London: Unwin Hyman. pp. 22–35. {{ISBN|978-0-04-445109-9}}.</ref> British armed forces were engaged across much of the British Empire and in several regions of Europe, particularly on the [[Western Front (World War I)|Western Front]].<ref name="Westwell&Cove" /> The high fatalities of [[trench warfare]] caused the loss of much of a generation of men, with lasting social effects in the nation and a great disruption in the social order. Britain had suffered 2.5&nbsp;million casualties and finished the war with a huge national debt.<ref name="Westwell&Cove">Westwell, I.; Cove, D. (eds) (2002). ''History of World War I, Volume 3''. London: Marshall Cavendish. pp. 698, 705. {{ISBN|978-0-7614-7231-5}}.</ref> The consequences of the war persuaded the government to expand the right to vote in national and local elections to all adult men and most adult women with the [[Representation of the People Act 1918]].<ref name="Westwell&Cove" /> After the war Britain became a permanent member of the Executive Council of the [[League of Nations]] and received [[League of Nations mandate|a mandate]] over a number of former German and [[Ottoman Empire|Ottoman]] colonies. Under the leadership of [[David Lloyd George]], the British Empire reached its greatest extent, covering a fifth of the world's land surface and a quarter of its population.<ref>Turner, J. (1988). ''Britain and the First World War''. Abingdon: Routledge. p. 41. {{ISBN|978-0-04-445109-9}}.</ref> By the mid-1920s most of the British population could listen to [[BBC]] radio programmes.<ref>{{Cite web |date=15 June 2020 |title=100 years of radio since Marconi's big breakthrough |url=https://www.ofcom.org.uk/about-ofcom/latest/features-and-news/100-years-of-radio |access-date=17 November 2020 |website=Ofcom |archive-date=4 August 2020 |archive-url=https://web.archive.org/web/20200804031332/https://www.ofcom.org.uk/about-ofcom/latest/features-and-news/100-years-of-radio |url-status=live}}</ref><ref>{{Cite web |title=History of the BBC: The origins of BBC Local Radio |url=https://www.bbc.com/historyofthebbc/research/local-radio |access-date=18 September 2022 |website=[[BBC]] |last=Linfoot |first=Matthew |archive-date=20 September 2022 |archive-url=https://web.archive.org/web/20220920232207/https://www.bbc.com/historyofthebbc/research/local-radio/ |url-status=live}}</ref> Experimental [[Television in the United Kingdom|television]] broadcasts [[History of television#United Kingdom|began in 1929]] and the [[First day of BBC television|first scheduled BBC Television Service]] commenced in 1936.<ref>{{Cite web |title=History of the BBC: 1920s |url=https://www.bbc.com/historyofthebbc/timelines/1920s |access-date=18 September 2022 |website=[[BBC]] |archive-date=26 September 2022 |archive-url=https://web.archive.org/web/20220926064808/https://www.bbc.com/historyofthebbc/timelines/1920s |url-status=live}}</ref> The rise of [[Irish nationalism]], and disputes within Ireland over the terms of [[Irish Home Rule]], led eventually to the [[Partition of Ireland|partition of the island]] in 1921.<ref>[[SR&O 1921]]/533 of 3 May 1921.</ref> [[The Troubles in Ulster (1920–1922)|A period of conflict in what is now Northern Ireland]] occurred from June 1920 until June 1922. The [[Irish Free State]] became independent, initially with [[Dominion]] status in 1922, and [[Statute of Westminster 1931#Irish Free State|unambiguously independent in 1931]]. Northern Ireland remained part of the United Kingdom.<ref>{{Cite web |title=The Anglo-Irish Treaty, 6&nbsp;December 1921 |url=http://cain.ulst.ac.uk/issues/politics/docs/ait1921.htm |access-date=15 May 2006 |website=CAIN Web Service |archive-date=14 May 2012 |archive-url=https://web.archive.org/web/20120514145108/http://cain.ulst.ac.uk/issues/politics/docs/ait1921.htm |url-status=live}}</ref> The [[1928 Equal Franchise Act]] gave women electoral equality with men in national elections. Strikes in the mid-1920s culminated in the [[General Strike of 1926]]. Still suffering from the long-term economic effects of the First World War, Britain was severely impacted by the [[Great Depression in the United Kingdom|Great Depression]] (1929–1932), which intensified hardship in old industrial areas in traditional sectors, led to mass unemployment peaking near 3 million, and precipitated widespread political instability and social unrest. [[National Government (1931)|A coalition government]] was formed in 1931.<ref>Rubinstein, W.D. (2004). ''Capitalism, Culture, and Decline in Britain, 1750–1990''. Abingdon: Routledge. p. 11. {{ISBN|978-0-415-03719-8}}.</ref> Nonetheless, Britain was described as "a very wealthy country, formidable in arms, ruthless in pursuit of its interests and sitting at the heart of a global production system."<ref name="Edgerton2012">{{Cite book |last=Edgerton |first=David |date=2012 |title=Britain's War Machine |url=https://www.penguin.co.uk/books/55731/britain-s-war-machine/9780141026107.html |access-date=10 May 2020 |publisher=Penguin |postscript=none |archive-date=28 April 2020 |archive-url=https://web.archive.org/web/20200428080558/https://www.penguin.co.uk/books/55731/britain-s-war-machine/9780141026107.html |url-status=live}}; {{Cite web |title=Britain's War Machine: Weapons, Resources and Experts in the Second World War |url=https://reviews.history.ac.uk/review/1114 |access-date=10 May 2020 |website=Reviews in History |archive-date=12 June 2020 |archive-url=https://web.archive.org/web/20200612173058/https://reviews.history.ac.uk/review/1114 |url-status=live}}</ref> After [[Nazi Germany]]'s [[invasion of Poland]] in 1939, Britain entered the [[Second World War]]. Despite the defeat of its European allies in the first year, Britain and its empire continued the war against Germany.<ref name="Edgerton2012" /> In 1940 the [[Royal Air Force]] successfully defended British airspace by repelling the German ''[[Luftwaffe]]'' in the [[Battle of Britain]]. Urban areas suffered heavy bombing during [[the Blitz]]. The [[Grand Alliance (World War II)|Grand Alliance]] of Britain, the United States and the [[Soviet Union]] formed in 1941, leading the [[Allies of World War II|Allies]] against the [[Axis powers]]. There were eventual hard-fought victories in the [[Battle of the Atlantic]], the [[North Africa campaign]] and the [[Italian campaign (World War II)|Italian campaign]]. British forces played important roles in the [[Normandy landings]] of 1944 and the [[liberation of Europe]]. The British Army led the [[Burma campaign]] against Japan, and the [[British Pacific Fleet]] fought Japan at sea. [[British contribution to the Manhattan Project|British scientists contributed]] to the American [[Manhattan Project]], whose task was to build a [[nuclear weapon]].<ref>{{cite book |author=Septimus H. Paul |url=https://books.google.com/books?id=fSZpgW-N628C&pg=PA1 |title=Nuclear Rivals: Anglo-American Atomic Relations, 1941–1952 |publisher=Ohio State U.P. |year=2000 |isbn=978-0-8142-0852-6 |pages=1–5}}</ref> === Post-war 20th century === {{Main|Post-war Britain (1945–1979)|Social history of post-war Britain (1945–1979)}} [[File:British Empire 1921.png|thumb|right|upright=1.4|The [[British Empire]] at its territorial peak in 1921]] The United Kingdom was one of the [[Big Three (World War II)|Big Three]] powers (with the United States and the Soviet Union) who met to plan the [[Aftermath of World War II|post-war world]];<ref>{{Cite book |last1=Doenecke |first1=Justus D. |url=https://books.google.com/books?id=xdMF9rX6mX8C&pg=PA62 |title=Debating Franklin D. Roosevelt's foreign policies, 1933–1945 |last2=Stoler |first2=Mark A. |year=2005 |publisher=Rowman & Littlefield |isbn=978-0-8476-9416-7 |access-date=19 March 2016 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141231/https://books.google.com/books?id=xdMF9rX6mX8C&pg=PA62#v=onepage&q&f=false |url-status=live|author-link=Justus Drew Doenecke}}; {{Cite book |last=Kelly |first=Brian |url=https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=37681 |title=The Four Policemen and Postwar Planning, 1943–1945: The Collision of Realist and Idealist Perspectives |publisher=Indiana University of Pennsylvania |access-date=25 August 2015 |archive-date=22 October 2015 |archive-url=https://web.archive.org/web/20151022125442/https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=37681 |url-status=live}}</ref> it drafted the [[Declaration by United Nations]] with the United States and became one of the five permanent members of the [[United Nations Security Council]]. It worked closely with the United States to establish the [[International Monetary Fund]], the [[World Bank]] and [[NATO]].<ref>{{Cite web |date=22 July 2010 |title=The "Special Relationship" between Great Britain and the United States Began with FDR |work=Roosevelt Institute |url=http://rooseveltinstitute.org/special-relationship-between-great-britain-and-united-states-began-fdr |archive-url=https://web.archive.org/web/20180125021103/http://rooseveltinstitute.org/special-relationship-between-great-britain-and-united-states-began-fdr |archive-date=25 January 2018 |access-date=24 January 2018 |quote=and the joint efforts of both powers to create a new post-war strategic and economic order through the drafting of the Atlantic Charter; the establishment of the International Monetary Fund and the World Bank; and the creation of the United Nations.}}; {{Cite press release |title=Remarks by the President Obama and Prime Minister Cameron in Joint Press Conference |date=22 April 2016 |publisher=The White House |url=https://obamawhitehouse.archives.gov/the-press-office/2016/04/22/remarks-president-obama-and-prime-minister-cameron-joint-press |quote=That's what we built after World War II. The United States and the UK designed a set of institutions – whether it was the United Nations, or the Bretton Woods structure, IMF, World Bank, NATO, across the board. |access-date=24 January 2018 |archive-date=8 June 2021 |archive-url=https://web.archive.org/web/20210608110653/https://obamawhitehouse.archives.gov/the-press-office/2016/04/22/remarks-president-obama-and-prime-minister-cameron-joint-press |url-status=live}}</ref> The war left the UK severely weakened and financially dependent on the American [[Marshall Plan]],<ref>{{Cite news |date=28 December 2006 |title=Britain to make its final payment on World War II loan from U.S. |work=The New York Times |url=https://www.nytimes.com/2006/12/28/business/worldbusiness/28iht-nazi.4042453.html |access-date=25 August 2011 |archive-date=20 August 2017 |archive-url=https://web.archive.org/web/20170820022220/http://www.nytimes.com/2006/12/28/business/worldbusiness/28iht-nazi.4042453.html |url-status=live}}</ref> but it was spared the total war that devastated [[eastern Europe]].<ref>{{Cite news |last=Reynolds |first=David |date=17 April 2011 |title=Britain's War Machine by David Edgerton – review |work=The Guardian |location=London |url=https://www.theguardian.com/books/2011/apr/17/britains-war-machine-david-edgerton-review |access-date=10 May 2020 |archive-date=12 June 2020 |archive-url=https://web.archive.org/web/20200612130213/https://www.theguardian.com/books/2011/apr/17/britains-war-machine-david-edgerton-review |url-status=live}}</ref> In the immediate post-war years the [[Labour Government 1945–1951|Labour government]] under [[Clement Attlee]] initiated a radical programme of reforms, which significantly affected British society [[Post-war consensus|in the following decades]].<ref>{{Cite book |last=Francis |first=Martin |title=Ideas and policies under Labour, 1945–1951: Building a new Britain |publisher=Manchester University Press |year=1997 |isbn=978-0-7190-4833-3 |pages=225–233}}</ref> Major industries and public utilities were [[nationalised]], a [[welfare state]] was established, and a comprehensive, publicly funded healthcare system, the [[National Health Service]], was created.<ref>{{Cite book |last=Lee |first=Stephen J. |url=https://archive.org/details/aspectsbritishpo00lees |title=Aspects of British political history, 1914–1995 |publisher=Routledge |year=1996 |isbn=978-0-415-13103-2 |location=London; New York |pages=[https://archive.org/details/aspectsbritishpo00lees/page/n183 173]–199 |url-access=limited}}</ref> The rise of nationalism in the colonies coincided with Britain's much-diminished economic position after [[History of the United Kingdom during the First World War|its involvement in the First World War]] and [[Military history of the United Kingdom during World War II|in the Second World War]], so that a policy of [[decolonisation]] was unavoidable.<ref>{{cite book |last=Brown |first=Judith |author-link=Judith M. Brown |url=https://books.google.com/books?id=CpSvK3An3hwC |title=The Twentieth Century, The Oxford History of the British Empire Volume IV |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924679-3 |ref=refOHBEv4 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20140103114315/http://books.google.com/books?id=CpSvK3An3hwC |archive-date=3 January 2014 |url-status=live}} p. 319.</ref><ref>{{cite book |last=Louis |first=Wm. Roger |url=https://books.google.com/books?id=NQnpQNKeKKAC |title=Ends of British Imperialism: The Scramble for Empire, Suez and Decolonization |publisher=I.B. Tauris |year=2006 |isbn=978-1-84511-347-6 |ref=refLouis2006 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20170222045215/https://books.google.com/books?id=NQnpQNKeKKAC |archive-date=22 February 2017 |url-status=live}} p. 337.</ref><ref>{{cite book |last=Abernethy |first=David |url=https://books.google.com/books?id=ennqNS1EOuMC |title=The Dynamics of Global Dominance, European Overseas Empires 1415–1980 |publisher=Yale University Press |year=2000 |isbn=978-0-300-09314-8 |ref=refAbernethy2000 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20111214082531/http://books.google.com/books?id=ennqNS1EOuMC |archive-date=14 December 2011 |url-status=live}} p. 146.</ref> Independence was granted to India and Pakistan in 1947.<ref>{{Cite book |last=Larres |first=Klaus |url=https://books.google.com/books?id=7D66_9YOof4C&pg=PA118 |title=A companion to Europe since 1945 |publisher=Wiley-Blackwell |year=2009 |isbn=978-1-4051-0612-2 |location=Chichester |page=118 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141350/https://books.google.com/books?id=7D66_9YOof4C&pg=PA118 |url-status=live}}</ref> Over the next three decades, most colonies of the British Empire gained their independence, and many became members of the [[Commonwealth of Nations]].<ref>{{Cite web |date=19 March 2009 |title=Country List |url=http://www.thecommonwealth.org/Templates/System/YearbookHomePage.asp?NodeID=152099&load=countrylist |archive-url=https://web.archive.org/web/20130506071236/http://www.thecommonwealth.org/Templates/System/YearbookHomePage.asp?NodeID=152099&load=countrylist |archive-date=6 May 2013 |access-date=8 March 2015 |publisher=[[Commonwealth Secretariat]]}}</ref> The UK was the third country to develop [[Nuclear weapons and the United Kingdom|a nuclear weapons arsenal]], with its first atomic bomb test, [[Operation Hurricane]], in 1952, although the post-war limitations of Britain's international role were illustrated by the [[Suez Crisis]] of 1956. As a result of a shortage of workers in the 1950s, the government [[Modern immigration to the United Kingdom|encouraged immigration]] from [[Commonwealth countries]]. In the following decades the UK became a more [[Multiracialism|multiracial]] and [[Multiculturalism|multicultural]] society.<ref>{{Cite book |last=Julios |first=Christina |url=https://books.google.com/books?id=s3RQ4dsFEkoC&pg=PA84 |title=Contemporary British identity: English language, migrants, and public discourse |publisher=Ashgate |year=2008 |isbn=978-0-7546-7158-9 |series=Studies in migration and diaspora |location=Aldershot |page=84 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141350/https://books.google.com/books?id=s3RQ4dsFEkoC&pg=PA84 |url-status=live}}</ref> Despite rising living standards in the late 1950s and 1960s, the United Kingdom's economic performance was less successful than many of its main competitors such as France, [[West Germany]] and Japan. In 1969, the United Kingdom was the first democratic nation to [[Representation of the People Act 1969|lower its voting age to 18]].<ref>{{Cite journal |last1=Loughran |first1=Thomas |last2=Mycock |first2=Andrew |last3=Tonge |first3=Jonathan |date=3 April 2021 |title=A coming of age: how and why the UK became the first democracy to allow votes for 18-year-olds |url=https://www.tandfonline.com/doi/full/10.1080/13619462.2021.1890589 |journal=Contemporary British History |volume=35 |issue=2 |pages=284–313 |doi=10.1080/13619462.2021.1890589 |issn=1361-9462 |s2cid=233956982 |access-date=24 May 2024 |archive-date=4 June 2023 |archive-url=https://web.archive.org/web/20230604093606/https://www.tandfonline.com/doi/full/10.1080/13619462.2021.1890589 |url-status=live |url-access=subscription}}</ref> In the decades-long process of [[European integration]] the UK was a founding member of the [[Western European Union]], established with the [[London and Paris Conferences]] in 1954. In 1960 the UK was one of the seven founding members of the [[European Free Trade Association]] (EFTA), but in 1973 it left to join the [[European Communities]] (EC). In a [[1975 United Kingdom European Communities membership referendum|1975 referendum]] 67 per cent voted to stay in it.<ref>{{Cite news |title=1975: UK embraces Europe in referendum |work=BBC News |url=http://news.bbc.co.uk/onthisday/hi/dates/stories/june/6/newsid_2499000/2499297.stm |access-date=8 March 2015 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620044520/http://news.bbc.co.uk/onthisday/hi/dates/stories/june/6/newsid_2499000/2499297.stm |url-status=live}}</ref> When the EC became the [[European Union]] (EU) in 1993, the UK was one of the 12 founding member states. From the late 1960s, Northern Ireland experienced communal and [[paramilitary]] violence, sometimes affecting other parts of the UK, known as [[the Troubles]]. It is usually considered to have ended with the 1998 [[Belfast Agreement|Belfast "Good Friday" Agreement]].<ref>{{Cite book |last=Aughey |first=Arthur |url=https://archive.org/details/politicsnorthern00augh |title=The Politics of Northern Ireland: Beyond the Belfast Agreement |publisher=Routledge |year=2005 |isbn=978-0-415-32788-6 |location=London |page=[https://archive.org/details/politicsnorthern00augh/page/n15 7] |url-access=limited}}; "The troubles were over, but the killing continued. Some of the heirs to Ireland's violent traditions refused to give up their inheritance." {{Cite book |last=Holland |first=Jack |url=https://archive.org/details/hopeagainsthisto00holl/page/221 |title=Hope against History: The Course of Conflict in Northern Ireland |publisher=Henry Holt |year=1999 |isbn=978-0-8050-6087-4 |location=New York |page=[https://archive.org/details/hopeagainsthisto00holl/page/221 221]}}; Elliot, Marianne (2007). ''The Long Road to Peace in Northern Ireland: Peace Lectures from the Institute of Irish Studies at Liverpool University.'' University of Liverpool Institute of Irish Studies, Liverpool University Press. p. 2. {{ISBN|978-1-84631-065-2}}.</ref> Following a period of widespread economic slowdown and industrial strife in the 1970s, the [[Conservative Party (UK)|Conservative]] government of the 1980s led by [[Margaret Thatcher]] initiated a radical policy of [[monetarism]], [[deregulation]], particularly of the financial sector (for example, the [[Big Bang (financial markets)|Big Bang]] in 1986) and labour markets, the sale of state-owned companies (privatisation), and the withdrawal of subsidies to others.<ref>{{Cite book |last=Dorey |first=Peter |title=British politics since 1945 |publisher=Blackwell |year=1995 |isbn=978-0-631-19075-2 |series=Making contemporary Britain |location=Oxford |pages=164–223}}</ref> In 1982, [[Argentina]] invaded the British territories of [[South Georgia and the South Sandwich Islands|South Georgia]] and the [[Falkland Islands]], leading to the 10-week [[Falklands War]] in which Argentine forces were defeated. The inhabitants of the islands strongly favour British sovereignty, expressed in a [[2013 Falkland Islands sovereignty referendum|2013 referendum]]. From 1984 the British economy was helped by the inflow of substantial [[North Sea oil]] revenues.<ref>{{Cite book |last1=Griffiths, Alan |url=http://vig.pearsoned.co.uk/catalog/uploads/Griffiths_C01.pdf |title=Applied Economics |last2=Wall, Stuart |publisher=Financial Times Press |year=2007 |isbn=978-0-273-70822-3 |edition=11th |location=Harlow |page=6 |access-date=26 December 2010 |archive-date=23 August 2009 |archive-url=https://web.archive.org/web/20090823124048/http://vig.pearsoned.co.uk/catalog/uploads/Griffiths_C01.pdf |url-status=dead}}</ref> Another British Overseas Territory, [[Gibraltar]],<ref>{{cite wikisource |title=Peace and Friendship Treaty of Utrecht between Spain and Great Britain}}</ref> is [[Port of Gibraltar|a key military base]]; a [[2002 Gibraltar sovereignty referendum|referendum in 2002]] on shared sovereignty with Spain was rejected. Around the end of the 20th century, major changes were made to the governance of the UK with the establishment of [[devolution|devolved]] administrations for Scotland, Wales and Northern Ireland.<ref>{{Cite journal |last=Keating |first=Michael |date=1 January 1998 |title=Reforging the Union: Devolution and Constitutional Change in the United Kingdom |journal=Publius: The Journal of Federalism |volume=28 |issue=1 |pages=217–234 |doi=10.1093/oxfordjournals.pubjof.a029948}}</ref> [[Human Rights Act 1998|The statutory incorporation]] followed acceptance of the [[European Convention on Human Rights]]. The UK remained a [[List of modern great powers#United Kingdom|great power]] with global diplomatic and military influence and a leading role in the United Nations and NATO.<ref name="David M. McCourt">{{Cite book |last=McCourt |first=David |url=https://books.google.com/books?id=lwpOnwEACAAJ&q=Britain+and+World+Power+Since+1945:+Constructing+a+Nation%27s+Role+in+International+Politics |title=Britain and World Power Since 1945: Constructing a Nation's Role in International Politics |publisher=[[University of Michigan Press]] |year=2014 |isbn=978-0-472-07221-7 |access-date=21 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141741/https://books.google.com/books?id=lwpOnwEACAAJ&q=Britain+and+World+Power+Since+1945:+Constructing+a+Nation%27s+Role+in+International+Politics |url-status=live}}</ref> === 21st century === {{Main|Political history of the United Kingdom (1979–present)|Social history of the United Kingdom (1979–present)}} [[File:Johnson signed Brexit Withdrawal Agreement.jpg|thumb|Prime Minister [[Boris Johnson]] signs the [[Brexit withdrawal agreement]] in 2020, formally [[Brexit|withdrawing the UK]] from the [[European Union]] (EU).]] The United Kingdom broadly supported the United States' approach to the "[[war on terror]]" in the early 21st century.<ref>{{Cite news |last=McSmith |first=Andy |date=5 July 2016 |title=The inside story of how Tony Blair led Britain to war in Iraq |work=Independent |location=London |url=https://www.independent.co.uk/news/uk/politics/chilcot-report-iraq-war-inquiry-tony-blair-george-bush-us-uk-what-happened-a7119761.html |access-date=17 February 2022 |archive-date=4 July 2016 |archive-url=https://web.archive.org/web/20160704200931/https://www.independent.co.uk/news/uk/politics/chilcot-report-iraq-war-inquiry-tony-blair-george-bush-us-uk-what-happened-a7119761.html |url-status=live}}</ref> British troops fought in the [[War in Afghanistan (2001–2021)|war in Afghanistan]], but controversy surrounded Britain's [[Iraq War|military deployment in Iraq]], which saw the [[15 February 2003 anti-war protests|largest protest in British history]] in opposition to the government led by [[Tony Blair]].<ref>{{Cite news |last=Adams |first=Tim |date=11 February 2023 |title='A beautiful outpouring of rage': did Britain's biggest ever protest change the world? |work=The Observer |location=London |url=https://www.theguardian.com/uk-news/2023/feb/11/slugs-iraq-war-london-protest-2003-legacy |access-date=5 June 2023 |archive-date=6 April 2023 |archive-url=https://web.archive.org/web/20230406052000/https://www.theguardian.com/uk-news/2023/feb/11/slugs-iraq-war-london-protest-2003-legacy |url-status=live}}</ref> The [[Great Recession]] (2007–2010) severely affected the British economy,<ref name="Latest UK GDP data">{{cite web |date=20 December 2013 |title=Quarterly National Accounts – National accounts aggregates (ABMI Gross Domestic Product: chained volume measures: Seasonally adjusted £m, constant prices) |url=http://www.ons.gov.uk/ons/datasets-and-tables/data-selector.html?cdid=ABMI&dataset=qna&table-id=A2 |publisher=Office for National Statistics |access-date=28 July 2023 |archive-date=29 September 2015 |archive-url=https://web.archive.org/web/20150929150429/http://www.ons.gov.uk/ons/datasets-and-tables/data-selector.html?cdid=ABMI&dataset=qna&table-id=A2 |url-status=live}}</ref> and was followed by a period of weak growth and stagnation.<ref>{{Cite web |last=Harari |first=Daniel |date=16 July 2024 |title=Low growth: The economy's biggest challenge |url=https://commonslibrary.parliament.uk/low-growth-the-economys-biggest-challenge/#:~: |access-date=16 April 2025 |website=House of Commons Library}}</ref><ref>{{Cite news |last1=Rees |first1=Tom |last2=Atkinson |first2=Andrew |last3=Aldrick |first3=Philip |date=12 March 2023 |title=A Lost Decade Worse Than Japan's Threatens to Change UK Forever |url=https://www.bloomberg.com/news/articles/2023-03-12/a-lost-decade-worse-than-japan-s-threatens-to-change-uk-forever |access-date=16 April 2025 |work=[[Bloomberg News]] |archive-date=13 March 2023 |archive-url=https://web.archive.org/web/20230313051724/https://www.bloomberg.com/news/articles/2023-03-12/a-lost-decade-worse-than-japan-s-threatens-to-change-uk-forever |url-status=live }}</ref> The [[Cameron–Clegg coalition]] government of 2010 introduced [[United Kingdom government austerity programme|austerity measures]] intended to tackle the substantial public deficits.<ref>{{Cite news |date=7 November 2022 |title=What is austerity and where could 'eye-watering' cuts fall now? |work=BBC News |url=https://www.bbc.com/news/63304224 |access-date=28 July 2023 |archive-date=28 July 2023 |archive-url=https://web.archive.org/web/20230728105646/https://www.bbc.com/news/63304224 |url-status=live}}</ref> [[2014 Scottish independence referendum|A referendum]] on [[Scottish independence]] in 2014 resulted in the Scottish electorate voting by 55.3 to 44.7 per cent to remain part of the United Kingdom.<ref>{{Cite web |title=Scottish independence referendum – Results |url=https://www.bbc.co.uk/news/events/scotland-decides/results |access-date=18 February 2022 |website=BBC News |archive-date=18 September 2014 |archive-url=https://web.archive.org/web/20140918212409/https://www.bbc.co.uk/news/events/scotland-decides/results |url-status=live}}</ref> In 2016, 51.9 per cent of voters in the UK [[2016 United Kingdom European Union membership referendum|voted to leave the European Union]] (EU).<ref>{{Cite news |date=24 June 2016 |title=In stunning decision, Britain votes to leave the E.U. |newspaper=[[The Washington Post]] |url=https://www.washingtonpost.com/world/britons-head-to-the-polls-for-historic-vote-on-eu/2016/06/23/0d466fb0-34a7-11e6-ab9d-1da2b0f24f93_story.html |access-date=24 June 2016 |first1=Griff |last1=Witte |first2=Karla |last2=Adam |first3=Dan |last3=Balz |archive-date=30 November 2022 |archive-url=https://web.archive.org/web/20221130215030/https://www.washingtonpost.com/world/britons-head-to-the-polls-for-historic-vote-on-eu/2016/06/23/0d466fb0-34a7-11e6-ab9d-1da2b0f24f93_story.html |url-status=live}}</ref> The [[Brexit|UK left the EU]] in 2020.<ref>{{Cite news |date=1 January 2021 |title=Brexit: New era for UK as it completes separation from European Union |work=BBC News |url=https://www.bbc.com/news/uk-politics-55502781 |access-date=18 February 2022 |archive-date=14 January 2021 |archive-url=https://web.archive.org/web/20210114212309/https://www.bbc.com/news/uk-politics-55502781 |url-status=live}}</ref> On 1 May 2021 the [[EU–UK Trade and Cooperation Agreement]], a free trade agreement between the UK and the EU, came into force.<ref name="commission.europa.eu">{{Cite web |title=The EU-UK Trade and Cooperation Agreement |url=https://commission.europa.eu/strategy-and-policy/relations-non-eu-countries/relations-united-kingdom/eu-uk-trade-and-cooperation-agreement_en |archive-url=https://web.archive.org/web/20230325155905/https://commission.europa.eu/strategy-and-policy/relations-non-eu-countries/relations-united-kingdom/eu-uk-trade-and-cooperation-agreement_en |archive-date=25 March 2023 |access-date=25 March 2023}}</ref><ref>{{Cite web |access-date=12 September 2025 |title=Free Trade Agreements EU-UK |url=https://rtais.wto.org/UI/PublicShowRTAIDCard.aspx?rtaid=1137}}</ref> The [[COVID-19 pandemic in the United Kingdom|COVID-19 pandemic]] had a severe [[Economic impact of the COVID-19 pandemic in the United Kingdom|impact on the British economy]], caused major [[Impact of the COVID-19 pandemic on education in the United Kingdom|disruptions to education]] and had [[Social impact of the COVID-19 pandemic in the United Kingdom|far-reaching impacts on society and politics]] in 2020 and 2021.<ref name="GOVUK">{{cite web |url=https://coronavirus.data.gov.uk/ |title=Coronavirus (COVID-19) in the UK |website=[[gov.uk]] |publisher=Government of the United Kingdom |access-date=15 April 2020 |archive-url=https://web.archive.org/web/20210501022145/https://coronavirus.data.gov.uk/ |archive-date=1 May 2021}}</ref><ref>{{Cite web |title=Coronavirus and the impact on output in the UK economy: April 2020 |url=https://www.ons.gov.uk/economy/grossdomesticproductgdp/articles/coronavirusandtheimpactonoutputintheukeconomy/april2020 |access-date=2 August 2020 |publisher=Government of the United Kingdom |website=ons.gov.uk |archive-date=2 August 2020 |archive-url=https://web.archive.org/web/20200802031859/https://www.ons.gov.uk/economy/grossdomesticproductgdp/articles/coronavirusandtheimpactonoutputintheukeconomy/april2020 |url-status=live}}</ref><ref>{{Cite news |last=Walker |first=Andrew |date=10 June 2020 |title=Coronavirus: UK economy could be among worst hit of leading nations, says OECD |work=BBC News |url=https://www.bbc.com/news/business-52991913 |access-date=2 August 2020 |archive-date=18 August 2020 |archive-url=https://web.archive.org/web/20200818031423/https://www.bbc.com/news/business-52991913 |url-status=live}}</ref> The United Kingdom was the first country in the world to use an approved [[COVID-19 vaccine]]. Developing a [[Oxford–AstraZeneca COVID-19 vaccine|vaccine in the UK]] allowed the rollout to be amongst the fastest in the world.<ref>{{Cite web |title=Landmark moment as first NHS patient receives COVID-19 vaccination |url=https://www.england.nhs.uk/2020/12/landmark-moment-as-first-nhs-patient-receives-covid-19-vaccination/ |archive-url=https://web.archive.org/web/20230225194320/https://www.england.nhs.uk/2020/12/landmark-moment-as-first-nhs-patient-receives-covid-19-vaccination/ |archive-date=25 February 2023 |website=NHS |date=8 December 2020}}</ref><ref>{{Cite web |title=Oxford University/AstraZeneca COVID-19 vaccine approved |url=https://www.gov.uk/government/news/oxford-universityastrazeneca-covid-19-vaccine-approved |archive-url=https://web.archive.org/web/20230225194442/https://www.gov.uk/government/news/oxford-universityastrazeneca-covid-19-vaccine-approved |archive-date=25 February 2023 |website=UK Government}}</ref> == Geography == {{Main|Geography of the United Kingdom|Fauna of Great Britain|Flora of Great Britain and Ireland}} [[File:MODIS - Great Britain and Northern Ireland - 2012-06-04 during heat wave (cropped).jpg|thumb|upright|A satellite image of the United Kingdom excluding [[Shetland]]]] The total area of the United Kingdom is approximately {{Convert|244376|km2|sqmi|order=flip}},{{efn|name=ONSArea}}<ref name="ONS Standard Area Measurement" /> with a land area of {{convert|242741|km2|sqmi|order=flip}}.<ref name="ONS Standard Area Measurement" /> It occupies the major part of the [[British Isles]]<ref>[[Oxford English Dictionary]]: "British Isles: a geographical term for the islands comprising Great Britain and Ireland with all their offshore islands including the Isle of Man and the Channel Islands."</ref> and includes the island of Great Britain, the north-eastern one-sixth of the island of Ireland and [[List of islands of the United Kingdom|some smaller surrounding islands]], meaning it comprises [[England]], [[Scotland]], [[Wales]] and [[Northern Ireland]].<ref name="ONS Geography Guide">{{cite web |url=https://geoportal.statistics.gov.uk/datasets/d1f39e20edb940d58307a54d6e1045cd/about |title=A Beginner's Guide to UK Geography (2023) |author=<!--Not stated--> |date=4 February 2025 |website=Open Geography Portal |publisher=Office for National Statistics |access-date=14 May 2025}}</ref> Geographically, the United Kingdom lies between the [[North Atlantic Ocean]] and the [[North Sea]] with the southeast coast coming within {{Convert|35|km|mi|0|order=flip}} of the coast of northern France, from which it is separated by the [[English Channel]].<ref name="factbook">{{Cite web |title=United Kingdom |url=https://www.cia.gov/the-world-factbook/countries/united-kingdom |access-date=21 January 2007 |website=[[The World Factbook]] |publisher=Central Intelligence Agency |archive-date=9 January 2021 |archive-url=https://web.archive.org/web/20210109221834/https://www.cia.gov/the-world-factbook/countries/united-kingdom |url-status=dead}}</ref> The nearby island polities of the [[Isle of Man]], [[Jersey]] and [[Guernsey]] are [[Crown Dependencies]], in union with the [[Monarchy of the United Kingdom|British monarch]], but do not strictly form part of the United Kingdom or any of its three jurisdictions or four countries, although the British government retains responsibility for their external affairs. The Isle of Man lies roughly midway between Great Britain and the [[Ireland|island of Ireland]] in the [[Irish Sea]], while the Channel Islands lie just off the northern French coast. The [[Royal Observatory, Greenwich|Royal Greenwich Observatory]] in London was chosen as the defining point of the [[Prime Meridian]]<ref>{{Cite web |last=ROG Learning Team |date=23 August 2002 |title=The Prime Meridian at Greenwich |url=http://www.rmg.co.uk/explore/astronomy-and-time/astronomy-facts/history/the-prime-meridian-at-greenwich |archive-url=https://web.archive.org/web/20151107023957/http://www.rmg.co.uk/explore/astronomy-and-time/astronomy-facts/history/the-prime-meridian-at-greenwich |archive-date=7 November 2015 |access-date=11 September 2012 |website=Royal Museums Greenwich}}</ref> at the [[International Meridian Conference]] in 1884.<ref>{{Cite news |date=13 August 2015 |title=Greenwich Royal Observatory: How the Prime Meridian line is actually 100 metres away from where it was believed to be |work=Independent |location=London |url=https://www.independent.co.uk/news/science/greenwich-royal-observatory-how-the-prime-meridian-line-is-actually-100-metres-away-from-where-it-10452386.html |access-date=13 December 2018 |archive-date=23 March 2019 |archive-url=https://web.archive.org/web/20190323081414/https://www.independent.co.uk/news/science/greenwich-royal-observatory-how-the-prime-meridian-line-is-actually-100-metres-away-from-where-it-10452386.html |url-status=live}}</ref> The UK lies between latitudes [[49th parallel north|49°]] and [[61st parallel north|61° N]], and longitudes [[9th meridian west|9° W]] and [[2nd meridian east|2° E]]. Northern Ireland shares a {{Convert|499|km|mi|0|adj=on|order=flip}} land boundary with the Republic of Ireland<ref name="factbook" /> and has a {{Convert|650|km|mi|0|adj=on|order=flip}} coastline.<ref name="NI coastline">{{Cite web |title=Northern Ireland Coastal and Marine Forum |url=https://library2.nics.gov.uk/pdf/dard/2014/EEUD.pdf |archive-url=https://web.archive.org/web/20241123094028/https://library2.nics.gov.uk/pdf/dard/2014/EEUD.pdf |archive-date=23 November 2024 |access-date=13 March 2025 |publisher=Northern Ireland Coastal and Marine Forum}}</ref> The length of coastline of Great Britain plus its principal islands is about {{Convert|31368|km|mi|0|order=flip}} long, with the coastline of the main island Great Britain being {{Convert|17820|km|mi|0|order=flip}} of that,<ref name="UK coastline">{{Cite web |last=Darkes |first=Giles |date=January 2008 |title=How long is the UK coastline? |url=http://www.cartography.org.uk/default.asp?contentID=749 |archive-url=https://web.archive.org/web/20120522042745/http://www.cartography.org.uk/default.asp?contentID=749 |archive-date=22 May 2012 |access-date=24 January 2015 |publisher=The [[British Cartographic Society]]}}</ref> though measurements can vary greatly due to the [[coastline paradox]].<ref>{{Cite web |last=Weiner |first=Sophie |date=3 March 2018 |title=Why it's Impossible to Accurately Measure a Coastline |url=https://www.popularmechanics.com/science/environment/a19068718/why-its-impossible-to-accurately-measure-a-coastline/ |access-date=29 June 2024 |website=Popular Mechanics |archive-date=29 June 2024 |archive-url=https://web.archive.org/web/20240629025825/https://www.popularmechanics.com/science/environment/a19068718/why-its-impossible-to-accurately-measure-a-coastline/ |url-status=live}}</ref> It is connected to continental Europe by the [[Channel Tunnel]], which at {{Convert|50|km|mi|0|order=flip}} ({{Convert|38|km|mi|0|order=flip}} underwater) is the longest underwater tunnel in the world.<ref>{{Cite web |title=The Channel Tunnel |url=http://www.eurotunnel.com/ukcP3Main/ukcCorporate/ukcTunnelInfrastructure/ukcInfrastructure |archive-url=https://web.archive.org/web/20101218114514/http://www.eurotunnel.com/ukcP3Main/ukcCorporate/ukcTunnelInfrastructure/ukcInfrastructure |archive-date=18 December 2010 |access-date=8 March 2015 |publisher=Eurotunnel}}</ref> The UK contains four terrestrial [[ecoregion]]s: [[Celtic broadleaf forests]], [[English Lowlands beech forests]], [[North Atlantic moist mixed forests]], and [[Caledonian Forest|Caledonian conifer forests]].<ref>{{Cite journal |last1=Dinerstein |first1=Eric |last2=Olson |first2=David |last3=Joshi |first3=Anup |last4=Vynne |first4=Carly |last5=Burgess |first5=Neil D. |last6=Wikramanayake |first6=Eric |last7=Hahn |first7=Nathan |last8=Palminteri |first8=Suzanne |last9=Hedao |first9=Prashant |last10=Noss |first10=Reed |last11=Hansen |first11=Matt |last12=Locke |first12=Harvey |last13=Ellis |first13=Erle C |last14=Jones |first14=Benjamin |last15=Barber |first15=Charles Victor |display-authors=1 |year=2017 |title=An Ecoregion-Based Approach to Protecting Half the Terrestrial Realm |journal=BioScience |volume=67 |issue=6 |pages=534–545 |doi=10.1093/biosci/bix014 |issn=0006-3568 |pmc=5451287 |pmid=28608869 |doi-access=free |last16=Hayes |first16=Randy |last17=Kormos |first17=Cyril |last18=Martin |first18=Vance |last19=Crist |first19=Eileen |last20=Sechrest |first20=Wes |last21=Price |first21=Lori |last22=Baillie |first22=Jonathan E. M. |last23=Weeden |first23=Don |last24=Suckling |first24=Kierán |last25=Davis |first25=Crystal |last26=Sizer |first26=Nigel |last27=Moore |first27=Rebecca |last28=Thau |first28=David |last29=Birch |first29=Tanya |last30=Potapov |first30=Peter |last31=Turubanova |first31=Svetlana |last32=Tyukavina |first32=Alexandra |last33=de Souza |first33=Nadia |last34=Pintea |first34=Lilian |last35=Brito |first35=José C. |last36=Llewellyn |first36=Othman A. |last37=Miller |first37=Anthony G. |last38=Patzelt |first38=Annette |last39=Ghazanfar |first39=Shahina A. |last40=Timberlake |first40=Jonathan |last41=Klöser |first41=Heinz |last42=Shennan-Farpón |first42=Yara |last43=Kindt |first43=Roeland |last44=Lillesø |first44=Jens-Peter Barnekow |last45=van Breugel |first45=Paulo |last46=Graudal |first46=Lars |last47=Voge |first47=Maianna |last48=Al-Shammari |first48=Khalaf F. |last49=Saleem |first49=Muhammad}}</ref> The area of woodland in the UK was estimated to be 3.25&nbsp;million hectares in 2023, which represents 13 per cent of its land area.<ref>{{Cite web |url=https://www.forestresearch.gov.uk/tools-and-resources/statistics/statistics-by-topic/woodland-statistics/ |title=Woodland Statistics, Key findings |work=Forest Research |access-date=8 July 2023 |archive-date=2 August 2023 |archive-url=https://web.archive.org/web/20230802030149/https://www.forestresearch.gov.uk/tools-and-resources/statistics/statistics-by-topic/woodland-statistics/ |url-status=live}}</ref> === Climate === {{Main|Climate of the United Kingdom|Climate change in the United Kingdom}} {{Further|Climate of England|Climate of Scotland|Climate of Wales|Climate of Northern Ireland}} Most of the United Kingdom has a temperate climate, with generally cool temperatures and plentiful rainfall all year round.<ref name="factbook" /> The temperature varies with the seasons seldom dropping below {{Convert|0|C|lk=on}} or rising above {{Convert|30|C}}.<ref>{{Cite web |title=Hottest day of each year from 1900 |url=https://www.trevorharley.com/hottest-day-of-each-year-from-1900.html |website=trevorharley.com |access-date=23 November 2019 |archive-date=16 June 2023 |archive-url=https://web.archive.org/web/20230616173152/https://www.trevorharley.com/hottest-day-of-each-year-from-1900.html |url-status=live}}; {{Cite web |title=Coldest day of each year from 1900 |url=https://www.trevorharley.com/coldest-days-of-each-year-from-1900.html |website=trevorharley.com |access-date=23 November 2019 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709173537/https://www.trevorharley.com/coldest-days-of-each-year-from-1900.html |url-status=live}}</ref> Some parts, away from the coast, of upland England, Wales, Northern Ireland and most of Scotland, experience a [[subpolar oceanic climate]]. Higher elevations in Scotland experience a [[Subarctic climate|continental subarctic climate]] and the mountains experience a [[tundra climate]].<ref>{{Cite web |date=9 August 2016 |title=English: A map of Köppen climate types in the United Kingdom (SVG version) |url=https://commons.wikimedia.org/wiki/File:UK_K%C3%B6ppen.svg |access-date=23 November 2019 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709202702/https://commons.wikimedia.org/wiki/File:UK_K%C3%B6ppen.svg |url-status=live}}</ref> The prevailing wind is from the southwest and bears frequent spells of mild and wet weather from the Atlantic Ocean,<ref name="factbook" /> although the eastern parts are mostly sheltered from this wind. Since the majority of the rain falls over the western regions, the eastern parts are the driest. Atlantic currents, warmed by the [[Gulf Stream]], bring mild winters, especially in the west where winters are wet and even more so over high ground. Summers are warmest in the southeast of England and coolest in the north. Heavy snowfall can occur in winter and early spring on high ground, and occasionally settles to great depth away from the hills.<ref>{{Cite web |title=Atlantic Ocean Circulation (Gulf Stream) |url=http://ukclimateprojections.metoffice.gov.uk/23152 |access-date=8 March 2015 |website=UK Climate Projections |publisher=Met Office |archive-date=17 October 2018 |archive-url=https://web.archive.org/web/20181017162552/http://ukclimateprojections.metoffice.gov.uk/23152 |url-status=live}}</ref> The average total annual sunshine in the United Kingdom was 1,339.7 hours between 1971 and 2000.<ref name="ukaverages">{{cite web |title=UK 1971–2000 averages |url=http://www.metoffice.gov.uk/climate/uk/averages/19712000/areal/uk.html |url-status=dead |archive-url=https://web.archive.org/web/20090705140124/http://www.metoffice.gov.uk/climate/uk/averages/19712000/areal/uk.html |archive-date=5 July 2009 |access-date=4 August 2007 |publisher=Met Office}}</ref> The hours of sunshine vary from 1,200 to about 1,580 hours per year.<ref name="met off climate series">{{Cite web |url=https://www.metoffice.gov.uk/research/climate/maps-and-data/uk-temperature-rainfall-and-sunshine-time-series |title=UK temperature, rainfall and sunshine time series |website=Met Office |access-date=31 December 2022 |archive-date=17 October 2019 |archive-url=https://web.archive.org/web/20191017203556/https://www.metoffice.gov.uk/research/climate/maps-and-data/uk-temperature-rainfall-and-sunshine-time-series |url-status=live}}</ref> Climate change has serious impacts on the country. A third of food price rise in 2023 was attributed to it.<ref>{{cite web |last1=Smeeton |first1=George |title=Families hit by £605 food bill as extreme weather and energy crisis bites |url=https://eciu.net/media/press-releases/2023/families-hit-by-605-food-bill-as-extreme-weather-and-energy-crisis-bites |website=Energy & Climate Intelligence Unit |date=28 November 2023 |access-date=19 July 2024 |archive-date=16 July 2024 |archive-url=https://web.archive.org/web/20240716124143/https://eciu.net/media/press-releases/2023/families-hit-by-605-food-bill-as-extreme-weather-and-energy-crisis-bites |url-status=live}}</ref> In 2024 the United Kingdom ranked 5th out of 180 countries in the [[Environmental Performance Index]].<ref>{{Cite web |title=2024 Environmental Performance Index |url=https://epi.yale.edu/measure/2024/EPI |access-date=27 May 2025 |website=Environmental Performance Index |language=en |archive-date=10 July 2024 |archive-url=https://web.archive.org/web/20240710023935/https://epi.yale.edu/measure/2024/EPI |url-status=live }}</ref> A law has been passed that [[Greenhouse gas emissions by the United Kingdom|UK greenhouse gas emissions]] will be [[net zero]] by 2050.<ref>{{Cite web |title=UK net zero target |url=https://www.instituteforgovernment.org.uk/explainers/net-zero-target#:~:text=In%20June%202019%2C%20parliament%20passed,to%201990%20levels%20by%202050.&text=Prior%20to%20this%2C%20the%20UK,1990%20levels%2C%20also%20by%202050. |access-date=20 March 2024 |website=Institute for Government |date=20 April 2020|last=Shepheard|first=Marcus}}</ref>{{Update after|2050|01|01|category|reason=Hello from 2024! By the time you're reading this, that law will be a little older than 30 years old. Could you check if the UK ever ended up hitting that net zero GHG target?}} === Topography === [[File:uk topo en.jpg|thumb|right|The United Kingdom's topography]] [[Geography of England|England]] accounts for 53 per cent of the UK, covering {{Convert|130395|km2|sqmi|order=flip|-1}}.<ref>{{Cite news |date=11 February 2010 |title=England&nbsp;– Profile |work=BBC News |url=http://news.bbc.co.uk/2/hi/europe/country_profiles/7327029.stm |access-date=9 October 2010 |archive-date=15 April 2018 |archive-url=https://web.archive.org/web/20180415064122/http://news.bbc.co.uk/1/hi/world/europe/country_profiles/7327029.stm |url-status=live}}</ref> Most of the country consists of lowland terrain,<ref name="Atlapedia">{{Cite web |last=Latimer Clarke Corporation Pty Ltd |title=United Kingdom – Atlapedia Online |url=http://www.atlapedia.com/online/countries/unitedki.htm |access-date=26 October 2010 |website=Atlapedia.com |archive-date=21 March 2012 |archive-url=https://web.archive.org/web/20120321191308/http://www.atlapedia.com/online/countries/unitedki.htm |url-status=live}}{{better source needed|date=July 2023}}</ref> with upland and mountainous terrain northwest of the [[Tees–Exe line]] which roughly divides the UK into [[lowland and upland]] areas. Lowland areas include [[Cornwall]], the [[New Forest]], the [[South Downs]] and the [[The Broads|Norfolk Broads]]. Upland areas include the [[Lake District]], the [[Pennines]], the [[Yorkshire Dales]], [[Exmoor]] and [[Dartmoor]]. The main rivers and estuaries are the [[River Thames|Thames]], [[River Severn|Severn]], and the [[Humber]]. England's highest mountain is [[Scafell Pike]], at {{Convert|978|m|ft|0}} in the Lake District; its largest island is the [[Isle of Wight]]. [[Geography of Scotland|Scotland]] accounts for 32 per cent of the UK, covering {{Convert|78772|km2|sqmi|order=flip|-1}}.<ref>{{Cite web |title=Scotland Facts |url=http://www.scotland.org/about/fact-file/index.html |archive-url=https://web.archive.org/web/20080621045248/http://www.scotland.org/about/fact-file/index.html |archive-date=21 June 2008 |access-date=16 July 2008 |publisher=Scotland Online Gateway}}</ref> This includes [[List of islands of Scotland|nearly 800 islands]],<ref>{{Cite news |last=Winter |first=Jon |date=1 June 2000 |title=The complete guide to the ... Scottish Islands |work=Independent |location=London |url=https://www.independent.co.uk/travel/uk/the-complete-guide-to-the--scottish-islands-633851.html |access-date=8 March 2015 |archive-date=2 April 2015 |archive-url=https://web.archive.org/web/20150402164423/http://www.independent.co.uk/travel/uk/the-complete-guide-to-the--scottish-islands-633851.html |url-status=live}}</ref> notably the [[Hebrides]], [[Orkney]] Islands and [[Shetland Islands]]. Scotland is the most mountainous constituent country of the UK. The [[Scottish Highlands|Highlands]] to the north and west are the more rugged region containing the majority of Scotland's mountainous land, including the [[Cairngorms]], [[Loch Lomond and The Trossachs]] and [[Ben Nevis]] which at {{Convert|1345|m|ft|0}}<ref>{{Cite web |date=18 March 2016 |title=Great Britain's tallest mountain is taller |work=Ordnance Survey Blog |url=https://www.ordnancesurvey.co.uk/blog/2016/03/britains-tallest-mountain-is-taller |access-date=9 September 2018 |publisher=Ordnance Survey |archive-date=9 September 2018 |archive-url=https://web.archive.org/web/20180909000504/https://www.ordnancesurvey.co.uk/blog/2016/03/britains-tallest-mountain-is-taller/ |url-status=live}}</ref> is the highest point in the British Isles.<ref>{{Cite web |title=Ben Nevis Weather |url=http://www.bennevisweather.co.uk/index.asp |archive-url=https://web.archive.org/web/20120510193022/http://www.bennevisweather.co.uk/index.asp |archive-date=10 May 2012 |access-date=26 October 2008 |publisher=Ben Nevis Weather}}</ref> [[Geography of Wales|Wales]] accounts for less than 9 per cent of the UK, covering {{Convert|20779|km2|sqmi|order=flip|-1}}.<ref>{{Cite news |date=9 June 2010 |title=Profile: Wales |work=BBC News |url=http://news.bbc.co.uk/2/hi/europe/country_profiles/6233450.stm |access-date=7 November 2010 |archive-date=26 August 2018 |archive-url=https://web.archive.org/web/20180826085704/http://news.bbc.co.uk/2/hi/europe/country_profiles/6233450.stm |url-status=live}}</ref> It is mostly mountainous, though [[South Wales]] is less mountainous than [[North Wales|North]] and [[Mid Wales]]. The highest mountains in Wales are in [[Snowdonia]] and include [[Snowdon]] ({{Langx|cy|Yr Wyddfa}}) which, at {{Convert|1085|m|ft|0}}, is the highest peak in Wales.<ref name="Atlapedia" /> Wales has over {{Convert|1680|mi|0|abbr=off}} of coastline including the [[Pembrokeshire Coast]].<ref name="UK coastline" /> Several islands lie off the Welsh mainland, the largest of which is [[Anglesey]] (''Ynys Môn''). [[Geography of Ireland|Northern Ireland]], separated from Great Britain by the [[Irish Sea]] and [[North Channel (Great Britain and Ireland)|North Channel]], has an area of {{Convert|14160|km2|sqmi|order=flip|-1}} and is mostly hilly. It includes [[Lough Neagh]] which, at {{Convert|388|km2|sqmi|order=flip|0}}, is the largest lake in the British Isles by area,<ref>{{Cite web |title=Geography of Northern Ireland |url=http://cain.ulst.ac.uk/ni/geog.htm |access-date=22 May 2006 |publisher=University of Ulster |archive-date=18 January 2012 |archive-url=https://web.archive.org/web/20120118133131/http://cain.ulst.ac.uk/ni/geog.htm |url-status=live}}</ref> [[Lough Erne]], which has over 150 islands, and the [[Giant's Causeway]], which is listed by [[UNESCO]] as a [[World Heritage Site]]. The highest peak in Northern Ireland is [[Slieve Donard]] in the [[Mourne Mountains]] at {{Convert|852|m|ft|0}}.<ref name="Atlapedia" /> == Government and politics == {{Main|Politics of the United Kingdom|Government of the United Kingdom|Monarchy of the United Kingdom}} {{Further|Constitution of the United Kingdom}}{{Multiple image | direction = horizontal | align = right | caption_align = center | total_width = 320 | image1 = King Charles III (July 2023).jpg | image2 = Prime Minister Sir Keir Starmer Official Portrait (cropped).jpg | caption1 = {{nowrap|[[Charles III]]}}<br>[[Monarch of the United Kingdom|King]] | caption2 = {{nowrap|[[Keir Starmer]]}}<br>{{nowrap|[[Prime Minister of the United Kingdom|Prime Minister]]}} | alt1 = | alt2 = }} The United Kingdom is a [[constitutional monarchy]] and a [[parliamentary democracy]]<ref>[http://www.royal.gov.uk/MonarchUK/HowtheMonarchyworks/Whatisconstitutionalmonarchy.aspx The British Monarchy, "What is constitutional monarchy?"] {{Webarchive|url=https://web.archive.org/web/20190604151257/http://www.royal.gov.uk/MonarchUK/HowtheMonarchyworks/Whatisconstitutionalmonarchy.aspx|date=4 June 2019}}. Retrieved 17 July 2013; [https://www.cia.gov/the-world-factbook/countries/united-kingdom/ "United Kingdom"] {{Webarchive|url=https://web.archive.org/web/20210109221834/https://www.cia.gov/the-world-factbook/countries/united-kingdom/|date=9 January 2021}} CIA ''The World Factbook''. Retrieved 17 July 2013</ref> operating under the [[Westminster system]], otherwise known as a "democratic parliamentary monarchy".<ref>{{Cite journal |last1=Stepan |first1=Alfred |last2=Linz |first2=Juan J. |last3=Minoves |first3=Juli F. |date=2014 |title=Democratic Parliamentary Monarchies |url=http://muse.jhu.edu/content/crossref/journals/journal_of_democracy/v025/25.2.stepan.html |journal=Journal of Democracy |volume=25 |issue=2 |pages=35–36 |doi=10.1353/jod.2014.0032 |issn=1086-3214 |s2cid=154555066 |url-access=subscription |archive-date=31 January 2026 |access-date=11 January 2023 |archive-url=https://web.archive.org/web/20260131155632/https://muse.jhu.edu/content/crossref/journals/journal_of_democracy/v025/25.2.stepan.html |url-status=live }}</ref> It is a [[Centralized government|centralised]], [[unitary state]]<ref>{{Cite web |last=Lewer |first=Andrew |date=5 May 2021 |title=The UK is one of the most centralised advanced democracies – it's time that changed |url=https://www.newstatesman.com/spotlight/2021/05/the-uk-is-one-of-the-most-centralised-advanced-democracies-its-time-that-changed |access-date=3 July 2023 |website=New Statesman |archive-date=3 July 2023 |archive-url=https://web.archive.org/web/20230703131907/https://www.newstatesman.com/spotlight/2021/05/the-uk-is-one-of-the-most-centralised-advanced-democracies-its-time-that-changed |url-status=live}}</ref><ref>{{Cite web |title=Centralisation Nation: Britain's system of local government and its impact on the national economy |url=https://www.centreforcities.org/?post_type=publication&p=40951 |access-date=3 July 2023 |website=Centre for Cities |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141833/https://www.centreforcities.org/publication/centralisation-nation/ |url-status=live}}</ref> wherein the [[Parliament of the United Kingdom]] is [[Parliamentary sovereignty in the United Kingdom|sovereign]].<ref>{{Cite web |title=Parliamentary Sovereignty |url=https://www.parliament.uk/site-information/glossary/parliamentary-sovereignty |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=11 August 2021 |archive-url=https://web.archive.org/web/20210811195135/https://www.parliament.uk/site-information/glossary/parliamentary-sovereignty/ |url-status=live}}</ref> Parliament is made up of the elected [[House of Commons of the United Kingdom|House of Commons]], the appointed [[House of Lords]] and [[the Crown]] (as personified by [[Monarchy of the United Kingdom|the monarch]]).{{Efn|British [[sovereignty]] derives from the Crown, a [[corporation sole]] occupied by the monarch. It is therefore by and through the monarch that Parliament exercises supreme legislative authority over both the executive and judiciary. Distinguished Professor of [[Public Law]] Maurice Sunkin opined the Crown symbolically occupies "...what in other places would be a core element of a written constitution."<ref>{{Cite web |url=https://www.ibanet.org/Relationship-between-UK-Crown-and-law-in-focus-as-Carolean-era-begins |title=Relationship between UK Crown and law in focus as Carolean era begins |author=Polly Botsford |publisher=International Bar Association |publication-date=22 September 2022 |access-date=4 July 2023 |archive-date=6 May 2023 |archive-url=https://web.archive.org/web/20230506211218/https://www.ibanet.org/Relationship-between-UK-Crown-and-law-in-focus-as-Carolean-era-begins |url-status=live}}</ref> As a result of this state of constitutional affairs, the monarch is formally referred to as "[[Sovereign|the Sovereign]]" in legislation.<ref>{{Cite web |url=https://www.legislation.gov.uk/ukpga/1978/30/section/10 |title=Interpretation Act 1978 (c. 30, s. 10) |publisher=The National Archives |access-date=4 July 2023 |archive-date=30 July 2023 |archive-url=https://web.archive.org/web/20230730073659/https://www.legislation.gov.uk/ukpga/1978/30/section/10 |url-status=live}}</ref>}}<ref name="parliament.uk">{{Cite web |title=Parliament |url=https://www.parliament.uk/about/how/role |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=18 February 2026 |archive-url=https://web.archive.org/web/20260218150954/https://www.parliament.uk/about/how/role/ |url-status=live }}</ref> The main business of Parliament takes place in the two houses,<ref name="parliament.uk" /> but [[royal assent]] is required for a bill to become an [[Act of Parliament (UK)|act of Parliament]] (that is, [[statute law]]).<ref>{{Cite web |title=Royal Assent |url=https://www.parliament.uk/about/how/laws/passage-bill/lords/lrds-royal-assent |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=16 July 2021 |archive-url=https://web.archive.org/web/20210716022947/https://www.parliament.uk/about/how/laws/passage-bill/lords/lrds-royal-assent/ |url-status=live}}</ref> As a result of parliamentary sovereignty, the [[Constitution of the United Kingdom|British constitution]] is [[Uncodified constitution|uncodified]], consisting mostly of disparate written sources, including parliamentary [[statute]]s, judge-made [[case law]] and international treaties, together with [[British Constitution#Conventions|constitutional conventions]].<ref>{{Cite web |last=Carter, Sarah |title=A Guide To the UK Legal System |url=http://www.llrx.com/features/uk2.htm#UK%20Legal%20System |archive-url=https://web.archive.org/web/20120505115306/http://www.llrx.com/features/uk2.htm |archive-date=5 May 2012 |access-date=16 May 2006 |publisher=[[University of Kent]] at Canterbury}}</ref> Nevertheless, the [[Supreme Court of the United Kingdom|Supreme Court]] recognises a number of principles underlying the British constitution, such as parliamentary sovereignty, the [[rule of law]], [[democracy]] and upholding [[Internationalism (politics)|international law]].<ref>See ''[[R (Miller) v Prime Minister]]'' [2019] UKSC 41 (Parliamentary sovereignty), ''[[R (UNISON) v Lord Chancellor]]'' [2017] [http://www.bailii.org/uk/cases/UKSC/2017/51.html UKSC 51] {{Webarchive|url=https://web.archive.org/web/20230104095357/https://www.bailii.org/uk/cases/UKSC/2017/51.html|date=4 January 2023}}, [67] ff (rule of law), ''[[R (Animal Defenders International) v Secretary of State for Culture Media and Sport]]'' [2008] UKHL 15, [48] (democracy), ''[[R v Lyons]]'' [2002] [https://www.bailii.org/uk/cases/UKHL/2002/44.html UKHL 44] {{Webarchive|url=https://web.archive.org/web/20230122064021/https://www.bailii.org/uk/cases/UKHL/2002/44.html|date=22 January 2023}}, [27] (international law).</ref> [[Charles III|King Charles III]] is the [[monarch]] and [[head of state]] of the United Kingdom and 14 other independent [[sovereign state]]s, referred to as "[[Commonwealth realm]]s". The monarch is formally vested with all executive authority as the personal embodiment of [[the Crown]] and is "fundamental to the law and working of government in the UK".<ref>{{Cite journal |url=https://kclpure.kcl.ac.uk/portal/en/publications/the-constitutional-role-and-working-of-the-monarchy-in-the-united |title=The Constitutional Role and Working of the Monarchy in the United Kingdom |author=Robert Blackburn |journal=Jahrbuch des Öffentlichen Rechts der Gegenwart |series=Neue Folge |year=2022 |volume=70 |pages=181–201 |editor=O. Lepsius |editor2=A. Nußberger |editor3=C. Schönberger |editor4=C. Waldhoff |editor5=C. Walter |name-list-style=amp |publisher=Mohr Siebeck |doi=10.1628/joer-2022-0009 |s2cid=257830288 |publication-date=2 June 2022 |access-date=19 June 2023 |archive-date=19 June 2023 |archive-url=https://web.archive.org/web/20230619174428/https://kclpure.kcl.ac.uk/portal/en/publications/the-constitutional-role-and-working-of-the-monarchy-in-the-united |url-status=live}}</ref> The disposition of such powers however, including those belonging to the [[Royal prerogative in the United Kingdom|royal prerogative]], is generally exercised only on the [[Advice (constitutional law)|advice]] of [[ministers of the Crown]] responsible to Parliament and thence to the electorate. Nevertheless, in the performance of official duties the monarch has "the right to be consulted, the right to encourage, and the right to warn".<ref>[[Walter Bagehot|Bagehot, Walter]] (1867). ''The English Constitution''. London: Chapman and Hall. p. 103.</ref> In addition the monarch has a number of [[Reserve power#United Kingdom|reserve powers]] at his disposal to uphold [[responsible government]] and prevent [[constitutional crisis|constitutional crises]].{{Efn|For instance, the monarch alone appoints the prime minister and confers [[Orders, decorations, and medals of the United Kingdom|state honours]] in the personal gift of the Crown. When necessary, the monarch may also refuse a [[dissolution of Parliament|dissolution]] or [[Prorogation in the United Kingdom|prorogation of Parliament]], withhold [[royal assent]] to [[Act of Parliament (UK)|primary legislation]], and prevent illegal use of the [[British Armed Forces]], amongst other reserve powers.<ref>{{Cite web |url=https://researchbriefings.files.parliament.uk/documents/CBP-8885/CBP-8885.pdf |title=The Crown and the Constitution |author=David Torrance |publisher=House of Commons Library |publication-date=11 January 2023 |access-date=19 June 2023 |pages=22 |archive-date=2 March 2023 |archive-url=https://web.archive.org/web/20230302033737/https://researchbriefings.files.parliament.uk/documents/CBP-8885/CBP-8885.pdf |url-status=live}}</ref>}} The prime minister is the [[head of government]] in the United Kingdom.<ref>{{Cite web |title=The Government, Prime Minister and Cabinet |url=http://direct.gov.uk/en/Governmentcitizensandrights/UKgovernment/Centralgovernmentandthemonarchy/DG_073444 |archive-url=https://web.archive.org/web/20120921004951/http://www.direct.gov.uk/en/Governmentcitizensandrights/UKgovernment/Centralgovernmentandthemonarchy/DG_073444 |archive-date=21 September 2012 |access-date=9 March 2015 |website=Public services all in one place |publisher=[[Directgov]]}}</ref> Acting under the direction and supervision of a [[Cabinet of the United Kingdom|Cabinet]] of senior ministers selected and led by the prime minister, [[His Majesty's Government]] serves as the principal instrument for public policymaking, administers public services and, through the [[Privy Council of the United Kingdom|Privy Council]], promulgates [[statutory instrument (UK)|statutory instruments]] and tenders advice to the monarch.<ref>{{Cite web |url=https://www.instituteforgovernment.org.uk/explainer/cabinet |title=Cabinet |author=Tim Durrant |date=25 March 2020 |publisher=Institute for Government |publication-date=25 March 2020 |access-date=4 July 2023 |archive-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704112925/https://www.instituteforgovernment.org.uk/explainer/cabinet |url-status=live}}</ref><ref>{{Cite web |url=https://www.parliament.uk/about/how/role/relations-with-other-institutions/parliament-government/ |title=Parliament and Government |publisher=UK Parliament |access-date=4 July 2023 |archive-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704112925/https://www.parliament.uk/about/how/role/relations-with-other-institutions/parliament-government/ |url-status=live}}</ref><ref>{{Cite book |url=https://books.google.com/books?id=mN6SzMefot4C |title=The Monarchy and the Constitution, Chapter 3 – The Basic Constitutional Rules: Influence and the Prerogative |author=Vernon Bogdanor |year=1995 |publisher=Clarendon Press |isbn=978-0-19-829334-7 |publication-date=1995 |access-date=4 July 2023}}</ref> Nearly all prime ministers have served concurrently as [[First Lord of the Treasury]]<ref>{{Cite web |last1=Blick |first1=Andrew |last2=Jones |first2=George |date=1 January 2012 |title=The Institution of Prime Minister – History of government |url=https://history.blog.gov.uk/2012/01/01/the-institution-of-prime-minister |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=21 July 2021 |archive-url=https://web.archive.org/web/20210721060401/https://history.blog.gov.uk/2012/01/01/the-institution-of-prime-minister/ |url-status=live}}</ref> and all prime ministers have continuously served as First Lord of the Treasury since 1905,<ref>{{Cite book |last=Brown |first=Jack |title=The Prime Ministers |publisher=[[Hodder & Stoughton]] |year=2020 |isbn=978-1-5293-1214-0 |editor-last=Dale |editor-first=Iain |page=303}}</ref> [[Minister for the Civil Service]] since 1968,<ref>{{Cite web |title=Minister for the Civil Service |url=https://www.gov.uk/government/ministers/minister-for-the-civil-service |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=2 September 2017 |archive-url=https://web.archive.org/web/20170902233116/https://www.gov.uk/government/ministers/minister-for-the-civil-service |url-status=live}}</ref> and [[Minister for the Union]] since 2019.<ref>{{Cite news |last=Woodcock |first=Andrew |date=26 July 2021 |title=Boris Johnson accused of 'cynical rebranding' after appointing himself 'Minister for the Union' |work=[[The Independent|Independent]] |url=https://www.independent.co.uk/news/uk/politics/boris-johnson-minister-union-scotland-independence-referendum-snp-a9022356.html |access-date=19 July 2021 |archive-date=27 July 2019 |archive-url=https://web.archive.org/web/20190727080405/https://www.independent.co.uk/news/uk/politics/boris-johnson-minister-union-scotland-independence-referendum-snp-a9022356.html |url-status=live}}; {{Cite web |title=Minister for the Union |url=https://www.gov.uk/government/ministers/minister-for-the-union |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=19 July 2020 |archive-url=https://web.archive.org/web/20200719053618/https://www.gov.uk/government/ministers/minister-for-the-union |url-status=live}}</ref> While appointed by the monarch, in modern times the prime minister is, by [[Constitutional conventions of the United Kingdom|convention]], an MP, the leader of the political party with the most seats in the House of Commons, and holds office by virtue of their ability to [[Confidence motions in the United Kingdom|command the confidence]] of the House of Commons.<ref>{{Cite web |date=October 2011 |title=The Cabinet Manual |url=https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/60641/cabinet-manual.pdf |access-date=19 July 2021 |website=[[gov.uk]] |pages=7, 21 |archive-date=15 April 2018 |archive-url=https://web.archive.org/web/20180415090557/https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/60641/cabinet-manual.pdf |url-status=live}}</ref><ref>{{Cite book |last=Norton |first=Philip |title=Governing Britain: Parliament, Ministers and Our Ambiguous Constitution |publisher=[[Manchester University Press]] |year=2020 |isbn=978-1-5261-4545-1 |page=130}}</ref> The prime minister as at 2025 is [[Keir Starmer|Sir Keir Starmer]], the [[Leader of the Labour Party (UK)|leader of the Labour Party]]. Although not part of the United Kingdom, the three [[Crown Dependencies]] of [[Jersey]], [[Guernsey]] and the [[Isle of Man]], as well as the 14 [[British Overseas Territories]], are subject to the sovereignty of the British Crown.<ref>{{cite book |last=Palan |first=Rolen |editor-last1=Palan |editor-first1=Rolen |editor-last2=Halperin |editor-first2=Sandra |chapter=The second British Empire and the re-emergence of global finance |chapter-url=https://books.google.com/books?id=76QyCgAAQBAJ&dq=%22British+overseas+territories%22+%22crown+dependencies%22+UK+%22British+crown%22&pg=PA48 |title=Legacies of Empire: Imperial Roots of the Contemporary Global Order |year=2015 |publisher=Cambridge University Press |isbn=978-1-107-10946-9 |page=48 |access-date=13 April 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212946/https://books.google.com/books?id=76QyCgAAQBAJ&dq=%22British+overseas+territories%22+%22crown+dependencies%22+UK+%22British+crown%22&pg=PA48#v=onepage&q=%22British%20overseas%20territories%22%20%22crown%20dependencies%22%20UK%20%22British%20crown%22&f=false |url-status=live}}</ref> [[Democratic backsliding]] was found by the 2026 [[V-Dem Institute#Democracy Report|V-Dem Democracy Report]] for the United Kingdom.<ref name="j496">{{cite web | title=Democracy Report 2026, Unraveling The Democratic Era? | url=https://v-dem.net/documents/75/V-Dem_Institute_Democracy_Report_2026_lowres.pdf | access-date=2026-03-17}}</ref> ===Elections=== {{Main|Elections in the United Kingdom}} [[File:Houses of Parliament in 2022 (cropped).jpg|thumb|upright=1.25|alt=Large sand-coloured building of Gothic design beside brown river. The building has several large towers, including large clock tower.|The [[Palace of Westminster]] in London is the seat of both houses of the Parliament of the United Kingdom.]] For [[General elections in the United Kingdom|general elections]] (elections to the House of Commons), the United Kingdom is divided into 650 [[United Kingdom constituencies|constituencies]], each of which is represented by one [[Member of Parliament (United Kingdom)|member of Parliament]] (MP) elected by the [[First-past-the-post voting|first-past-the-post]] system.<ref name="parliament.uk-2">{{Cite web |title=General elections |url=https://www.parliament.uk/about/how/elections-and-voting/general |access-date=19 July 2021 |website=[[parliament.uk]]}}</ref> MPs hold office for up to five years and must then stand for re-election if they wish to continue to be an MP.<ref name="parliament.uk-2" /> The [[Conservative Party (UK)|Conservative Party]], colloquially known as the Tory Party or the Tories, and the [[Labour Party (UK)|Labour Party]] have been the dominant political parties in the country since the 1920s, leading to the UK being described as a [[two-party system]]. However, since the 1920s other [[List of political parties in the United Kingdom|political parties]] have won seats in the House of Commons, although never more than the Conservatives or Labour.<ref>{{Cite web |last=Raymond |first=C |date=2016 |title=Why British Politics is Not a Two-Party System |url=https://pureadmin.qub.ac.uk/ws/portalfiles/portal/107735631/The_United_Kingdom_is_Not_a_Two_Party_System.pdf |website=Queen's University Belfast |access-date=3 July 2023 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709172832/https://pureadmin.qub.ac.uk/ws/portalfiles/portal/107735631/The_United_Kingdom_is_Not_a_Two_Party_System.pdf |url-status=live}}</ref> The 2020s marked the erosion of the two-party system and the growth of a multi-party system.<ref>{{Cite web |date=2026-05-08 |title=Sir John Curtice: Election results show politics in the UK has fragmented |url=https://www.bbc.com/news/articles/ce8p4yn448vo |access-date=2026-05-09 |website=[[BBC News]] |language=en-GB}}</ref> === Administrative divisions === {{Main|Countries of the United Kingdom|Administrative geography of the United Kingdom|List of counties in the United Kingdom}} [[File:United Kingdom labelled map7 vector.svg|thumb|upright=0.8|The four countries of the United Kingdom]] The geographical division of the United Kingdom into counties or [[shire]]s began in England and Scotland in the [[early Middle Ages]], and was completed throughout Great Britain and Ireland by the [[early modern period]].<ref>Hackwood Frederick William: ''The Story of the Shire, Being the Lore, History and Evolution of English County Institutions'' (1851)</ref> Modern [[local government]] by elected councils, partly based on the ancient counties, was established by separate Acts of Parliament: in England and Wales [[Local Government Act 1888|in 1888]], Scotland [[Local Government (Scotland) Act 1889|in 1889]] and Ireland [[Local Government (Ireland) Act 1898|in 1898]], meaning there is no consistent system of administrative or geographic demarcation across the UK,<ref>{{Cite web |last=United Nations Economic and Social Council |author-link=United Nations Economic and Social Council |date=August 2007 |title=Ninth UN Conference on the standardization of Geographical Names |url=http://unstats.un.org/unsd/geoinfo/UNGEGN/docs/9th-uncsgn-docs/report%20of%209th%20uncsgn%20n0750902%20en.pdf |url-status=live |archive-url=https://web.archive.org/web/20091211213055/http://unstats.un.org/unsd/geoinfo/9th-UNCSGN-Docs/E-CONF-98-48-Add1.pdf |archive-date=11 December 2009 |access-date=21 October 2008 |publisher=UN Statistics Division}}</ref> and [[English law|England and Wales]], [[Scots law|Scotland]] and [[Law of Northern Ireland|Northern Ireland]] each have their own distinct jurisdictions.<ref>{{Cite book |last1=Dewart |first1=Megan |url=https://books.google.com/books?id=XW_EtwEACAAJ |title=The Scottish Legal System |date=2019 |publisher=[[Bloomsbury Academic]] |isbn=978-1-5265-0633-7 |location=London |page=57 |quote=The laws and legal institutions of Scotland and of England and Wales were not merged by the Union of 1707. Thus, they remain separate 'law areas', with separate court systems (as does Northern Ireland), and it is necessary to distinguish Scots law and English law (and Northern Irish law). |access-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704040048/https://books.google.com/books?id=XW_EtwEACAAJ |archive-date=4 July 2023 |url-status=live}}; {{Cite web |title=The justice system and the constitution |url=https://www.judiciary.uk/about-the-judiciary/our-justice-system/jud-acc-ind/justice-sys-and-constitution/#:~:text=The%20United%20Kingdom%20has%20three,of%20Union%201707%20and%201800. |archive-url=https://web.archive.org/web/20230521180341/https://www.judiciary.uk/about-the-judiciary/our-justice-system/jud-acc-ind/justice-sys-and-constitution/ |archive-date=21 May 2023 |access-date=13 June 2023 |publisher=Courts and Tribunals Judiciary |quote=The United Kingdom has three separate legal systems; one each for England and Wales, Scotland and Northern Ireland. This reflects its historical origins and the fact that both Scotland and Ireland, and later Northern Ireland, retained their own legal systems and traditions under the Acts of Union 1707 and 1800.}}</ref> Until the 19th century there was little change to those arrangements, but there has since been a constant evolution of role and function.<ref>{{Cite book |last=Barlow |first=I.M. |title=Metropolitan Government |publisher=Routledge |year=1991 |isbn=978-0-415-02099-2 |location=London}}</ref> [[Local government in England]] is complex, with the distribution of functions varying according to local arrangements. The upper-tier [[subdivisions of England]] are the nine [[Regions of England|regions]], used primarily for statistical purposes.<ref>{{Cite web |title=Welcome to the national site of the Government Office Network |url=http://www.gos.gov.uk/national |archive-url=https://web.archive.org/web/20090606073647/http://www.gos.gov.uk/national |archive-date=6 June 2009 |access-date=3 July 2008 |publisher=Government Offices}}</ref> One of the regions, [[Greater London Authority|Greater London]], has had a directly elected assembly and mayor since 2000 following popular support for the proposal in a [[1998 Greater London Authority referendum|1998 referendum]].<ref>{{Cite web |title=A short history of London government |url=http://www.london.gov.uk/london-life/city-government/history.jsp |archive-url=https://web.archive.org/web/20080421023053/http://www.london.gov.uk/london-life/city-government/history.jsp |archive-date=21 April 2008 |access-date=4 October 2008 |publisher=Greater London Authority}}</ref> [[Local government in Scotland]] is divided into [[subdivisions of Scotland|32 council areas]] with a wide variation in size and population. The cities of [[Glasgow]], Edinburgh, [[Aberdeen]] and [[Dundee]] are separate council areas, as is the [[Politics of the Highland council area|Highland Council]], which includes a third of Scotland's area but only just over 200,000&nbsp;people. Local councils are made up of elected councillors, of whom there are 1,223.<ref name="political-studies-association">{{Cite web |title=STV in Scotland: Local Government Elections 2007 |url=http://www.psa.ac.uk/2007/pps/Bennie.pdf |archive-url=https://web.archive.org/web/20110222124635/http://www.psa.ac.uk/2007/pps/Bennie.pdf |archive-date=22 February 2011 |access-date=2 August 2008 |publisher=Political Studies Association}}</ref> [[Local government in Wales]] consists of 22 [[Unitary authority|unitary authorities]], each led by a leader and cabinet elected by the council itself. These include the cities of Cardiff, [[Swansea]] and [[Newport, Wales|Newport]], which are unitary authorities in their own right.<ref name="unitary">{{Cite web |year=2014 |title=Unitary authorities |url=http://gov.wales/topics/localgovernment/local-authorities/?lang=en |archive-url=https://web.archive.org/web/20150310210146/http://gov.wales/topics/localgovernment/local-authorities/?lang=en |archive-date=10 March 2015 |access-date=9 March 2015 |publisher=Welsh Government}}</ref> Elections are held every four years under the first-past-the-post system.<ref name="unitary" /> [[Local government in Northern Ireland]] since 2015 has been organised into 11 district councils, each elected by single transferable vote. Their powers are limited to services such as waste collection, dog control, and maintaining parks and cemeteries.<ref name="Devenport">{{Cite news |last=Devenport |first=Mark |date=18 November 2005 |title=NI local government set for shake-up |work=BBC News |url=http://news.bbc.co.uk/1/hi/northern_ireland/4449092.stm |access-date=15 November 2008 |archive-date=12 December 2008 |archive-url=https://web.archive.org/web/20081212221731/http://news.bbc.co.uk/1/hi/northern_ireland/4449092.stm |url-status=live}}</ref> This system was introduced after a 2008 decision by the executive to replace the previous structure of 26 districts which had been in place since 1973.<ref>{{Cite press release |title=Foster announces the future shape of local government |date=13 March 2008 |publisher=Northern Ireland Executive |url=http://www.northernireland.gov.uk/news/news-doe/news-doe-130308-foster-announces-the.htm |access-date=20 October 2008 |archive-url=https://web.archive.org/web/20080725002254/http://www.northernireland.gov.uk/news/news-doe/news-doe-130308-foster-announces-the.htm |archive-date=25 July 2008}}</ref> === Devolution === {{Main|Devolution in the United Kingdom}} {{further|Devolved, reserved and excepted matters}} [[File:Council of Nations and Regions (54059219744) (cropped).jpg|thumb|right|Prime Minister Keir Starmer meets with the first ministers of Scotland, Northern Ireland and Wales during the [[Council of Nations and Regions]] summit.]] In the United Kingdom a process of devolution has transferred various powers from the UK Government to three of the four UK countries—Scotland, Northern Ireland and Wales—as well as to the regions of England, which since 1999 have their own governments and parliaments that control various devolved matters.<ref>{{Cite web |title=Devolution of powers to Scotland, Wales and Northern Ireland |url=https://www.gov.uk/devolution-of-powers-to-scotland-wales-and-northern-ireland#devolved-administrations |url-status=live |archive-url=https://web.archive.org/web/20130718065448/https://www.gov.uk/devolution-of-powers-to-scotland-wales-and-northern-ireland#devolved-administrations |archive-date=18 July 2013 |access-date=17 April 2013 |publisher=United Kingdom Government |quote=In a similar way to how the government is formed from members from the two Houses of Parliament, members of the devolved legislatures nominate ministers from amongst themselves to comprise executives, known as the devolved administrations...}}; {{Cite web |title=Country Overviews: United Kingdom |url=http://www.transport-research.info/web/countryprofiles/uk.cfm |archive-url=https://web.archive.org/web/20100404062853/http://www.transport-research.info/web/countryprofiles/uk.cfm |archive-date=4 April 2010 |access-date=28 March 2010 |url-status=usurped |publisher=Transport Research Knowledge Centre}}</ref> These powers vary and have been moved to the [[Scottish Government]], the [[Welsh Government]], the [[Northern Ireland Executive]] and (in England) to [[strategic authorities]]: the [[Greater London Authority]], [[Combined authorities and combined county authorities|combined authorities, and combined county authorities]].<ref>{{cite book |last1=Le Sueur |first1=Andrew |last2=Sunkin |first2=Maurice |last3=Murkens |first3=Jo Eric Khushal |title=Public Law: Text, Cases, and Materials |year=2023 |edition=5th |isbn=978-0-19-287061-2 |publisher=Oxford University Press |page=147 |url=https://books.google.com/books?id=6sLDEAAAQBAJ&dq=Le+sueur+Public+Law%C2%A0fifth+edition&pg=PR3 |access-date=13 April 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002213048/https://books.google.com/books?id=6sLDEAAAQBAJ&dq=Le+sueur+Public+Law%C2%A0fifth+edition&pg=PR3#v=onepage&q=Le%20sueur%20Public%20Law%C2%A0fifth%20edition&f=false |url-status=live}}</ref> Amongst the devolved parliaments across the United Kingdom, the [[Scottish Parliament]] has the most extensive responsibilities for [[Devolved, reserved and excepted matters|devolved powers]], and has been described as "one of the most powerful devolved parliaments in the world".<ref>{{cite web |title=The progress of devolution - Erskine May - UK Parliament |url=https://erskinemay.parliament.uk/section/4537/the-progress-of-devolution |website=erskinemay.parliament.uk |access-date=1 March 2025}}</ref><ref>{{cite web |title=David Mundell speech: 20 years of Scottish devolution |url=https://www.gov.uk/government/news/david-mundell-speech-20-years-of-scottish-devolution |website=GOV.UK |access-date=1 March 2025}}</ref> The United Kingdom has an [[uncodified constitution]] and constitutional matters are not amongst the powers that have been devolved. Under the doctrine of [[Parliamentary sovereignty in the United Kingdom|parliamentary sovereignty]], the UK Parliament could, in theory, therefore, abolish the Scottish Parliament, Senedd or Northern Ireland Assembly.<ref>{{Cite journal |last=Burrows |first=N. |year=1999 |title=Unfinished Business: The Scotland Act 1998 |journal=The Modern Law Review |volume=62 |issue=2 |pages=241–260 [p. 249] |doi=10.1111/1468-2230.00203 |quote=The UK Parliament is sovereign and the Scottish Parliament is subordinate. The White Paper had indicated that this was to be the approach taken in the legislation. The Scottish Parliament is not to be seen as a reflection of the settled will of the people of Scotland or of popular sovereignty but as a reflection of its subordination to a higher legal authority. Following the logic of this argument, the power of the Scottish Parliament to legislate can be withdrawn or overridden...}}; {{Cite journal |last=Elliot |first=M. |year=2004 |title=United Kingdom: Parliamentary sovereignty under pressure |journal=International Journal of Constitutional Law |volume=2 |issue=3 |pages=545–627, 553–554 |doi=10.1093/icon/2.3.545 |quote=Notwithstanding substantial differences among the schemes, an important common factor is that the UK Parliament has not renounced legislative sovereignty in relation to the three nations concerned. For example, the Scottish Parliament is empowered to enact primary legislation on all matters, save those in relation to which competence is explicitly denied&nbsp;... but this power to legislate on what may be termed "devolved matters" is concurrent with the Westminster Parliament's general power to legislate for Scotland on any matter at all, including devolved matters&nbsp;... In theory, therefore, Westminster may legislate on Scottish devolved matters whenever it chooses... |doi-access=free}}</ref> Though in the [[Scotland Act 2016]] and the [[Wales Act 2017]] it states that the Scottish Government and the Welsh Government "are a permanent part of the United Kingdom's constitutional arrangements".<ref>{{cite web |title=Scotland Act 2016 |url=https://www.legislation.gov.uk/ukpga/2016/11/part/1/crossheading/the-scottish-parliament-and-the-scottish-government#:~:text=(1)The%20Scottish%20Parliament%20and,the%20United%20Kingdom's%20constitutional%20arrangements. |website=Gov.uk |access-date=28 June 2024 |archive-date=28 June 2024 |archive-url=https://web.archive.org/web/20240628211304/https://www.legislation.gov.uk/ukpga/2016/11/part/1/crossheading/the-scottish-parliament-and-the-scottish-government#:~:text=(1)The%20Scottish%20Parliament%20and,the%20United%20Kingdom's%20constitutional%20arrangements. |url-status=live}}</ref><ref>{{cite web |title=Wales Act 2017 |url=https://www.legislation.gov.uk/ukpga/2017/4/section/1/enacted |access-date=13 July 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212916/https://www.legislation.gov.uk/ukpga/2017/4/section/1/enacted |url-status=live}}</ref> In practice it would be politically difficult for the UK Parliament to abolish devolution to the Scottish Parliament and the Senedd because these institutions were created by referendums.<ref>{{Cite journal |last=Gamble |first=A. |year=2006 |title=The Constitutional Revolution in the United Kingdom |journal=Publius |volume=36 |issue=1 |pages=19–35 [p. 29] |doi=10.1093/publius/pjj011 |quote=The British parliament has the power to abolish the Scottish parliament and the Welsh assembly by a simple majority vote in both houses, but since both were sanctioned by referenda, it would be politically difficult to abolish them without the sanction of a further vote by the people. In this way, several of the constitutional measures introduced by the Blair government appear to be entrenched and not subject to a simple exercise of parliamentary sovereignty at Westminster.}}</ref> The political constraints placed upon the UK Parliament's power to interfere with devolution in Northern Ireland are greater still, because devolution in Northern Ireland rests upon an international agreement with the [[Government of Ireland]].<ref>{{Cite journal |last=Meehan |first=E. |year=1999 |title=The Belfast Agreement – Its Distinctiveness and Points of Cross-Fertilization in the UK's Devolution Programme |journal=Parliamentary Affairs |volume=52 |issue=1 |pages=19–31 [p. 23] |doi=10.1093/pa/52.1.19 |quote=[T]he distinctive involvement of two governments in the Northern Irish problem means that Northern Ireland's new arrangements rest upon an intergovernmental agreement. If this can be equated with a treaty, it could be argued that the forthcoming distribution of power between Westminster and Belfast has similarities with divisions specified in the written constitutions of federal states...Although the Agreement makes the general proviso that Westminster's 'powers to make legislation for Northern Ireland' remains 'unaffected', without an explicit categorical reference to reserved matters, it may be more difficult than in Scotland or Wales for devolved powers to be repatriated. The retraction of devolved powers would not merely entail consultation in Northern Ireland backed implicitly by the absolute power of parliamentary sovereignty but also the renegotiation of an intergovernmental agreement. |doi-access=free}}</ref> The UK Parliament restricts the three devolved parliaments' legislative powers in economic policy matters through [[United Kingdom Internal Market Act 2020|an act]] passed in 2020.<ref name="UKIM" /> ==== England ==== Unlike Scotland, Northern Ireland and Wales, England does not have a separate devolved government or national parliament,<ref>{{cite web |title=English devolution |url=https://www.instituteforgovernment.org.uk/explainer/english-devolution#:~:text=After%201997%20Labour%20governments%20devolved,assembly%20were%20created%20in%202000. |publisher=Institute for Government |access-date=30 August 2024 |date=21 June 2024 |archive-date=30 August 2024 |archive-url=https://web.archive.org/web/20240830150949/https://www.instituteforgovernment.org.uk/explainer/english-devolution#:~:text=After%201997%20Labour%20governments%20devolved,assembly%20were%20created%20in%202000. |url-status=live}}</ref> rather a process of devolution of powers from the central government to local authorities has taken place, first in 1998.<ref>{{cite web |title=Devolution explained |url=https://www.local.gov.uk/topics/devolution/devolution-hub/devolution-explained |publisher=Local Government Association |access-date=30 August 2024 |archive-date=30 August 2024 |archive-url=https://web.archive.org/web/20240830152450/https://www.local.gov.uk/topics/devolution/devolution-hub/devolution-explained |url-status=live}}</ref> The [[Greater London Authority]] was set up following a [[1998 Greater London Authority referendum|referendum in 1998]]. Colloquially known as City Hall, it is the devolved regional government body for Greater London. It consists of two political branches: a directly elected [[Mayor of London]] and the [[London Assembly]], which serves as a check and balance on the Mayor. A [[Combined authorities and combined county authorities|combined authority]] is a type of local government institution introduced in England outside Greater London by the [[Local Democracy, Economic Development and Construction Act 2009]]. CAs allow a group of local authorities to pool appropriate responsibility and receive certain devolved functions from central government in order to deliver transport and economic policy more effectively over a wider area.<ref>{{Cite web |date=6 March 2023 |title=English devolution |url=https://www.instituteforgovernment.org.uk/explainer/english-devolution |access-date=4 February 2024 |publisher=Institute for Government |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212917/https://www.instituteforgovernment.org.uk/explainer/english-devolution |url-status=live}}</ref> A combined county authority is a similar type of local-government institution introduced in England outside Greater London by the [[Levelling-up and Regeneration Act 2023]], but may only be formed by upper-tier authorities: [[county council]]s and [[Unitary authority|unitary authorities]].<ref>{{Cite web |date=6 April 2023 |title=Combined County Authorities – key differences to Combined Authorities |url=https://www.localgovernmentlawyer.co.uk/governance/314-governance-a-risk-articles/53464-combined-county-authorities-key-differences-to-combined-authorities |access-date=4 February 2024 |website=Local Government Lawyer |archive-date=4 February 2024 |archive-url=https://web.archive.org/web/20240204170903/https://www.localgovernmentlawyer.co.uk/governance/314-governance-a-risk-articles/53464-combined-county-authorities-key-differences-to-combined-authorities |url-status=live}}</ref> ==== Scotland ==== {{main|Responsibilities of the Scottish Government}} [[File:First Minister meets Prime Minister (53840421342).jpg|thumb|Prime Minister Keir Starmer meets with [[First Minister of Scotland]] [[John Swinney]], the head of the [[Scottish Government]], at [[Bute House]], Edinburgh.]] Since 1999 Scotland has had a devolved national government and parliament with wide-ranging powers over any matter that has not been specifically [[Reserved and excepted matters|reserved]] to the UK Parliament.<ref name="Scottish Parliament">{{cite web |title=Devolved and Reserved Powers |url=https://www.parliament.scot/about/how-parliament-works/devolved-and-reserved-powers |website=parliament.scot |publisher=Scottish Parliament |access-date=28 December 2023 |archive-date=20 September 2023 |archive-url=https://web.archive.org/web/20230920053732/https://www.parliament.scot/about/how-parliament-works/devolved-and-reserved-powers |url-status=live}}</ref><ref>{{Cite news |date=8 April 1999 |title=Scotland's Parliament&nbsp;– powers and structures |work=BBC News |url=http://news.bbc.co.uk/1/hi/events/scotland_99/the_scottish_parliament/310036.stm |access-date=21 October 2008 |archive-date=18 February 2007 |archive-url=https://web.archive.org/web/20070218234816/http://news.bbc.co.uk/1/hi/events/scotland_99/the_scottish_parliament/310036.stm |url-status=live}}</ref> Scotland has the most devolved powers of any of the three devolved parliaments in the United Kingdom, with full legislative control over [[Education in Scotland|education]], [[Scots law|law and order]], [[Economy of Scotland|the economy]], [[Health in Scotland|healthcare]], [[Elections in Scotland|elections]], [[Crown Estate Scotland]], the [[Planning system in Scotland|planning system]] and [[Housing in Scotland|housing]].<ref>{{cite web |title=Devolved and Reserved Matters - Visit & Learn Scottish Parliament |url=http://www.parliament.scot/visitandlearn/Education/18642.aspx |archive-url=https://web.archive.org/web/20170722092046/http://www.parliament.scot/visitandlearn/Education/18642.aspx |url-status=dead |archive-date=22 July 2017 |access-date=1 March 2025 |date=22 July 2017}}</ref> Additional powers were transferred to the Scottish Parliament via the [[Scotland Act 2012]] and the [[Scotland Act 2016]], such as [[Taxation in Scotland|some taxation powers]], including full control of [[Income tax in Scotland|income tax]] on income earned through employment, [[Land and Buildings Transaction Tax]], [[Scottish Landfill Tax|Landfill Tax]], Aggregates Levy, [[Air Departure Tax]] and [[Revenue Scotland]], as well as aspects of the [[Energy in Scotland|energy network]], including [[Renewable energy in Scotland|renewable energy]], energy efficiency and onshore [[Oil industry in Scotland|oil and gas licensing]].<ref name="Devolved Matters in Scotland">{{cite web |url=https://www.gov.scot/about/what-the-government-does/ |title=What the Scottish Government does |publisher=Scottish Government |access-date=8 August 2019 |archive-date=8 July 2019 |archive-url=https://web.archive.org/web/20190708045359/https://www.gov.scot/about/what-the-government-does/ |url-status=live}}</ref><ref name="Scottish Parliament" /> Their power over economic issues is significantly constrained by an [[United Kingdom Internal Market Act 2020|act of the UK Parliament]] passed in 2020.{{refn|name=UKIM|<ref name="Keating21">{{Cite journal |last=Keating |first=Michael |date=2 February 2021 |title=Taking back control? Brexit and the territorial constitution of the United Kingdom |journal=[[Journal of European Public Policy]] |location=Abingdon |publisher=[[Taylor & Francis]] |volume=28 |issue=4 |pages=6–7 |doi=10.1080/13501763.2021.1876156 |quote=The UK Internal Market Act gives ministers sweeping powers to enforce mutual recognition and non-discrimination across the four jurisdictions. Existing differences and some social and health matters are exempted but these are much less extensive than the exemptions permitted under the EU Internal Market provisions. Only after an amendment in the House of Lords, the Bill was amended to provide a weak and non-binding consent mechanism for amendments (equivalent to the Sewel Convention) to the list of exemptions. The result is that, while the devolved governments retain regulatory competences, these are undermined by the fact that goods and services originating in, or imported into, England can be marketed anywhere. |hdl-access=free |hdl=1814/70296 |s2cid=234066376}}</ref><ref name="KenMcEw21">{{Cite journal |last1=Kenny |first1=Michael |author-link=Michael Kenny (political scientist) |last2=McEwen |first2=Nicola |author-link2=Nicola McEwen |date=1 March 2021 |title=Intergovernmental Relations and the Crisis of the Union |journal=Political Insight |publisher=[[SAGE Publishing]] |volume=12 |issue=1 |pages=12–15 |doi=10.1177/20419058211000996 |quote=That phase of joint working was significantly damaged by the UK Internal Market Act, pushed through by the Johnson government in December 2020...the Act diminishes the authority of the devolved institutions, and was vehemently opposed by them. |doi-access=free |s2cid=232050477}}</ref><ref name="WolffeDevol">{{Cite journal |last=Wolffe |first=W James |author-link=James Wolffe |date=7 April 2021 |title=Devolution and the Statute Book |url=https://academic.oup.com/slr/advance-article/doi/10.1093/slr/hmab003/6213886 |journal=[[Statute Law Review]] |location=Oxford |publisher=[[Oxford University Press]] |doi=10.1093/slr/hmab003 |access-date=18 April 2021 |quote=the Internal Market Bill—a Bill that contains provisions which, if enacted, would significantly constrain, both legally and as a matter of practicality, the exercise by the devolved legislatures of their legislative competence; provisions that would be significantly more restrictive of the powers of the Scottish Parliament than either EU law or Articles 4 and 6 of the Acts of the Union...The UK Parliament passed the European Union (Withdrawal Agreement) Act 2020 and the Internal Market Act 2020 notwithstanding that, in each case, all three of the devolved legislatures had withheld consent. |archive-date=21 April 2021 |archive-url=https://web.archive.org/web/20210421145355/https://academic.oup.com/slr/advance-article/doi/10.1093/slr/hmab003/6213886 |url-status=live |url-access=subscription}}</ref><ref name="Wincott21">{{Cite journal |last1=Wincott |first1=Daniel |author-link=Daniel Wincott |last2=Murray |first2=C. R. G. |last3=Davies |first3=Gregory |date=17 May 2021 |title=The Anglo-British imaginary and the rebuilding of the UK's territorial constitution after Brexit: unitary state or union state? |journal=Territory, Politics, Governance |location=Abingdon/Brighton |publisher=[[Taylor & Francis]]; [[Regional Studies Association]] |volume=10 |issue=5 |pages=696–713 |doi=10.1080/21622671.2021.1921613 |quote=Taken as a whole, the Internal Market Act imposes greater restrictions upon the competences of the devolved institutions than the provisions of the EU Single Market which it replaced, in spite of pledges to use common frameworks to address these issues. [[David Hope, Baron Hope of Craighead|Lord Hope]], responsible for many of the leading judgments relating to the first two decades of devolution, regarded the legislation's terms as deliberately confrontational: 'this Parliament can do what it likes, but a different approach is essential if the union is to hold together'. |doi-access=free}}</ref><ref name="DouganMcEwen20">{{Cite report |url=https://www.centreonconstitutionalchange.ac.uk/publications/uk-and-internal-market-devolution-and-union |title=UK and the Internal Market, Devolution and the Union |last1=Dougan |first1=Michael |last2=Hayward |first2=Katy |date=2020 |publisher=[[University of Edinburgh]]; [[University of Aberdeen]] |pages=2–3 |last3=Hunt |first3=Jo |last4=McEwen |first4=Nicola |last5=McHarg |first5=Aileen |last6=Wincott |first6=Daniel |author-link=Michael Dougan |author-link2=Katy Hayward |access-date=16 October 2020 |author-link4=Nicola McEwen |author-link6=Daniel Wincott |department=Centre on Constitutional Change |archive-date=18 October 2020 |archive-url=https://web.archive.org/web/20201018185830/https://www.centreonconstitutionalchange.ac.uk/publications/uk-and-internal-market-devolution-and-union |url-status=live}}</ref><ref name="Dougan20Brief">{{Cite report |url=https://www.liverpool.ac.uk/media/livacuk/law/2-research/eull/UKIM,Briefing,Paper,-,Prof,Michael,Dougan,15,September,2020.pdf |title=Briefing Paper. United Kingdom Internal Market Bill: Implications for Devolution |last=Dougan |first=Michael |date=2020 |publisher=[[University of Liverpool]] |location=Liverpool |pages=4–5 |author-link=Michael Dougan |access-date=15 October 2020 |archive-date=26 October 2020 |archive-url=https://web.archive.org/web/20201026161836/https://www.liverpool.ac.uk/media/livacuk/law/2-research/eull/UKIM,Briefing,Paper,-,Prof,Michael,Dougan,15,September,2020.pdf |url-status=live}}</ref><ref name="DouHu22">{{cite journal |last1=Dougan |first1=Michael |last2=Hunt |first2=Jo |last3=McEwen |first3=Nicola |last4=McHarg |first4=Aileen |author-link1=Michael Dougan |author-link3=Nicola McEwen |title=Sleeping with an Elephant: Devolution and the United Kingdom Internal Market Act 2020 |journal=[[Law Quarterly Review]] |date=2022 |url=https://dro.dur.ac.uk/35167/ |location=London |publisher=[[Sweet & Maxwell]] |ssrn=4018581 |via=[[Durham University|Durham Research Online]] |access-date=4 March 2022 |quote=The Act has restrictive – and potentially damaging – consequences for the regulatory capacity of the devolved legislatures...This was not the first time since the Brexit referendum that the Convention had been set aside, but it was especially notable given that the primary purpose of the legislation was to constrain the capacity of the devolved institutions to use their regulatory autonomy...in practice, it constrains the ability of the devolved institutions to make effective regulatory choices for their territories in ways that do not apply to the choices made by the UK government and parliament for the English market. |issn=0023-933X |archive-date=2 August 2022 |archive-url=https://web.archive.org/web/20220802185022/https://dro.dur.ac.uk/35167/ |url-status=live}}</ref>}} The [[Scottish Government]] is a [[Scottish National Party]] (SNP) [[minority government]],<ref>{{cite web |title=Humza Yousaf's precarious position puts the SNP – and Scotland – at a crossroads |url=https://www.instituteforgovernment.org.uk/comment/humza-yousaf-snp-scotland-crossroads |website=Institute for Government |access-date=26 April 2024 |date=26 April 2024 |archive-date=26 April 2024 |archive-url=https://web.archive.org/web/20240426221203/https://www.instituteforgovernment.org.uk/comment/humza-yousaf-snp-scotland-crossroads |url-status=live}}</ref> led by the [[First Minister of Scotland|first minister]], currently [[John Swinney]], the [[leader of the SNP]]. In 2014 the [[2014 Scottish independence referendum|Scottish independence referendum]] was held, with 55.3 per cent voting against independence from the United Kingdom and 44.7 per cent voting in favour, resulting in Scotland staying within the United Kingdom. [[Local government in Scotland]] is divided into [[subdivisions of Scotland|32 council areas]] with a wide variation in size and population. Local councils are made up of elected councillors, of whom there are 1,223.<ref name="political-studies-association" /> The Scottish Parliament is separate from the Scottish Government. It is made up of 129 elected [[members of the Scottish Parliament]] (MSPs). It is the law-making body of Scotland, and thus it scrutinises the work of the incumbent Scottish Government and considers any piece of proposed legislation through parliamentary debates, committees and parliamentary questions.<ref name="Devolved Matters in Scotland"/> ==== Wales ==== Since 1999 Wales has had a devolved national government and legislature, known as the [[Senedd]]. Elections to the Senedd used the [[additional member system]] until 2026 when the voting system was changed to [[closed list]] proportional representation. The number of elected members also increased from 60 to 96, representing 16 [[Senedd constituencies|six-member constituencies]]. The Senedd has more limited powers than those devolved to Scotland.<ref>{{Cite news |date=9 April 1999 |title=Structure and powers of the Assembly |work=BBC News |url=http://news.bbc.co.uk/1/hi/events/wales_99/the_welsh_assembly/309033.stm |access-date=21 October 2008 |archive-date=7 February 2004 |archive-url=https://web.archive.org/web/20040207162926/http://news.bbc.co.uk/1/hi/events/wales_99/the_welsh_assembly/309033.stm |url-status=live}}</ref> It can legislate on any matter not specifically reserved to the UK Parliament by [[Acts of Senedd Cymru]]. The [[Welsh Government]] is currently a [[Plaid Cymru]] minority government led by the [[First Minister of Wales|first minister]], [[Rhun ap Iorwerth]]. [[Local government in Wales]] consists of 22 unitary authorities, each led by a leader and cabinet elected by the council itself. ==== Northern Ireland ==== The devolved form of government in Northern Ireland is based on the 1998 [[Good Friday Agreement]], which brought to an end a 30-year period of [[Unionism in Ireland|unionist]]-[[Irish nationalism|nationalist]] communal conflict known as [[the Troubles]]. The Agreement was [[1998 Northern Ireland Good Friday Agreement referendum|confirmed by referendum]] and implemented later that year. It established [[power sharing]] arrangements for a devolved government and legislature, referred to as the [[Northern Ireland Executive]] and the [[Northern Ireland Assembly]] respectively.<ref>{{cite web |title=Good Friday Agreement: What is it? |url=https://www.bbc.co.uk/news/uk-northern-ireland-61968177 |website=BBC News |date=3 April 2023 |access-date=11 April 2024 |archive-date=15 May 2024 |archive-url=https://web.archive.org/web/20240515131233/https://www.bbc.co.uk/news/uk-northern-ireland-61968177 |url-status=live}}</ref> Elections to the Assembly use the [[single transferable vote]] system. The Executive and Assembly have powers similar to those devolved to Scotland.<ref>{{Cite web |date=8 May 2019 |title=Devolution of powers to Scotland, Wales and Northern Ireland |url=https://www.gov.uk/guidance/devolution-of-powers-to-scotland-wales-and-northern-ireland |access-date=11 June 2024 |website=GOV.UK |archive-date=7 March 2023 |archive-url=https://web.archive.org/web/20230307093336/https://www.gov.uk/guidance/devolution-of-powers-to-scotland-wales-and-northern-ireland |url-status=live}}</ref> The Executive is led by a [[diarchy]] representing [[Designated Unionist|unionist]] and [[Designated Nationalist|nationalist]] members of the Assembly.<ref name="northernireland1">{{Cite web |date=25 September 2015 |title=Your Executive |url=https://www.northernireland.gov.uk/topics/your-executive |publisher=Northern Ireland Executive |access-date=14 August 2016 |archive-date=21 August 2016 |archive-url=https://web.archive.org/web/20160821135048/https://www.northernireland.gov.uk/topics/your-executive |url-status=live}}</ref> The [[First Minister and Deputy First Minister of Northern Ireland|first minister and deputy first minister of Northern Ireland]] are the joint heads of government of Northern Ireland.<ref>{{Cite news |title=Stormont: Why were NI leaders given unequal job titles? |work=BBC News |date=15 May 2022 |url=https://www.bbc.co.uk/news/uk-northern-ireland-61393736 |access-date=2 February 2024 |archive-url=https://web.archive.org/web/20240202190001/https://www.bbc.com/news/uk-northern-ireland-61393736 |archive-date=2 February 2024}}</ref><ref>{{Cite web |title=Northern Ireland Executive: Ministerial Code |date=28 September 2015 |url=https://www.northernireland.gov.uk/topics/your-executive/ministerial-code |access-date=2 February 2024 |archive-url=https://web.archive.org/web/20240202191115/https://www.northernireland.gov.uk/topics/your-executive/ministerial-code |archive-date=2 February 2024}}</ref> [[Local government in Northern Ireland]] since 2015 has been divided between 11 councils with limited responsibilities.<ref name="Devenport" /> === Foreign relations === {{Main|Foreign relations of the United Kingdom}} [[File:Trump-Starmer bilateral 2025-02-27-16-07.jpg|thumb|right|UK prime minister Keir Starmer and US president [[Donald Trump]] shaking hands in a joint press conference in 2025. The UK and the US share a "[[Special Relationship]]".]] The United Kingdom is [[Big Five (United Nations)|a permanent member]] of the [[United Nations Security Council]] and a member of [[NATO]], [[AUKUS]], the Commonwealth of Nations, the [[G7]], the [[G-20 major economies|G20]], the [[Organisation for Economic Co-operation and Development|OECD]], the [[World Trade Organization|WTO]], the [[Council of Europe]] and the [[Organization for Security and Co-operation in Europe|OSCE]].<ref>{{Cite web |last=May |first=Theresa |author-link=Theresa May |date=29 March 2017 |title=Prime Minister's letter to Donald Tusk triggering Article 50 |url=https://www.gov.uk/government/publications/prime-ministers-letter-to-donald-tusk-triggering-article-50/prime-ministers-letter-to-donald-tusk-triggering-article-50 |via=Gov.uk |access-date=19 June 2017 |archive-date=5 June 2017 |archive-url=https://web.archive.org/web/20170605184239/https://www.gov.uk/government/publications/prime-ministers-letter-to-donald-tusk-triggering-article-50/prime-ministers-letter-to-donald-tusk-triggering-article-50 |url-status=live}}</ref> It maintains the [[British Council]], an organisation specialising in international cultural and educational opportunities in over 100 countries. The UK remains a [[great power]] with considerable political, cultural, economic and military influence.<ref name="PaulWirtz2004">{{cite book |last1=Paul |first1=T.V. |url=https://books.google.com/books?id=9jy28vBqscQC&pg=PA59 |title=Balance of Power: Theory and Practice in the 21st century |last2=Wirtz |first2=James |last3=Fortmann |first3=Michel |date=2004 |publisher=Stanford University Press |isbn=978-0-8047-5017-2 |page=59}}</ref><ref>{{Cite news |date=10 May 2012 |title=United Kingdom country profile |url=https://www.bbc.com/news/world-europe-18023389 |access-date=6 July 2025 |work=BBC News |language=en-GB |archive-date=3 January 2023 |archive-url=https://web.archive.org/web/20230103160059/https://www.bbc.com/news/world-europe-18023389 |url-status=live }}</ref> The United Kingdom is said to have a "[[Special Relationship]]" with the United States and a close partnership with France – the "[[Entente cordiale]]" – and shares nuclear weapons technology with both countries;<ref>{{Cite web |last=Swaine |first=Jon |date=13 January 2009 |title=Barack Obama presidency will strengthen special relationship, says Gordon Brown |url=https://www.telegraph.co.uk/news/worldnews/barackobama/4226246/Barack-Obama-presidency-will-strengthen-special-relationship-says-Gordon-Brown.html |url-access=subscription |access-date=30 May 2011 |website=[[The Daily Telegraph|The Telegraph]] |publication-place=[[London]] |archive-date=4 July 2020 |archive-url=https://web.archive.org/web/20200704192159/https://www.telegraph.co.uk/news/worldnews/barackobama/4226246/Barack-Obama-presidency-will-strengthen-special-relationship-says-Gordon-Brown.html |url-status=live}}</ref><ref>{{Cite book |last1=Kirchner |first1=Emil Joseph |title=Global Security Governance: Competing Perceptions of Security in the 21st century |last2=Sperling |first2=James |publisher=[[Routledge]] |year=2007 |isbn=978-0-415-39162-7 |edition=illustrated |location=London |page=100}}</ref> the [[Anglo-Portuguese Alliance]] is considered to be the oldest binding military alliance in the world. The UK is also closely linked with the Republic of Ireland; the two countries share a [[Common Travel Area]] and co-operate through the [[British-Irish Intergovernmental Conference]] and the [[British-Irish Council]]. Britain's global presence and influence is further amplified through its trading relations, foreign investments, [[official development assistance]] and military engagements.<ref>{{Cite web |last=The Committee Office, House of Commons |date=19 February 2009 |title=DFID's expenditure on development assistance |url=http://www.parliament.the-stationery-office.co.uk/pa/cm200809/cmselect/cmintdev/220/22007.htm |archive-url=https://web.archive.org/web/20130112222226/http://www.parliament.the-stationery-office.co.uk/pa/cm200809/cmselect/cmintdev/220/22007.htm |archive-date=12 January 2013 |access-date=28 April 2013 |publisher=UK Parliament}}</ref> === Military === {{Main|British Armed Forces|Military history of the United Kingdom}} [[File:United Kingdom overseas military installations and operations.png|thumb|upright=1.4| {{Legend|#0000FF|Overseas military installations of the United Kingdom, and locally raised units of the [[British Overseas Territories]]}} {{Legend|#F0002B|Military interventions since 2000: [[British military intervention in the Sierra Leone Civil War|Palliser]] (Sierra Leone); [[Operation Herrick|Herrick]] (Afghanistan); [[Operation Enduring Freedom – Horn of Africa|Enduring Freedom]] (Horn of Africa); [[Operation Telic|Telic]] (Iraq); [[Operation Ellamy|Ellamy]] (Libya); and [[Operation Shader|Shader]] (Islamic State of Iraq and the Levant).}}]] The British Armed Forces consist of three professional service branches: the [[Royal Navy]] and [[Royal Marines]] (forming the [[Naval Service (United Kingdom)|Naval Service]]), the [[British Army]] and the [[Royal Air Force]].<ref>{{Cite web |title=Ministry of Defence |url=http://www.mod.uk/DefenceInternet/Home |access-date=21 February 2012 |publisher=Ministry of Defence |archive-date=19 February 2012 |archive-url=https://web.archive.org/web/20120219194140/http://mod.uk/DefenceInternet/Home/ |url-status=live}}</ref> The armed forces of the United Kingdom are managed by the [[Ministry of Defence (United Kingdom)|Ministry of Defence]] and controlled by the [[Defence Council of the United Kingdom|Defence Council]], chaired by the [[Secretary of State for Defence]]. The [[Commander-in-Chief]] is the [[Monarchy of the United Kingdom|British monarch]], to whom members of the forces swear an oath of allegiance.<ref>{{Cite web |date=30 March 2012 |title=Speaker addresses Her Majesty Queen Elizabeth II |url=http://www.parliament.uk/business/news/2012/march/speaker-addresses-hm-the-queen |access-date=28 April 2013 |publisher=UK Parliament |archive-date=1 May 2013 |archive-url=https://web.archive.org/web/20130501221305/http://www.parliament.uk/business/news/2012/march/speaker-addresses-hm-the-queen/ |url-status=live}}</ref> The armed forces are charged with protecting the United Kingdom and its overseas territories, promoting the UK's global security interests and supporting international peacekeeping efforts. They are active and regular participants in [[NATO]] (including the [[Allied Rapid Reaction Corps]]), the [[Five Power Defence Arrangements]], [[RIMPAC]] and other worldwide coalition operations. [[Overseas military bases of the United Kingdom|Overseas garrisons]] and facilities are maintained in [[RAF Ascension Island|Ascension Island]], [[Mina Salman|Bahrain]], [[Military of Belize|Belize]], [[Military Forces based in Brunei|Brunei]], [[British Army Training Unit Suffield|Canada]], [[British Forces Cyprus|Cyprus]], [[Diego Garcia]], the [[Military of the Falkland Islands|Falkland Islands]], [[British Forces Germany|Germany]], [[British Forces Gibraltar|Gibraltar]], [[British Army Training Unit Kenya|Kenya]], [[Oman]], [[Al Udeid Air Base|Qatar]] and [[Singapore]].<ref>{{Cite web |title=House of Commons Hansard |url=https://publications.parliament.uk/cgi-bin/newhtml_hl?DB=semukparl&STEMMER=en&WORDS=raf%20diego%20garcia&ALL=RAF&ANY=&PHRASE=%22Diego%20Garcia%20%22&CATEGORIES=&SIMPLE=&SPEAKER=&COLOUR=red&STYLE=s&ANCHOR=50221w33.html_spnew0&URL=/pa/cm200405/cmhansrd/vo050221/text/50221w33.htm#50221w33.html_spnew0 |archive-url=https://web.archive.org/web/20090309114107/http://www.publications.parliament.uk/cgi-bin/newhtml_hl?DB=semukparl&STEMMER=en&WORDS=raf%20diego%20garcia&ALL=RAF&ANY=&PHRASE=%22Diego%20Garcia%20%22&CATEGORIES=&SIMPLE=&SPEAKER=&COLOUR=red&STYLE=s&ANCHOR=50221w33.html_spnew0&URL=%2Fpa%2Fcm200405%2Fcmhansrd%2Fvo050221%2Ftext%2F50221w33.htm#50221w33.html_spnew0 |archive-date=9 March 2009 |access-date=23 October 2008 |publisher=UK Parliament}}; {{Cite web |title=House of Commons Hansard Written Answers for 17 Jun 2013 (pt 0002) |url=https://publications.parliament.uk/pa/cm201314/cmhansrd/cm130617/text/130617w0002.htm#13061746000236 |archive-url=https://web.archive.org/web/20150214025754/http://www.publications.parliament.uk/pa/cm201314/cmhansrd/cm130617/text/130617w0002.htm#13061746000236 |archive-date=14 February 2015 |access-date=4 March 2015 |publisher=Publications.parliament.uk}}</ref> According to the [[Stockholm International Peace Research Institute]]<ref>{{Cite web |date=April 2026|title=Trends in Military Expenditure 2025|url=https://www.sipri.org/sites/default/files/2026-04/2604_milex_2025.pdf#page=2|access-date=31 May 2026|publisher=[[Stockholm International Peace Research Institute]]}}</ref> and the [[International Institute for Strategic Studies]],<ref>{{Cite web |title=The Military Balance 2026: Global defence spending|url=https://www.iiss.org/publications/the-military-balance/2026/the-military-balance-2026/global-defence-spending/|access-date=2026-05-31|website=IISS|language=en}}</ref> the UK had the world's [[List of countries by military expenditures|sixth- or fifth-highest military expenditures]] in 2025. Total defence spending in 2024 was estimated at 2.3 per cent of [[gross domestic product]].<ref>{{Cite web |title=Rishi Sunak vows to boost UK defence spending to 2.5% of GDP by 2030 |url=https://www.bbc.co.uk/news/uk-politics-68880171 |access-date=24 April 2024 |publisher=BBC News |date=24 April 2024 |archive-date=23 April 2024 |archive-url=https://web.archive.org/web/20240423233438/https://www.bbc.co.uk/news/uk-politics-68880171 |url-status=live}}</ref> Following the end of the [[Cold War]], defence policy has a stated assumption that "the most demanding operations" will be undertaken as part of a coalition.<ref>''UK 2005: The Official Yearbook of the United Kingdom of Great Britain and Northern Ireland''. Office for National Statistics. p. 89.</ref> === Law and criminal justice === <!-- Copyedit done to here --> {{Main|Law of the United Kingdom|Crime in the United Kingdom}} {{Further|English law|Northern Ireland law|Scots law}} [[File:Middlesex Guildhall (cropped).jpg|thumb|The [[Supreme Court of the United Kingdom|Supreme Court]] is the final court of appeal for England, Wales and Northern Ireland, and for Scottish civil cases.]] The United Kingdom does not have a single legal system as the [[Treaty of Union|1706 Treaty of Union]] provided for the continuation of Scotland's separate legal system.<ref name="Acts of Union 1707" /> The UK has three distinct [[Legal systems of the world|systems of law]]: English law, Northern Ireland law and Scots law. A new [[Supreme Court of the United Kingdom]] came into being in October 2009 to replace the [[judicial functions of the House of Lords|Appellate Committee of the House of Lords]].<ref>{{Cite news |date=1 October 2009 |title=UK Supreme Court judges sworn in |work=BBC News |url=http://news.bbc.co.uk/1/hi/uk/8283939.stm |access-date=6 October 2009 |archive-date=7 February 2020 |archive-url=https://web.archive.org/web/20200207160453/http://news.bbc.co.uk/1/hi/uk/8283939.stm |url-status=live}}; {{Cite web |date=July 2003 |title=Constitutional reform: A Supreme Court for the United Kingdom |url=http://www.dca.gov.uk/consult/supremecourt/supreme.pdf |archive-url=http://webarchive.nationalarchives.gov.uk/20090117132005/http://www.dca.gov.uk/consult/supremecourt/supreme.pdf |archive-date=17 January 2009 |access-date=13 May 2013 |publisher=Department for Constitutional Affairs}}</ref> The [[Judicial Committee of the Privy Council]], including the same members as the Supreme Court, is the highest court of appeal for several independent Commonwealth countries, the [[British Overseas Territories]] and the [[Crown Dependencies]].<ref>{{Cite web |title=Role of the JCPC |url=http://www.jcpc.uk/about/role-of-the-jcpc.html |access-date=28 April 2013 |publisher=Judicial Committee of the Privy Council |archive-date=14 January 2014 |archive-url=https://web.archive.org/web/20140114165910/http://www.jcpc.uk/about/role-of-the-jcpc.html |url-status=live}}</ref> Both English law, which applies in England and Wales, and Northern Ireland law are based on [[common law]] (or [[case law]]) principles.<ref>{{Cite book |last=Bainham |first=Andrew |url=https://books.google.com/books?id=AF303DEl0MkC&pg=PA298 |title=The international survey of family law: 1996 |publisher=Martinus Nijhoff |year=1998 |isbn=978-90-411-0573-8 |location=The Hague |page=298 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141743/https://books.google.com/books?id=AF303DEl0MkC&pg=PA298#v=onepage&q&f=false |url-status=live}}</ref> It originated in England in the [[Middle Ages]] and is the basis for many legal systems around the world.<ref>{{Cite web |title=Common Law |url=https://www.britannica.com/topic/common-law |access-date=27 May 2024 |publisher=Britannica |date=19 May 2024 |archive-date=6 May 2021 |archive-url=https://web.archive.org/web/20210506134920/https://www.britannica.com/topic/common-law |url-status=live}}</ref> The [[courts of England and Wales]] are headed by the [[Senior Courts of England and Wales]], consisting of the [[Court of Appeal of England and Wales|Court of Appeal]], the [[High Court of Justice]] for civil cases and the [[Crown Court]] for criminal cases.<ref>{{Cite web |title=The Australian courts and comparative law |url=http://www.alpn.edu.au/node/66 |archive-url=https://web.archive.org/web/20130414202207/http://alpn.edu.au/node/66 |archive-date=14 April 2013 |access-date=9 March 2015 |publisher=Australian Law Postgraduate Network}}</ref> Scots law is a hybrid system based on common-law and [[Civil law (legal system)|civil-law]] principles. The chief courts are the [[Court of Session]], for civil cases,<ref>{{Cite web |title=Court of Session&nbsp;– Introduction |url=http://www.scotcourts.gov.uk/session/index.asp |archive-url=https://web.archive.org/web/20080731094308/http://www.scotcourts.gov.uk/session/index.asp |archive-date=31 July 2008 |access-date=8 March 2015 |publisher=Scottish Courts}}</ref> and the [[High Court of Justiciary]], for criminal cases.<ref>{{Cite web |title=High Court of Justiciary&nbsp;– Introduction |url=http://www.scotcourts.gov.uk/justiciary/index.asp |archive-url=https://web.archive.org/web/20080912204821/http://www.scotcourts.gov.uk/justiciary/index.asp |archive-date=12 September 2008 |access-date=9 March 2015 |publisher=Scottish Courts}}</ref> The Supreme Court of the United Kingdom serves as the highest court of appeal for civil cases under Scots law.<ref>{{Cite web |title=House of Lords&nbsp;– Practice Directions and Standing Orders Applicable to Civil Appeals |url=https://publications.parliament.uk/pa/ld199697/ldinfo/ld08judg/bluebook/bluebk03.htm |archive-url=https://web.archive.org/web/20131206120915/http://www.publications.parliament.uk/pa/ld199697/ldinfo/ld08judg/bluebook/bluebk03.htm |archive-date=6 December 2013 |access-date=8 March 2015 |publisher=UK Parliament}}</ref> The criminal justice system has been characterised by low [[conviction rate]]s and [[Justice delayed is justice denied|court delays]] for some crime types.<ref name="s576">{{cite journal | last1=Lovett | first1=Jo | last2=Hales | first2=Gavin | last3=Kelly | first3=Liz | last4=Khan | first4=Aneela | last5=Hardiman | first5=Margaret | last6=Trott | first6=Louise | title=What can We Learn from Police Data About Timeliness in Rape and Serious Sexual Offence Investigations in England and Wales? | journal=International Criminology | volume=2 | issue=3 | date=2022 | issn=2662-9976 | doi=10.1007/s43576-022-00069-8 | pages=286–298| pmc=9527390 }}</ref> Crime in England and Wales increased between 1981 and 1995. Since that peak there has been an overall fall of 66% in recorded crime from 1995 to 2015,<ref>{{Cite web |url=http://www.ons.gov.uk/ons/dcp171778_419450.pdf |title=Crime in England and Wales, Year Ending June 2015 |publisher=Office for National Statistics |website=UK Government Web Archive |access-date=16 March 2023 |archive-date=16 March 2023 |archive-url=https://web.archive.org/web/20230316221317/https://webarchive.nationalarchives.gov.uk/ukgwa/20160105160709/http://www.ons.gov.uk/ons/dcp171778_419450.pdf |url-status=bot: unknown}}</ref> according to [[Crime statistics in the United Kingdom|UK crime statistics]]. [[United Kingdom labour law|UK labour laws]] establish employment rights including [[National Minimum Wage Act 1998|a minimum wage]], a minimum of 28 days annual holiday, parental leave, statutory sick pay and [[Pensions Act 2008|a pension]]. [[Same-sex marriage]] has been legal in England, Scotland, and Wales since 2014, and in [[Northern Ireland]] since 2020.<ref>{{cite web |last1=Wratten |first1=Marcus |title=Tom Allen to host vital new BBC show marking 10th anniversary of same-sex marriage |url=https://www.thepinknews.com/2023/07/03/tom-allen-bbc-my-big-gay-wedding-same-sex-marriage/ |website=PinkNews |date=3 July 2023 |access-date=2 September 2023 |archive-date=2 September 2023 |archive-url=https://web.archive.org/web/20230902195143/https://www.thepinknews.com/2023/07/03/tom-allen-bbc-my-big-gay-wedding-same-sex-marriage/ |url-status=live}}</ref> [[LGBT rights in the United Kingdom|LGBT equality]] in the United Kingdom is considered advanced by modern standards.<ref>{{Cite web |date=5 June 2023 |title=The 203 Worst (& Safest) Countries for LGBTQ+ Travel in 2023 |url=https://www.asherfergusson.com/lgbtq-travel-safety/ |access-date=20 August 2023 |website=Asher & Lyric |archive-date=10 September 2021 |archive-url=https://web.archive.org/web/20210910063408/https://www.asherfergusson.com/lgbtq-travel-safety/ |url-status=live}}</ref><ref>{{cite web |last1=R. Flores |first1=Andrew |title=Social Acceptance of LGBTI People in 175 Countries and Locations |url=https://williamsinstitute.law.ucla.edu/publications/global-acceptance-index-lgbt/ |website=Williams Institute |access-date=11 September 2023 |archive-date=13 September 2023 |archive-url=https://web.archive.org/web/20230913091254/https://williamsinstitute.law.ucla.edu/publications/global-acceptance-index-lgbt/ |url-status=live}}</ref> Since leaving the [[European Union|EU]] most disputes under UK-EU agreements are addressed through consultation between the parties. If consultation fails to resolve the issue, either party can request [[arbitration]], typically at the [[Permanent Court of Arbitration|PCA]] in [[Peace Palace|The Hague]].<ref name="commission.europa.eu" /><ref>{{Cite web |title=Disputes under the Trade and Cooperation Agreement |date=November 2021 |url=https://www.instituteforgovernment.org.uk/explainer/disputes-trade-and-cooperation-agreement |access-date=26 January 2025 |publisher=Institute for Government}}</ref><ref>{{Cite web |title=Sandeel fishing ban to remain in place |date=2 May 2025 |url=https://www.bbc.co.uk/news/articles/ckgrwxxzxkjo |website=BBC |access-date=4 May 2025 |archive-url=https://web.archive.org/web/20250504203005/https://www.bbc.com/news/articles/ckgrwxxzxkjo |archive-date=4 May 2025}}</ref> The [[EU–UK Trade and Cooperation Agreement]] states that the UK and EU have to cooperate and negotiate with each other with 'full mutual respect and good faith', as defined by international law.<ref>{{Cite web |title=Good Faith in Public Law |date=20 January 2022 |url=https://www.law.ox.ac.uk/news/2022-01-20-good-faith-public-law |website=ox.ac.uk |access-date=13 May 2025 |archive-url=https://web.archive.org/web/20250513165454/https://www.law.ox.ac.uk/news/2022-01-20-good-faith-public-law |archive-date=13 May 2025}}</ref> Under the [[Windsor Framework]], [[Northern Ireland]] matters requiring interpretation of EU law go to the [[European Court of Justice|ECJ]], though the [[Stormont Brake]] can prevent new EU rules from taking effect. == Economy == {{Main|Economy of the United Kingdom}} {{Further|Economy of England|Economy of Scotland|Economy of Northern Ireland|Economy of Wales}} [[File:Bank junction - 2020-09-20 (2).jpg|thumb|[[City of London]] skyline from [[City Hall, London (Southwark)|London City Hall]]. [[London]] is Europe's largest financial centre.<ref>{{Cite web |last=Yanatma |first=Servet |date=16 March 2024 |title=Europe's top financial centres: Where's best to do business? |url=https://www.euronews.com/business/2024/03/16/europes-top-financial-centres-wheres-best-to-do-business |access-date=16 August 2025 |publisher=[[Euronews]] |quote=While the US dominates the upper end of the list, with New York taking the number one spot, London continues to lead in Europe.}}</ref>]] The United Kingdom has a highly developed [[social market economy]].<ref>{{Cite journal |last1=Thane |first1=Pat |year=2019 |title=The Origins of the British Welfare State |journal=The Journal of Interdisciplinary History |volume=50 |issue=3 |pages=427–433 |doi=10.1162/jinh_a_01448 |s2cid=208223636 |doi-access=free}}</ref><ref name="ftms">{{cite web |last1=Griffiths |first1=Alan |last2=Wall |first2=Stuart |date=16 July 2011 |title=Applied Economics |url=http://www.ftms.edu.my/pdf/Download/UndergraduateStudent/BusinessEconomics/BC215001S%20-%20BE%20Key%20Text%20-%20Applied%20Economics.pdf |url-status=dead |archive-url=https://web.archive.org/web/20130620120524/http://www.ftms.edu.my/pdf/Download/UndergraduateStudent/BusinessEconomics/BC215001S%20-%20BE%20Key%20Text%20-%20Applied%20Economics.pdf |archive-date=20 June 2013 |access-date=25 September 2014}}</ref> With an estimated nominal [[gross domestic product]] (GDP) of £2.819 trillion in 2025,<ref>{{Cite web |title=Data Explorer |url=https://data.imf.org/en/Data-Explorer?datasetUrn=IMF.RES:WEO(9.0.0) |access-date=2026-05-07 |website=data.imf.org}}</ref> it is the [[List of countries by GDP (nominal)|fifth-largest national economy]] in the world and the [[List of sovereign states in Europe by GDP (nominal)|second-largest]] in Europe. Its currency, the [[pound sterling]], is the [[Foreign exchange market#Most traded currencies by value|fourth-most-traded currency]] in the [[foreign exchange market]] and the world's fourth-largest [[reserve currency]], after the [[United States dollar]], the [[euro]] and the [[yen]].<ref>{{Cite web |title=World Currency Composition of Official Foreign Exchange Reserves |url=https://data.imf.org/regular.aspx?key=41175 |access-date=10 October 2021 |website=IMF Data |archive-date=12 May 2016 |archive-url=https://web.archive.org/web/20160512202858/https://data.imf.org/regular.aspx?key=41175 |url-status=live}}</ref> The pound sterling maintains its high nominal value through both its long history of stability and by never undergoing formal [[redenomination]]. Since 2022 the UK has been both the world's [[List of countries by exports|fourth-largest exporter]]<ref>{{Cite web |title=Exports of goods and services (BoP, current US$) |url=https://data.worldbank.org/indicator/BX.GSR.GNFS.CD?end=2024&most_recent_value_desc=true |access-date=22 September 2025 |website=[[World Bank]]}}</ref> and [[List of countries by imports|fourth-largest importer]]<ref>{{Cite web |title=Imports of goods and services (current US$) |url=https://data.worldbank.org/indicator/NE.IMP.GNFS.CD?most_recent_value_desc=true |access-date=22 September 2025 |website=[[World Bank]] |archive-date=13 September 2025 |archive-url=https://web.archive.org/web/20250913065521/https://data.worldbank.org/indicator/NE.IMP.GNFS.CD?most_recent_value_desc=true |url-status=live }}</ref> of goods and services. Despite having one of the highest levels of [[Income inequality in the United Kingdom|income inequality]] in the [[OECD]],<ref>{{Cite web |last1=Francis-Devine |first1=Brigid |title=House of Commons Research Briefing on Income inequality in the UK. |url=https://commonslibrary.parliament.uk/research-briefings/cbp-7484/ |url-status=live |archive-url=https://web.archive.org/web/20220210104536/https://commonslibrary.parliament.uk/research-briefings/cbp-7484/ |archive-date=10 February 2022 |access-date=1 July 2023 |website=UK Parliament}}</ref><ref>{{Cite web |title=Inequality – Income inequality – OECD Data |url=http://data.oecd.org/inequality/income-inequality.htm |archive-url=https://web.archive.org/web/20230629183322/https://data.oecd.org/inequality/income-inequality.htm |archive-date=29 June 2023 |access-date=3 July 2023 |website=theOECD}}</ref> the UK has a very high [[Human Development Index|HDI]] ranking, including when [[List of countries by inequality-adjusted Human Development Index|adjusted for inequality]]. As of 2025 the [[Unemployment in the United Kingdom|UK unemployment rate]] is 4.7%<ref>{{Cite web |last1=Labiak |first1=Mitchell |last2=Smith |first2=Oliver |date=17 July 2025 |title=UK jobs market weakens as unemployment rate rises |url=https://www.bbc.com/news/articles/cg754negn75o |access-date=25 September 2025 |website=www.bbc.com |language=en-GB |archive-date=15 September 2025 |archive-url=https://web.archive.org/web/20250915184829/https://www.bbc.com/news/articles/cg754negn75o |url-status=live }}</ref> and the annual [[List of countries by real GDP per capita growth|real GDP per head growth]] was 1.1%.<ref name="f919">{{cite web | title=GDP quarterly national accounts, UK | website=Office for National Statistics | date=2026 | url=https://www.ons.gov.uk/economy/grossdomesticproductgdp/bulletins/quarterlynationalaccounts/octobertodecember2025 | access-date=2026-04-24}}</ref> [[HM Treasury]], led by the [[Chancellor of the Exchequer]], is responsible for developing and executing the government's [[public finance]] and [[economic policy]]. The [[Department for Business and Trade]] is responsible for business, international trade, and enterprise. The [[Bank of England]] is the UK's [[central bank]] and responsible for issuing notes and coins in the pound sterling. Banks in Scotland and Northern Ireland retain the right to issue their own notes, subject to retaining enough Bank of England notes in reserve to cover their issue. === Industries and services === [[File:Bank-of-England.jpg|thumb|The [[Bank of England]] is the [[central bank]] of the United Kingdom and the model on which most modern central banks have been based.]] [[File:British Airways Concorde G-BOAC 03.jpg|thumb|[[Concorde]] was a [[Supersonic speed|supersonic]] airliner that reduced transatlantic flight time from 8 hours to 3.5 hours.<ref>{{Cite web |title=Celebrating Concorde |url=https://www.britishairways.com/en-gb/information/about-ba/history-and-heritage/celebrating-concorde |archive-url=https://web.archive.org/web/20230317103939/https://www.britishairways.com/en-gb/information/about-ba/history-and-heritage/celebrating-concorde |archive-date=17 March 2023 |access-date=30 March 2023}}</ref>]] The [[Tertiary sector of the economy|service sector]] made up around 80 per cent of the UK's [[Gross value added|GVA]] in 2023.<ref>{{Cite web |last=Hutton |first=Georgina |date=3 October 2024 |title=Industries in the UK |url=https://commonslibrary.parliament.uk/research-briefings/cbp-8353/ |access-date=19 May 2025 |website=UK Parliament: House of Commons Library |archive-date=7 October 2021 |archive-url=https://web.archive.org/web/20211007134640/https://commonslibrary.parliament.uk/research-briefings/cbp-8353/ |url-status=live }}</ref> As of 2023 it is the world's [[List of countries by service exports|second-largest exporter of services]]<ref>{{Cite web |title=Service exports (BoP, current US$) |url=https://data.worldbank.org/indicator/BX.GSR.NFSV.CD?most_recent_value_desc=true&year_high_desc=false |access-date=19 May 2025 |website=World Bank Open Data |archive-date=17 March 2023 |archive-url=https://web.archive.org/web/20230317140633/https://data.worldbank.org/indicator/BX.GSR.NFSV.CD?most_recent_value_desc=true&year_high_desc=false |url-status=live }}</ref> and in 2024 was the world's largest net exporter of [[Financial services in the United Kingdom|financial services]].<ref>{{Cite web |date=15 January 2025 |title=UK leads world in financial services trade surplus |url=https://www.thecityuk.com/news/uk-leads-world-in-financial-services-trade-surplus/ |access-date=2 June 2025 |website=TheCityUK |language=en}}</ref> [[London]] is the world capital for foreign exchange trading, with a market share of 37.8 per cent in 2022 of the global turnover.<ref>{{Cite web |date=30 September 2025 |title=BIS Triennial Survey of Foreign Exchange and Over-The-Counter Interest Rate Derivatives Markets in April 2025 – UK Data |url=https://www.bankofengland.co.uk/news/2025/september/bis-triennial-survey-of-foreign-exchange-and-over-the-counter-interest-rate-derivatives-markets |access-date=7 December 2025 |publisher=Bank of England}}</ref> It is the largest urban economy in Europe<ref>{{Cite web |last=Florida |first=Richard |date=16 March 2017 |title=The Economic Power of Cities Compared to Nations |url=https://www.bloomberg.com/news/articles/2017-03-16/top-metros-have-more-economic-power-than-most-nations |url-status=live |archive-url=https://web.archive.org/web/20240308074221/https://www.bloomberg.com/news/articles/2017-03-16/top-metros-have-more-economic-power-than-most-nations |archive-date=8 March 2024 |access-date=22 February 2024 |website=Bloomberg}}</ref> and, alongside [[New York City|New York]], the city in the world most integrated with the [[World economy|global economy]].<ref>{{Cite web |title=World Cities 2024 |url=https://gawc.lboro.ac.uk/gawc-worlds/the-world-according-to-gawc/world-cities-2024/ |access-date=21 September 2025 |website=GaWC |language=en-US |archive-date=3 July 2025 |archive-url=https://web.archive.org/web/20250703071437/https://gawc.lboro.ac.uk/gawc-worlds/the-world-according-to-gawc/world-cities-2024/ |url-status=live }}</ref> London is also one of the world's leading financial centres, ranking second in the 2025 [[Global Financial Centres Index]].<ref name="www.longfinance.net">{{Cite web |title=GFCI 36 Rank - Long Finance |url=https://www.longfinance.net/programmes/financial-centre-futures/global-financial-centres-index/gfci-36-explore-the-data/gfci-36-rank/ |access-date=19 May 2025 |website=www.longfinance.net |archive-date=25 September 2024 |archive-url=https://web.archive.org/web/20240925155927/https://www.longfinance.net/programmes/financial-centre-futures/global-financial-centres-index/gfci-36-explore-the-data/gfci-36-rank/ |url-status=live }}</ref> [[Edinburgh]], the UK's second-largest financial centre, ranks 29th in the world in the same index.<ref name="www.longfinance.net" /> The [[Manufacturing in the United Kingdom|UK's manufacturing sector]] in 2024 was the world's [[List of countries by manufacturing output|10th-largest]] and Europe's fourth-largest by value output.<ref>{{Cite web |title=World Bank Open Data |url=https://data.worldbank.org/indicator/NV.IND.MANF.CD?most_recent_value_desc=true |access-date=5 August 2025 |website=World Bank Open Data |archive-date=7 January 2020 |archive-url=https://web.archive.org/web/20200107135049/https://data.worldbank.org/indicator/NV.IND.MANF.CD?most_recent_value_desc=true |url-status=live }}</ref> At the end of 2024 manufacturing in the United Kingdom accounted for 8 per cent of the workforce and 8.6 per cent of national economic output.<ref>{{Cite web |date=22 May 2025 |title=Manufacturing industries: Economic indicators |url=https://commonslibrary.parliament.uk/research-briefings/sn05206/ |access-date=1 June 2025 |website=House of Commons Library}}</ref> As reported in 2017 the [[East Midlands Manufacturing|East Midlands]] and [[West Midlands Manufacturing|West Midlands]] (at 12.6 and 11.8 per cent respectively) were the regions with the highest proportion of employees in manufacturing. [[London manufacturing|London's manufacturing sector]] had the lowest at 2.8 per cent.<ref>Hennik Research. [http://www.themanufacturer.com/wp-content/uploads/2017/01/Annual-Manufacturing-Report-2017-Final-Version.pdf ''Annual Manufacturing Report: 2017'' (Dec. 2016)] {{Webarchive|url=https://web.archive.org/web/20170131192050/http://www.themanufacturer.com/wp-content/uploads/2017/01/Annual-Manufacturing-Report-2017-Final-Version.pdf|date=31 January 2017}}</ref> The [[Tourism in the United Kingdom|country's tourism sector]] is important to the British economy;<ref>{{Cite web |last1=Chan |first1=Kelvin |date=25 April 2023 |title=King Charles' coronation is bringing millions of tourists and a cash infusion to London but it probably won't save the British economy |url=https://fortune.com/2023/04/25/king-charles-coronation-tourists-money-london-british-economy/ |archive-url=https://web.archive.org/web/20230502144950/https://fortune.com/2023/04/25/king-charles-coronation-tourists-money-london-british-economy/ |archive-date=2 May 2023 |access-date=9 May 2023 |website=[[fortune.com]] |agency=The Associated Press}}</ref> The [[creative industries]] accounted for 5.9 per cent of the UK's GVA in 2019,<ref>{{Cite web |title=DCMS Economic Estimates 2019 (provisional): Gross Value Added |url=https://www.gov.uk/government/statistics/dcms-economic-estimates-2019-gross-value-added/dcms-economic-estimates-2019-provisional-gross-value-added |access-date=31 January 2023 |website=gov.uk |archive-date=31 January 2023 |archive-url=https://web.archive.org/web/20230131001226/https://www.gov.uk/government/statistics/dcms-economic-estimates-2019-gross-value-added/dcms-economic-estimates-2019-provisional-gross-value-added |url-status=live}}</ref> and contributed £111 billion to the UK economy in 2018.<ref>{{Cite web |year=2020 |title=UK's Creative Industries contributes almost £13 million to the UK economy every hour |url=https://www.gov.uk/government/news/uks-creative-industries-contributes-almost-13-million-to-the-uk-economy-every-hour |access-date=21 February 2023 |publisher=UK Government |archive-date=21 February 2023 |archive-url=https://web.archive.org/web/20230221131518/https://www.gov.uk/government/news/uks-creative-industries-contributes-almost-13-million-to-the-uk-economy-every-hour |url-status=live}}</ref> [[Lloyd's of London]], located in London, is the world's largest [[insurance]] and [[reinsurance]] market.<ref>{{Cite web |title=Lloyd's of London – value proposition |url=https://www.lloyds.com/about-lloyds/value-proposition-coverholder |archive-url=https://web.archive.org/web/20230227100951/https://www.lloyds.com/about-lloyds/value-proposition-coverholder |archive-date=27 February 2023 |website=Lloyd's of London}}</ref> [[WPP plc]] is one of the world's biggest advertising companies and also based in London.<ref>{{Cite web |title=Rankings 2025 - Creative 100 |url=https://www.warc.com/creative/rankings/creative-100 |website=WARC |access-date=12 June 2025 |archive-url=https://web.archive.org/web/20250612162216/https://www.warc.com/creative/rankings/creative-100 |archive-date=12 June 2025}}</ref> The UK is one of Europe's leading retail markets and its largest [[e-commerce]] market.<ref>{{Cite web |url=https://www.great.gov.uk/international/content/investment/sectors/retail/ |access-date=18 January 2024 |title=Retail |publisher=great.gov.uk |archive-date=18 January 2024 |archive-url=https://web.archive.org/web/20240118084416/https://www.great.gov.uk/international/content/investment/sectors/retail/ |url-status=live}}</ref> With [[Consumer spending|consumption expenditures]] of over US$2 trillion in 2023, it has the [[List of largest consumer markets|second-largest consumer market]] in Europe.<ref>{{Cite web |title=Households and NPISHs Final consumption expenditure (current US$) |url=https://data.worldbank.org/indicator/NE.CON.PRVT.CD?year_high_desc=true |access-date=17 August 2024 |website=World Bank Group |archive-date=12 June 2018 |archive-url=https://web.archive.org/web/20180612143614/https://data.worldbank.org/indicator/NE.CON.PRVT.CD?year_high_desc=true |url-status=live}}</ref> [[John Lewis Partnership|John Lewis]] is the UK's largest employee-owned business.<ref>{{Cite web |url=https://employeeownership.co.uk/resources/what-the-evidence-tells-us/ |access-date=18 January 2024 |title=Employee owned businesses - What the evidence tells us |archive-date=2 December 2023 |archive-url=https://web.archive.org/web/20231202155249/https://employeeownership.co.uk/resources/what-the-evidence-tells-us/ |url-status=live}}</ref> The [[Automotive industry in the United Kingdom|British automotive industry]] generates £47&nbsp;billion of exports (12 per cent of the UK's total exports of goods).<ref name="Auto Output 2025" /> In 2024 the UK produced 779,584 passenger vehicles and 125,649 commercial vehicles; 8 out of 10 cars produced in the UK are exported overseas.<ref name="Auto Output 2025">{{Cite web |date=15 May 2025 |title=SMMT Motor Industry Facts 2025 |url=https://www.smmt.co.uk/smmt-motor-industry-facts-2025/ |access-date=26 May 2025 |website=SMMT |archive-date=26 May 2025 |archive-url=https://web.archive.org/web/20250526074751/https://www.smmt.co.uk/smmt-motor-industry-facts-2025/ |url-status=live}}</ref> Britain is known for iconic cars like [[Mini Hatch|Mini]] and [[Jaguar Cars|Jaguar]],<ref>{{Cite web |date=19 November 2020 |title=Best British cars: Top 50 all-time greatest British-built cars revealed - page 2 |url=https://www.autoexpress.co.uk/best-cars-vans/351729/best-british-cars-top-50-all-time-greatest-british-built-cars-revealed/page-2 |access-date=9 March 2024 |website=Auto Express |archive-date=16 March 2024 |archive-url=https://web.archive.org/web/20240316184015/https://www.autoexpress.co.uk/best-cars-vans/351729/best-british-cars-top-50-all-time-greatest-british-built-cars-revealed/page-2 |url-status=live}}</ref> as well as luxury cars such as [[Rolls-Royce Motor Cars|Rolls-Royce]], [[Bentley]] and [[Range Rover]]. The UK is a major centre for engine manufacturing: 1.59&nbsp;million engines were produced in 2024.<ref name="Auto Output 2025" /> It was the world's [[List of countries by engine exports|third-largest exporter of engines]] by value in 2023.<ref>{{Cite web |title=Combustion Engines |url=https://oec.world/en/profile/hs/combustion-engines |access-date=26 May 2025 |website=OEC - The Observatory of Economic Complexity |archive-date=26 May 2025 |archive-url=https://web.archive.org/web/20250526073421/https://oec.world/en/profile/hs/combustion-engines |url-status=live}}</ref> The [[Motorsport in the United Kingdom|UK motorsport]] industry has an annual turnover of around £10&nbsp;billion.<ref>{{Cite web |year=2020 |title=UK motorsport industry in pole position for F1's 70th anniversary |url=https://www.gov.uk/government/news/uk-motorsport-industry-in-pole-position-for-f1s-70th-anniversary |access-date=19 February 2023 |publisher=UK Government |archive-date=19 February 2023 |archive-url=https://web.archive.org/web/20230219100712/https://www.gov.uk/government/news/uk-motorsport-industry-in-pole-position-for-f1s-70th-anniversary |url-status=live}}</ref> Seven of the eleven [[Formula One]] teams are based in the UK, with their technology being used in supercars and hypercars from [[McLaren Automotive|McLaren]], [[Aston Martin]] and [[Lotus Cars|Lotus]].{{Efn|Car brands here are classed as British based on several of the following criteria: historical heritage, cultural significance, design and engineering base, manufacturing location, headquarters location, UK registered company (even with overseas investors).}} The [[Aerospace industry in the United Kingdom|aerospace industry of the UK]] is the second-largest in the world<ref>{{cite web |title=United Kingdom - Country Commercial Guide: Aerospace and Defense |url=https://www.trade.gov/country-commercial-guides/united-kingdom-aerospace-and-defense |website=[[International Trade Administration]] |date=3 November 2023 |access-date=17 December 2024 |archive-date=12 June 2023 |archive-url=https://web.archive.org/web/20230612142750/https://www.trade.gov/country-commercial-guides/united-kingdom-aerospace-and-defense |url-status=live }}</ref> and has an annual turnover of around £30&nbsp;billion.<ref>{{Cite news |last=Tovey |first=Alan |date=29 June 2016 |title=Britain's aerospace sector soars amid fears Brexit could clip its wings |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/business/2016/06/29/britains-aerospace-sector-soars-amid-fears-brexit-could-clip-its |url-status=live |url-access=subscription |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/business/2016/06/29/britains-aerospace-sector-soars-amid-fears-brexit-could-clip-its |archive-date=10 January 2022}}{{Cbignore}}</ref> The [[British space programme|UK space industry]] was worth £17.5 billion in 2020/21 and employed around 48,800 people.<ref>{{cite web |title=UK space sector income reaches £17.5 billion as jobs and services grow |url=https://www.ukspace.org/uk-space-sector-income-reaches-17-5-billion-as-jobs-and-services-grow/ |website=UKspace |date=27 March 2023}}</ref><ref>{{cite web |title=UK space sector income reaches £17.5 billion as jobs and services grow |url=https://www.gov.uk/government/news/uk-space-sector-income-reaches-175-billion-as-jobs-and-services-grow |website=gov.uk |date=29 March 2023 |access-date=10 August 2025}}</ref> The [[UK Space Agency]] has stated in 2023 that it is investing £1.6&nbsp;billion in space-related projects.<ref>{{Cite web |url=https://www.gov.uk/government/news/new-funding-to-support-space-exploration-using-moon-resources-and-nuclear-power |title=New funding to support space exploration using Moon resources and nuclear power |access-date=11 March 2023 |archive-date=11 March 2023 |archive-url=https://web.archive.org/web/20230311195622/https://www.gov.uk/government/news/new-funding-to-support-space-exploration-using-moon-resources-and-nuclear-power}} <!-- (last checked 2023-03-11) --></ref> The [[Agriculture in the United Kingdom|British agriculture industry]] is intensive, highly mechanised and efficient by European standards, producing approximately 60 per cent of the country's overall food requirements and 73 per cent of its indigenous food needs, utilising around 0.9 per cent of the labour force (292,000 workers).<ref>{{Cite web |title=UK Food Security Index 2024 |url=https://www.gov.uk/government/publications/uk-food-security-index-2024/uk-food-security-index-2024 |access-date=19 May 2024 |publisher=Department for the Environment Food & Rural Affairs |archive-date=18 May 2024 |archive-url=https://web.archive.org/web/20240518072412/https://www.gov.uk/government/publications/uk-food-security-index-2024/uk-food-security-index-2024 |url-status=live}};{{Cite web |title=Agricultural workforce in England at 1 June 2023 |url=https://www.gov.uk/government/statistics/agricultural-workforce-in-england-at-1-june/agricultural-workforce-in-england-at-1-june-2023 |access-date=19 May 2024 |publisher=Department for the Environment Food & Rural Affairs |archive-date=19 May 2024 |archive-url=https://web.archive.org/web/20240519211112/https://www.gov.uk/government/statistics/agricultural-workforce-in-england-at-1-june/agricultural-workforce-in-england-at-1-june-2023 |url-status=live}}</ref> Around two-thirds of production is devoted to [[livestock]] and one-third to [[arable crops]]. The UK retains a significant though much reduced fishing industry, with at least 49 per cent of UK fish sustainably caught in 2020.<ref>{{Cite web |url=https://jncc.gov.uk/our-work/ukbi-b2-sustainable-fisheries |title=Sustainable fisheries: fish stocks harvested within safe limits |website=JNCC |access-date=14 December 2024}}</ref> The UK marine natural capital assets were estimated to have a value of £211 billion in 2021.<ref>{{Cite web |title=Marine accounts, natural capital, UK: 2021 |date=6 April 2021 |url=https://www.ons.gov.uk/economy/environmentalaccounts/bulletins/marineaccountsnaturalcapitaluk/2021 |website=ONS |access-date=21 May 2025 |archive-url=https://web.archive.org/web/20250521071820/https://www.ons.gov.uk/economy/environmentalaccounts/bulletins/marineaccountsnaturalcapitaluk/2021 |archive-date=21 May 2025}}</ref> It is rich in a variety of other natural resources including coal, [[petroleum]], [[natural gas]], tin, limestone, iron ore, salt, clay, chalk, [[gypsum]], lead, and silica and has an abundance of arable land.<ref>{{Cite web |url=http://www.bgs.ac.uk/mineralsuk/mines/coal/home.html |title=Coal |website=BGS Minerals UK |access-date=7 July 2015 |archive-date=26 April 2009 |archive-url=https://web.archive.org/web/20090426141109/http://www.bgs.ac.uk/ |url-status=live}}</ref> === Science and technology === {{Main|Science and technology in the United Kingdom|Telecommunications in the United Kingdom}} [[File:Cambridge Science Park Napp.jpg|thumb|The [[Cambridge Cluster]] is the most intensive research cluster for science and technology in the world.<ref>{{Cite book |last=WIPO |url=https://www.wipo.int/global_innovation_index/en/2022/index.html |title=Global Innovation Index 2022, 15th Edition |publisher=World Intellectual Property Organization |year=2022 |isbn=978-92-805-3432-0 |doi=10.34667/tind.46596 |access-date=16 November 2022 |archive-date=3 December 2022 |archive-url=https://web.archive.org/web/20221203061259/https://www.wipo.int/global_innovation_index/en/2022/index.html |url-status=live}}; {{Cite web |title=Global Innovation Index 2021 |url=https://www.wipo.int/global_innovation_index/en/2021 |access-date=5 March 2022 |website=[[World Intellectual Property Organization]] |publisher=[[United Nations]] |archive-date=5 March 2022 |archive-url=https://web.archive.org/web/20220305010458/https://www.wipo.int/global_innovation_index/en/2021/ |url-status=live}}; {{Cite web |title=Release of the Global Innovation Index 2020: Who Will Finance Innovation? |url=https://www.wipo.int/global_innovation_index/en/2020/index.html |access-date=2 September 2021 |website=World Intellectual Property Organization |archive-date=3 June 2021 |archive-url=https://web.archive.org/web/20210603121259/https://www.wipo.int/global_innovation_index/en/2020/index.html |url-status=live}}; {{Cite web |title=Global Innovation Index 2019 |url=https://www.wipo.int/global_innovation_index/en/2019/index.html |access-date=2 September 2021 |website=World Intellectual Property Organization |archive-date=2 September 2021 |archive-url=https://web.archive.org/web/20210902101818/https://www.wipo.int/global_innovation_index/en/2019/index.html |url-status=live}}; {{Cite web |title=RTD – Item |url=https://ec.europa.eu/newsroom/rtd/items/691898 |access-date=2 September 2021 |website=ec.europa.eu |archive-date=2 September 2021 |archive-url=https://web.archive.org/web/20210902140715/https://ec.europa.eu/newsroom/rtd/items/691898 |url-status=live}}</ref>]] England and Scotland were leading centres of the [[Scientific Revolution]] from the 17th century.<ref>Gascoin, J. "A reappraisal of the role of the universities in the Scientific Revolution", in Lindberg, David C. and Westman, Robert S., eds (1990), ''Reappraisals of the Scientific Revolution''. Cambridge University Press. p. 248. {{ISBN|978-0-521-34804-1}}.</ref> The United Kingdom led the [[Industrial Revolution]] from the 18th century, and has continued to produce scientists and [[List of British engineers|engineers]] credited with [[List of British innovations and discoveries|important advances]].<ref>Reynolds, E.E.; Brasher, N.H. (1966). ''Britain in the Twentieth Century, 1900–1964''. Cambridge University Press. p. 336. {{OCLC|474197910}}</ref> Major theorists from the 17th and 18th centuries include [[Isaac Newton]], whose [[Newton's laws of motion|laws of motion]] and illumination of [[gravitation|gravity]] have been seen as a keystone of modern science;<ref>Burtt, E.A. (2003) 1924.[https://books.google.com/books?id=G9WBMa1Rz_kC&pg=PA207 ''The Metaphysical Foundations of Modern Science''] {{Webarchive|url=https://web.archive.org/web/20230326164803/https://books.google.com/books?id=G9WBMa1Rz_kC&pg=PA207 |date=26 March 2023 }}. Mineola, NY: Courier Dover. p. 207. {{ISBN|978-0-486-42551-1}}.</ref> from the 19th century [[Charles Darwin]], whose theory of [[evolution]] by [[natural selection]] was fundamental to the development of modern biology, and [[James Clerk Maxwell]], who formulated classical [[electromagnetic theory]]; and more recently [[Stephen Hawking]], who advanced major theories in the fields of [[cosmology]], [[quantum gravity]] and the investigation of [[black holes]].<ref>Hatt, C. (2006). [https://books.google.com/books?id=BVBvehqrAPQC ''Scientists and Their Discoveries''] {{Webarchive|url=https://web.archive.org/web/20230326164803/https://books.google.com/books?id=BVBvehqrAPQC |date=26 March 2023 }}. London: Evans Brothers. pp. 16, 30 and 46. {{ISBN|978-0-237-53195-9}}.</ref> The [[Department for Science, Innovation and Technology]] (DSIT) is responsible for helping to develop and manage the UK's scientific, research, and technological outputs. Scientific research and development remains important in [[Universities in the United Kingdom|British universities]], with many establishing [[science park]]s to facilitate production and co-operation with industry.<ref>Castells, M.; Hall, P.; Hall, P.G. (2004). ''Technopoles of the World: the Making of Twenty-First-Century Industrial Complexes''. London: Routledge. pp. 98–100. {{ISBN|978-0-415-10015-1}}.</ref> In 2022, the UK produced [[List of countries by number of scientific and technical journal articles|6.0 per cent of the world's scientific research papers]] and had an 8.8 per cent share of scientific citations, the fourth and third highest among <abbr>G7</abbr> countries and Brazil, China, India, Russia, and South Korea. The UK ranked 1st among these countries for Field-Weighted Citation Impact.<ref>{{Cite web |title=International comparison of the UK research base, 2025 |url=https://www.gov.uk/government/publications/international-comparison-of-the-uk-research-base-2025/international-comparison-of-the-uk-research-base-2025 |access-date=2025-12-07 |website=GOV.UK |language=en}}</ref> Scientific journals produced in the UK include publications by the [[Royal Society]], ''[[Nature (journal)|Nature]]'', the ''[[BMJ|British Medical Journal]]'' and ''[[The Lancet]]''.<ref>{{Cite journal |last=McCook, Alison |year=2006 |title=Is peer review broken? |url=http://gaia.pge.utexas.edu/Good/Materials/scientist_02_28_2006.htm |journal=The Scientist |volume=20 |issue=2 |page=26 |archive-url=https://web.archive.org/web/20110816230933/http://gaia.pge.utexas.edu/Good/Materials/scientist_02_28_2006.htm |archive-date=16 August 2011 |access-date=22 June 2011}}</ref> By 2024 the UK tech sector reached a value of US$1.2 trillion surpassing the combined values of the French and German sectors.<ref>{{Cite web |last=Greenberg |first=Elizabeth |date=2025-01-14 |title=UK Innovation Economy Worth a Combined $1.2 trillion |url=https://www.digit.fyi/uk-innovation-economy-worth-a-combined-1-2-trillion/ |access-date=2026-05-26 |publisher=Digit News |language=en |quote=Valued at $1.2 trillion collectively, the UK innovation ecosystem is worth more than the French and German ecosystems combined.}}</ref> Cambridge was named the number one university in the world for producing successful technology founders.<ref>{{Cite web |title=UK tech sector retains #1 spot in Europe and #3 in world as sector resilience brings continued growth |date=21 December 2022 |url=https://www.gov.uk/government/news/uk-tech-sector-retains-1-spot-in-europe-and-3-in-world-as-sector-resilience-brings-continued-growth |website=gov.uk |access-date=27 May 2025 |archive-url=https://web.archive.org/web/20250527173044/https://www.gov.uk/government/news/uk-tech-sector-retains-1-spot-in-europe-and-3-in-world-as-sector-resilience-brings-continued-growth |archive-date=27 May 2025}}</ref> The [[Artificial intelligence industry in the United Kingdom|UK's artificial intelligence industry]] is the largest in Europe by value<ref>{{Cite web |date=11 June 2024 |title=UK AI sector most valuable in Europe, new report reveals |url=https://www.holyrood.com/news/view,uk-ai-sector-most-valuable-in-europe-new-report-reveals |access-date=20 July 2025 |website=[[Holyrood (magazine)|Holyrood]] |language=en}}</ref> and the country ranked fifth globally in a 2026 report on artificial intelligence development by [[Stanford University]].<ref>{{Cite web |title=Which countries are leading in AI? {{!}} Stanford HAI |url=https://hai.stanford.edu/ai-index/global-vibrancy-tool |access-date=2026-05-09 |website=hai.stanford.edu |language=en}}</ref> The UK ranked 6th in the 2025 [[Global Innovation Index]].<ref>{{Cite web |title=GII Innovation Ecosystems & Data Explorer 2025 |url=https://www.wipo.int/gii-ranking/en/united-kingdom |access-date=16 October 2025 |website=WIPO}}</ref><ref>{{Cite book |last1=Dutta |first1=Soumitra |url=https://www.wipo.int/web-publications/global-innovation-index-2025/en/index.html |title=Global Innovation Index 2025: Innovation at a Crossroads |last2=Lanvin |first2=Bruno |publisher=[[World Intellectual Property Organization]] |year=2025 |isbn=978-92-805-3797-0 |page=19 |language=en |doi=10.34667/tind.58864 |access-date=17 October 2025}}</ref> === Transport === {{Main|Transport in the United Kingdom}} {{further|Transport in England|Transport in Scotland|Transport in Wales|Transport in Northern Ireland}} [[File:An LNER Azuma train on the East Coast Railway Line, geograph 6275180 by Walter Baxter.jpg|thumb|A high-speed [[East Coast Main Line]] train in [[Northumberland]], England]] [[File:London City Airport Sunset.jpg|thumb|A plane taking off from [[London City Airport]]. [[Airports of London|London's airports]] make it the city with the [[List of busiest city airport systems by passenger traffic|busiest airport system]] in the world.]] In the UK, all traffic [[Left- and right-hand traffic|drives on the left]], with distance and speed being measured in miles, yards and miles per hour (mph). All vehicles manufactured for use in the UK have the steering wheel situated on the right side of the vehicle. A radial road network totals {{Convert|29145|mi|km}} of main roads, {{Convert|2173|mi|km}} of motorways and {{Convert|213750|mi|km}} of paved roads.<ref name="factbook" /> The [[M25 motorway|M25]], encircling London, is the largest and busiest bypass in the world.<ref>{{Cite book |last=Moran |first=Joe |url=https://archive.org/details/readingeveryday00mora |title=Reading the Everyday |date=16 November 2005 |publisher=Routledge |isbn=978-1-134-37216-4 |page=[https://archive.org/details/readingeveryday00mora/page/n107 95] |url-access=limited}}</ref> In 2024 there were 41.7&nbsp;million licensed vehicles in the UK.<ref>{{cite web |title=General facts and figures about roads and road use |url=https://www.racfoundation.org/motoring-faqs/mobility |access-date=31 May 2025 |archive-date=18 May 2025 |archive-url=https://web.archive.org/web/20250518191035/https://www.racfoundation.org/motoring-faqs/mobility}}</ref> The UK has an extensive railway network of {{Convert|10072|mi|0|abbr=out}}. In Great Britain, the [[British Rail]] network [[privatisation of British Rail|was privatised]] between 1994 and 1997, followed by a rapid rise in passengers. [[Great British Railways]] is a planned state-owned public body that will oversee [[rail transport in Great Britain]]. The UK was ranked eighth amongst national European rail systems in the 2017 European Railway Performance Index assessing intensity of use, quality of service and safety.<ref>{{Cite web |last1=Sylvain Duranton |last2=Agnès Audier |last3=Joël Hazan |last4=Mads Peter Langhorn |last5=Vincent Gauche |date=18 April 2017 |title=The 2017 European Railway Performance Index |url=https://www.bcg.com/en-ch/publications/2017/transportation-travel-tourism-2017-european-railway-performance-index.aspx |publisher=Boston Consulting Group |access-date=4 February 2019 |archive-date=31 May 2020 |archive-url=https://web.archive.org/web/20200531104458/https://www.bcg.com/en-ch/publications/2017/transportation-travel-tourism-2017-european-railway-performance-index.aspx |url-status=live}}</ref> A train runs directly from London to [[Paris]].<ref>{{Cite web |title=London to Paris Trains |url=https://www.eurostar.com/uk-en/train/london-to-paris |access-date=11 May 2024 |publisher=Eurostar |archive-url=https://web.archive.org/web/20240511114452/https://www.eurostar.com/uk-en/train/london-to-paris |archive-date=11 May 2024}}</ref> Called the [[Eurostar]], it travels through the [[Channel Tunnel]] under the [[English Channel]]. At 23.5&nbsp;miles long, it is the world's longest undersea tunnel.<ref>{{Cite web |title=Channel Tunnel, Tunnel, Europe |url=https://www.britannica.com/topic/Channel-Tunnel |access-date=11 May 2024 |publisher=Britannica |date=10 May 2024}}</ref> There is also a car service through the tunnel to France called [[LeShuttle]]. The [[Elizabeth line]], a rail link running between [[East London|East]] and [[West London]], was named in honour of [[Queen Elizabeth II]] in 2016 and opened in 2022.<ref>{{Cite news |date=2 January 2012 |title=Crossrail's giant tunnelling machines unveiled |work=BBC News |url=https://www.bbc.co.uk/news/av/uk-16289051 |access-date=20 June 2018 |archive-date=10 April 2016 |archive-url=https://web.archive.org/web/20160410034914/http://www.bbc.co.uk/news/uk-16289051 |url-status=live}}; {{Cite news |last=Leftly |first=Mark |date=29 August 2010 |title=Crossrail delayed to save £1bn |work=Independent |location=London |url=https://www.independent.co.uk/news/business/news/crossrail-delayed-to-save-1631bn-2064629.html |access-date=22 August 2017 |archive-date=16 November 2020 |archive-url=https://web.archive.org/web/20201116062835/https://www.independent.co.uk/news/business/news/crossrail-delayed-to-save-1631bn-2064629.html |url-status=live}}</ref><ref>{{Cite web |title=Crossrail to become the Elizabeth line in honour of Her Majesty the Queen |url=https://tfl.gov.uk/info-for/media/press-releases/2016/february/crossrail-to-become-the-elizabeth-line-in-honour-of-her-majesty-the-queen |archive-url=https://web.archive.org/web/20230225110413/https://tfl.gov.uk/info-for/media/press-releases/2016/february/crossrail-to-become-the-elizabeth-line-in-honour-of-her-majesty-the-queen |archive-date=25 February 2023 |website=Transport for London}}</ref> Another major infrastructure project is [[High Speed 2]] (HS2), a high-speed railway under construction since 2019. It will link London with [[Birmingham]], with the potential to extend further north and capable of speeds of up to 225&nbsp;mph.<ref>{{Cite web |title=What is HS2 |url=https://www.hs2.org.uk/what-is-hs2 |website=HS2 |access-date=22 June 2022 |archive-date=21 June 2022 |archive-url=https://web.archive.org/web/20220621190841/https://www.hs2.org.uk/what-is-hs2/ |url-status=live}}</ref><ref>{{Cite web |title=HS2 Trains |url=https://www.hs2.org.uk/building-hs2/trains/ |website=HS2 |access-date=24 February 2023 |archive-date=24 February 2023 |archive-url=https://web.archive.org/web/20230224183953/https://www.hs2.org.uk/building-hs2/trains/ |url-status=live}}</ref> In 2023 there were 4 billion bus journeys in the UK, 1.8 billion of which were in London.<ref>{{Cite web |title=Transport Statistics Great Britain: 2023 Domestic Travel |date=19 December 2024 |url=https://www.gov.uk/government/statistics/transport-statistics-great-britain-2024/transport-statistics-great-britain-2023-domestic-travel |website=gov.uk |access-date=14 March 2025}}</ref> The red [[Double-decker bus|double-decker]] bus has entered popular culture as an internationally recognised icon of London and England.<ref>{{Cite web |title=Our Collection |url=http://www.icons.org.uk/theicons/index.html |access-date=16 August 2014 |publisher=icons.org.uk}}</ref> The [[London Buses|London bus network]] is extensive, with over 6,800 scheduled services every weekday carrying about 6&nbsp;million passengers on over 700 different routes, making it one of the most extensive bus systems in the world and the largest in Europe.<ref>[http://www.tfl.gov.uk/corporate/modesoftransport/1548.aspx London Buses], Transport for London. Accessed 10 May 2007.</ref> During 2024 [[List of airports in the United Kingdom and the British Crown Dependencies|British airports]] handled nearly 292.5 million passengers.<ref name="caastats">{{Cite web |title=Size of Reporting Airports 2024 |url=https://www.caa.co.uk/Documents/Download/11910/4d230d1f-dab6-4c1a-992a-431b9cca89a2/16918 |access-date=17 January 2025 |publisher=Civil Aviation Authority}}</ref> In that period the three largest airports were [[London Heathrow Airport]] (83.9 million passengers), [[Gatwick Airport]] (43.2 million passengers) and [[Manchester Airport]] (30.8 million passengers).<ref name="caastats" /> London Heathrow Airport, located {{Convert|15|mi|km|}} west of the capital, is the world's [[List of busiest airports by passenger traffic|second-busiest airport by international passenger traffic]] and has the most international passenger traffic of any airport in the world;<ref>{{Cite news |date=25 June 2008 |title=Heathrow 'needs a third runway' |work=BBC News |url=http://news.bbc.co.uk/1/hi/business/7472432.stm |access-date=17 October 2008}}; {{Cite press release |title=Statistics: Top 30 World airports |date=July 2008 |publisher=Airports Council International |url=http://www.aci.aero/aci/aci/file/Press%20Releases/2008/TOP30_International%20Passengers_2007.pdf |access-date=15 October 2008}}</ref> it is the hub for the UK flag carrier [[British Airways]], as well as [[Virgin Atlantic]].<ref>{{Cite news |date=29 October 2008 |title=BMI being taken over by Lufthansa |work=BBC News |url=http://news.bbc.co.uk/2/hi/7697261.stm |access-date=23 December 2009}}</ref> During 2023, 18.3 million passengers travelled internationally by rail and 18.1 million by sea.<ref>{{Cite web |title=Transport Statistics Great Britain: 2023 International Travel |date=19 December 2024 |url=https://www.gov.uk/government/statistics/transport-statistics-great-britain-2024/transport-statistics-great-britain-2023-international-travel |website=gov.uk |access-date=4 March 2025}}</ref> === Energy === {{Main|Energy in the United Kingdom}} {{further|Energy in England|Energy in Scotland|Energy in Wales|Energy in Northern Ireland}} In 2021 the UK was the world's [[List of countries by energy consumption and production|14th-largest consumer and 22nd-largest producer of energy]].<ref name="United Kingdom Energy Profile">{{Cite web |title=United Kingdom Energy Profile |url=https://www.eia.gov/international/overview/country/GBR |archive-url=https://web.archive.org/web/20230228165225/https://www.eia.gov/international/overview/country/GBR |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=U.S. Energy Information Administration}}</ref> It is home to [[Big Six energy suppliers|many large energy companies]], including two of the six major oil and gas companies{{snd}}[[BP]] and [[Shell plc|Shell]].<ref>{{Cite news |last=Mason |first=Rowena |date=24 October 2009 |title=Let the battle begin over black gold |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/finance/newsbysector/energy/6424030/Let-the-battle-begin-over-black-gold.html |url-status=live |url-access=subscription |access-date=26 November 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/finance/newsbysector/energy/6424030/Let-the-battle-begin-over-black-gold.html |archive-date=10 January 2022}}{{Cbignore}}; {{Cite news |last=Heath |first=Michael |date=26 November 2010 |title=RBA Says Currency Containing Prices, Rate Level 'Appropriate' in Near Term |work=Bloomberg |location=New York |url=https://www.bloomberg.com/news/2010-11-25/rba-s-stevens-says-inflation-unlikely-to-fall-much-further.html |access-date=26 November 2010}}</ref> [[File:Ardrossan's fan club. - panoramio.jpg|thumb|Wind turbines overlooking [[Ardrossan]] in Scotland. The UK is [[Wind power in the United Kingdom|a major producer of wind energy]] in Europe.<ref>{{Cite web |date=13 September 2023 |title='Success story': Which European countries are leading the way on wind? |url=https://www.euronews.com/green/2023/09/13/winds-of-change-which-european-countries-are-generating-the-most-energy-from-wind |access-date=15 August 2025 |website=[[Euronews]] |language=en}}</ref>]] Renewable electricity sources provided 51 per cent of the electricity generated in the UK in 2024. [[Wind power in the United Kingdom|Wind power]] was the largest source of electricity in 2024, generating 30 per cent of the UK's total electricity.<ref name="2024 Energy">{{Cite report |title=Britain's Electricity Explained: 2024 Review |url=https://www.neso.energy/news/britains-electricity-explained-2024-review |archive-url=https://web.archive.org/web/20250126085830/https://www.neso.energy/news/britains-electricity-explained-2024-review |archive-date=26 January 2025 |access-date=26 January 2025 |publisher=NESO}}</ref> The UK has the largest offshore wind farm in the world, which is located off the coast of [[Yorkshire]].<ref>{{Cite report |date=14 June 2021 |title=Wind energy in the UK: June 2021 |work=UK Government |url=https://www.ons.gov.uk/economy/environmentalaccounts/articles/windenergyintheuk/june2021 |access-date=8 May 2023}}</ref> In 2023 the UK had nine nuclear reactors generating about 15 per cent of the UK's electricity.<ref name="coal-ref">{{Cite web |title=Nuclear Power in the United Kingdom |url=https://world-nuclear.org/information-library/country-profiles/countries-t-z/united-kingdom.aspx |archive-url=https://web.archive.org/web/20230228175735/https://world-nuclear.org/information-library/country-profiles/countries-t-z/united-kingdom.aspx |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=World Nuclear Association}}</ref> There are two reactors under construction and more planned.<ref>{{Cite web |date=April 2013 |title=Nuclear Power in the United Kingdom |url=http://www.world-nuclear.org/info/inf84.html |archive-url=https://web.archive.org/web/20130214061431/http://www.world-nuclear.org/info/inf84.html |archive-date=14 February 2013 |access-date=9 April 2013 |publisher=World Nuclear Association}}</ref><ref>{{Cite news |title=Nuclear energy: What you need to know |url=https://www.gov.uk/government/news/nuclear-energy-what-you-need-to-know |archive-url=https://web.archive.org/web/20230228181113/https://www.gov.uk/government/news/nuclear-energy-what-you-need-to-know |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=UK Government}}</ref> In the late 1990s [[Nuclear power plants in the United Kingdom|nuclear power plants]] contributed around 25 per cent of the total annual electricity generation in the UK, but this has gradually declined as old plants have been shut down. The UK government is investing in [[small modular reactors]] that operate via [[nuclear fission]], as well as in research and development towards commercial [[fusion reactors]]. To that end the government entered into a partnership with the US in late 2023 to collaborate on fusion technology, with "a commercial grid-ready fusion reactor by 2040" stated as a goal.<ref>{{Cite news |title=UKAEA implementing the UK's fusion energy strategy |work=Open Access Government |date=7 March 2024 |url=https://www.openaccessgovernment.org/ukaea-implementing-the-uks-fusion-energy-strategy/174384/ |access-date=27 May 2024 |last1=Belderbos |first1=Harriet}};{{Cite magazine |title=UK nuclear fusion reactor sets new world record for energy output |url=https://www.newscientist.com/article/2415909-uk-nuclear-fusion-reactor-sets-new-world-record-for-energy-output/ |magazine=New Scientist |access-date=27 May 2024}}</ref> At the end of 2023 it was estimated that there were 1.1&nbsp;billion [[barrels of oil equivalent]] of "proven" and "probable" [[Oil and gas reserves and resource quantification|gas reserves]] and 2.3&nbsp;billion boe of "proven" and "probable" [[North Sea oil|oil reserves]] offshore, reducing reliance on imports for energy security and transitioning to renewables.<ref>{{Cite report |title=UK Oil and Gas Reserves and Resources |url=https://www.nstauthority.co.uk/media/vtjkyqnf/uk-reserves-and-resources-report-as-at-end-2023.pdf |archive-url=https://web.archive.org/web/20250113172052/https://www.nstauthority.co.uk/media/vtjkyqnf/uk-reserves-and-resources-report-as-at-end-2023.pdf |archive-date=13 January 2025 |access-date=1 February 2025 |publisher=North Sea Transition Authority}}</ref> Emissions from UK gas production are roughly four times lower than imported [[liquefied natural gas]] (LNG), according to the [[North Sea Transition Authority|UK's oil and gas regulator]].<ref>{{Cite news |title=North Sea oil and gas claims fact-checked |work=BBC |date=22 January 2024 |url=https://www.bbc.co.uk/news/science-environment-67945281 |archive-url=https://web.archive.org/web/20250201182137/https://www.bbc.com/news/science-environment-67945281 |archive-date=1 February 2025 |access-date=1 February 2025}}</ref> In September 2024 the last coal power station was closed, making [[coal]] no longer a power source in the UK.<ref name="2024 Energy" /> The UK currently has no [[fracking]] (hydraulic fracturing) for [[shale gas]] despite a large supply, due to environmental concerns.<ref>{{Cite news |title=UK's last fracking wells to be filled with cement despite dwindling gas stocks |date=29 January 2025 |url=https://www.cityam.com/uks-last-fracking-wells-to-be-filled-with-cement-despite-dwindling-gas-stocks/ |archive-url=https://web.archive.org/web/20250201182917/https://www.cityam.com/uks-last-fracking-wells-to-be-filled-with-cement-despite-dwindling-gas-stocks/ |archive-date=1 February 2025 |access-date=1 February 2025 |work=City AM}}</ref> === Water supply and sanitation === {{Main|Water supply and sanitation in the United Kingdom}} Access to improved water supply and sanitation in the UK is universal. It was estimated that 96 per cent of households were connected to the sewer network in 2022.<ref>{{Cite web |url=https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/69582/pb6655-uk-sewage-treatment-020424.pdf |title=Sewage Treatment in the UK |publisher=DEFRA |website=assets.publishing.service.gov.uk |date=March 2022 |page=3 |id=PB 6655 |access-date=8 April 2023}}</ref> According to the [[Environment Agency]], total water abstraction for public water supply in the UK was 16,406 [[megalitre]]s per day in 2007.<ref>{{Cite web |title=Environment Agency |url=http://www.environment-agency.gov.uk/research/library/data/112185.aspx |archive-url=https://web.archive.org/web/20091125040346/http://www.environment-agency.gov.uk/research/library/data/112185.aspx |archive-date=25 November 2009}}</ref> In England and Wales, water and sewerage services are provided by 10 private regional water and sewerage companies and 13 mostly smaller private "water only" companies. In Scotland, said services are provided by a single public company, [[Scottish Water]]. In Northern Ireland, they are also provided by a single public entity, [[Northern Ireland Water]].<ref>{{Cite web |title=About Us |url=https://www.niwater.com/about |access-date=29 August 2020 |publisher=niwater.com}}</ref> == Demographics == {{Main|Demographics of the United Kingdom|British people}} {{Further|Ceremonial counties of England|Subdivisions of Scotland|Subdivisions of Wales|Counties of Northern Ireland}} Whereas the censuses of England and Wales and of Northern Ireland went ahead as planned in 2021, the census in Scotland was delayed until 2022 due to the COVID-19 pandemic. The Office for National Statistics has estimated that the total population of the United Kingdom recorded in the census would have been 66,912,637 had it been conducted in all parts of the UK on 21 March 2021.<ref name=Ethnicity2021/> The UK population is the [[List of European countries by population|fourth-largest]] in Europe and the [[List of countries by population|22nd-largest]] in the world. In 2012 and 2013 births contributed the most to population growth, while in 2014 and 2015 net international migration contributed more.<ref name="pop2015">{{Cite web |date=23 June 2016 |title=Population Estimates for UK, England and Wales, Scotland and Northern Ireland, Mid-2015 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/latest |publisher=Office for National Statistics}}</ref> Between 2001 and 2011 the population increased at an average annual rate of 0.7 per cent.<ref name="2011census">{{Cite web |date=21 December 2022 |title=Population estimates for the UK, England, Wales, Scotland and Northern Ireland: mid-2021 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/mid2021 |access-date=16 April 2025 |publisher=Office for National Statistics}}</ref> The [[2011 United Kingdom census|2011 census]] also showed that, over the previous 100 years, the proportion of the population aged 0–14 fell from 31 to 18 per cent, and the proportion of people aged 65 and over rose from 5 to 16 per cent.<ref name="2011census" /> In 2018 the [[median age]] of the UK population was 41.7 years.<ref name="factbook" /> The 2021 census put Scotland's population at 5.48&nbsp;million, Wales's at 3.1&nbsp;million and Northern Ireland's at 1.9&nbsp;million.<ref name="2011census" /> <!-- Self-maintaining population table --> {{UK population table}} England's population in 2021 was 56&nbsp;million, representing some 84 per cent of the UK total.<ref name="2011census" /> England is one of the [[List of countries and dependencies by population density|most-densely-populated countries]] in the world, with 434&nbsp;people per square kilometre in mid-2021,<ref name="2011census" /> with a particular concentration in London and the south-east.<ref>{{Cite news |last=Khan |first=Urmee |date=16 September 2008 |title=England is most crowded country in Europe |url=https://www.telegraph.co.uk/news/newstopics/politics/2967374/England-is-most-crowded-country-in-Europe.html |archive-url=https://web.archive.org/web/20080918221002/http://www.telegraph.co.uk/news/newstopics/politics/2967374/England-is-most-crowded-country-in-Europe.html |archive-date=18 September 2008 |access-date=5 September 2009 |work=The Telegraph |location=London}}</ref> [[London metropolitan area|London's wider metropolitan area]] is the largest in [[Western Europe]], with a population of 14.9&nbsp;million in 2024.<ref>{{Cite web |title=Major Agglomerations |url=http://citypopulation.de/en/world/agglomerations |url-status=live |archive-url=https://web.archive.org/web/20231004094531/https://www.citypopulation.de/en/world/agglomerations/ |archive-date=4 October 2023 |access-date=16 October 2023}}</ref> {| class="wikitable sortable" style="text-align:right;" |+ Population of England by region ({{UK subdivision statistics year}})<ref name="ONS mid-year pop est">{{UK subdivision statistics citation}}</ref> |- ! Rowspan=2 | Region ! Colspan=2 | Land area ! Colspan=2 | Population ! Rowspan=2 | Density<br />(/km<sup>2</sup>) |- ! (km<sup>2</sup>) ! (%) ! People ! (%) |- | style="text-align:left;" | [[North East England|North East]] | 8,581 | 6% | 2,683,040 | 5% | 313 |- | style="text-align:left;" | [[North West England|North West]] | 14,108 | 11% | 7,516,113 | 13% | 533 |- | style="text-align:left;" | [[Yorkshire and the Humber]] | 15,404 | 12% | 5,541,262 | 10% | 360 |- | style="text-align:left;" | [[East Midlands]] | 15,624 | 12% | 4,934,939 | 9% | 316 |- | style="text-align:left;" | [[West Midlands (region)|West Midlands]] | 12,998 | 10% | 6,021,653 | 11% | 463 |- | style="text-align:left;" | [[East of England]] | 19,116 | 15% | 6,398,497 | 11% | 335 |- | style="text-align:left;" | [[Greater London]] | 1,572 | 1% | 8,866,180 | 15% | 5,640 |- | style="text-align:left;" | [[South East England|South East]] | 19,072 | 15% | 9,379,833 | 16% | 492 |- | style="text-align:left;" | [[South West England|South West]] | 23,836 | 18% | 5,764,881 | 10% | 242 |- ! style="text-align:left;" | England ! style="text-align:right;" | 130,310 ! style="text-align:right;" | 100% ! style="text-align:right;" | 57,106,398 ! style="text-align:right;" | 100% ! style="text-align:right;" | 438 |} In 2021 the [[total fertility rate]] across the UK was 1.53 children born per woman,<ref>{{Cite web |title=Vital statistics: population and health reference tables |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/vitalstatisticspopulationandhealthreferencetables |access-date=6 March 2018 |website=Office for National Statistics}}</ref> which remains considerably below the [[Mid-20th century baby boom|baby boom]] peak of 2.95 children per woman in 1964,<ref>{{Cite news |last=Boseley |first=Sarah |date=14 July 2008 |title=The question: What's behind the baby boom? |url=https://www.theguardian.com/lifeandstyle/2008/jul/14/familyandrelationships.women |access-date=28 August 2009 |work=The Guardian |location=London |page=3}}</ref> or the high of 6.02 children born per woman in 1815<ref>{{Citation |last=Roser |first=Max |title=Total Fertility Rate around the world over the last centuries |date=2014 |work=[[Our World in Data]], [[Gapminder Foundation]] |url=https://ourworldindata.org/grapher/children-born-per-woman?year=1800&country=GBR |access-date=10 December 2019 |archive-url=https://web.archive.org/web/20190705121623/https://ourworldindata.org/grapher/children-born-per-woman?year=1800&country=GBR |archive-date=5 July 2019}}</ref> and below the replacement rate of 2.1. In 2011, 47.3 per cent of births in the UK were to unmarried women.<ref>[http://epp.eurostat.ec.europa.eu/tgm/table.do?tab=table&plugin=0&language=en&pcode=tps00018 Tables, Graphs and Maps Interface (TGM) table]. Eurostat (26 February 2013). Retrieved 12 July 2013.</ref> The [[Office for National Statistics]] reported in 2015 that amongst the UK population aged 16 and over, 1.7 per cent identify as gay, lesbian, or bisexual (2.0 per cent of males and 1.5 per cent of females); 4.5 per cent of respondents responded with "other", "I don't know", or did not respond.<ref>{{Cite web |date=5 October 2016 |title=Sexual identity, UK: 2015 – Experimental Official Statistics on sexual identity in the UK in 2015 by region, sex, age, marital status, ethnicity and NS-SEC |url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/sexuality/bulletins/sexualidentityuk/2015 |access-date=19 January 2017 |publisher=[[Office for National Statistics]]}}</ref> The number of [[transgender]] people in the UK was estimated to be between 65,000 and 300,000 by research between 2001 and 2008.<ref>{{Cite web |title=Research report 27: Trans research review |url=http://www.equalityhumanrights.com/about-us/our-work/key-projects/trans-inequalities-reviewed/introduction-to-the-review |url-status=dead |archive-url=https://web.archive.org/web/20150706020643/http://www.equalityhumanrights.com/about-us/our-work/key-projects/trans-inequalities-reviewed/introduction-to-the-review |archive-date=6 July 2015 |access-date=26 November 2021 |website=equalityhumanrights.com |page=v}}</ref> {{Largest Urban Areas of the United Kingdom}} === Ethnicity === {{Main|Ethnic groups in the United Kingdom}} Historically, indigenous British people were thought to be [[Genetic history of the British Isles|descended from ethnic groups]] that settled there before the 12th century: the [[Celts]], Romans, Anglo-Saxons, Norse and the [[Normans]]. [[Welsh people]] could be the oldest ethnic group in the UK.<ref>{{Cite news |date=19 June 2012 |title=Welsh people could be most ancient in UK, DNA suggests |url=https://www.bbc.co.uk/news/uk-wales-18489735 |access-date=28 April 2013 |work=BBC News}}</ref> The UK has a history of non-white immigration with [[Liverpool]] having the oldest black population in the country dating from at least the 1730s,<ref>{{Cite book |last=Winder |first=Robert |url=https://books.google.com/books?id=7ORcaQIgdcEC&q=combed&pg=PT94 |title=Bloody Foreigners: The Story of Immigration to Britain |date=2010 |publisher=Little, Brown Book |isbn=978-0-7481-2396-4}}; {{Cite book |last=Costello |first=Ray |title=Black Liverpool: The Early History of Britain's Oldest Black Community 1730–1918 |date=2001 |publisher=Picton Press |isbn=978-1-873245-07-1 |location=Liverpool}}</ref> in addition to having the oldest [[British Chinese|Chinese]] community in Europe dating from the 19th century.<ref>{{Cite web |title=Culture and Ethnicity Differences in Liverpool&nbsp;– Chinese Community |url=http://www.mersey-gateway.org/server.php?show=ConWebDoc.1369 |archive-url=https://web.archive.org/web/20090724204513/http://www.mersey-gateway.org/server.php?show=ConWebDoc.1369 |archive-date=24 July 2009 |access-date=9 March 2015 |publisher=Chambré Hardman Trust}}</ref> In 2021, 83.1 per cent of the UK population was classified as white, 8.6 per cent as Asian or Asian British, 3.7 per cent as Black or Black British, 2.7 per cent as mixed ethnicity, and 2.0 per cent other.<ref name=Ethnicity2021/> Ethnic diversity varies significantly across the UK. In 2021, 46.2 per cent of London's population was from a non-white ethnic minority,<ref name=Regionaldiversity>{{cite news|url=https://www.ethnicity-facts-figures.service.gov.uk/uk-population-by-ethnicity/national-and-regional-populations/regional-ethnic-diversity/latest/|title=Regional ethnic diversity|publisher=Office for National Statistics|date=22 December 2022|access-date=28 March 2026}}</ref> compared less than 10 per cent in the South West and North East of England, Wales,<ref name=Regionaldiversity/> Scotland<ref>{{cite news|url=https://www.scotlandscensus.gov.uk/census-results/at-a-glance/ethnicity/|title=Ethnicity|publisher=National Records of Scotland|date=4 February 2025|access-date=28 March 2026}}</ref> and Northern Ireland.<ref>{{cite web|url=https://www.nisra.gov.uk/system/files/statistics/census-2021-ms-b01.xlsx|title=MS-B01: Ethnic group|publisher=Northern Ireland Statistics and Research Agency|date=30 November 2023|access-date=28 March 2026}}</ref> === Language === {{Main|Languages of the United Kingdom}} The [[English language]] is the ''[[de facto]]'' official and most widely spoken language in the United Kingdom.<ref>{{Cite web |title=English language&nbsp;– Government, citizens and rights |url=http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012519 |archive-url=http://webarchive.nationalarchives.gov.uk/20121015000000/http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012519 |archive-date=15 October 2012 |access-date=23 August 2011 |website=[[Directgov]]}}</ref><ref>{{Cite journal |last=Mac Sithigh |first=Daithí |date=17 May 2018 |title=Official status of languages in the UK and Ireland |url=https://pureadmin.qub.ac.uk/ws/portalfiles/portal/141540053/Status_OA_Feb_2018.pdf |journal=Common Law World Review |publisher=Queen's University, Belfast |volume=47 |issue=1 |pages=77–102 |doi=10.1177/1473779518773642 |s2cid=219987922}}</ref> The UK promotes the language globally to build connections, understanding and trust between people in the UK and countries worldwide.<ref>British Council {{Cite web |title=British Council &#124; the UK's international culture and education organisation |url=https://www.britishcouncil.org/ |url-status=live |archive-url=https://web.archive.org/web/20230201181104/https://www.britishcouncil.org/ |archive-date=1 February 2023 |access-date=5 December 2018}} (last checked 6 February 2023)</ref><ref>{{Cite web |title=About BBC Learning English |url=https://www.bbc.com/learningenglish/english/hygiene |url-status=live |archive-url=https://web.archive.org/web/20230204204233/https://www.bbc.com/learningenglish/english/hygiene |archive-date=4 February 2023 |access-date=9 February 2023 |website=BBC}}</ref> In the UK, the English language is spoken with distinctive characteristics that collectively form what is known as [[British English]]. The variety of dialects and accents is often noted, with nearby regions frequently having highly distinct variations. [[Received Pronunciation]] is traditionally associated with educated speakers in southern England.<ref>{{Cite web |title=British English Pronunciations |url=https://www.oed.com/information/understanding-entries/pronunciation/british-english-pronunciations/?tl=true |archive-url=https://web.archive.org/web/20250605075115/https://www.oed.com/information/understanding-entries/pronunciation/british-english-pronunciations/?tl=true |archive-date=5 June 2025 |access-date=5 June 2025 |website=OED}}</ref> The main national dialects are [[Scottish English]], [[Welsh English]] and [[Northern Irish English]]. Distinctive regional varieties include [[Brummie dialect|Brummie]], [[Cockney]], [[Geordie]], [[Manchester dialect|Mancunian]], [[Scouse]], [[West Country English|West Country]], [[Yorkshire dialect|Yorkshire]] and [[Multicultural London English|MLE]] (Multicultural London English).<ref>{{Cite web |title=10 British dialects you need to know |url=https://www.ef.com/wwen/blog/language/british-dialects-you-need-to-know/ |website=EF |access-date=5 June 2025}}</ref> [[File:Bilingual welcome sign Newry.jpg|thumb|[[Bilingual sign]] ([[Irish language|Irish]] and [[English language|English]]) in [[Newry]], Northern Ireland]]Three indigenous [[Celtic languages]] are spoken in the UK: [[Welsh language|Welsh]], [[Irish language|Irish]] and [[Scottish Gaelic]]. [[Cornish language|Cornish]], which became extinct as a first language in the late-18th century, is being revived and has a small group of second-language speakers.<ref>{{Cite book |last1=Track |first1=Robert Lawrence |url=https://books.google.com/books?id=oLx9AgAAQBAJ&q=%E2%80%9Cthese+people+speak+the+dead+language+as+a+second+language%E2%80%9D&pg=PA63 |title=Language and Linguistics: The Key Concepts |last2=Stockwell, Peter |date=2007 |isbn=978-0-415-41358-9 |page=63 |publisher=Routledge |access-date=4 August 2019}}; {{Cite web |title=Framework Convention for the Protection of National Minorities, Strasbourg, 1.II.1995 |url=http://conventions.coe.int/Treaty/en/Treaties/Html/157.htm |access-date=9 March 2015 |publisher=Council of Europe |archive-date=22 February 2005 |archive-url=https://web.archive.org/web/20050222193410/http://conventions.coe.int/Treaty/EN/treaties/Html/157.htm |url-status=dead}}; {{Cite web |title=European Charter for Regional or Minority Languages, Strasbourg, 5.XI.1992 |url=http://conventions.coe.int/treaty/en/Treaties/Html/148.htm |access-date=9 March 2015 |publisher=Council of Europe |archive-date=26 February 2011 |archive-url=https://web.archive.org/web/20110226052008/http://conventions.coe.int/Treaty/EN/Treaties/HTML/148.htm |url-status=dead}}</ref><ref name="reglang" /> In the [[2021 United Kingdom census|2021 census]] the [[Welsh-speaking population]] of Wales aged three or older was 538,300 (17.8 per cent).<ref>{{Cite web |date=6 December 2022 |title=Welsh language in Wales (Census 2021) |url=https://gov.wales/welsh-language-wales-census-2021-html |access-date=6 December 2022 |website=gov.wales}}</ref> In addition it is estimated that about 200,000 Welsh-speakers live in England.<ref>{{Cite web |last=Wynn Thomas |first=Peter |date=March 2007 |title=Welsh today |url=https://www.bbc.co.uk/voices/multilingual/welsh.shtml |access-date=5 July 2011 |website=Voices |publisher=BBC}}</ref> In the 2021 census in Northern Ireland 12.4 per cent of people had some [[Irish language in Northern Ireland|Irish language]] ability and 10.4 per cent had some facility in the [[Ulster Scots dialect|Ulster-Scots]] language.<ref>{{Cite web |title=Census 2021: Main statistics for Northern Ireland |url=https://www.nisra.gov.uk/system/files/statistics/census-2021-main-statistics-for-northern-ireland-phase-1-statistical-bulletin-language.pdf |archive-url=https://web.archive.org/web/20240210110853/https://www.nisra.gov.uk/system/files/statistics/census-2021-main-statistics-for-northern-ireland-phase-1-statistical-bulletin-language.pdf |archive-date=10 February 2024 |access-date=10 February 2024}}</ref> In 2001, over 92,000 people in Scotland, just under 2 per cent of the population, had some Gaelic language ability, including 72 per cent of those living in the [[Outer Hebrides]].<ref>{{Cite web |title=Scotland's Census 2001&nbsp;– Gaelic Report |url=http://www.gro-scotland.gov.uk/press/news2005/scotlands-census-2001-gaelic-report.html |archive-url=https://web.archive.org/web/20130522110328/http://www.gro-scotland.gov.uk/press/news2005/scotlands-census-2001-gaelic-report.html |archive-date=22 May 2013 |access-date=28 April 2013 |publisher=General Register Office for Scotland}}</ref> The number of children being taught either Welsh or Scottish Gaelic is increasing.<ref>{{Cite news |date=12 February 2009 |title=Local UK languages 'taking off' |url=http://news.bbc.co.uk/1/hi/education/7885493.stm |work=BBC News}}</ref> [[Scots language|Scots]], a language descended from early northern [[Middle English]], has limited [[European Charter for Regional or Minority Languages|recognition]] alongside its regional variant, [[Ulster Scots dialects|Ulster Scots]] in Northern Ireland, without specific commitments to protection and promotion.<ref name="reglang" /><ref>{{Cite web |title=Language Data&nbsp;– Scots |url=http://www.eurolang.net/index.php?option=com_content&task=view&id=2449&Itemid=52&lang=en |archive-url=https://web.archive.org/web/20070623185445/http://eurolang.net/index.php?option=com_content&task=view&id=2449&Itemid=52&lang=en |archive-date=23 June 2007 |access-date=2 November 2008 |publisher=European Bureau for Lesser-Used Languages}}</ref> As of April 2020 there are around 151,000 users of [[British Sign Language]] (BSL), a [[sign language]] used by deaf people, in the UK.<ref>{{Cite news |last=Brown |first=Hannah |date=23 April 2020 |title='People are dying because of this': Calls for UK Gov to follow Scotland with sign language interpreter at Covid-19 briefing |url=https://www.scotsman.com/news/politics/people-are-dying-because-calls-uk-gov-follow-scotland-sign-language-interpreter-covid-19-briefing-2547989 |access-date=19 December 2021 |work=The Scotsman}}</ref> In 2013, it was estimated that 95 per cent of the UK's population were [[monolingual]] English speakers.<ref name="BBC languages">{{Cite web |title=Languages across Europe: United Kingdom |url=https://www.bbc.co.uk/languages/european_languages/countries/uk.shtml |access-date=4 February 2013 |website=BBC}}</ref> In 2013, over 5 per cent of the population were estimated to speak languages brought to the UK as a result of immigration.<ref name="BBC languages" /> [[South Asian languages]] are the largest group, which includes [[Punjabi language|Punjabi]], [[Urdu]], [[Bengali language|Bengali]], [[Sylheti language|Sylheti]], [[Hindi]], [[Pahari-Pothwari]], [[Tamil language|Tamil]] and [[Gujarati language|Gujarati]].<ref>Carl Skutsch (2013). ''Encyclopedia of the World's Minorities''. pp.1261. Routledge. Retrieved 3 December 2020.</ref> In the 2011 census [[Polish language|Polish]] was the second-largest language spoken in England, with 546,000 speakers.<ref>{{Cite news |last=Booth |first=Robert |date=30 January 2013 |title=Polish becomes England's second language |url=https://www.theguardian.com/uk/2013/jan/30/polish-becomes-englands-second-language |access-date=4 February 2012 |work=The Guardian |location=London}}</ref> In 2019 some three-quarters of a million people spoke little or no English.<ref>{{Cite news |date=23 April 2019 |title=The teenagers who translate for their parents |url=https://www.bbc.co.uk/news/av/uk-47982494 |access-date=23 April 2019 |work=BBC News}}</ref> === Religion === {{Main|Religion in the United Kingdom|Freedom of religion in the United Kingdom}} [[File:Westminster_Abbey_St_Peter.jpg|thumb|The [[Westminster Abbey]] in [[London]]. This was the [[Coronation of the British monarch|coronation]] site of 40 monarchs, 18 royal burials, and at least 16 royal weddings since 1100.]] [[Christianity]] has dominated religious life in the United Kingdom for [[History of Christianity in Britain|more than 1,400 years]].<ref>Cannon, John, ed. (2nd edn., 2009). [https://books.google.com/books?id=TYnfhTq2M7EC&pg=PA144 ''A Dictionary of British History'']. Oxford University Press. p. 144. {{ISBN|978-0-19-955037-1}}.</ref> Although a majority of citizens still identify with Christianity in surveys, regular church attendance has fallen dramatically since the middle of the 20th century,<ref>Field, Clive D. (November 2009). [http://www.brin.ac.uk/wp-content/uploads/2011/12/development-of-religious-statistics.pdf "British religion in numbers"]. BRIN Discussion Series on Religious Statistics, Discussion Paper 001. Retrieved 7 March 2015.</ref> while immigration and demographic change have contributed to the growth of Islam and other faiths.<ref>Yilmaz, Ihsan (2005). [https://books.google.com/books?id=ryrD2YODzxUC&pg=PA291 ''Muslim Laws, Politics and Society in Modern Nation States: Dynamic Legal Pluralisms in England, Turkey, and Pakistan'']. Aldershot: Ashgate Publishing. pp. 55–56. {{ISBN|978-0-7546-4389-0}}.</ref> This has led some commentators to describe the UK as a multi-faith,<ref>Brown, Callum G. (2006). [https://books.google.com/books?id=ryrD2YODzxUC&pg=PA291 ''Religion and Society in Twentieth-Century Britain'']. Harlow: Pearson Education. p. 291. {{ISBN|978-0-582-47289-1}}.</ref> [[secularised]],<ref>Norris, Pippa; Inglehart, Ronald (2004). [https://books.google.com/books?id=dto-P2YfWJIC&pg=PA84 ''Sacred and Secular: Religion and Politics Worldwide'']. Cambridge University Press. p. 84. {{ISBN|978-0-521-83984-6}}.</ref> or [[post-Christian]] society.<ref>Fergusson, David (2004). [https://books.google.com/books?id=Owz4aBSEINgC&pg=PA94 ''Church, State and Civil Society'']. Cambridge University Press. p. 94. {{ISBN|978-0-521-52959-4}}.</ref> In the 2021 census of England and Wales, 46.2 per cent of respondents reported that they were Christians, with the next largest faiths being [[Islam in the United Kingdom|Islam]] (6.5 per cent), [[Hinduism in the United Kingdom|Hinduism]] (1.7 per cent), [[Sikhism in the United Kingdom|Sikhism]] (0.9 per cent), [[Buddhism in the United Kingdom|Buddhism]] (0.5 per cent), [[Judaism in the United Kingdom|Judaism]] (0.5 per cent), and all other religions (0.6 per cent). Of the respondents, 37.2 per cent stated that they had [[Irreligion in the United Kingdom|no religion]] and a further 6.0 per cent did not answer the optional question.<ref>{{cite news|url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/religion/bulletins/religionenglandandwales/census2021|title=Religion, England and Wales: Census 2021|publisher=Office for National Statistics|first=Michael|last=Roskams|date=29 November 2022|access-date=28 March 2026}}</ref> In the census of Northern Ireland, 42.3 per cent of the population was recorded as Catholic, 37.7% as Protestant or other Christian, 1.3 per cent as belonging to other religions, 17.4 per cent as having no religion and 1.6 per cent did not state a religion.<ref>{{cite web|url=https://www.nisra.gov.uk/system/files/statistics/census-2021-ms-b19.xlsx|title=MS-B19: Religion|publisher=Northern Ireland Statistics and Research Agency|date=30 November 2023}}</ref> In Scotland's 2022 census, 51.1 per cent of the population stated that they had no religion, 20.4 per cent were recorded as Church of Scotland, 13.3 per cent as Catholic, 5.1 per cent as other Christian, 2.2 per cent as Muslim and 0.6 per cent as Hindu, with 1.2 per cent belonging to other religions and 6.2 per cent not stating a religion.<ref>{{cite web|url=https://www.scotlandscensus.gov.uk/2022-reports/scotland-s-census-2022-ethnic-group-national-identity-language-and-religion/|title=Scotland's Census 2022 - Ethnic group, national identity, language and religion|publisher=National Records of Scotland|date=21 May 2024|access-date=28 March 2026}}</ref> A [[Tearfund]] survey in 2007 showed that one Briton in ten attends church weekly.<ref>{{Cite web |date=4 April 2007 |title=United Kingdom: New Report Finds Only One in 10 Attend Church |url=http://news.adventist.org/2007/04/uite-kigom-ew-report-fis-oly-oe-i-10-atte-church.html |archive-url=https://web.archive.org/web/20111213155625/http://news.adventist.org/2007/04/uite-kigom-ew-report-fis-oly-oe-i-10-atte-church.html |archive-date=13 December 2011 |access-date=9 March 2015 |website=News.adventist.org}}</ref> Between the 2001 and 2011 censuses there was a 12 per cent decrease in those who identified as Christian, while the percentage reporting no religious affiliation doubled. This contrasted with growth in the other main religious group categories, with the number of [[Muslims]] increasing the most to about 5 per cent.<ref>{{Cite news |last=Philby |first=Charlotte |date=12 December 2012 |title=Less religious and more ethnically diverse: Census reveals a picture of Britain today |url=https://www.independent.co.uk/news/uk/home-news/less-religious-and-more-ethnically-diverse-census-reveals-a-picture-of-britain-today-8406506.html |work=[[The Independent|Independent]] |location=London}}</ref> The [[Church of England]] is the [[State religion|established church]] in England.<ref>{{Cite web |date=2004 |title=The History of the Church of England |url=http://www.cofe.anglican.org/about/history/ |url-status=dead |archive-url=https://web.archive.org/web/20100221212004/http://www.cofe.anglican.org/about/history |archive-date=21 February 2010 |access-date=23 November 2008 |website=The Church of England}}</ref> It retains [[Lords Spiritual|representation]] in the UK Parliament, and the British monarch is its [[Supreme Governor of the Church of England|Supreme Governor]].<ref>{{Cite web |title=Queen and Church of England |url=http://www.royalinsight.gov.uk/output/Page4708.asp |archive-url=https://web.archive.org/web/20061008203611/http://www.royalinsight.gov.uk/output/Page4708.asp |archive-date=8 October 2006 |access-date=5 June 2010 |publisher=British Monarchy Media Centre}}</ref> In [[religion in Scotland|Scotland]] the [[Church of Scotland]] is the [[national church]]. It is not subject to state control, and the British monarch is an ordinary member, required to swear an oath to "maintain and preserve the Protestant Religion and [[Presbyterian polity|Presbyterian Church Government]]" upon his or her accession.<ref>{{Cite web |title=Queen and the Church |url=http://www.royal.gov.uk/MonarchUK/QueenandChurch/History.aspx |url-status=live |archive-url=https://web.archive.org/web/20110605025533/http://www.royal.gov.uk/MonarchUK/QueenandChurch/History.aspx |archive-date=5 June 2011 |publisher=The British Monarchy (Official Website)}}</ref><ref name="reglang" /><ref>{{Cite web |date=22 February 2010 |title=Our structure |url=https://www.churchofscotland.org.uk/about-us/our-structure |url-status=live |archive-url=https://web.archive.org/web/20200125192732/https://www.churchofscotland.org.uk/about-us/our-structure |archive-date=25 January 2020 |website=churchofscotland.org.uk}}</ref> The [[Church in Wales]] was disestablished in 1920 and, because the [[Church of Ireland]] was disestablished in 1870 before the [[partition of Ireland]], there is no established church in Northern Ireland.<ref>Weller, Paul (2005). [https://books.google.com/books?id=tHc88PzAPLMC&pg=PA80 ''Time for a Change: Reconfiguring Religion, State, and Society'']. London: Continuum. pp. 79–80. {{ISBN|978-0-567-08487-3}}.</ref> Although there are no UK-wide data in the 2001 census on adherence to individual Christian denominations, it has been estimated that 62 per cent of Christians are Anglican, 13.5 per cent Catholic, 6 per cent Presbyterian, and 3.4 per cent Methodist, with smaller numbers of other denominations.<ref>Peach, Ceri, [https://books.google.com/books?id=i6ER_z8gcD4C "United Kingdom, a major transformation of the religious landscape"], in H. Knippenberg. ed. (2005). ''The Changing Religious Landscape of Europe''. Amsterdam: Het Spinhuis. pp. 44–58. {{ISBN|978-90-5589-248-8}}.</ref> === Migration === {{Main|Historical immigration to Great Britain|Modern immigration to the United Kingdom}} {{See also|Foreign-born population of the United Kingdom}} [[File:United Kingdom foreign born population by country of birth.png|thumb|upright=1.35|Estimated foreign-born population by country of birth from April 2007&nbsp;to March 2008]] [[File:British expats countrymap.svg|thumb|upright=1.35|Estimated number of British citizens living overseas by country in 2006: {{legend|#002255|Greater than or equal to 1,000,000}} {{legend|#003380|500,000 - 999,999}} {{legend|#0044aa|100,000 - 499,999}} {{legend|#0055d4|50,000 - 99,999}} {{legend|#0066ff|10,000 - 49,999}} {{legend|#2a7fff|5,000 - 9,999}} {{legend|#5599ff|1,000 - 4,999}} {{legend|#80b3ff|100 - 999}} {{legend|#afc6e9|Less than 100 or no data}} {{legend|#000000|UK}} ]] Immigration is contributing to a rising population in the United Kingdom,<ref>{{Cite news |date=21 August 2008 |title=Immigration and births to non-British mothers pushes British population to record high |url=https://www.standard.co.uk/news/immigration-and-births-to-nonbritish-mothers-pushes-british-population-to-record-high-6816318.html |work=London Evening Standard}}</ref><ref name="bbc-23-05-2024">{{cite news |title=Migration: How many people come to the UK and how are the salary rules changing? |url=https://www.bbc.com/news/uk-48785695 |work=BBC News |date=23 May 2024}}</ref> with arrivals and UK-born children of migrants accounting for about half of the population increase between 1991 and 2001. According to statistics released in 2015, 27 per cent of UK live births in 2014 were to mothers born outside the UK.<ref>{{Cite web |date=15 July 2015 |title=Births in England and Wales: 2014 |url=http://www.ons.gov.uk/ons/rel/vsob1/birth-summary-tables--england-and-wales/2014/index.html |website=Office for National Statistics }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> In 2013 approximately 208,000 foreign nationals were naturalised as British citizens, the highest number since 1962. This figure fell to around 125,800 in 2014. Between 2009 and 2013 the average number of British citizenships granted annually was 195,800. The most common origins of those naturalised in 2024 were Pakistani, Indian, [[Nigeria]]n, [[Philippines|Filipino]], [[Bangladesh]]i, Italian, Turkish, Romanian and Iranian. The number of grants of settlement, which confer [[Permanent residency|permanent residence]] in the UK but not [[British citizenship|citizenship]],<ref>{{Cite web |last=Blinder |first=Scott |date=11 June 2014 |title=Settlement in the UK |url=http://www.migrationobservatory.ox.ac.uk/briefings/settlement-uk |archive-url=https://web.archive.org/web/20150906232123/http://migrationobservatory.ox.ac.uk/briefings/settlement-uk |archive-date=6 September 2015 |access-date=1 August 2015 |publisher=The Migration Observatory, University of Oxford}}</ref> was approximately 154,700 in 2013, higher than the previous two years.<ref name="Blinder2015">{{Cite web |last=Blinder |first=Scott |date=27 March 2015 |title=Naturalisation as a British Citizen: Concepts and Trends |url=http://www.migrationobservatory.ox.ac.uk/sites/files/migobs/Briefing%20-%20Naturalisation%20as%20a%20British%20Citizen%20-%20Concepts%20and%20Trends_0.pdf |archive-url=https://web.archive.org/web/20150916052200/http://www.migrationobservatory.ox.ac.uk/sites/files/migobs/Briefing%20-%20Naturalisation%20as%20a%20British%20Citizen%20-%20Concepts%20and%20Trends_0.pdf |archive-date=16 September 2015 |access-date=1 August 2015 |publisher=The Migration Observatory, University of Oxford}}</ref> Long-term net migration (the number of people immigrating minus the number emigrating) reached a record of 860,000 in 2023, with immigration at 1.326&nbsp;million and emigration at 466,000. In comparison, in 2024 net migration was estimated to be 431,000 with immigration at 948,000 and emigration at 517,000.<ref>{{Cite web |title=Long-term international migration, provisional: year ending December 2024 |date=22 May 2025 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/internationalmigration/bulletins/longterminternationalmigrationprovisional/yearendingdecember2024 |website=gov.uk |access-date=22 May 2025}}</ref> [[British diaspora|Emigration]] was an important feature of British society in the 19th century. Between 1815 and 1930, around 11.4&nbsp;million people emigrated from Britain and 7.3&nbsp;million from Ireland.<ref>{{Cite book |last=Hammar |first=Tomas |url=https://www.cambridge.org/core/books/european-immigration-policy/10B639425685B0C101619FA11522C409 |title=European Immigration Policy: A Comparative Study |date=1985 |publisher=Cambridge University Press |isbn=978-0-521-12437-9 |series=Comparative Ethnic and Race Relations |location=Cambridge}}</ref><ref name="richards-2018">{{Cite book |last=Richards |first=Eric |url=https://www.jstor.org/stable/j.ctvnb7rj2 |title=The genesis of international mass migration: The British case, 1750-1900 |date=2018 |publisher=Manchester University Press |edition=1 |jstor=j.ctvnb7rj2}}</ref> Estimates show that by the end of the 20th century, some 300&nbsp;million people of British and Irish descent were permanently settled around the globe.<ref name="richards-2018" /> In 2006 at least 5.5&nbsp;million UK-born people lived abroad,<ref name="BritsAbroad">{{Cite web |last1=Sriskandarajah |first1=Dhananjayan |last2=Drew |first2=Catherine |date=11 December 2006 |title=Brits Abroad: Mapping the scale and nature of British emigration |url=http://www.ippr.org/publicationsandreports/publication.asp?id=509 |archive-url=https://web.archive.org/web/20070828011816/http://www.ippr.org/publicationsandreports/publication.asp?id=509 |archive-date=28 August 2007 |access-date=9 March 2015 |publisher=Institute for Public Policy Research}}</ref><ref>{{Cite news |title=Brits Abroad: world overview |url=http://news.bbc.co.uk/1/shared/spl/hi/in_depth/brits_abroad/html/default.stm |access-date=20 April 2007 |publisher=BBC}}; {{Cite news |last=Casciani |first=Dominic |date=11 December 2006 |title=5.5&nbsp;m Britons 'opt to live abroad' |work=BBC News |url=http://news.bbc.co.uk/2/hi/uk_news/6210358.stm |access-date=20 April 2007}}</ref> mainly in Australia, Spain, the United States and Canada.<ref name="BritsAbroad" /><ref>{{Cite news |date=11 December 2006 |title=Brits Abroad: Country-by-country |url=http://news.bbc.co.uk/2/hi/uk_news/6161705.stm |work=BBC News}}</ref> === Education === {{Main|Education in the United Kingdom|Universities in the United Kingdom}} {{Further|Education in England|Education in Scotland|Education in Wales|Education in Northern Ireland}} Education in the United Kingdom is a [[Devolution|devolved]] matter, with each country having a separate education system. About 38 per cent of the United Kingdom population has a university or [[college degree]], the highest percentage in Europe and one of the highest in the world.<ref>{{Cite web |date=24 September 2012 |title=The Most Educated Countries in the World |url=https://finance.yahoo.com/news/the-most-educated-countries-in-the-world.html;_ylt=AlaWy8IcyeBaviKi7_.WJyhE6odG;_ylu=X3oDMTJrY2d2NGZyBG1pdANDeFMgRmluYW5jaWFsbHkgRml0IEFydGljbGUgQXJ0aWNsZSBCb2R5IFByb2QEcG9zAzMEc2VjA01lZGlhQXJ0aWNsZUJvZHlBc3NlbWJseQ--;_ylg=X3oDMTNjdGVoaXJqBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDY2IyOTRhMGEtYmY2OS0zYTdlLThlYTUtZWFlNTU3YWI1ZTc3BHBzdGNhdANleGNsdXNpdmVzfGZpbmFuY2lhbGx5Zml0BHB0A3N0b3J5cGFnZQ--;_ylv=3?page=1 |archive-url=https://web.archive.org/web/20160204213400/http://finance.yahoo.com/news/the-most-educated-countries-in-the-world.html%3B_ylt%3DAlaWy8IcyeBaviKi7_.WJyhE6odG%3B_ylu%3DX3oDMTJrY2d2NGZyBG1pdANDeFMgRmluYW5jaWFsbHkgRml0IEFydGljbGUgQXJ0aWNsZSBCb2R5IFByb2QEcG9zAzMEc2VjA01lZGlhQXJ0aWNsZUJvZHlBc3NlbWJseQ--%3B_ylg%3DX3oDMTNjdGVoaXJqBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDY2IyOTRhMGEtYmY2OS0zYTdlLThlYTUtZWFlNTU3YWI1ZTc3BHBzdGNhdANleGNsdXNpdmVzfGZpbmFuY2lhbGx5Zml0BHB0A3N0b3J5cGFnZQ--%3B_ylv%3D3?page=1 |archive-date=4 February 2016 |access-date=20 April 2016 |website=Yahoo Finance }}; {{Cite magazine |date=27 September 2012 |title=And the World's Most Educated Country Is... |url=https://newsfeed.time.com/2012/09/27/and-the-worlds-most-educated-country-is/ |magazine=Time |location=New York |access-date=20 April 2016 |archive-date=30 April 2018 |archive-url=https://web.archive.org/web/20180430040213/http://newsfeed.time.com/2012/09/27/and-the-worlds-most-educated-country-is/ |url-status=dead }}</ref> The UK is home to [[List of universities in the United Kingdom|many universities]], including the [[University of Oxford]] and [[University of Cambridge]], which often achieve first place on global rankings.<ref>{{Cite web |title=The Times Higher Education World University Rankings 2024 |date=25 September 2023 |url=https://www.timeshighereducation.com/world-university-rankings/2024/world-ranking |access-date=17 April 2024}}</ref><ref>{{Cite web |title=QS World University Rankings 2024 |url=https://www.topuniversities.com/university-rankings/world-university-rankings/2024 |access-date=17 April 2024}}</ref> University education has varied [[Student loans and grants in the United Kingdom|tuition fees]] in different regions of the UK. England and Wales have a fixed maximum annual fee for all UK citizens, contingent on attaining a certain level of income. Only those who reach a certain salary threshold pay this fee through [[Taxation in the United Kingdom|general taxation]].<ref>{{Cite web |title=Repaying your student loan |url=https://www.gov.uk/repaying-your-student-loan/what-you-pay |website=gov.uk |access-date=21 June 2025}}</ref> Northern Ireland and Scotland have a reduced maximum fee or no fee for citizens where it is their home region. Some NHS courses have bursaries which pay the fee and in 2017 it was stated that each doctor gets subsidised by £230,000 during their training.<ref>{{Cite web |date=20 October 2014 |title=Undergraduate Tuition Fess and Student Loans |url=https://www.ucas.com/money-and-student-life/money/student-finance/undergraduate-tuition-fees-and-student-loans |access-date=24 February 2024 |website=UCAS}}</ref><ref>{{Cite web |title=More undergraduate medical education places |url=https://www.gov.uk/government/news/more-undergraduate-medical-education-places |access-date=24 February 2024 |website=gov.uk}}</ref> In 2022 the [[Programme for International Student Assessment]] (PISA), coordinated by the [[OECD]], ranked the overall knowledge and skills of British 15-year-olds as 14th in the world in reading, mathematics and science. The average British student scored 494, above the OECD average of 478.<ref>{{Cite web |title=PISA 2022 UK Results |url=https://www.oecd.org/publication/pisa-2022-results/country-notes/united-kingdom-9c15db47#chapter-d1e11 |access-date=24 February 2024 |website=OECD |date=4 December 2023}}</ref> === Health === {{Main|Health in the United Kingdom|Healthcare in the United Kingdom}} {{Further|Healthcare in England|Healthcare in Scotland|Healthcare in Wales|Healthcare in Northern Ireland}} [[File:QEUH.jpg|thumb|[[NHS Scotland]]'s [[Queen Elizabeth University Hospital]] in Glasgow, the largest hospital campus in Europe]] The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the creation of the [[National Health Service]] (NHS) in 1949 is the primary healthcare provider in the United Kingdom. The widespread popularity of the NHS has led to it being described as a "national religion".<ref>{{Cite news |last=Gill |first=Martha |date=9 July 2023 |title=To those who claim the NHS has turned into a British religion, I say: keep the faith |url=https://www.theguardian.com/commentisfree/2023/jul/09/nhs-british-religion-keep-faith-nhs-at-75 |access-date=16 July 2023 |work=The Observer}}</ref><ref>{{Cite web |date=14 April 2020 |title=Is the NHS our new national religion? – Religion Media Centre |url=https://religionmediacentre.org.uk/news/is-the-nhs-our-new-national-religion/ |access-date=16 July 2023 |website=religionmediacentre.org.uk}}</ref> Healthcare in the United Kingdom is a [[Devolution|devolved matter]] and each country has its own system of universal publicly funded healthcare ([[NHS England]], [[NHS Scotland]], [[Health and Social Care (Northern Ireland)]] and [[NHS Wales]]), although private healthcare is also available. Public healthcare is provided to all [[British nationality law|UK permanent residents]] and is mostly free at the point of need, being paid for from [[Taxation in the United Kingdom|general taxation]]. The [[World Health Organization]], in 2000, ranked the provision of healthcare in the United Kingdom as fifteenth-best in Europe and eighteenth in the world.<ref>{{Cite book |url=https://archive.org/details/worldhealthrepor00worl |title=The world health report 2000&nbsp;– Health systems: improving performance |publisher=World Health Organization |date=2000 |isbn=978-92-4-156198-3 |editor-last=Haden |editor-first=Angela |location=Geneva |access-date=5 July 2011 |editor-last2=Campanini |editor-first2=Barbara}}; {{Cite web |last=World Health Organization |author-link=World Health Organization |title=Measuring overall health system performance for 191 countries |url=http://pages.stern.nyu.edu/~wgreene/Statistics/WHO-COMP-Study-30.pdf |access-date=5 July 2011 |publisher=New York University}}</ref> Since 1979 expenditure on healthcare has increased significantly.<ref>{{Cite journal |last=Fisher |first=Peter |title=The NHS from Thatcher to Blair |url=http://www.healthp.org/node/71 |journal=NHS Consultants Association |archive-url=https://web.archive.org/web/20181120124807/http://www.healthp.org/node/71 |archive-date=20 November 2018 |access-date=19 December 2018 |quote=The Budget&nbsp;... was even more generous to the NHS than had been expected amounting to an annual rise of 7.4 per cent above the rate of inflation for the next five years. This would take us to 9.4 per cent of GDP spent on health ie around EU average.}}</ref> The 2018 [[OECD]] data, which incorporates in health a chunk of what in the UK is classified as social care, has the UK spending £3,121 per person.<ref>{{Cite news |date=24 September 2019 |title=Swindells: They aren't 'your' patients |url=https://www.hsj.co.uk/policy-and-regulation/swindells-they-arent-your-patients/7025988.article? |access-date=19 November 2019 |publisher=Health Service Journal}}</ref> In 2017 the UK spent £2,989 per person on healthcare, near the median for members of the Organisation for Economic Co-operation and Development.<ref>{{Cite news |date=29 August 2019 |title=How does UK healthcare spending compare with other countries? |url=https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/healthcaresystem/articles/howdoesukhealthcarespendingcomparewithothercountries/2019-08-29 |access-date=5 October 2019 |publisher=Office of National Statistics}}</ref> Regulatory bodies are organised on a UK-wide basis such as the [[General Medical Council]], the [[Nursing and Midwifery Council]] and non-governmental-based, such as the [[Medical royal college|Royal College]]s. Political and operational responsibility for healthcare lies with four national [[governments]]; healthcare in England is the responsibility of the UK Government; healthcare in Northern Ireland is the responsibility of the Northern Ireland Executive; healthcare in Scotland is the responsibility of the Scottish Government; and healthcare in Wales is the responsibility of the Welsh Government. Each National Health Service has different policies and priorities.<ref>{{Cite news |date=28 August 2008 |title='Huge contrasts' in devolved NHS |url=http://news.bbc.co.uk/1/hi/health/7586147.stm |work=BBC News}}; {{Cite news |last=Triggle |first=Nick |date=2 January 2008 |title=NHS now four different systems |work=BBC News |url=http://news.bbc.co.uk/1/hi/health/7149423.stm}}</ref> == Culture == {{Main|Culture of the United Kingdom}} {{Further|Culture of England|Culture of Scotland|Culture of Wales|Culture of Northern Ireland}} The culture of the United Kingdom is influenced by the nation's island status, its history, and being a [[political union]] of four countries with each preserving distinctive traditions, customs and symbolism. British influence can be observed in the language, culture and [[Common law|legal systems]] of many of [[List of countries that have gained independence from the United Kingdom|its former colonies]], in particular the United States, Australia, Canada, New Zealand and Ireland, a common culture known as the Anglosphere.<ref>{{Cite book |last=Julian Go |title=Constitutionalism and political reconstruction |date=2007 |publisher=Brill |isbn=978-90-04-15174-1 |editor-last=Arjomand |editor-first=Saïd Amir |pages=92–94 |chapter=A Globalizing Constitutionalism?, Views from the Postcolony, 1945–2000 |chapter-url=https://books.google.com/books?id=kYmmnYKEvE0C&pg=PA94}}</ref>{{Sfn|Ferguson|2004|p=307}} Most of its former colonies are Commonwealth countries, bonded by a shared British inheritance.<ref>{{Cite web |title=The Commonwealth |url=https://www.mfat.govt.nz/en/peace-rights-and-security/the-commonwealth/ |access-date=8 January 2024 |website=[[New Zealand Ministry of Foreign Affairs and Trade]] |language=en-NZ}}</ref><ref>{{Cite web |title=Commonwealth of Nations |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny/parliament-and-empire/contemporary-context/ |access-date=2026-02-22 |publisher=UK Parliament |language=en}}</ref><ref>{{Cite book |last1=Mazrui |first1=Ali Al Amin |title=Anglo-African Commonwealth |last2=Taylor |first2=D. |last3=Bradley |first3=Kenneth |date=1967 |publisher=Pergamon |isbn=978-0-08-012253-3 |pages=40–41 |quote=...in the ultimate analysis, what could a New Zealander have in common with a Jamaican or a Zambian, if not the bonds of a shared British-ness?}}</ref> A global survey in 2024 ranked the UK third in the 'Most Influential Countries' rankings, behind the US and China.<ref>{{Cite web |title=Most Influential Countries |url=https://www.usnews.com/news/best-countries/most-influential-countries |access-date=22 September 2025 |website=[[U.S. News & World Report]]}}</ref> === Literature and drama === {{Main|British literature|Theatre of the United Kingdom}} {{Further|Literature of England|Scottish literature|Welsh literature|Literature of Northern Ireland}} {{multiple image | align = right | total_width = 320 | image1 = PG 1063Burns Naysmith.jpg | alt1 = Robert Burns | caption1 = [[Robert Burns]] (1759–1796) | image2 = William Shakespeare by John Taylor, edited.jpg | alt2 = William Shakespeare | caption2 = [[William Shakespeare]] (1564–1616) | footer = Burns and Shakespeare are considered the [[national poet]]s of Scotland and England respectively. }} British literature includes that associated with the United Kingdom, the [[Isle of Man]] and the [[Channel Islands]]. Most British literature is in English. In 2022, 669&nbsp;million physical books were sold in the UK, the most ever.<ref>{{Cite web |title=UK publishing industry reports record-breaking year in 2022 |url=https://www.theguardian.com/books/2023/apr/17/uk-publishing-industry-reports-record-breaking-year-in-2022 |access-date=9 May 2024 |work=[[The Guardian]] |date=17 April 2023}}</ref> Britain is renowned for [[Literature for children|children's literature]]; writers include [[Daniel Defoe]], [[Rudyard Kipling]], [[Lewis Carroll]] and [[Beatrix Potter]], who also illustrated her own books. Other writers include [[A. A. Milne]], [[Enid Blyton]], [[J. R. R. Tolkien]], [[Roald Dahl]], [[Terry Pratchett]] and [[J. K. Rowling]], who wrote ''[[Harry Potter]]'', the [[List of best-selling book series|best-selling book series]] of all time.<ref>{{Cite web |title=Best-selling Book Series Of All Time |url=https://wordsrated.com/best-selling-book-series-of-all-time-statistics/ |access-date=18 May 2024 |publisher=Wordsrated |date=20 July 2023}}</ref> The playwright and poet [[William Shakespeare]] is generally regarded as the greatest dramatist ever and the [[national poet]] of England.<ref>{{Cite web |title=William Shakespeare (English author) |url=https://www.britannica.com/EBchecked/topic/537853/William-Shakespeare |access-date=26 February 2006 |publisher=[[Encyclopædia Britannica]]}}; {{Cite encyclopedia |title=MSN Encarta Encyclopedia article on Shakespeare |url=http://encarta.msn.com/encyclopedia_761562101/Shakespeare.html |access-date=26 February 2006 |archive-url=https://web.archive.org/web/20060209154055/http://encarta.msn.com/encyclopedia_761562101/Shakespeare.html |archive-date=9 February 2006}}; {{Cite web |title=William Shakespeare |work=TheFreeDictionary.com |publisher=Columbia Electronic Encyclopedia |url=http://encyclopedia2.thefreedictionary.com/Shakespeare%2c+William |access-date=26 February 2006}}</ref> Theatre of United Kingdom plays an important part in British culture and has had a vibrant tradition of [[theatre]] since the Renaissance with roots going back to the Roman occupation. Other important figures in the literature of England are [[Geoffrey Chaucer]], known for ''[[The Canterbury Tales]]'', the poet [[William Wordsworth]], and other [[Romantic Poetry|Romantic poets]], also the novelists [[Charles Dickens]], [[H. G. Wells]], [[George Orwell]], [[Aldous Huxley]] and [[Ian Fleming]]. The 20th-century English crime writer [[Agatha Christie]] is the [[List of best-selling fiction authors|best-selling novelist]] in history.<ref>{{Cite news |date=19 December 2005 |title=Mystery of Christie's success is solved |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/uknews/1505799/Mystery-of-Christies-success-is-solved.html |url-status=live |url-access=subscription |access-date=14 November 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/news/uknews/1505799/Mystery-of-Christies-success-is-solved.html |archive-date=10 January 2022}}{{Cbignore}}</ref> Twelve of the top 25 of 100 novels by British writers chosen by a BBC poll of global critics were written by women; these included works by [[George Eliot]], [[Virginia Woolf]], [[Charlotte Brontë]], [[Emily Brontë]], [[Mary Shelley]], [[Jane Austen]], [[Doris Lessing]] and [[Zadie Smith]].<ref>{{Cite news |last=Ciabattari |first=Jane |date=December 2015 |title=The 25 greatest British novels |work=BBC Culture |url=https://www.bbc.com/culture/article/20151204-the-25-greatest-british-novels |access-date=29 December 2021}}</ref> Scottish literature includes [[Arthur Conan Doyle]] (the creator of [[Sherlock Holmes]]), [[Walter Scott|Sir Walter Scott]], [[J. M. Barrie]], [[Robert Louis Stevenson]] (whose novel ''[[Treasure Island]]'' strongly influenced the portrayal of [[pirates in the arts and popular culture]]), and the poet [[Robert Burns]], who is considered the national poet of Scotland. More recently [[Hugh MacDiarmid]] and [[Neil M. Gunn]] contributed to the [[Scottish Renaissance]], with grimmer works from [[Ian Rankin]] and [[Iain Banks]]. Edinburgh was UNESCO's first worldwide [[City of Literature]].<ref>{{Cite web |year=2004 |title=Edinburgh, United Kingdom, UNESCO City of Literature |url=http://www.unesco.org/new/en/culture/themes/creativity/creative-industries/creative-cities-network/literature/edinburgh |archive-url=https://web.archive.org/web/20130528152834/http://www.unesco.org/new/en/culture/themes/creativity/creative-industries/creative-cities-network/literature/edinburgh |archive-date=28 May 2013 |url-status=dead |access-date=9 March 2015 |work=Unesco}}</ref> Welsh literature includes Britain's oldest known poem, ''[[Y Gododdin]]'', most likely composed in the late 6th century. It was written in [[Cumbric language|Cumbric]] or [[Old Welsh]] and contains the earliest known reference to [[King Arthur]].<ref>{{Cite web |title=Early Welsh poetry |url=https://www.bbc.co.uk/wales/history/sites/themes/society/language_poetry.shtml |access-date=29 December 2010 |work=BBC Wales}}</ref> The [[Arthurian legend]] was further developed by [[Geoffrey of Monmouth]].<ref>{{Cite book |last=Lang, Andrew |url=https://books.google.com/books?id=dKJiPyyTevgC |title=History of English Literature from Beowulf to Swinburne |publisher=Wildside Press |year=2003 |isbn=978-0-8095-3229-2 |location=Holicong, PA |page=42 |orig-date=1913}}</ref> [[Dafydd ap Gwilym]] (''fl.''&nbsp;1320–1370) is widely regarded as one of the greatest European poets of his age.<ref>{{Cite web |year=2011 |title=Dafydd ap Gwilym |url=http://www.academi.org/dafydd-ap-gwilym-eng |archive-url=https://web.archive.org/web/20120324034938/http://www.literaturewales.org/dafydd-ap-gwilym-eng |archive-date=24 March 2012 |url-status=dead |access-date=3 January 2011 |website=[[Literature Wales|Academi.org]] |quote=Dafydd ap Gwilym is widely regarded as one of the greatest Welsh poets of all time, and amongst the leading European poets of the Middle Ages.}}</ref> [[Daniel Owen]] is credited as the first Welsh-language novelist, publishing ''[[Rhys Lewis (novel)|Rhys Lewis]]'' in 1885. The best-known of the [[Anglo-Welsh poetry|Anglo-Welsh poets]] are [[Dylan Thomas]] and [[R. S. Thomas]], the latter nominated for the [[Nobel Prize in Literature]] in 1996. Leading Welsh novelists of the twentieth century include [[Richard Llewellyn]] and [[Kate Roberts (author)|Kate Roberts]].<ref>{{Cite web |url=http://newsalerts.bbc.co.uk/1/low/wales/551486.stm |title=True birthplace of Wales's literary hero |archive-url=https://web.archive.org/web/20200316173733/http://newscdn.bbc.net.uk/2/hi/uk_news/wales/551486.stm |archive-date=16 March 2020 |url-status=dead |website=BBC News |date=5 December 1999 |access-date=28 April 2012}}</ref><ref>{{Cite web |title=Kate Roberts: Biography |url=https://www.bbc.co.uk/wales/northwest/halloffame/arts/kateroberts.shtml |url-status=dead |access-date=19 February 2017 |website=BBC Wales |archive-url=https://web.archive.org/web/20130308000646/https://www.bbc.co.uk/wales/northwest/halloffame/arts/kateroberts.shtml |archive-date=8 March 2013}}</ref> Northern Ireland's most popular writer is [[C. S. Lewis]], who was born in Belfast and wrote ''[[The Chronicles of Narnia]]''.<ref>{{Cite web |title=The Chronicles of Narnia Book Series Statistics |url=https://wordsrated.com/the-chronicles-of-narnia-book-series-statistics/ |access-date=18 May 2024 |publisher=Wordsrated |date=19 July 2023}}</ref> Irish writers, living at a time when all of Ireland was part of the United Kingdom, include [[Oscar Wilde]],<ref>{{Cite book |last=Varty |first=Anne |title=A Preface to Oscar Wilde |date=2014 |publisher=Routledge |isbn=978-1-317-89231-1 |pages=[https://books.google.com/books?id=A9YFBAAAQBAJ&pg=PA231 231–232]}}; {{Cite encyclopedia |title=Oscar Wilde |encyclopedia=[[Encyclopedia.com]] |publisher=[[Cengage]] |url=https://www.encyclopedia.com/people/literature-and-arts/english-literature-19th-cent-biographies/oscar-wilde |access-date=10 December 2019}}</ref> [[Bram Stoker]] (who wrote ''[[Dracula]]'')<ref>{{Cite book |last=Moss |first=Joyce |url=https://archive.org/details/isbn_9780787637286 |title=British and Irish Literature and Its Times: The Victorian Era to the Present (1837–) |publisher=Gale Group |year=2001 |isbn=978-0-7876-3729-3 |page=[https://archive.org/details/isbn_9780787637286/page/107 107] |url-access=registration}}</ref> and [[George Bernard Shaw]].<ref>{{Cite book |last=Holroyd |first=Michael |url=https://archive.org/details/bernardshaw00holr/page/384 |title=Bernard Shaw, Volume 2: 1898–1918: The Pursuit of Power |publisher=Chatto & Windus |year=1989 |isbn=978-0-7011-3350-4 |page=[https://archive.org/details/bernardshaw00holr/page/384 384]}}; {{Cite web |title=G B Shaw |url=https://www.bl.uk/people/g-b-shaw |access-date=10 December 2019 |website=Discovering Literature: 20th century |publisher=[[British Library]] |archive-date=9 August 2020 |archive-url=https://web.archive.org/web/20200809155152/https://www.bl.uk/people/g-b-shaw |url-status=dead}}</ref> There have been many authors whose origins were from outside the United Kingdom but who moved to the UK, including [[Joseph Conrad]],<ref>{{Cite book |last=Middleton |first=Tim |url=https://books.google.com/books?id=Azd1f8NBpUoC&pg=PA159 |title=Joseph Conrad |publisher=Routledge |year=2006 |isbn=978-0-415-26851-6 |page=159}}</ref> [[T. S. Eliot]],<ref>{{Cite book |last=Cooper |first=John Xiros |url=https://books.google.com/books?id=XqmNjQzhwV4C&pg=PA111 |title=The Cambridge Introduction to T. S. Eliot |date=2006 |publisher=Cambridge University Press |isbn=978-1-139-45790-3 |page=111}}</ref> [[Kazuo Ishiguro]],<ref>{{Cite book |last=Sim |first=Wai-chew |url=https://books.google.com/books?id=WcKLAgAAQBAJ&pg=PT201 |title=Kazuo Ishiguro |date=2009 |publisher=Routledge |isbn=978-1-135-19867-1 |page=201}}</ref> Sir [[Salman Rushdie]]<ref>{{Cite web |title=Salman Rushdie |url=https://www.oxfordreference.com/view/10.1093/oi/authority.20110803100433765 |access-date=10 December 2019 |website=Oxford Reference |publisher=[[Oxford University Press]]}}</ref> and [[Ezra Pound]].<ref>{{Cite news |last=Campbell |first=James |date=17 May 2008 |title=Home from home |work=The Guardian |url=https://www.theguardian.com/books/2008/may/17/poetry3 |access-date=10 December 2019}}; {{Cite book |last=Nadel |first=Ira |url=https://books.google.com/books?id=ECiGDAAAQBAJ&pg=PA90 |title=Ezra Pound: A Literary Life |date=2004 |publisher=Palgrave Macmillan |isbn=978-0-230-37881-0 |page=90}}</ref> === Philosophy === {{Main|British philosophy}} The United Kingdom is famous for "[[British Empiricism]]", a branch of the philosophy that states that only knowledge verified by experience is valid, and 'Scottish Philosophy', sometimes referred to as the '[[Scottish School of Common Sense]]'.<ref>{{Cite book |url=http://www.rrbltd.co.uk/bibliographies/scottish_v5_bibliog.pdf |title=A bibliography of Scottish common sense philosophy: Sources and origins |publisher=Thoemmes Press |year=2000 |editor-last=Fieser, James |location=Bristol |access-date=17 December 2010 |archive-date=9 April 2023 |archive-url=https://web.archive.org/web/20230409171906/https://www.rrbltd.co.uk/bibliographies/scottish_v5_bibliog.pdf |url-status=dead}}</ref> The most famous philosophers of British Empiricism are [[John Locke]], [[George Berkeley]]{{Efn|Berkeley is in fact Irish but was called a 'British empiricist' due to the territory of what is now known as the [[Republic of Ireland]] being in the UK at the time.}} and [[David Hume]]; while [[Dugald Stewart]], [[Thomas Reid]] and [[Sir William Hamilton, 9th Baronet|William Hamilton]] were major exponents of the Scottish "common sense" school. Two Britons are also notable for the ethical theory of [[utilitarianism]], a moral philosophy first used by [[Jeremy Bentham]] and later by [[John Stuart Mill]] in his short work ''[[Utilitarianism (book)|Utilitarianism]]''.<ref>{{Cite book |last=Palmer, Michael |url=https://books.google.com/books?id=s7y5MJOuN30C&pg=PA66 |title=Moral Problems in Medicine: A Practical Coursebook |publisher=Lutterworth Press |year=1999 |isbn=978-0-7188-2978-0 |location=Cambridge |page=66}}; {{Cite book |last=Scarre, Geoffrey |url=https://books.google.com/books?id=8A4xLnzfqYwC&pg=PA82 |title=Utilitarianism |publisher=Routledge |year=1995 |isbn=978-0-415-12197-2 |location=London |page=82}}</ref> === Media === {{Main|Media of the United Kingdom|Censorship in the United Kingdom}} {{Further|Media of England|Media of Scotland|Media of Wales|Media of Northern Ireland}} The [[BBC]], founded in 1922, is the United Kingdom's publicly funded radio, television and Internet broadcasting corporation, and is the oldest and largest broadcaster in the world.<ref name="MediaNewsline">{{Cite web |title=BBC: World's largest broadcaster & Most trusted media brand |url=http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-url=https://web.archive.org/web/20101005004930/http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-date=5 October 2010 |access-date=23 September 2010 |publisher=Media Newsline}}</ref><ref name="ProspectMag">{{Cite web |title=Digital license |url=http://www.prospectmagazine.co.uk/?p=64654 |archive-url=https://web.archive.org/web/20111107024637/http://www.prospectmagazine.co.uk/2009/07/digitallicense |archive-date=7 November 2011 |access-date=9 March 2015 |publisher=Prospect}}</ref><ref name="AboutBBC">{{Cite news |title=About the BBC&nbsp;– What is the BBC |work=BBC Online |url=https://www.bbc.co.uk/info/purpose/what.shtml |access-date=9 March 2015 |archive-url=https://web.archive.org/web/20100116202334/http://www.bbc.co.uk/info/purpose/what.shtml |archive-date=16 January 2010}}</ref> It operates television and radio stations across the UK and abroad and its domestic services are funded by the [[Television licensing in the United Kingdom|television licence]].<ref>{{Cite journal |date=13 August 2009 |title=BBC: World's largest broadcaster & Most trusted media brand |url=http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |journal=Media Newsline |archive-url=https://web.archive.org/web/20110510090842/http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-date=10 May 2011 |access-date=19 June 2011}}; {{Cite web |date=April 2010 |title=TV Licence Fee: facts & figures |url=https://www.bbc.co.uk/pressoffice/keyfacts/stories/licencefee.shtml |url-status=live |archive-url=https://web.archive.org/web/20110427080539/http://www.bbc.co.uk/pressoffice/keyfacts/stories/licencefee.shtml |archive-date=27 April 2011 |publisher=BBC Press Office}}</ref> The [[BBC World Service]] is an [[International broadcasting|international broadcaster]] owned and operated by the BBC, and the world's largest.<ref>{{Cite web |title=Microsoft Word – The Work of the BBC World Service 2008–09 HC 334 FINAL.doc |url=https://publications.parliament.uk/pa/cm200910/cmselect/cmfaff/334/334.pdf |archive-url=https://web.archive.org/web/20201021001645/https://publications.parliament.uk/pa/cm200910/cmselect/cmfaff/334/334.pdf |archive-date=21 October 2020 |access-date=16 February 2011}}</ref> It broadcasts radio news, speech and discussions in more than 40 languages.<ref>{{Cite web |title=News in your language – BBC News |url=https://www.bbc.co.uk/ws/languages |website=BBC}}; {{Cite web |title=BBC World Service |url=https://www.facebook.com/pages/category/Media-News-Company/bbcworldservice/about |website=Facebook.com}}</ref> Other major players in the UK media include [[ITV plc|ITV]], which operates 11 of the 15 regional television broadcasters that make up the [[ITV (TV network)|ITV Network]],<ref>{{Cite web |title=Publications & Policies: The History of ITV |url=http://www.itv.com/aboutitv/publications-policies |archive-url=https://web.archive.org/web/20110411224117/http://www.itv.com/aboutitv/publications-policies |archive-date=11 April 2011 |website=ITV.com}}</ref> and [[Sky UK|Sky]].<ref>{{Cite journal |title=Direct Broadcast Satellite Television |url=http://www.newscorp.com/operations/dbst.html |journal=News Corporation |archive-url=https://web.archive.org/web/20110604095622/http://www.newscorp.com/operations/dbst.html |archive-date=4 June 2011}}</ref> Newspapers produced in the United Kingdom include the ''[[Daily Mail]]'', ''[[The Guardian]]'', ''[[The Daily Telegraph|The Telegraph]]'', ''[[The Times]]'', and the ''[[Financial Times]]''.<ref>{{Cite news |date=10 October 2008 |title=ABCs: National daily newspaper circulation September 2008 |work=The Guardian |location=London |url=https://www.theguardian.com/media/table/2008/oct/10/abcs-pressandpublishing |access-date=17 October 2008}}</ref> Magazines and journals published in the United Kingdom that have achieved worldwide circulation include ''[[The Spectator]]'', ''[[The Economist]]'', ''[[New Statesman]]'' and ''[[Radio Times]]''. [[File:Media City Footbridge and BBC Offices (geograph 2685261).jpg|thumb|[[MediaCityUK]] in [[Salford]], [[Greater Manchester]], is one of the largest media production facilities in Europe.]]London dominates the media sector in the UK: national newspapers and television and radio are largely based there, although [[MediaCityUK]] in Manchester is also a significant national media centre. Edinburgh and Glasgow, and Cardiff, are important centres of newspaper and broadcasting production in Scotland and Wales, respectively.<ref>William, D. (2010). [https://books.google.com/books?id=7yg45P35KDMC ''UK Cities: A Look at Life and Major Cities in England, Scotland, Wales and Northern Ireland'']. Eastbourne: Gardners Books. {{ISBN|978-9987-16-021-1}}, pp. 22, 46, 109 and 145.</ref> The UK publishing sector, including books, directories and databases, journals, magazines and business media, newspapers and news agencies, has a combined turnover of around £20&nbsp;billion and employs 167,000 people.<ref>{{Cite web |title=Publishing |url=http://www.culture.gov.uk/what_we_do/creative_industries/3280.aspx |url-status=live |archive-url=https://web.archive.org/web/20110505104322/http://www.culture.gov.uk/what_we_do/creative_industries/3280.aspx |archive-date=5 May 2011 |publisher=Department of Culture, Media and Sport}}</ref> In 2015 the UK published 2,710 book titles per million inhabitants, more than any other country, with much of this exported to other [[Anglophone]] countries.<ref>{{Cite web |last=<!--Not stated--> |date=2016 |title=Annual Report 2015–2016 |url=https://www.internationalpublishers.org/images/reports/Annual_Report_2016/IPA_Annual_Report_2015-2016_interactive.pdf |access-date=14 January 2021 |website=internationalpublishers.org |publisher=International Publishers Association |page=16 |archive-date=31 August 2023 |archive-url=https://web.archive.org/web/20230831205753/https://www.internationalpublishers.org/images/reports/Annual_Report_2016/IPA_Annual_Report_2015-2016_interactive.pdf |url-status=dead}}</ref> In 2010, 82.5 per cent of the UK population were Internet users, the [[List of countries by number of Internet users|highest proportion]] amongst the 20 countries with the largest total number of users in that year.<ref>{{Cite journal |title=Top 20 countries with the highest number of Internet users |url=http://www.internetworldstats.com/top20.htm |journal=Internet World Stats |archive-url=https://web.archive.org/web/20110610104435/http://www.internetworldstats.com/top20.htm |archive-date=10 June 2011 |access-date=19 June 2011}}</ref> The [[Video games in the United Kingdom|British video game industry]] is the largest in Europe, and since 2022 the UK has the [[List of video games markets by country|largest video game market]] in Europe by sales, surpassing [[Video games in Germany|Germany]].<ref>{{Cite web |last=Dring |first=Christopher |date=12 January 2023 |title=European console and PC game sales fall 7.1% in 2022 |url=https://www.gamesindustry.biz/european-console-and-pc-game-sales-fall-71-over-2021 |access-date=30 September 2023 |website=GamesIndustry.biz}}</ref> It is the world's third-largest producer of video games after [[Video games in Japan|Japan]] and the [[Video games in the United States|United States]].<ref>{{Cite web |title=About UK Video Games Industry |url=https://tiga.org/about-tiga-and-our-industry/about-uk-video-games-industry |access-date=6 June 2023 |website=TIGA}}</ref> === Visual art === {{Main|Art of the United Kingdom|Architecture of the United Kingdom}} [[File:Angel of the North - 6150534524.jpg|thumb|The [[Angel of the North]] sculpture by [[Antony Gormley]] has become a symbol of [[Northern England]].]] Major British artists include the [[Romanticism|Romantic]] artists [[William Blake]], [[John Constable]], [[Samuel Palmer]], and [[J. M. W. Turner]]; the [[portrait]] painters [[Joshua Reynolds|Sir Joshua Reynolds]] and [[Lucian Freud]]; the landscape artists [[Thomas Gainsborough]] and [[L. S. Lowry]]; the pioneer of the [[Arts and Crafts movement]] [[William Morris]]; the figurative painter [[Francis Bacon (artist)|Francis Bacon]]; the [[Pop artist]]s [[Peter Blake (artist)|Peter Blake]], [[Richard Hamilton (artist)|Richard Hamilton]] and [[David Hockney]]; the pioneers of [[conceptual art]] movement [[Art & Language]];<ref>{{Cite news |last=Tate |title=Art & Language – Art Term {{!}} Tate |work=Tate |url=https://www.tate.org.uk/art/art-terms/a/art-language |access-date=8 September 2018}}</ref> the collaborative duo [[Gilbert and George]]; the [[Abstract art|abstract]] artist [[Howard Hodgkin]]; and the sculptors [[Antony Gormley]], [[Anish Kapoor]] and [[Henry Moore]]. During the late 1980s and 1990s the [[Saatchi Gallery]] in London helped to bring to public attention a group of multi-genre artists who would become known as the "[[Young British Artists]]": [[Damien Hirst]], [[Chris Ofili]], [[Rachel Whiteread]], [[Tracey Emin]], [[Mark Wallinger]], [[Steve McQueen (director)|Steve McQueen]], [[Sam Taylor-Wood]] and the [[Jake and Dinos Chapman|Chapman Brothers]] are amongst the better-known members of this loosely affiliated movement. The [[Royal Academy]] in London is a key organisation for the promotion of the visual arts in the United Kingdom. Major schools of art in the UK include: the six-school [[University of the Arts London]], which includes the [[Central Saint Martins College of Art and Design]] and [[Chelsea College of Art and Design]]; [[Goldsmiths, University of London]]; the [[Slade School of Fine Art]] (part of [[University College London]]); the [[Glasgow School of Art]]; the [[Royal College of Art]]; and [[The Ruskin School of Drawing and Fine Art]] (part of the University of Oxford). The [[Courtauld Institute of Art]] is a leading centre for the teaching of the [[history of art]]. Important art galleries in the United Kingdom include the [[National Gallery]], [[National Portrait Gallery (London)|National Portrait Gallery]], [[Tate Britain]], and [[Tate Modern]] (the most-visited modern art gallery in the world, with around 4.7&nbsp;million visitors per year).<ref>{{Cite news |last=Bayley |first=Stephen |date=24 April 2010 |title=The startling success of Tate Modern |work=[[The Times]] |location=London |url=http://entertainment.timesonline.co.uk/tol/arts_and_entertainment/visual_arts/article7105032.ece |archive-url=https://web.archive.org/web/20110429173928/http://entertainment.timesonline.co.uk/tol/arts_and_entertainment/visual_arts/article7105032.ece |url-status=dead |archive-date=29 April 2011 |access-date=19 January 2011}} {{Subscription required}}</ref> === Music === {{Main|Music of the United Kingdom}} {{Further|Music of England (disambiguation){{!}}Music of England|Music of Scotland|Music of Wales|Music of Northern Ireland}} <!----Caution should be taken to ensure that the sections are not simply a listing of names or mini biographies of individuals accomplishments.----> [[File:Royal Albert Hall, BBC Proms 2017.jpg|thumb|[[The Proms]] is a classical music festival, most closely associated with [[Henry Wood]] and held at the [[Royal Albert Hall]] in London, which regularly plays music by [[Edward Elgar]] and other British composers.]] Various styles of music have become popular in the UK, including the [[folk music]] of [[Folk music of England|England]], [[Folk music of Scotland|Scotland]], [[Music of Wales#Folk music|Wales]] and [[Folk music of Northern Ireland|Northern Ireland]]. English folk features melodic ballads with strong lyrics and music for country dancing often using accordion and fiddles.<ref>{{Cite web |access-date=15 September 2025 |title=Songs of England |url=https://www.english-heritage.org.uk/visit/inspire-me/songs-of-england}}</ref> Scottish folk features bagpipes and fiddles playing traditional dance tunes with bouncy tempos.<ref>{{Cite web |access-date=15 September 2025 |title=The influence of traditional Scottish Music |url=https://www.visitscotland.com/things-to-do/events/music-festivals/traditional-folk}}</ref> Welsh folk has harps and vocal harmonies often sung in Welsh.<ref>{{Cite web |access-date=15 September 2025 |title=Celtic connections: the story of folk music in Wales |date=17 February 2020 |url=https://www.wales.com/culture-and-sport/music-and-performance/roots-and-shoots-welsh-folk-music}}</ref> Northern Irish folk blends fiddles with flutes merging Scottish and Irish influences.<ref>{{Cite web |access-date=15 September 2025 |title=Why you should experience traditional music in Ireland |url=https://www.ireland.com/en-us/magazine/music/traditional-music/}}</ref> Historically, there has been [[Renaissance music]] from the [[Tudor period]], with [[Mass (music)|masses]], [[madrigal]]s and [[lute]] music by [[Thomas Tallis]], [[John Taverner]], [[William Byrd]], [[Orlando Gibbons]] and [[John Dowland]]. After the [[Stuart Restoration]], an English tradition of dramatic [[masque]]s, anthems and airs became established, led by [[Henry Purcell]], followed by [[Thomas Arne]] and others. [[George Frideric Handel]] composed the anthem ''[[Zadok the Priest]]'' for the [[coronation of George II]]; it became the traditional ceremonial music for anointing all future monarchs. Handel's many oratorios, such as his famous ''[[Messiah (Handel)|Messiah]]'', were written in English.<ref>{{Cite web |date=20 July 2009 |title=British Citizen by Act of Parliament: George Frideric Handel |url=http://www.parliament.uk/parliamentary_publications_and_archives/parliamentary_archives/handel_and_naturalisation.cfm |archive-url=https://web.archive.org/web/20100326164147/http://www.parliament.uk/parliamentary_publications_and_archives/parliamentary_archives/handel_and_naturalisation.cfm |archive-date=26 March 2010 |access-date=9 March 2015 |publisher=UK Parliament}}; {{Cite news |last=Andrews |first=John |date=14 April 2006 |title=Handel all'inglese |work=Playbill |location=New York |url=http://www.playbillarts.com/features/article/4236.html |access-date=11 September 2009 |archive-url=https://web.archive.org/web/20080516210558/http://www.playbillarts.com/features/article/4236.html |archive-date=16 May 2008}}</ref> In the second half of the 19th century, [[Arthur Sullivan]] and his librettist [[W. S. Gilbert]] wrote their popular [[Savoy opera]]s, and [[Edward Elgar]] composed a wide range of music. Increasingly, composers became inspired by the English countryside and its [[folk music]], notably [[Gustav Holst]], [[Ralph Vaughan Williams]] and [[Benjamin Britten]], a pioneer of modern British opera. Amongst the many post-war composers, some of the most notable have made their own personal choice of musical identity: [[Peter Maxwell Davies]] (Orkney), [[Harrison Birtwistle]] (mythological), and [[John Tavener]] (religious).<ref>{{Cite Grove |title=Great Britain |first1=Nicholas |last1=Iemperley |date=2002 |url=https://doi.org/10.1093/gmo/9781561592630.article.O006236 |url-access=subscription}}; {{Cite Grove |title=England (i) |date=2001 |url=https://doi.org/10.1093/gmo/9781561592630.article.40044 |url-access=subscription |first1=Stephen |last1=Banfield |first2=Ian |last2=Russell}}; {{Cite Grove |title=Wales |date=2001 |first1=Geraint |last1=Lewis |first2=Lyn |last2=Davies |first3=Phyllis |last3=Kinney |url=https://doi.org/10.1093/gmo/9781561592630.article.41108 |url-access=subscription}}; {{Cite Grove |title=Scotland |first1=Kenneth |last1=Elliott |first2=Francis |last2=Collinson |first3=Peggy |last3=Duesenberry |url=https://doi.org/10.1093/gmo/9781561592630.article.40113 |url-access=subscription |date=2001}}; {{Cite Grove |title=Ireland |first1=Harry |last1=White |first2=Nicholas |last2=Carolan |url=https://doi.org/10.1093/gmo/9781561592630.article.13901 |url-access=subscription |date=2011}}; {{Cite web |title=British 20th century composers |url=https://www.bbc.co.uk/bitesize/guides/zdjw7p3/revision/1 |access-date=21 April 2022 |website=[[BBC]]}}</ref> Recent classical singers include [[Alfie Boe]], [[Bryn Terfel]], [[Katherine Jenkins]], [[Michael Ball]], [[Roderick Williams]], [[Russell Watson]] and [[Sarah Brightman]], while [[Nicola Benedetti]] and [[Nigel Kennedy]] are renowned for their violin ability.<ref>{{Cite web |date=21 June 2022 |title=30 of the greatest violinists on record |url=https://www.gramophone.co.uk/features/article/30-of-the-greatest-violinists-on-record |access-date=4 March 2024 |website=Gramophone}};{{Cite web |date=1 January 2020 |title=Katherine Jenkins has officially sold the most classical albums this century |url=https://www.classicfm.com/radio/shows-presenters/classic-fm-chart/katherine-jenkins-most-classical-albums/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=6 May 2023 |title=Who is Roderick Williams, the British baritone and composer at the King's coronation? |url=https://www.classicfm.com/discover-music/roderick-williams-composer-baritone-singing-roles/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=23 February 2024 |title=Michael Ball |url=https://www.eno.org/artists/michael-ball-2/ |access-date=4 March 2024 |website=English National Opera}};{{Cite web |title=Alfie Bow |url=https://www.classicfm.com/artists/alfie-boe/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=11 July 2023 |title=Sarah Brightman facts |url=https://www.smoothradio.com/news/music/sarah-brightman-age-husband-songs/ |access-date=4 March 2024 |website=Smooth Radio}}</ref> According to ''[[The New Grove Dictionary of Music and Musicians]]'' the term "[[pop music]]" originated in Britain in the mid-1950s to describe [[rock and roll]]'s fusion with the "new youth music".<ref>R. Middleton, et al., [http://www.oxfordmusiconline.com/public/book/omo_gmo "Pop"], ''Grove music online'', retrieved 14 March 2010. {{Subscription required}} {{Webarchive|url=https://web.archive.org/web/20110113160329/http://www.oxfordmusiconline.com/public/book/omo_gmo|date=13 January 2011}}</ref> ''The Oxford Dictionary of Music'' states that artists such as [[the Beatles]] and [[the Rolling Stones]] drove pop music to the forefront of popular music in the early 1960s.<ref>"Pop", [http://www.oxfordmusiconline.com/public/book/omo_t237 ''The Oxford Dictionary of Music''], retrieved 9 March 2010.{{Subscription required}} {{Webarchive|url=https://web.archive.org/web/20171112170116/http://www.oxfordmusiconline.com/public/book/omo_t237|date=12 November 2017}}</ref> Birmingham became known as the birthplace of [[heavy metal music|heavy metal]], with the band [[Black Sabbath]] starting there in the 1960s.<ref>{{Cite news |title=Birmingham, England ... the unlikely birthplace of heavy metal |work=CNN |date=1 July 2011 |first1=Laura |last1=Allsop |url=http://www.cnn.com/2011/WORLD/europe/07/01/birmingham.home.of.metal/index.html |access-date=28 February 2022 |postscript=;}} {{Cite web |last=Bentley |first=David |date=4 June 2013 |title=Midlands rocks! How Birmingham's industrial heritage made it the birthplace of heavy metal |url=http://www.birminghampost.co.uk/whats-on/music/birmingham-birthplace-of-heavy-metal-4031445 |access-date=28 February 2022 |website=[[Birmingham Post]]}}</ref> In the following years, Britain took part in the development of [[rock music]], with British acts pioneering [[hard rock]],<ref>{{Cite web |title=The Rolling Stones {{!}} Biography & History |url=https://www.allmusic.com/artist/the-rolling-stones-mn0000894465/biography |access-date=22 July 2020 |website=AllMusic}}</ref> [[raga rock]], heavy metal,<ref>{{Cite book |last=Tom Larson |url=https://books.google.com/books?id=vGJ7XmA8rjIC&pg=PA183 |title=History of Rock and Roll |publisher=Kendall/Hunt Pub. |year=2004 |isbn=978-0-7872-9969-9 |pages=183–187}}</ref> [[space rock]], [[glam rock]],<ref>{{Cite encyclopedia |title=Glam Rock |url=http://encarta.msn.com/dictionary_561509274/glam_rock.html |access-date=21 December 2008 |archive-url=https://web.archive.org/web/20090828224412/http://encarta.msn.com/dictionary_561509274/glam_rock.html |archive-date=28 August 2009 |encyclopedia=[[Encarta]]}}</ref> [[Gothic rock]],<ref>{{Cite web |year=2004 |title=NME Originals: Goth |url=https://www.nme.com/originals/4 |archive-url=https://web.archive.org/web/20080126150121/http://www.nme.com/originals/4 |archive-date=26 January 2008 |access-date=30 September 2013 |website=[[NME]]}}</ref> [[psychedelic rock]]<ref>{{Cite web |title=Pop/Rock » Psychedelic/Garage |url=https://www.allmusic.com/subgenre/psychedelic-garage-ma0000002800 |access-date=6 August 2020 |publisher=[[AllMusic]]}}</ref> and [[punk rock]].<ref>{{cite magazine |author1=Charles M. Young |title=Rock is Sick and Living in London |url=https://www.rollingstone.com/feature/a-report-on-the-sex-pistols-119989/ |magazine=Rolling Stone |access-date=23 February 2026 |date=20 October 1977 |archive-url=https://web.archive.org/web/20250328094721/https://www.rollingstone.com/feature/a-report-on-the-sex-pistols-119989/ |archive-date=28 March 2025}}</ref> British acts also developed [[neo soul]] and created [[dubstep]].<ref>Henderson, Alex (1 August 2003). [https://web.archive.org/web/20101104165122/http://allmusic.com/explore/essay/british-soul-t2160 British Soul]. Allmusic. Retrieved 6 March 2011.; [http://www.allmusic.com/style/dubstep-ma0000004465 AllMusic – Dubstep] {{Webarchive|url=https://web.archive.org/web/20170923151236/http://www.allmusic.com/style/dubstep-ma0000004465|date=23 September 2017}} "Absorbed and transfigured elements of techno, drum'n' bass and dub"; {{Cite news |last=Goldman |first=Vivien |date=31 January 2012 |title=Local Groove Does Good: The Story Of Trip-Hop's Rise From Bristol |work=NPR |url=https://www.npr.org/sections/therecord/2012/01/31/142607358/local-groove-does-good-the-story-of-trip-hops-rise-from-bristol}}</ref> The UK has produced some of the most prominent English-speaking [[rappers]] along with the United States, including [[Stormzy]], [[Kano (rapper)|Kano]], [[Yxng Bane]], [[Ramz (rapper)|Ramz]], [[Little Simz]] and [[Skepta]].<ref>{{Cite magazine |title=5 U.K. Rappers Primed to Take Over America in 2018 |url=https://www.billboard.com/music/rb-hip-hop/uk-rappers-to-watch-2018-8097878/ |magazine=Billboard |access-date=18 June 2018}}</ref> [[File:The SSE Hydro arena - geograph.org.uk - 6725739.jpg|thumb|right|The [[OVO Hydro]] in [[Glasgow]], Scotland, a 14,500-capacity arena consistently ranked within the top ten busiest venues worldwide<ref>{{cite web |title=OVO Hydro {{!}} SEC |url=https://www.sec.co.uk/organise-an-event/event-spaces/the-ovo-hydro |website=www.sec.co.uk |access-date=9 February 2026 |language=en}}</ref>]] The Beatles have international sales of over 1&nbsp;billion units and are the [[List of best-selling music artists|biggest-selling band]], in addition to being [[Cultural impact of the Beatles|widely regarded as the most influential band]] in the history of popular music.<ref name="Beatles sales">{{Cite web |title=1960–1969 |url=http://www.emimusic.com/about/history/1960-1969/# |archive-url=https://web.archive.org/web/20140425011032/http://www.emimusic.com/about/history/1960-1969 |archive-date=25 April 2014 |access-date=9 March 2015 |publisher=EMI Group}}</ref><ref name="McCartney">{{Cite magazine |date=8 June 1992 |title=Paul At Fifty |url=http://www.time.com/time/magazine/article/0,9171,975715-2,00.html |magazine=Time |location=New York |archive-url=https://web.archive.org/web/20090206120350/http://www.time.com/time/magazine/article/0,9171,975715-2,00.html |archive-date=6 February 2009}}</ref><ref name="Guinness">[https://books.google.com/books?id=rdU1xtIWJz0C Most Successful Group] ''[[The Guinness Book of Records]]'' 1999, p. 230. Retrieved 19 March 2011.</ref><ref>{{Cite news |date=25 November 2010 |title=Beatles a big hit with downloads |work=Belfast Telegraph |url=http://www.belfasttelegraph.co.uk/entertainment/music/news/beatles-a-big-hit-with-downloads-15013117.html |access-date=16 May 2011}}</ref> Other prominent British contributors to popular music over the last 50 years include the Rolling Stones, [[Pink Floyd]], [[Queen (band)|Queen]], [[Led Zeppelin]], the [[Bee Gees]] and [[Elton John]], all of whom have worldwide record sales of 200&nbsp;million or more.<ref>{{Cite press release |title=British rock legends get their own music title for PlayStation3 and PlayStation2 |date=2 February 2009 |publisher=[[EMI]] |url=http://www.emimusic.com/news/2009/singstar®-queen-to-be-launched-by-sony-computer-entertainment-europe |access-date=9 March 2015 |archive-url=https://web.archive.org/web/20140423012539/http://www.emimusic.com/news/2009/singstar%C2%AE-queen-to-be-launched-by-sony-computer-entertainment-europe |archive-date=23 April 2014}}; {{Cite news |last=Khan |first=Urmee |date=17 July 2008 |title=Sir Elton John honoured in Ben and Jerry ice cream |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/newstopics/celebritynews/2305273/Sir-Elton-John-honoured-in-Ben-and-Jerry-ice-cream.html |archive-url=https://web.archive.org/web/20080730164432/http://www.telegraph.co.uk/news/newstopics/celebritynews/2305273/Sir-Elton-John-honoured-in-Ben-and-Jerry-ice-cream.html |archive-date=30 July 2008}}; {{Cite news |last=Alleyne |first=Richard |date=19 April 2008 |title=Rock group Led Zeppelin to reunite |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/uknews/1562875/Rock-group-Led-Zeppelin-to-reunite.html |url-status=live |url-access=subscription |access-date=31 March 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/news/uknews/1562875/Rock-group-Led-Zeppelin-to-reunite.html |archive-date=10 January 2022}}{{Cbignore}}; {{Cite news |date=11 July 2006 |title=Floyd 'true to Barrett's legacy' |work=BBC News |url=http://news.bbc.co.uk/1/hi/entertainment/5170644.stm}}; {{Cite news |last=Holton |first=Kate |date=17 January 2008 |title=Rolling Stones sign Universal album deal |work=Reuters |url=https://www.reuters.com/article/entertainmentNews/idUSL1767761020080117 |access-date=26 October 2008}}; {{Cite news |last=Walker |first=Tim |date=12 May 2008 |title=Jive talkin': Why Robin Gibb wants more respect for the Bee Gees |work=Independent |location=London |url=https://www.independent.co.uk/arts-entertainment/music/features/jive-talkin-why-robin-gibb-wants-more-respect-for-the-bee-gees-826116.html |access-date=26 October 2008 |archive-url=https://web.archive.org/web/20111013215157/http://www.independent.co.uk/arts-entertainment/music/features/jive-talkin-why-robin-gibb-wants-more-respect-for-the-bee-gees-826116.html |archive-date=13 October 2011}}</ref> The [[Brit Awards]] are the [[British Phonographic Industry|BPI]]'s annual music awards, and some of the British recipients of the [[Brit Award for Outstanding Contribution to Music|Outstanding Contribution to Music]] award include [[the Who]], [[David Bowie]], [[Eric Clapton]], [[Rod Stewart]], [[the Police]] and [[Fleetwood Mac]] (who are a British-American band).<ref>[https://www.theguardian.com/news/datablog/2012/feb/22/brit-awards-winners-list-2012 "Brit awards winners list 2012: every winner since 1977"]. ''The Guardian'' (London). Retrieved 28 February 2012.</ref> <!-- Please note that the following list of recent musicians and groups includes only those selling more than 30&nbsp;million records. -->More recent UK music acts that have had international success include [[George Michael]], [[Oasis (band)|Oasis]], [[Spice Girls]], [[Radiohead]], [[Coldplay]], [[Arctic Monkeys]], [[Robbie Williams]], [[Amy Winehouse]], [[Susan Boyle]], [[Adele]], [[Ed Sheeran]], [[Lewis Capaldi]], [[One Direction]], [[Harry Styles]] and [[Dua Lipa]].<ref>{{Cite web |date=12 January 2020 |title=Harry Styles Has Weathered the Post-Boy Band Storm Better Than Most |url=https://consequence.net/2020/01/harry-styles-solo-career/ |access-date=15 September 2020 |website=Consequence of Sound}}; {{Cite magazine |date=16 July 2020 |title=10 Years of One Direction: The Story of the World's Biggest Boy Band, Told With the Fans Who Made It Happen |magazine=Billboard |url=https://www.billboard.com/music/pop/one-direction-ten-year-anniversary-fan-interviews-9419436/ |access-date=15 September 2020}}; {{Cite news |last=Corner, Lewis |date=16 February 2012 |title=Adele, Coldplay biggest-selling UK artists worldwide in 2011 |work=Digital Spy |url=http://www.digitalspy.co.uk/music/news/a366130/adele-coldplay-biggest-selling-uk-artists-worldwide-in-2011.html |access-date=22 March 2012}}; {{Cite web |title=Ed Sheeran's career journey: From street busker to global superstar |url=https://planetradio.co.uk/hits-radio/entertainment/celebrity/ed-sheeran-career-timeline/ |access-date=7 January 2023 |website=PlanetRadio.co.uk |last=Magliola |first=Anna Sky |date=30 November 2022}}; {{Cite web |url=https://open.spotify.com/artist/6M2wZ9GZgrQXHCFfjv46we |title=Dua Lipa, 77.5M Monthly listeners |date=6 May 2024 |publisher=Spotify}}</ref> As of 2024 the UK is the world's [[List of largest music markets|third-largest music market]] behind the US and Japan,<ref>{{Cite web |last=Paine |first=Andre |date=10 September 2024 |title=IFPI report reveals EU risks falling behind in global market - UK still among top music exporters |url=https://www.musicweek.com/labels/read/ifpi-report-reveals-eu-risks-falling-behind-in-global-market-uk-still-among-top-music-exporters/090424 |access-date=17 November 2025 |website=[[Music Week]] |language=en}}</ref> and in 2021 was the second-largest exporter of music behind the US.<ref>{{Cite news |last=Savage |first=Mark |date=16 June 2021 |title=British music exports reach a record high |url=https://www.bbc.com/news/entertainment-arts-57486272 |access-date=17 November 2025 |work=[[BBC]] |language=en-GB}}</ref> Many British cities are known for their music. Acts from Liverpool have had 54 UK chart number 1 hit singles, more per capita than any other city worldwide.<ref>{{Cite news |last=Hughes |first=Mark |date=14 January 2008 |title=A tale of two cities of culture: Liverpool vs Stavanger |work=Independent |location=London |url=https://www.independent.co.uk/news/uk/this-britain/a-tale-of-two-cities-of-culture-liverpool-vs-stavanger-770076.html?r=RSS |access-date=2 August 2009 |archive-url=https://web.archive.org/web/20180618175425/https://www.independent.co.uk/news/uk/this-britain/a-tale-of-two-cities-of-culture-liverpool-vs-stavanger-770076.html?r=RSS |archive-date=18 June 2018}}</ref> Glasgow's contribution was recognised in 2008 when it was named a [[City of Music (UNESCO)|City of Music]] by [[UNESCO]].<ref>{{Cite news |date=20 August 2008 |title=Glasgow gets city of music honour |work=BBC News |url=http://news.bbc.co.uk/1/hi/scotland/glasgow_and_west/7570915.stm |access-date=2 August 2009}}</ref> Manchester played a role in the spread of dance music such as [[acid house]], and from the mid-1990s, [[Britpop]]. London and Bristol are closely associated with the origins of [[electronic music]] sub-genres such as [[drum and bass]] and [[trip hop]].<ref>{{Cite web |title=Out of the melting pot: The origins and evolution of drum'n'bass |url=https://www.redbull.com/gb-en/history-of-drum-and-bass-music |access-date=1 August 2021 |website=Red Bull |date=25 June 2020}}</ref> UK dance music traces its roots back to the black British [[Sound system (Jamaican)|Sound System Culture]] and the [[New Age travellers|New Age Traveller]] movement of the 60s and 70s,<ref>{{Cite web |date=3 August 2023 |title=Parties, protest and police: the neglected histories of UK dance music |url=https://www.dazeddigital.com/music/article/60511/1/ed-gillet-new-book-party-lines-politics-history-uk-dance-music-clubbing |access-date=27 February 2024 |website=Dazed}}</ref> it also has influences from the [[House music|Chicago House]] and [[Detroit techno|Detroit Techno]] scenes. In the late 80's, dance music exploded with [[Rave]] culture mainly [[Acid House]] tracks which were made mainstream with novelty records (such as Smart E's [[Sesame's Treet]] and the Prodigy's [[Charly (song)|Charly]])<ref>{{Cite web |date=20 January 2001 |title=Rave |url=https://www.oxfordmusiconline.com/search?q=rave |access-date=27 February 2024 |website=Oxford Music Online}}</ref> and the [[Balearic beat|Balearic sound]] brought back from the Ibiza club scene. This led on to genres such as [[UK Garage]], [[Speed Garage]], [[Drum and bass]], [[Jungle music|Jungle]], [[Trance music|Trance]], and [[Dubstep]]. Influential UK dance acts past and present include [[808 State]], [[Orbital (band)|Orbital]], [[the Prodigy]], [[Underworld (band)|Underworld]], [[Roni Size]], [[Leftfield]], [[Massive Attack]], [[Groove Armada]], [[Fatboy Slim]], [[Faithless]], [[Basement Jaxx]], [[Chemical Brothers]], [[Disclosure (band)|Disclosure]], [[Calvin Harris]], and [[Fred Again]].<ref>{{Cite web |title=Mixmag's Greatest Dance Act of all Time Revealed |date=19 January 2012 |url=http://www.mixmag.net/words/news/mixmags-greatest-dance-act-revealed |archive-date=14 April 2012 |archive-url=https://web.archive.org/web/20120414045620/http://www.mixmag.net/words/news/mixmags-greatest-dance-act-revealed}};{{Cite web |date=26 February 2024 |title=Fred Again: who is the DJ who has thousands queuing for a 'secret rave' at the Sydney Opera House? |url=https://www.theguardian.com/music/2024/feb/27/fred-again-dj-sydney-opera-house-secret-show-tickets-sell-out-profile-bio-details |access-date=27 February 2024 |website=The Guardian}}</ref> Other influential UK DJs include [[Judge Jules]], [[Pete Tong]], [[Carl Cox]], [[Paul Oakenfold]], [[John Digweed]] and [[Sasha (dj)|Sasha]].<ref>{{Cite web |title=Top 100 DJs Poll results 2003 |url=http://djmag.com/top100chart.asp |archive-date=7 December 2003 |archive-url=https://web.archive.org/web/20031207071739/http://djmag.com/top100chart.asp}}</ref> === Cinema === {{Main|Cinema of the United Kingdom|Independent cinema in the United Kingdom}} The United Kingdom has had a considerable influence on the history of the cinema. The British directors [[Alfred Hitchcock]], whose film ''[[Vertigo (film)|Vertigo]]'' is considered by some critics as the [[List of films considered the best|best film of all time]],<ref>{{Cite news |date=2 August 2012 |title=Vertigo is named 'greatest film of all time' |work=BBC News |url=https://www.bbc.co.uk/news/entertainment-arts-19078948 |access-date=18 August 2012}}</ref> and [[David Lean]], who directed ''[[Lawrence of Arabia (film)|Lawrence of Arabia]]'', are amongst the most critically acclaimed directors ever.<ref>{{Cite web |title=The Directors' Top Ten Directors |url=http://www.bfi.org.uk/sightandsound/topten/poll/directors-directors.html |url-status=dead |archive-url=https://web.archive.org/web/20120517155218/http://www.bfi.org.uk/sightandsound/topten/poll/directors-directors.html |archive-date=17 May 2012 |publisher=British Film Institute}}</ref> Recent popular directors include [[Christopher Nolan]], [[Sam Mendes]], [[Steve McQueen (director)|Steve McQueen]], [[Richard Curtis]], [[Danny Boyle]], [[Tony Scott]] and [[Ridley Scott]].<ref>{{Cite web |title=The 24 Best British Directors of All Time |date=13 May 2023 |url=https://movieweb.com/best-british-directors-of-all-time/ |access-date=17 February 2024 |publisher=Movieweb}}</ref><ref>{{Cite web |title=Top 22 U.K. Film Directors |url=https://www.imdb.com/list/ls062383258/ |access-date=17 February 2024 |publisher=IMDb}}</ref><ref>{{Cite web |title=5 of the best ... Richard Curtis films |url=https://www.thetimes.com/culture/tv-radio/article/5-of-the-best-richard-curtis-films-tzxx9fv2h |work=The Times |access-date=4 June 2024 |date=17 April 2024}}</ref><ref>{{Cite web |title=The UK's top 50 film directors |date=23 May 2012 |url=https://www.televisual.com/news/the-uk-s-top-50-film-directors_bid-357/ |access-date=17 February 2024 |publisher=Televisual}}</ref> Many British actors have achieved international fame and critical success. Some of the most commercially successful films have been produced in the United Kingdom, including two of the [[List of highest-grossing film series|highest-grossing film franchises]] (''[[Harry Potter (film series)|Harry Potter]]'' and ''[[James Bond (film series)|James Bond]]'').<ref>{{Cite news |date=11 September 2007 |title=Harry Potter becomes highest-grossing film franchise |work=The Guardian |location=London |url=https://www.theguardian.com/film/2007/sep/11/jkjoannekathleenrowling |access-date=2 November 2010}}</ref> 2019 was a particularly good year for British films which grossed around £10.3&nbsp;billion globally, accounting for 28.7 per cent of global box office revenue.<ref>{{Cite web |title=UK Film Industry Statistics 2023 |date=10 April 2023 |url=https://www.socialfilms.co.uk/blog/uk-film-industry-statistics |archive-url=https://web.archive.org/web/20240217211749/https://www.socialfilms.co.uk/blog/uk-film-industry-statistics |archive-date=17 February 2024 |access-date=17 February 2024}}</ref> UK box-office takings totalled £1.25&nbsp;billion in 2019, with around 176&nbsp;million admissions.<ref>{{Cite web |title=The UK box office in 2019 |url=https://www2.bfi.org.uk/sites/bfi.org.uk/files/downloads/bfi-uk-box-office-2019.pdf |archive-url=https://web.archive.org/web/20240217214846/https://www2.bfi.org.uk/sites/bfi.org.uk/files/downloads/bfi-uk-box-office-2019.pdf |archive-date=17 February 2024 |access-date=17 February 2024}}</ref> In 2023 UK film and television studio stage space stood at 6.9&nbsp;million sq ft, with 1&nbsp;million sq ft added in the past year with more in development.<ref>{{Cite web |title=UK Film and Television Studios Market Report |url=https://content.knightfrank.com/research/2439/documents/en/uk-film-and-television-studios-market-2023-10567.pdf |access-date=17 February 2024 |publisher=Knight Frank}}</ref> The annual [[British Academy Film Awards|BAFTA Film Awards]] are hosted by the [[British Academy of Film and Television Arts]].<ref>{{Cite news |date=26 February 2001 |title=Baftas fuel Oscars race |work=BBC News |url=http://news.bbc.co.uk/1/hi/entertainment/1190562.stm |access-date=14 February 2011}}</ref> === Cuisine === {{Main|British cuisine}} {{Further|English cuisine|Scottish cuisine|Welsh cuisine|Northern Irish cuisine}} [[File:Fish, chips and mushy peas.jpg|thumb|[[Fish and chips]], a traditional British dish, served with lemon, tartar sauce and mushy peas]] British cuisine developed from influences reflective of its land, settlements, [[Immigration to the United Kingdom|arrivals of new settlers and immigrants]], trade and colonialism. The food of England has historically been characterised by simplicity of approach and a reliance on the high quality of natural produce.<ref>{{Cite book |last=Else |first=David |title=Inghilterra |publisher=EDT srl |date=2007 |isbn=978-88-6040-136-6 |page=76}}</ref> The traditional [[Sunday roast]] is one example, featuring a [[roasting|roast joint]] (usually of beef), lamb, chicken, or pork, often [[free range]] (and generally grass-fed, in the case of beef). Roasts are served with either roasted or boiled vegetables, [[Yorkshire pudding]] and [[gravy]]. Other traditional meals include [[meat pie]]s and [[stew]]s. A poll by [[YouGov]] in 2019 rated classic British food, with more than 80 per cent liking the Sunday roast, Yorkshire pudding, [[fish and chips]], [[crumpet]]s and the [[full English breakfast]].<ref>{{Cite web |url=https://yougov.co.uk/topics/consumer/articles-reports/2019/06/12/classic-british-cuisine-ranked-britons |date=11 June 2019 |title=Classic British cuisine ranked by Britons }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> The UK is home to a large selection of [[fine dining]]. The nation hosts multiple restaurant guides such as ''[[The Good Food Guide]]'' and ''[[Harden's]]''. In 2025 there were 197 restaurants with a [[Michelin Star]]; [[List of Michelin 3-star restaurants in the United Kingdom|ten of which have received a three-star rating]].<ref>{{cite web |url=https://guide.michelin.com/en/gb/restaurants/all-starred |title=United Kingdom |publisher=Michelin Guide |access-date=12 May 2025}}</ref> Sweet foods are common within British cuisine, and there is a long list of [[List of British desserts|British desserts]]. Afternoon tea is a light afternoon meal served with tea in tea rooms and hotels around the United Kingdom, with the tradition dating back to around 1840.<ref>{{Cite web |title=The tea-rific history of Victorian afternoon tea |work=The British Museum |url=https://www.britishmuseum.org/blog/tea-rific-history-victorian-afternoon-tea |access-date=11 April 2023}}</ref> A poll from July 2024 revealed that 3 per cent of the UK population follow a [[vegan]] diet, 6 per cent are [[vegetarian]], and 13 per cent identify as [[flexitarian]] (following a mainly vegetarian diet).<ref>{{Cite web |title=Dietary choices of Brits (e.g. vegeterian, flexitarian, meat-eater etc) |url=https://yougov.co.uk/topics/society/trackers/dietery-choices-of-brits-eg-vegeterian-flexitarian-meat-eater-etc |access-date=26 November 2024 |date=8 July 2024 |website=YouGov.co.uk}}</ref> The British Empire facilitated knowledge of [[Indian cuisine]] with its "strong, penetrating spices and herbs". British cuisine has absorbed the cultural influence of those who have settled in Britain, producing hybrid dishes, such as [[chicken tikka masala]].<ref>{{Cite news |date=19 April 2001 |title=Robin Cook's chicken tikka masala speech |work=The Guardian |location=London |url=https://www.theguardian.com/world/2001/apr/19/race.britishidentity |access-date=7 September 2021}}; {{Cite news |last=BBC E-Cyclopedia |date=20 April 2001 |title=Chicken tikka masala: Spice and easy does it |publisher=BBC |url=http://news.bbc.co.uk/1/hi/special_report/1999/02/99/e-cyclopedia/1285804.stm |access-date=28 September 2007}}</ref> The British have embraced world cuisine and regularly eat recipes or fast food from other European countries, the Caribbean and Asia. The UK has many [[gastropub]]s and is the birthplace of many alcoholic drinks including several beer styles such as [[pale ale]], [[India pale ale]], [[bitter (beer)|bitter]], [[brown ale]], [[porter (beer)|porter]], and [[stout]]. The number of [[craft beer]]s and microbreweries has expanded rapidly in the last two decades.<ref>{{Cite web |title=A guide to British Beer |url=https://www.expatica.com/uk/lifestyle/food-drink/british-beer-469903/ |access-date=25 November 2024 |website=Expatica}}</ref> Other popular alcoholic drinks produced in the UK include [[Scotch whisky]], [[Wine from the United Kingdom|English wine]], [[gin]], [[perry]] and [[cider]]. === Sport === {{Main|Sport in the United Kingdom|Great Britain at the Olympics}} {{Further|Sport in England|Sport in Scotland|Sport in Wales|Sport in Northern Ireland}} [[File:City vs United FA Cup final 2023.jpg|thumb|right|The [[2023 FA Cup final]] at [[Wembley Stadium]] between [[Manchester City]] and [[Manchester United]]]] [[File:Old 18th tee lr.jpg|thumb|right|Golf originated from the [[Old Course at St Andrews]] in Scotland.]] [[Association football]], [[tennis]], [[table tennis]], [[badminton]], [[rugby union]], [[rugby league]], [[rugby sevens]], [[golf]], [[boxing]], [[netball]], [[water polo]], [[field hockey]], [[English billiards|billiards]], [[darts]], [[Rowing (sport)|rowing]], [[rounders]] and [[cricket]] originated or were substantially developed in the UK, with the rules and codes of many modern sports invented and codified in the Victorian era.{{efn|In 2012, the president of the IOC, [[Jacques Rogge]], stated, "This great, sports-loving country is widely recognised as the birthplace of modern sport. It was here that the concepts of sportsmanship and fair play were first codified into clear rules and regulations. It was here that sport was included as an educational tool in the school curriculum."<ref>{{Cite web |url=http://www.olympic.org/Documents/Games_London_2012/London_2012_Opening_ceremony_Speech_Jacques_Rogge.pdf |title=Opening Ceremony of the Games of the XXX Olympiad |website=Olympic.org |access-date=30 November 2013 |date=27 July 2012 |archive-date=19 August 2013 |archive-url=https://web.archive.org/web/20130819135346/http://www.olympic.org/Documents/Games_London_2012/London_2012_Opening_ceremony_Speech_Jacques_Rogge.pdf |url-status=dead}}</ref><ref>{{Cite web |url=http://uk.reuters.com/article/uk-oly-preview-ad-idUKBRE86M0I720120723 |title=Unparalleled Sporting History |work=Reuters |access-date=30 November 2013 |last=Mehaffey |first=John |location=London |archive-date=25 May 2017 |archive-url=https://web.archive.org/web/20170525164121/http://uk.reuters.com/article/uk-oly-preview-ad-idUKBRE86M0I720120723 |url-status=dead}}</ref>}} A poll in 2003 found that football is the most popular sport in the UK.<ref name="sports poll">{{Cite web |date=22 December 2003 |title=Rugby Union 'Britain's Second Most Popular Sport' |url=http://www.ipsos-mori.com/researchpublications/researcharchive/928/Rugby-Union-Britains-Second-Most-Popular-Sport.aspx |access-date=28 April 2013 |publisher=Ipsos-Mori}}</ref> England is recognised by [[FIFA]] as the birthplace of club football, and the [[Football Association]] is the oldest of its kind, with the [[Laws of the Game (association football)|rules of football]] first drafted in 1863 by [[Ebenezer Cobb Morley]].<ref>{{Cite news |last=Rudd |first=Alyson |date=7 April 2008 |title=The father of football deserves much more |work=The Times |location=London |url=http://www.timesonline.co.uk/tol/sport/football/article3694775.ece |url-access=subscription |access-date=29 January 2015 |archive-date=4 June 2011 |archive-url=https://web.archive.org/web/20110604183514/http://www.timesonline.co.uk/tol/sport/football/article3694775.ece |url-status=dead}}; {{Cite web |date=24 October 2007 |title=Sheffield FC: 150 years of history |url=https://www.fifa.com/worldfootball/clubfootball/news/newsid=621801.html |archive-url=https://web.archive.org/web/20071025033006/http://www.fifa.com/worldfootball/clubfootball/news/newsid=621801.html |archive-date=25 October 2007 |access-date=29 January 2015 |publisher=[[FIFA]]}}</ref> Each of the [[Home Nations]] (England, Scotland, Wales and Northern Ireland) has its own football association, national team and [[league system]], and each is individually a governing member of the [[International Football Association Board]] alongside FIFA. The English top division, the [[Premier League]], is the most watched football league in the world.<ref>{{Cite news |last=Ebner |first=Sarah |date=2 July 2013 |title=History and time are key to power of football, says Premier League chief |work=The Times |location=London |url=http://www.thetimes.co.uk/tto/public/ceo-summit/article3804923.ece |url-access=subscription |access-date=30 November 2013}}</ref> The first international football match was contested by [[England national football team|England]] and [[Scotland national football team|Scotland]] on 30&nbsp;November 1872.<ref>{{Cite web |last=Mitchell, Paul |author-link=Paul Mitchell (broadcaster) |date=November 2005 |title=The first international football match |url=https://www.bbc.co.uk/scotland/sportscotland/asportingnation/article/0012/index.shtml |access-date=15 December 2013 |publisher=BBC Sport Scotland}}</ref> England, Scotland, [[Wales national football team|Wales]] and [[Northern Ireland national football team|Northern Ireland]] usually compete as separate countries in international competitions.<ref>{{Cite news |last=Harlow |first=Phil |date=5 August 2008 |title=Why is there no GB Olympics football team? |work=[[BBC Sport]] |url=http://news.bbc.co.uk/sport1/hi/olympics/football/7529807.stm |access-date=31 December 2010}}</ref> In 2003 rugby union was ranked the second-most-popular sport in the UK.<ref name="sports poll" /> The sport was created in [[Rugby School]], Warwickshire, and the [[1871 England versus Scotland rugby union match|first rugby international]] took place on 27&nbsp;March 1871 between [[England national rugby union team|England]] and [[Scotland national rugby union team|Scotland]].<ref>{{Cite web |url=https://www.bbc.co.uk/news/uk-england-coventry-warwickshire-25946757 |title=Six ways the town of Rugby helped change the world |work=BBC News |access-date=29 January 2015 |date=1 February 2014}}</ref><ref>{{Cite book |last1=Godwin |first1=Terry |last2=Rhys |first2=Chris |year=1981 |title=The Guinness Book of Rugby Facts & Feats |page=10 |publisher=Guinness Superlatives |isbn=978-0-85112-214-4}}</ref> England, Scotland, [[Wales national rugby union team|Wales]], [[Ireland national rugby union team|Ireland]], [[France national rugby union team|France]] and [[Italy national rugby union team|Italy]] compete in the [[Six Nations Championship]], the premier international rugby union tournament in the northern hemisphere. [[Sports governing bodies]] in [[Rugby union in England|England]], [[Rugby union in Scotland|Scotland]], [[Rugby union in Wales|Wales]] and [[Rugby union in Ireland|Ireland]] organise and regulate the game separately.<ref>{{Cite book |last1=Louw, Jaco |url=https://books.google.com/books?id=0-IiowvNomMC&pg=PA95 |title=The Girlfriends Guide to Rugby |last2=Nesbit, Derrick |publisher=South Publishers |year=2008 |isbn=978-0-620-39541-0 |location=Johannesburg}}</ref> Every four years the Home Nations make a combined team known as the [[British and Irish Lions]] which tours Australia, New Zealand and South Africa. The United Kingdom hosted the [[Summer Olympic Games]] in [[1908 Summer Olympics|1908]], [[1948 Summer Olympics|1948]] and [[2012 Summer Olympics|2012]], with London acting as the host city on all three occasions. Birmingham hosted the [[2022 Commonwealth Games]], the seventh time a country of the United Kingdom hosted the [[Commonwealth Games]] (England, Scotland and Wales have each hosted the Commonwealth Games at least once).<ref>{{Cite news |title=The journey of India in Commonwealth Games in 2022 |work=The Times of India |url=https://timesofindia.indiatimes.com/readersblog/allaboutsports/the-journey-of-india-in-commonwealth-games-in-2022-44477/ |access-date=29 June 2023}}</ref> === Symbols === {{Main|Symbols of the United Kingdom, the Channel Islands and the Isle of Man|l1 = Symbols of the United Kingdom}} [[File:Queen Elizabeth II Platinum Jubilee 2022 - Platinum Pageant (52123378222).jpg|thumb|Union Jack flags on [[The Mall, London|The Mall]], London]] The [[flag of the United Kingdom]] is the [[Union Flag]], which is also referred to as the Union Jack.<ref>{{Cite web |title=Union Jack or Union Flag? |url=https://www.flaginstitute.org/wp/uk-flags/the-union-jack-or-the-union-flag |access-date=26 September 2022 |website=The Flag Institute}}</ref> It was created in 1606 by the superimposition of the [[flag of England]], representing [[Saint George]], on the [[flag of Scotland]], representing [[Saint Andrew]], and was updated in 1801 with the addition of [[Saint Patrick's Flag]].<ref>{{Cite web |title=college-of-arms.gov.uk |url=https://www.college-of-arms.gov.uk/resources/union-flag-approved-designs |access-date=14 January 2022 |publisher=The College of Arms}}</ref> Wales is not represented in the Union Flag, as Wales had been conquered and [[annexed]] to England prior to the formation of the United Kingdom. The possibility of redesigning the Union Flag to include representation of Wales was discussed in 2007.<ref>{{Cite news |date=27 November 2007 |title=Welsh dragon call for Union flag |work=BBC News |url=http://news.bbc.co.uk/1/hi/uk/7114248.stm |access-date=17 October 2008}}</ref> The [[national anthem]] of the United Kingdom is "[[God Save the King]]", with "King" replaced with "Queen" in the lyrics whenever the monarch is a woman. [[Britannia]] is a [[national personification]] of the United Kingdom, originating from [[Roman Britain]].<ref>{{Cite web |title=Britannia on British Coins |url=http://www.24carat.co.uk/britanniaframe.html |access-date=25 June 2006 |publisher=Chard}}</ref> Beside [[The Lion and the Unicorn]] and the [[Welsh Dragon|dragon]] of heraldry, the [[bulldog]] is an iconic animal and commonly represented with the Union Flag.<ref>{{Cite book |last=Baker |first=Steve |title=Picturing the Beast |publisher=University of Illinois Press |year=2001 |isbn=978-0-252-07030-3 |page=52}}</ref> A rare personification is a character originating in the 18th century, [[John Bull]].<ref>{{Cite web |last=<!--Not stated--> |title=Who is John Bull |url=https://www.loc.gov/wiseguide/jan04/johnbull.html |access-date=11 January 2022 |publisher=The Library of Congress}}</ref> [[National symbols of England|England]], [[National symbols of Wales|Wales]] and [[National symbols of Scotland|Scotland]] each have their own national symbols, including their national flags. [[National symbols of Ireland, the Republic of Ireland and Northern Ireland|Northern Ireland]] also has symbols, many of which are shared with the [[Republic of Ireland]]. == See also == {{Portal|United Kingdom|England|Northern Ireland|Scotland|Wales}} * [[Outline of the United Kingdom]] ** [[Outline of England]] ** [[Outline of Northern Ireland]] ** [[Outline of Scotland]] ** [[Outline of Wales]] * [[International rankings of the United Kingdom]] * [[Historiography of the United Kingdom]] * [[Historiography of the British Empire]] * [[United Kingdom–Crown Dependencies Customs Union]] == Notes == {{Notelist}} == References == {{Reflist}} == External links == {{Sister project links|auto=yes}} * [https://www.bbc.co.uk/news/world-europe-18023389 United Kingdom] from [[BBC News]] * [https://web.archive.org/web/20260118175542/https://www.cia.gov/the-world-factbook/countries/united-kingdom/ United Kingdom]. ''[[The World Factbook]]''. [[Central Intelligence Agency]]. * [https://web.archive.org/web/20090406224510/http://ucblibraries.colorado.edu/govpubs/for/british.htm United Kingdom] from ''UCB Libraries GovPubs'' (archived 6 April 2009) * {{Wikiatlas|United Kingdom}} * {{OSM relation|62149}} * [http://www.ifs.du.edu/ifs/frm_CountryProfile.aspx?Country=GB Key Development Forecasts for the United Kingdom] from [[International Futures]] === Government === * [https://www.gov.uk/ Official website of HM Government] * [https://www.royal.uk/ Official website of the British Monarchy] * [https://www.gov.uk/government/organisations/prime-ministers-office-10-downing-street Official website of the British Prime Minister's Office] === Travel === * [http://www.visitbritain.com/en/ Official tourist guide to Britain] <!-- Please discuss links on the talk page before adding them to this list – remember to read the WP:EL guideline.--> {{United Kingdom topics}} {{Navboxes | list = {{United Kingdom constituents and affiliations}} {{British Isles}} {{Sovereign states of Europe}} {{Commonwealth realms}} {{English official language clickable map}} {{The Commonwealth}} }} {{Authority control}} {{Coord|55|N|3|W|type:country_region:GB|display=title}} [[Category:United Kingdom| ]] [[Category:British Islands]] [[Category:Countries in Europe]] [[Category:Countries and territories where English is an official language]] [[Category:G20 members]] [[Category:Island countries]] [[Category:Member states of NATO]] [[Category:Member states of the Commonwealth of Nations]] [[Category:Member states of the Council of Europe]] [[Category:Member states of the United Nations]] [[Category:OECD members]] [[Category:States and territories established in 1707]] [[Category:States and territories established in 1801]] [[Category:States and territories established in 1922]] fhvytuxn1gpa6ayvzfjjoso68aip63w 117263 117262 2026-07-16T11:45:33Z Tumbuka Arch 6863 1 revision imported from [[:en:United_Kingdom]] 117262 wikitext text/x-wiki {{Short description|Country in northwestern Europe}} {{Hatnote|"UK" redirects here. For other uses, see [[UK (disambiguation)]] and [[United Kingdom (disambiguation)]]. Not to be confused with [[England]] or [[Great Britain]].}} {{pp-sock|small=yes}} {{pp-move|small=yes}} {{Use British English|date=April 2012}} {{Use dmy dates|date=November 2025}} {{Infobox country | common_name = United Kingdom | linking_name = the United Kingdom<!--Note: "the" required here as this entry used to create wikilinks--> | conventional_long_name = United Kingdom of Great Britain and Northern Ireland | image_flag = Flag of the United Kingdom (1-2).svg | flag_type = [[Union Jack|Flag]] | alt_flag = A flag composed of a red cross edged in white and superimposed on a red saltire, also edged in white, superimposed on a white saltire on a blue background | image_coat = | other_symbol = [[File:Coat of arms of the United Kingdom (2022, both variants).svg|250px]]<br />Used in relation to [[Scotland]] (right) and elsewhere (left) | other_symbol_type = [[Coat of arms of the United Kingdom|Coat of arms]]: | national_anthem = "[[God Save the King]]"{{Efn|"God Save the King" is the [[national anthem]] by custom, not statute, and there is no authorised version. Typically only the first verse is usually sung, although the second verse is also often sung as well at state and public events.<ref>{{Cite web |title=National Anthem |url=https://www.royal.uk/encyclopedia/national-anthem |access-date=10 April 2024 |website=The Royal Family |archive-date=20 May 2024 |archive-url=https://web.archive.org/web/20240520130352/https://www.royal.uk/encyclopedia/national-anthem |url-status=live}}</ref> The words ''King, he, him, his'', used at present, are replaced by ''Queen, she, her'' when the monarch is female.}}<br /><div style="display:inline-block;margin-top:0.4em;">[[File:United States Navy Band - God Save the Queen.ogg|God Save the King / Queen <!-- Do not change file name due to computer error without ensuring that the file is playable. -->]]</div> | image_map = {{Switcher|[[File:Europe-UK (orthographic projection).svg|upright=1.15|frameless]]|Show globe|[[File:Europe-UK.svg|upright=1.15|frameless]]|Show map of Europe|[[File:United Kingdom (+overseas territories and crown dependencies) in the World (+Antarctica claims).svg|upright=1.15|frameless]]|Show [[British Overseas Territories]] and [[Crown Dependencies]]|[[File:Territorial waters - United Kingdom.svg|upright=1.15|frameless]]|Show [[Exclusive economic zone of the United Kingdom|their exclusive economic zones]]|default=1}} | map_caption = | capital = [[London]] | coordinates = {{Coord|51|30|N|0|7|W|type:city(9,100,000)_region:GB-LND}} | largest_city = capital | languages_type = [[National language]] | languages = [[English language|English]] <!--Note: Just English, don't add "British English".--> | languages2_type = Regional and minority languages{{Efn|Scots, Ulster Scots, Welsh, Cornish, Scottish Gaelic and Irish are classed as [[Regional language|regional]] or [[Minority language|minority]] languages under the [[Council of Europe]]'s [[European Charter for Regional or Minority Languages]].<ref name="reglang">{{Cite web |title=List of declarations made with respect to treaty No. 148 |url=http://conventions.coe.int/treaty/Commun/ListeDeclarations.asp?CL=ENG&NT=148&VL=1 |access-date=12 December 2013 |publisher=[[Council of Europe]] |archive-date=12 December 2013 |archive-url=https://web.archive.org/web/20131212175720/http://conventions.coe.int/treaty/Commun/ListeDeclarations.asp?CL=ENG&NT=148&VL=1 |url-status=dead}}</ref> These include defined obligations to promote those languages.<ref>{{Cite web |title=Welsh language on GOV.UK – Content design: planning, writing and managing content – Guidance |url=https://www.gov.uk/guidance/content-design/welsh-language-on-gov-uk |access-date=3 August 2018 |website=gov.uk |archive-date=4 August 2018 |archive-url=https://web.archive.org/web/20180804014121/https://www.gov.uk/guidance/content-design/welsh-language-on-gov-uk |url-status=live |postscript=;}} {{Cite news |title=Welsh language scheme |work=GOV.UK |url=https://www.gov.uk/government/organisations/department-for-transport/about/welsh-language-scheme |access-date=3 August 2018 |archive-date=4 August 2018 |archive-url=https://web.archive.org/web/20180804014119/https://www.gov.uk/government/organisations/department-for-transport/about/welsh-language-scheme |url-status=live |postscript=;}} {{Cite news |title=Welsh language scheme |work=GOV.UK |url=https://www.gov.uk/government/organisations/home-office/about/welsh-language-scheme |access-date=3 August 2018 |archive-date=2 August 2018 |archive-url=https://web.archive.org/web/20180802010917/https://www.gov.uk/government/organisations/home-office/about/welsh-language-scheme |url-status=live}}</ref> See also [[Languages of the United Kingdom]]. Welsh has limited ''[[de jure]]'' official status in Wales, as well as in the provision of national government services provided for Wales.}} | languages2 = {{Hlist <!--Anglic--> | [[Scots language|Scots]] | [[Ulster Scots dialects|Ulster Scots]] <!--Brittonic--> | [[Welsh language|Welsh]] | [[Cornish language|Cornish]] <!--Goidelic--> | [[Scottish Gaelic]]<!--Keep "Scottish Gaelic"; people will find "Gaelic" confusing, as the Irish language is also commonly called "Gaelic"--> | [[Irish language|Irish]] <!--BANZSL--> | [[British Sign Language]] }} | ethnic_groups = {{unbulleted list | 83.1% [[White people in the United Kingdom|White]] | 8.6% [[British Asian|Asian]] | 3.7% [[Black British|Black]] | 2.7% [[Mixed (United Kingdom ethnicity category)|Mixed]] | 2.0% [[Ethnic groups in the United Kingdom|other]] }} | ethnic_groups_year = 2021 | ethnic_groups_ref = {{Efn|name=UK-wide2021|Whereas the censuses of England and Wales and of Northern Ireland went ahead as planned in 2021, the census in Scotland was postponed until 2022. The Office for National Statistics reports that these UK-wide statistics "have been created to provide an image of how UK census data may have looked if the most recent UK censuses had been conducted with an aligned date of 21 March 2021".}}<ref name=Ethnicity2021>{{cite web|url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/censusbasedstatisticsuk2021|title=Table 06: UK06 - Ethnic group by sex by age, United Kingdom|work=Census-based statistics UK: 2021|publisher=Office for National Statistics|date=27 June 2025|access-date=28 March 2026}}</ref> | religion = {{unbulleted list | 46.6% [[Religion in the United Kingdom#Christianity|Christianity]] | 37.6% [[Irreligion in the United Kingdom|no religion]] | 6.0% [[Islam in the United Kingdom|Islam]] | 1.6% [[Hinduism in the United Kingdom|Hinduism]] | 2.2% [[Religion in the United Kingdom|other]] | 5.9% not stated }} | religion_year = 2021 | religion_ref = {{Efn|name=UK-wide2021}}<ref name=Religion2021>{{cite web|url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/censusbasedstatisticsuk2021|title=Table 07: UK07 - Religion by sex by age, United Kingdom|work=Census-based statistics UK: 2021|publisher=Office for National Statistics|date=27 June 2025|access-date=28 March 2026}}</ref> | demonym = {{hlist |[[British people|British]] |Briton |Brit (colloquial) }} | government_type = Unitary [[Westminster parliamentary system|parliamentary constitutional monarchy]]{{Efn|Although the United Kingdom has traditionally been seen as a [[unitary state]], an alternative description of the UK as a "union state", put forward by, amongst others, [[Vernon Bogdanor]],<ref>{{Cite book |last=Bradbury |first=Jonathan |url=https://books.google.com/books?id=c3QWEAAAQBAJ&q=%2522union+state%2522+UK+unitary&pg=PA19 |title=Constitutional Policy and Territorial Politics in the UK: Volume 1: Union and Devolution 1997–2012 |date=2021 |publisher=Policy Press |isbn=978-1-5292-0588-6 |pages=19–20 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204328/https://books.google.com/books?id=c3QWEAAAQBAJ&q=%2522union+state%2522+UK+unitary&pg=PA19#v=onepage&q=%2522union%20state%2522%20UK%20unitary&f=false |url-status=live}}</ref> has become increasingly influential since the adoption of devolution in the 1990s.<ref>{{Cite book |last=Leith |first=Murray Stewart |url=https://books.google.com/books?id=PeBvAAAAQBAJ&q=Uk+%2522unitary+state%2522&pg=PA39 |title=Political Discourse and National Identity in Scotland |date=2012 |publisher=Edinburgh University Press |isbn=978-0-7486-8862-3 |page=39 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204223/https://books.google.com/books?id=PeBvAAAAQBAJ&q=Uk+%2522unitary+state%2522&pg=PA39#v=onepage&q=Uk%20%2522unitary%20state%2522&f=false |url-status=live}}</ref> A union state is considered to differ from a unitary state in that while it maintains a central authority it also recognises the authority of historic rights and infrastructures of its component parts.<ref>{{Cite book |last1=Gagnon |first1=Alain-G. |url=https://books.google.com/books?id=g0ahE2fTxS0C&q=%2522union+state%2522+UK+unitary&pg=PA47 |title=Multinational Democracies |last2=Tully |first2=James |date=2001 |publisher=Cambridge University Press |isbn=978-0-521-80473-8 |page=47 |access-date=3 October 2021 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002204329/https://books.google.com/books?id=g0ahE2fTxS0C&q=%2522union+state%2522+UK+unitary&pg=PA47#v=onepage&q=%2522union%20state%2522%20UK%20unitary&f=false |url-status=live |postscript=;}} {{Cite book |last=Bogdanor |first=Vernon |title=Constitutional Reform in the United Kingdom: Practice and Principles |date=1998 |publisher=Hart Publishing |isbn=978-1-901362-84-8 |editor-last=Beatson |editor-first=Jack |location=Oxford |page=18 |chapter=Devolution: the Constitutional Aspects |chapter-url=https://books.google.com/books?id=YEEgDsCYmbQC&q=%2522union+state%2522+UK+unitary&pg=PA18}}</ref>}} | leader_title1 = [[Monarchy of the United Kingdom|Monarch]] | leader_name1 = [[Charles III]] | leader_title2 = [[Prime Minister of the United Kingdom|Prime Minister]] | leader_name2 = [[Keir Starmer]] <!--Do NOT change the name to Sir Keir Starmer without discussion in the talk page, also don't change it to Andy Burham YET unless if many reliable sources are reporting him to be the new PM. --> | legislature = [[Parliament of the United Kingdom|Parliament]] | upper_house = [[House of Lords]] | lower_house = [[House of Commons of the United Kingdom|House of Commons]] | sovereignty_type = [[Formation of the United Kingdom of Great Britain and Northern Ireland|Formation]] | established_event1 = [[Laws in Wales Acts 1535 and 1542|Laws in Wales Acts]] | established_date1 = 1535 and 1542 | established_event2 = [[Union of the Crowns]] | established_date2 = 24 March 1603 | established_event3 = [[Treaty of Union]] | established_date3 = 22 July 1706 | established_event4 = [[Acts of Union 1707|Acts of Union of England and Scotland]] | established_date4 = 1 May 1707 | established_event5 = [[Acts of Union 1800|Acts of Union of Great Britain and Ireland]] | established_date5 = 1 January 1801 | established_event6 = [[Irish Free State Constitution Act 1922|Irish Free State Constitution Act]] | established_date6 = 6 December 1922 | area_label = Total{{efn|name=ONSArea|[[Office for National Statistics|ONS]] Standard Area Measurement, 'area to mean high water'. Excludes the [[Crown Dependencies]] and [[British Overseas Territories]].}} | area_km2 = 244376 | area_footnote = <ref name="ONS Standard Area Measurement">{{cite web |url=https://geoportal.statistics.gov.uk/datasets/ons::standard-area-measurements-for-administrative-areas-december-2023-in-the-uk/about |title=Standard Area Measurements for Administrative Areas (December 2023) in the UK |author=<!--Not stated--> |date=31 May 2024 |website=[[ONS Open Geography Portal|Open Geography Portal]] |publisher=Office for National Statistics |access-date=7 June 2024 |archive-date=7 June 2024 |archive-url=https://web.archive.org/web/20240607052407/https://geoportal.statistics.gov.uk/datasets/ons::standard-area-measurements-for-administrative-areas-december-2023-in-the-uk/about |url-status=live}}</ref> | area_rank = 78th | area_sq_mi = auto | area_label2 = Land{{efn|name=ONSLandArea|[[Office for National Statistics|ONS]] Standard Area Measurement, "area to mean high water excluding inland water". Excludes the [[Crown Dependencies]] and [[British Overseas Territories]].}} | area_data2 = {{convert|{{UK subdivision area|GSS=K02000001}}|km2|sqmi|abbr=on}}<ref name="ONS mid-year pop est" /> | percent_water = | population_estimate = {{IncreaseNeutral}} {{UK subdivision population|GSS=K02000001}}<ref name="ONS mid-year pop est">{{UK subdivision statistics citation}}</ref> | population_estimate_year = {{UK subdivision statistics year}} | population_estimate_rank = 20th | population_census = {{IncreaseNeutral}} 66,912,637{{Efn|name=UK-wide2021}}<ref name=Ethnicity2021/> | population_census_year = 2021 | population_census_rank = | population_density_km2 = {{UK subdivision density|GSS=K02000001}} | population_density_sq_mi = auto | population_density_rank = 48th | pop_den_footnote = <ref name="ONS mid-year pop est" /> | GDP_PPP = {{increase}} $4.721&nbsp;trillion<ref name="IMFWEO.UK">{{cite web |url=https://data.imf.org/en/Data-Explorer?datasetUrn=IMF.RES:WEO(9.0.0) |title=World Economic Outlook Database (April 2026 Edition) |publisher=[[International Monetary Fund]] |website=www.imf.org |date=14 April 2026 |access-date=18 April 2026}}</ref> | GDP_PPP_year = 2026 | GDP_PPP_rank = 10th | GDP_PPP_per_capita = {{increase}} $67,585<ref name="IMFWEO.UK" /> | GDP_PPP_per_capita_rank = 33rd | GDP_nominal = {{increase}} $4.265&nbsp;trillion<ref name="IMFWEO.UK" /> | GDP_nominal_year = 2026 | GDP_nominal_rank = 5th | GDP_nominal_per_capita = {{increase}} $61,056<ref name="IMFWEO.UK" /> | GDP_nominal_per_capita_rank = 21st | Gini = 35.4 | Gini_year = 2021 | Gini_change = decrease | Gini_ref = <ref>{{Cite web |title=Income inequality |url=https://data.oecd.org/inequality/income-inequality.htm |access-date=12 February 2024 |website=OECD Data |publisher=[[OECD]] |archive-date=1 July 2022 |archive-url=https://web.archive.org/web/20220701171540/https://data.oecd.org/inequality/income-inequality.htm |url-status=live}}</ref> | HDI = 0.946<!--number only--> | HDI_year = 2023<!-- Please use the year to which the data refers, not the publication year.--> | HDI_change = increase<!--increase/decrease/steady--> | HDI_ref = <ref name="UNHDR">{{Cite web |date=6 May 2025 |title=Human Development Report 2025 |url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf |url-status=live |archive-url=https://web.archive.org/web/20250506051232/https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf |archive-date=6 May 2025 |access-date=6 May 2025 |publisher=[[United Nations Development Programme]] |language=en}}</ref> | HDI_rank = 13th | currency = [[Pound&nbsp;sterling]]{{Efn|Some of the devolved countries, Crown Dependencies and British Overseas Territories issue their own sterling banknotes or currencies, or use another nation's currency. See [[List of British currencies]].}} ([[£]]) | currency_code = GBP | utc_offset = +0 | time_zone = [[Greenwich Mean Time|GMT]] | utc_offset_DST = +1 | time_zone_DST = [[British Summer Time|BST]]{{Efn|Also observed by the [[Crown Dependencies]]. For further information, see [[Time in the United Kingdom]].}} | DST_note = | date_format = {{Abbr|dd|day}}/{{Abbr|mm|month}}/{{Abbr|yyyy|year}} ([[Anno Domini|AD]]){{efn|The UK Government uses the [[ISO 8601]] format, {{Abbr|yyyy|year}}-{{Abbr|mm|month}}-{{Abbr|dd|day}}, for machine-readable dates and times.<ref>{{cite web |title=Formatting dates and times in data |url=https://www.gov.uk/government/publications/open-standards-for-government/date-times-and-time-stamps-standard |date=9 August 2022 |website=[[gov.uk]] |publisher=[[Government of the United Kingdom|HM Government]] |access-date=1 June 2024 |archive-date=9 May 2024 |archive-url=https://web.archive.org/web/20240509092813/https://www.gov.uk/government/publications/open-standards-for-government/date-times-and-time-stamps-standard |url-status=live}}</ref> See [[Date and time notation in the United Kingdom]].}} | calling_code = [[Telephone numbers in the United Kingdom|+44]]{{Efn|Excludes most overseas territories. See [[Telephone numbers in the United Kingdom#Telephone numbers in Overseas Territories]].}} | cctld = [[.uk]]{{Efn|The [[.gb]] domain is also reserved for the UK, but has been little used.}} }} The '''United Kingdom of Great Britain and Northern Ireland''', commonly known as the '''United Kingdom''' ('''UK''') or '''Britain''',<!--DO NOT CHANGE ORDER OF INTRO WITHOUT CONSENSUS-->{{Efn|Usage is mixed. ''[[The Guardian]]''<ref>{{Cite news |date=2021-04-23 |title=Guardian style guide: U |url=https://www.theguardian.com/guardian-style-guide-u |access-date=2025-12-29 |work=The Guardian |language=en-GB |issn=0261-3077}}</ref> and ''[[The Daily Telegraph|The Telegraph]]''<ref>{{Cite news |date=2025-07-25 |title=Places |url=https://www.telegraph.co.uk/style-book/places/ |access-date=2025-12-29 |work=The Telegraph |language=en-GB |issn=0307-1235 |archive-date=17 November 2025 |archive-url=https://web.archive.org/web/20251117111222/https://www.telegraph.co.uk/style-book/places/ |url-status=live }}</ref> use ''Britain'' as a synonym for the United Kingdom. The British [[Cabinet Office]]'s [[Government Digital Service]] style guide<ref>{{Cite web |title=Style guide - A to Z - Guidance - GOV.UK |url=https://www.gov.uk/guidance/style-guide/a-to-z#great-britain |access-date=2026-01-02 |website=www.gov.uk |language=en |archive-date=22 November 2024 |archive-url=https://web.archive.org/web/20241122222025/https://www.gov.uk/guidance/style-guide/a-to-z#great-britain |url-status=live }}</ref> for use on [[gov.uk]] recommends: "Use UK and United Kingdom in preference to Britain and British (UK business, UK foreign policy, ambassador and high commissioner). But British embassy, not UK embassy."}} is a country<!-- The term "country" was chosen as a result of a 2022 Request for Comment. Discuss potential changes on the talk page first. --> in [[northwestern Europe]], off the coast of [[European mainland|the continental mainland]]. It comprises [[England]], [[Scotland]], [[Wales]] and [[Northern Ireland]],{{efn|The [[Isle of Man]], [[Bailiwick of Guernsey|Guernsey]] and [[Jersey]] are [[Crown Dependencies]] and not part of the UK.}} with a population of over 69 million in 2024. The UK includes the island of [[Great Britain]], the north-eastern part of the island of [[Ireland]], and most of [[List of islands of the United Kingdom|the smaller islands]] within the [[British Isles]], covering {{Convert|244376|km2|sqmi|order=flip}}.{{efn|name=ONSArea}} It shares [[Republic of Ireland–United Kingdom border|a land border]] with the [[Republic of Ireland]] and is surrounded by the [[Atlantic Ocean]], the [[North Sea]], the [[English Channel]], the [[Celtic Sea]] and the [[Irish Sea]], while maintaining sovereignty over the [[Crown Dependencies]] and the [[British Overseas Territories]]. The capital and largest city of England and the UK is [[London]]; [[Edinburgh]], [[Cardiff]] and [[Belfast]] are the national capitals of Scotland, Wales and Northern Ireland, respectively. The British Isles have been continuously inhabited since the [[Neolithic]]. In AD&nbsp;43 the [[Roman conquest of Britain]] began. The [[end of Roman rule in Britain|Roman departure]] between 383 and 410 was followed by [[Anglo-Saxon settlement of Britain|Anglo-Saxon settlement]] beginning around 450. In 1066 the [[Norman Conquest|Normans conquered England]]. Over the 17th century the role of the [[British monarchy]] was reduced, particularly as a result of the [[English Civil War]]. In 1707 the Kingdom of England and the [[Kingdom of Scotland]] united under the [[Treaty of Union]] to create the [[Kingdom of Great Britain]]. The [[Acts of Union 1800]] incorporated the [[Kingdom of Ireland]] to create the [[United Kingdom of Great Britain and Ireland]] in 1801. Most of Ireland [[Partition of Ireland|seceded]] from the UK in 1922 as the [[Irish Free State]], and the [[Royal and Parliamentary Titles Act 1927]] created the present United Kingdom. The UK [[History of industrialisation#Industrial Revolution in Europe|became the first industrialised country]] and was the world's [[foremost power]] for the majority of the 19th and early 20th centuries, particularly during the ''[[Pax Britannica]]'' between 1815 and 1914. The [[British Empire]] was the leading [[economic power]] for most of the 19th century, a position supported by [[British Agricultural Revolution|its agricultural prosperity]], its role as a dominant [[trading nation]], a massive industrial capacity, [[List of British innovations and discoveries in the 19th century|significant technological achievements]], and the rise of [[19th-century London]] as the world's principal financial centre. At its height in the 1920s, the empire encompassed around a quarter of the world's landmass and population, and was the [[List of largest empires#Empires at their greatest extent|largest in history]]. However, [[History of the United Kingdom during the First World War|its involvement in the First World War]] and [[Military history of the United Kingdom during World War II|in the Second World War]] damaged [[Economy of the British Empire|Britain's economic power]], and a global wave of [[decolonisation]] led to the independence of most British colonies. The UK is a [[constitutional monarchy]] and [[parliamentary democracy]]{{Efn|The United Kingdom does not have a codified constitution but an unwritten one formed of Acts of Parliament, court judgments, traditions, and conventions.<ref>{{Citation |title=What is the UK Constitution? |date=9 August 2018 |url=https://www.ucl.ac.uk/constitution-unit/what-uk-constitution/what-uk-constitution |publisher=The Constitution Unit of UCL |access-date=6 February 2020 |archive-date=7 November 2018 |archive-url=https://web.archive.org/web/20181107060057/http://www.ucl.ac.uk/constitution-unit/whatis/uk-constitution |url-status=live}}</ref>}} with three distinct jurisdictions: [[English law|England and Wales]], [[Scots law|Scotland]], and [[Law of Northern Ireland|Northern Ireland]]. Scotland, Wales and Northern Ireland have their own governments and parliaments which control various [[Devolution in the United Kingdom|devolved]] matters. A [[developed country]] with [[Economy of the United Kingdom|an advanced economy]], the UK ranks amongst the [[List of countries by GDP (nominal)|largest economies by nominal GDP]] and is one of the world's [[List of countries by exports|largest exporters]] and [[List of countries by imports|importers]]. As a [[nuclear state]] with one of the [[List of countries by military expenditures|highest defence budgets]], the UK maintains [[British Armed Forces|one of the strongest militaries in Europe]]. [[Culture of the United Kingdom|British culture]] is globally influential, notably in the [[Anglosphere]] and [[Commonwealth of Nations|the Commonwealth]]; [[Anglicisation|its soft power influence]] is observable in the legal and political systems of many [[List of countries that have gained independence from the United Kingdom|former colonies]], and in its exports [[English-speaking world|of language]], [[British literature|literature]], [[Theatre of the United Kingdom|theatre]], [[Cinema of the United Kingdom|cinema]], [[Music of the United Kingdom|music]], [[Art of the United Kingdom|art]] and [[Sport in the United Kingdom|sport]]. A [[great power]], the UK is part of [[Foreign relations of the United Kingdom#International organisations|numerous international organisations]]. == Etymology and terminology == {{Anchor|Etymology}}<!--linked--> {{See also|Britain (place name)|Terminology of the British Isles}} The [[Acts of Union 1707]] declared that the [[Kingdom of England]] and the [[Kingdom of Scotland]] were "United into One Kingdom by the Name of Great Britain".{{Efn|Compare to section 1 of both of the 1800 [[Acts of Union (1800)|Acts of Union]] which reads: "the kingdoms of Great Britain and Ireland shall{{spaces}}... be united into one kingdom, by the name of the United Kingdom of Great Britain and Ireland".}}<ref name="Acts of Union 1707">{{Cite web |title=The Treaty (act) of the Union of Parliament 1706 |url=http://www.scotshistoryonline.co.uk/union.html |archive-url=https://web.archive.org/web/20190527074630/http://www.scotshistoryonline.co.uk/union.html |archive-date=27 May 2019 |access-date=23 August 2011 |publisher=Scots History Online |postscript=;}} {{Cite book |last1=Barnett, Hilaire |url=https://books.google.com/books?id=LYc1tSYonrQC&pg=PA165 |title=Constitutional & Administrative Law |last2=Jago, Robert |publisher=Routledge |year=2011 |isbn=978-0-415-56301-7 |edition=8th |location=Abingdon |page=165 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140722/https://books.google.com/books?id=LYc1tSYonrQC&pg=PA165 |url-status=live}}</ref> The term "United Kingdom" has occasionally been used for the former [[Kingdom of Great Britain]], although its official name from 1707 to 1800 was simply "Great Britain".<ref>"After the political union of England and Scotland in 1707, the nation's official name became 'Great Britain{{'"}}, ''The American Pageant, Volume 1'', Cengage Learning (2012); "From 1707 until 1801 ''Great Britain'' was the official designation of the kingdoms of England and Scotland". ''The Standard Reference Work: For the Home, School and Library, Volume 3'', Harold Melvin Stanford (1921); "In 1707, on the union with Scotland, 'Great Britain' became the official name of the British Kingdom, and so continued until the union with Ireland in 1801". ''United States Congressional serial set, Issue 10; Issue 3265'' (1895); {{Cite web |last=Gascoigne, Bamber |author-link=Bamber Gascoigne |title=History of Great Britain (from 1707) |url=http://www.historyworld.net/wrldhis/PlainTextHistories.asp?historyid=ab07 |access-date=18 July 2011 |publisher=History World |archive-date=27 May 2019 |archive-url=https://web.archive.org/web/20190527205230/http://www.historyworld.net/wrldhis/PlainTextHistories.asp?historyid=ab07 |url-status=live}}</ref> The [[Acts of Union 1800]] formed the [[United Kingdom of Great Britain and Ireland]]. Following the [[partition of Ireland]] and the independence of the [[Irish Free State]] in 1922, which left [[Northern Ireland]] as the only part of the island of Ireland within the United Kingdom, the name was changed in 1927 to the "United Kingdom of Great Britain and Northern Ireland".<ref>{{Cite book |last=Cottrell, P. |url=https://archive.org/details/irishcivilwar00cott_573 |title=The Irish Civil War 1922–23 |year=2008 |isbn=978-1-84603-270-7 |page=[https://archive.org/details/irishcivilwar00cott_573/page/n85 85] |publisher=Bloomsbury USA |url-access=limited}}</ref> Although the United Kingdom is a sovereign country, England, Scotland, Wales and Northern Ireland are widely referred to as [[Countries of the United Kingdom|countries]].<ref>{{Citation |last1=S. Dunn |title=An Alphabetical Listing of Word, Name and Place in Northern Ireland and the Living Language of Conflict |year=2000 |place=[[Lewiston, New York]] |publisher=[[Edwin Mellen Press]] |quote=One specific problem – in both general and particular senses – is to know what to call Northern Ireland itself: in the general sense, it is not a country, or a province, or a state – although some refer to it contemptuously as a statelet: the least controversial word appears to be jurisdiction, but this might change. |last2=H. Dawson |postscript=;}} {{Cite web |date=15 December 2011 |title=Changes in the list of subdivision names and code elements |url=http://www.iso.org/iso/iso_3166-2_newsletter_ii-3_2011-12-13.pdf |access-date=28 May 2012 |website=ISO 3166-2 |publisher=International Organization for Standardization |archive-date=19 September 2016 |archive-url=https://web.archive.org/web/20160919073956/http://www.iso.org/iso/iso_3166-2_newsletter_ii-3_2011-12-13.pdf |url-status=live}}</ref> The UK Prime Minister's website has used the phrase "countries within a country" to describe it.<ref name="page823">{{Cite web |date=10 January 2003 |title=Countries within a country |url=http://www.number10.gov.uk/Page823 |archive-url=http://webarchive.nationalarchives.gov.uk/20080909013512/http://www.number10.gov.uk/Page823 |archive-date=9 September 2008 |access-date=8 March 2015 |publisher=Prime Minister's Office}}</ref> Some statistical summaries, such as those for the twelve [[NUTS of the United Kingdom|NUTS 1 regions]], refer to Scotland, Wales and Northern Ireland as "regions".<ref>{{Cite web |title=Statistical bulletin: Regional Labour Market Statistics |url=http://www.ons.gov.uk/ons/dcp171778_346117.xml |archive-url=https://web.archive.org/web/20141224045523/http://www.ons.gov.uk/ons/dcp171778_346117.xml |archive-date=24 December 2014 |access-date=5 March 2014 |postscript=;}} {{Cite web |title=13.4% Fall In Earnings Value During Recession |url=http://www.gmb.org.uk/newsroom/fall-in-earnings-value-during-recession |archive-url=https://web.archive.org/web/20140103194604/http://www.gmb.org.uk/newsroom/fall-in-earnings-value-during-recession |archive-date=3 January 2014 |access-date=5 March 2014}}</ref> Northern Ireland is also referred to as a "province".<ref>{{Cite book |last1=Dunn, Seamus |title=An Alphabetical Listing of Word, Name and Place in Northern Ireland and the Living Language of Conflict |last2=Dawson, Helen |publisher=[[Edwin Mellen Press]] |year=2000 |isbn=978-0-7734-7711-7 |location=[[Lewiston, New York]] |postscript=;}} {{Cite book |last=Murphy, Dervla |title=[[A Place Apart (Murphy book)|A Place Apart]] |publisher=Penguin |year=1979 |isbn=978-0-14-005030-1 |location=London}}</ref> With regard to Northern Ireland, the descriptive name used "can be controversial, with the choice often revealing one's political preferences".<ref>{{Cite book |last1=Whyte |first1=John |title=Interpreting Northern Ireland |last2=FitzGerald |first2=Garret |publisher=Clarendon Press |year=1991 |isbn=978-0-19-827380-6 |location=Oxford |author-link=John Henry Whyte |author-link2=Garret FitzGerald}}</ref> The term "Great Britain" conventionally refers to the island of Great Britain, or politically to England, Scotland and Wales in combination.<ref>{{Cite news |date=19 December 2008 |title=Guardian Unlimited Style Guide |publisher=Guardian News and Media Limited |location=London |url=https://www.theguardian.com/styleguide/page/0,,184840,00.html |access-date=23 August 2011 |postscript=;}} {{Cite news |date=19 August 2002 |title=BBC style guide (Great Britain) |work=BBC News |url=http://news.bbc.co.uk/1/hi/programmes/radio_newsroom/1099593.stm#g |access-date=23 August 2011 |archive-date=15 February 2009 |archive-url=https://web.archive.org/web/20090215074832/http://news.bbc.co.uk/1/hi/programmes/radio_newsroom/1099593.stm#g |url-status=live |postscript=;}} {{Cite web |title=Key facts about the United Kingdom |url=http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012517 |archive-url=http://webarchive.nationalarchives.gov.uk/20121015000000/http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012517 |archive-date=15 October 2012 |access-date=8 March 2015 |website=Government, citizens and rights |publisher=HM Government}}</ref> It is sometimes used as a loose synonym for the United Kingdom as a whole.<ref>[[New Oxford American Dictionary]]: "Great Britain: England, Wales, and Scotland considered as a unit. The name is also often used loosely to refer to the United Kingdom."</ref> The word ''England'' is occasionally used incorrectly to refer to the United Kingdom as a whole, a mistake principally made by people from outside the UK.<ref>"When people say England, they sometimes mean Great Britain, sometimes the United Kingdom, sometimes the British Isles — but never England." — {{Citation |last=George Mikes |title=How To Be An Alien |year=1946 |publisher=Penguin}} {{ISBN|978-0-582-41686-4|postscript=;}} {{Cite web |title=England OR United Kingdom (UK)? {{!}} Vocabulary {{!}} EnglishClub |url=https://www.englishclub.com/vocabulary/cw-uk-england.htm |access-date=16 October 2022 |website=englishclub.com |archive-date=16 October 2022 |archive-url=https://web.archive.org/web/20221016192638/https://www.englishclub.com/vocabulary/cw-uk-england.htm |url-status=live}}</ref> The term "Britain" is used as a synonym for [[Great Britain]],<ref>{{Cite web |title=Britain Meaning in the Cambridge English Dictionary |url=https://dictionary.cambridge.org/dictionary/english/britain |website=dictionary.cambridge.org |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024348/https://dictionary.cambridge.org/dictionary/english/britain |url-status=live |postscript=;}} {{Cite web |title=Definition of Britain in English by Oxford Dictionaries |url=https://en.oxforddictionaries.com/definition/britain |archive-url=https://web.archive.org/web/20160926204707/https://en.oxforddictionaries.com/definition/britain |archive-date=26 September 2016 |website=Oxford Dictionaries – English}}</ref><ref name="Britain-Col">{{Cite web |title=Britain definition and meaning |url=https://www.collinsdictionary.com/dictionary/english/britain |website=collinsdictionary.com |publisher=Collins English Dictionary |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024837/https://www.collinsdictionary.com/dictionary/english/britain |url-status=live}}</ref> but also sometimes for the United Kingdom.<ref>{{Cite web |title=Britain – Definition for English-Language Learners |url=http://learnersdictionary.com/definition/Britain |website=learnersdictionary.com |publisher=Merriam-Webster's Learner's Dictionary |access-date=19 June 2018 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620024648/http://learnersdictionary.com/definition/Britain |url-status=live}}</ref><ref name="Britain-Col" /> Usage is mixed: the [[style guide]] of the [[Government of the United Kingdom|UK Government]] prefers the term "UK" rather than "Britain" or "British" (except when referring to embassies{{Efn|"UK" embassies became "British" embassies in 1961.<ref>{{Cite news |date=21 October 1961 |title='Cold U.K.' Becomes British |work=[[The Times]] |page=8}}</ref>}}),<ref>{{Cite web |date=21 November 2024 |orig-date=23 February 2016 |title=Style guide: A to Z |url=https://www.gov.uk/guidance/style-guide/a-to-z |url-status=live |archive-url=https://web.archive.org/web/20241122222025/https://www.gov.uk/guidance/style-guide/a-to-z |archive-date=22 November 2024 |publisher=UK Government}}</ref> while other government documents acknowledge that both terms refer to the United Kingdom and that elsewhere "British government" is used at least as frequently as "United Kingdom government".<ref name="PCGN-uk-guide">{{Cite web |last=Permanent Committee on Geographical Names |title=Toponymic guidelines for the United Kingdom |url=https://www.gov.uk/government/publications/toponymic-guidelines |website=gov.uk |date=17 May 2023 |publisher=UK Government |access-date=17 June 2018 |archive-date=17 June 2018 |archive-url=https://web.archive.org/web/20180617165832/https://www.gov.uk/government/publications/toponymic-guidelines |url-status=live}}</ref> The UK [[Permanent Committee on Geographical Names for British Official Use|Permanent Committee on Geographical Names]] recognises "United Kingdom", "UK" and "U.K." as shortened and abbreviated geopolitical terms for the United Kingdom of Great Britain and Northern Ireland in its toponymic guidelines; it does not list "Britain" but notes that "it is only the one specific nominal term 'Great Britain' which invariably excludes Northern Ireland".<ref name="PCGN-uk-guide" /> The [[BBC]] historically preferred to use "Britain" as shorthand only for Great Britain, though the present style guide does not take a position except that "Great Britain" excludes Northern Ireland.<ref>{{Cite web |title=BBC News style guide – Names |url=https://www.bbc.co.uk/academy/en/articles/art20130702112133537 |archive-url=https://web.archive.org/web/20191110082858/https://www.bbc.co.uk/academy/en/articles/art20130702112133537 |archive-date=10 November 2019 |access-date=9 November 2019 |website=BBC Academy |publisher=BBC |postscript=;}} {{Cite web |title=Alphabetical checklist |url=https://www.bbc.co.uk/academy/journalism/news-style-guide/article/art20130702112133551 |archive-url=https://web.archive.org/web/20180326162901/http://www.bbc.co.uk/academy/journalism/news-style-guide/article/art20130702112133551 |archive-date=26 March 2018 |access-date=17 June 2018 |website=BBC News |publisher=BBC}}</ref> The adjective "British" is commonly used to refer to matters relating to the United Kingdom and is used in law to refer to United Kingdom citizenship and [[British nationality law|nationality]].<ref>{{Cite book |last1=Bradley, Anthony Wilfred |url=https://books.google.com/books?id=HT_GS2zgN5QC&pg=PA36 |title=Constitutional and administrative law |last2=Ewing, Keith D. |publisher=Pearson Longman |year=2007 |isbn=978-1-4058-1207-8 |edition=14th |volume=1 |location=Harlow |page=36 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140723/https://books.google.com/books?id=HT_GS2zgN5QC&pg=PA36 |url-status=live}}</ref>{{Efn|Historically, the term ''British'' was used to refer to members and institutions within the British Empire and later Commonwealth and was not limited to the geographical British Isles. The UK Government adopted the term for its exclusive use only in 1961, but in recognition of its wider usage first sought the prior consent of Australia, Canada and New Zealand.<ref>{{Cite book |last1=Curran |first1=James |title=The Unknown Nation: Australia after Empire |last2=Ward |first2=Stuart |date=2010 |publisher=Melbourne University Publishing |isbn=978-0-522-85645-3 |location=Carlton, Vic |pages=26–7}}</ref><ref>{{Cite book |last=Ward |first=Stuart |title=Untied kingdom: A Global History of the End of Britain |date=2023 |publisher=Cambridge University Press |isbn=978-1-107-14599-3 |at=Chapter 1}}</ref>}} People of the United Kingdom use several different terms to describe their national identity and may identify themselves as being [[British people|British]], [[English people|English]], [[Scottish people|Scottish]], [[Welsh people|Welsh]], [[People of Northern Ireland|Northern Irish]] or [[Irish people|Irish]];<ref>{{Cite web |year=2010 |title=Which of these best describes the way you think of yourself? |url=http://www.ark.ac.uk/nilt/2010/Community_Relations/NINATID.html |access-date=1 July 2010 |website=Northern Ireland Life and Times Survey 2010 |publisher=ARK&nbsp;– Access Research Knowledge |archive-date=23 September 2015 |archive-url=https://web.archive.org/web/20150923175111/http://www.ark.ac.uk/nilt/2010/Community_Relations/NINATID.html |url-status=live}}</ref> or as having a combination of different national identities.<ref>{{Cite web |title=Ethnicity and National Identity in England and Wales |url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/ethnicity/articles/ethnicityandnationalidentityinenglandandwales/2012-12-11 |access-date=25 June 2020 |website=Office for National Statistics |archive-date=21 January 2022 |archive-url=https://web.archive.org/web/20220121012603/https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/ethnicity/articles/ethnicityandnationalidentityinenglandandwales/2012-12-11 |url-status=live |postscript=;}} {{Cite book |last=Schrijver, Frans |url=https://books.google.com/books?id=u8gZklxHTMUC&pg=PA275 |title=Regionalism after regionalisation: Spain, France and the United Kingdom |publisher=Amsterdam University Press |year=2006 |isbn=978-90-5629-428-1 |pages=275–277 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140905/https://books.google.com/books?id=u8gZklxHTMUC&pg=PA275#v=onepage&q&f=false |url-status=live}}</ref> == History == {{Main|Formation of the United Kingdom of Great Britain and Northern Ireland|History of the British Isles}} {{Further|History of the constitution of the United Kingdom|Timeline of British history}} === Prior to the Treaty of Union === {{Main|History of England|History of Wales|History of Scotland|History of Ireland}} {{further|Kingdom of England|Kingdom of Scotland}} [[File:Stonehenge2007 07 30.jpg|thumb|[[Stonehenge]] in [[Wiltshire]] is a ring of stones, each about {{Cvt|13|ft|0|order=flip}} high, {{Cvt|7|ft|0|order=flip}} wide and 25 [[tonne]]s, erected 2400–2200&nbsp;BC.]] Settlement by [[Cro-Magnons]] of what was to become the United Kingdom occurred in waves beginning by about 30,000 years ago.<ref>[http://news.bbc.co.uk/1/hi/wales/south_west/7069001.stm "Ancient skeleton was 'even older'] {{Webarchive|url=https://web.archive.org/web/20210213081240/http://news.bbc.co.uk/2/hi/uk_news/wales/south_west/7069001.stm |date=13 February 2021}}". [[BBC News]]. 30 October 2007. Retrieved 27 April 2011.</ref> The island has been continuously inhabited since the last retreat of ice around 11,500 years ago.<ref>{{Cite web |date=9 February 2018 |title=A 12,000-year story - revealing the history of settlers in Britain from the end of the Ice Age to the present day {{!}} University of Oxford |url=https://www.ox.ac.uk/news/2018-02-09-12000-year-story-revealing-history-settlers-britain-end-ice-age-present-day |access-date=6 July 2025 |website=ox.ac.uk |language=en }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> By the end of the [[Prehistoric Britain|region's prehistoric period]], the population is thought to have belonged largely to a culture termed [[Insular Celts|Insular Celtic]], comprising [[Britons (historical)|Brittonic Britain]] and [[Gaelic Ireland]].<ref>{{Cite book |last=Koch, John T. |url=https://archive.org/details/celticculturehis00koch_128 |title=Celtic culture: A historical encyclopedia |publisher=ABC-CLIO |year=2006 |isbn=978-1-85109-440-0 |location=Santa Barbara, CA |page=[https://archive.org/details/celticculturehis00koch_128/page/n1016 973] |url-access=limited}}</ref> The [[Roman conquest of Britain|Roman conquest]], beginning in AD 43, and the 400-year [[Roman Britain|rule of southern Britain]], was followed by an invasion by [[Germanic peoples|Germanic]] [[Anglo-Saxon]] settlers, reducing the Brittonic area mainly [[Wales#Post-Roman era|to what was to become Wales]], [[Cornwall]] and, until the latter stages of the Anglo-Saxon settlement, the [[Hen Ogledd]] (northern England and parts of southern Scotland).<ref>{{Cite book |title=[[Encyclopaedia of Wales|The Welsh Academy Encyclopaedia of Wales]] |publisher=University of Wales Press |year=2008 |isbn=978-0-7083-1953-6 |editor-last=Davies |editor-first=John |editor-link=John Davies (historian) |location=Cardiff |page=915 |editor-last2=Jenkins |editor-first2=Nigel |editor-link2=Nigel Jenkins |editor-last3=Baines |editor-first3=Menna |editor-last4=Lynch |editor-first4=Peredur I. |editor-link4=Peredur Lynch}}</ref> Most of the [[Anglo-Saxon England|region settled by the Anglo-Saxons]] became unified as the Kingdom of England in the 10th century.<ref>{{Cite magazine |title=Short Athelstan biography |url=https://www.bbc.co.uk/history/historic_figures/athelstan.shtml |magazine=BBC History |access-date=9 April 2013 |archive-date=13 February 2007 |archive-url=https://web.archive.org/web/20070213191353/http://www.bbc.co.uk/history/historic_figures/athelstan.shtml |url-status=live}}</ref> [[Dál Riata|Gaelic speakers in north-west Britain]] (with connections to the north-east of Ireland and traditionally supposed to have migrated from there in the 5th century)<ref>{{Cite book |last=Mackie, J.D. |url=https://archive.org/details/historyofscotlan00mack_0/page/18 |title=A History of Scotland |publisher=Penguin |year=1991 |isbn=978-0-14-013649-4 |location=London |pages=[https://archive.org/details/historyofscotlan00mack_0/page/18 18–19] |author-link=J.D. Mackie |postscript=;}} {{Cite book |last=Campbell |first=Ewan |title=Saints and Sea-kings: The First Kingdom of the Scots |publisher=Canongate |year=1999 |isbn=978-0-86241-874-8 |location=Edinburgh |pages=8–15}}</ref> united with the [[Picts]] to create the [[Kingdom of Scotland]] in the 9th century.<ref>{{Cite book |last=Haigh |first=Christopher |url=https://archive.org/details/cambridgehistori0000unse_a9n8/page/30 |title=The Cambridge Historical Encyclopedia of Great Britain and Ireland |publisher=Cambridge University Press |year=1990 |isbn=978-0-521-39552-6 |page=[https://archive.org/details/cambridgehistori0000unse_a9n8/page/30 30]}}</ref> [[File:Roman Baths in Bath Spa, England - July 2006.jpg|alt=Photograph of the Baths showing a rectangular area of greenish water surrounded by yellow stone buildings with pillars. In the background is the tower of the abbey.|thumb|The [[Roman Baths (Bath)|Roman Baths]] in [[Bath, Somerset]], are a well-preserved ''[[thermae]]'' from [[Roman Britain]].]] In 1066 the [[Normans]] invaded England from northern France. After [[Norman conquest of England|conquering England]] they seized [[Norman invasion of Wales|large parts of Wales]], [[Norman invasion of Ireland|conquered much of Ireland]] and were invited to settle in Scotland, bringing to each country [[feudalism]] on the Northern French model and [[Norman-French]] culture.<ref>{{Cite book |last=Ganshof, F.L. |url=https://archive.org/details/feudalism0000gans_j4b5 |title=Feudalism |publisher=University of Toronto |year=1996 |isbn=978-0-8020-7158-3 |page=165 |url-access=registration}}</ref> The [[Anglo-Normans|Anglo-Norman]] [[ruling class]] greatly influenced, but eventually assimilated with, the local cultures.<ref>{{Cite book |last=Chibnall, Marjorie |url=https://books.google.com/books?id=qJl5Jm-IndUC&pg=PA115 |title=The Debate on the Norman Conquest |publisher=Manchester University Press |year=1999 |isbn=978-0-7190-4913-2 |pages=115–122 |author-link=Marjorie Chibnall |access-date=20 March 2023 |archive-date=26 March 2023 |archive-url=https://web.archive.org/web/20230326164802/https://books.google.com/books?id=qJl5Jm-IndUC&pg=PA115 |url-status=live}}</ref> Subsequent [[House of Plantagenet|medieval English kings]] completed the [[conquest of Wales]] and tried unsuccessfully [[Wars of Scottish Independence|to annex Scotland]]. Asserting its independence in the 1320 [[Declaration of Arbroath]], Scotland maintained its independence thereafter, albeit in [[Anglo-Scottish Wars|near-constant conflict with England]].<ref>{{Cite web |date=3 June 2023 |title=The Declaration of Arbroath |url=https://www.nms.ac.uk/past-exhibitions/the-declaration-of-arbroath |access-date=6 July 2025 |website=NMS |language=en}}</ref> In 1215 [[Magna Carta]] was the first document to state that no government was above the law and that citizens have rights protecting them.<ref>{{Cite web |title=Magna Carta |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/ |access-date=27 May 2024 |publisher=parliament.uk}} {{Cite web |title=The contents of Magna Carta |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/magnacartaclauses/ |access-date=27 May 2024 |publisher=parliament.uk |archive-date=28 August 2022 |archive-url=https://web.archive.org/web/20220828101448/https://www.parliament.uk/about/living-heritage/evolutionofparliament/originsofparliament/birthofparliament/overview/magnacarta/magnacartaclauses/ |url-status=live}} {{Cite web |title=Magna Carta Key Facts |url=https://www.britannica.com/summary/Magna-Carta-Key-Facts |access-date=27 May 2024 |publisher=Britannica |archive-date=27 May 2024 |archive-url=https://web.archive.org/web/20240527191804/https://www.britannica.com/summary/Magna-Carta-Key-Facts |url-status=live}}</ref> The English monarchs, through inheritance of [[Angevin Empire|substantial territories in France]] and claims to the French crown, were also heavily involved in conflicts in France, most notably the [[Hundred Years' War]], while the [[List of Scottish monarchs|Kings of Scots]] were in [[Auld Alliance|an alliance with the French]] during this period.<ref>Keen, Maurice. [https://www.bbc.co.uk/history/british/middle_ages/hundred_years_war_01.shtml "The Hundred Years' War"] {{Webarchive|url=https://web.archive.org/web/20131214092949/http://www.bbc.co.uk/history/british/middle_ages/hundred_years_war_01.shtml |date=14 December 2013 }}. BBC History.</ref> [[Early modern Britain]] saw religious conflict resulting from the [[Reformation]] and the introduction of [[Protestant]] state churches in each country.<ref>[https://www.britannica.com/EBchecked/topic/479892/Protestantism/41558/The-Reformation-in-England-and-Scotland The Reformation in England and Scotland] {{Webarchive|url=https://web.archive.org/web/20150515015218/https://www.britannica.com/EBchecked/topic/479892/Protestantism/41558/The-Reformation-in-England-and-Scotland |date=15 May 2015 }} and [https://www.britannica.com/EBchecked/topic/293754/Ireland/22978/The-Reformation-period Ireland: The Reformation Period & Ireland under Elizabeth I] {{Webarchive|url=https://web.archive.org/web/20150521133445/http://www.britannica.com/EBchecked/topic/293754/Ireland/22978/The-Reformation-period |date=21 May 2015 }}, Encyclopædia Britannica Online.</ref> The [[English Reformation]] ushered in political, constitutional, social and cultural change in the 16th century and [[State religion|established]] the [[Church of England]]. It defined a national identity for England and slowly, but profoundly, changed people's religious beliefs.<ref>{{Cite web |title=English Reformation c1527-1590 |url=https://www.nationalarchives.gov.uk/education/resources/the-english-reformation-c1527-1590/ |access-date=20 January 2023 |website=The National Archives |archive-date=2 December 2022 |archive-url=https://web.archive.org/web/20221202002512/https://www.nationalarchives.gov.uk/education/resources/the-english-reformation-c1527-1590/ |url-status=live}}</ref> Wales was [[Laws in Wales Acts 1535 and 1542|fully incorporated into the Kingdom of England]],<ref>{{Cite magazine |date=5 November 2009 |title=British History in Depth&nbsp;– Wales under the Tudors |url=https://www.bbc.co.uk/history/british/tudors/wales_tudors_01.shtml |magazine=BBC History |access-date=21 September 2010 |archive-date=7 February 2012 |archive-url=https://web.archive.org/web/20120207145836/http://www.bbc.co.uk/history/british/tudors/wales_tudors_01.shtml |url-status=live}}</ref> and Ireland was constituted as a kingdom in personal union with the English crown.<ref>{{Cite book |last=Nicholls |first=Mark |url=https://archive.org/details/historyofmodernb0000nich |title=A history of the modern British Isles, 1529–1603: The two kingdoms |publisher=Blackwell |year=1999 |isbn=978-0-631-19334-0 |location=Oxford |pages=171–172 |url-access=registration}}</ref> During the [[Plantation of Ulster]] in the 17th century, the lands of the Catholic Gaelic nobility were confiscated by the Crown and granted to Protestant settlers from England and Scotland.<ref>{{Cite book |last=Canny |first=Nicholas P. |url=https://archive.org/details/makingirelandbri00cann |title=Making Ireland British, 1580–1650 |publisher=Oxford University Press |year=2003 |isbn=978-0-19-925905-2 |pages=189–200 |url-access=registration}}</ref> [[File:Bayeux Tapestry WillelmDux.jpg|thumb|The [[Bayeux Tapestry]] depicts the [[Battle of Hastings]], 1066, and the events leading to it.]] The [[Union of the Crowns]] occurred in 1603 when [[James VI of Scotland]] inherited the thrones of England and Ireland, subsequently moving his court from Edinburgh to London. Although unified under a single monarch, the three realms remained entirely separate political entities, preserving their respective parliaments, judicial systems, and established churches.<ref>Ross, D. (2002). ''[[iarchive:chronologyofscot0000ross|Chronology of Scottish History]]''. Glasgow: Geddes & Grosset. p. 56. {{ISBN|978-1-85534-380-1}}; Hearn, J. (2002). ''Claiming Scotland: National Identity and Liberal Culture''. Edinburgh University Press. p. 104. {{ISBN|978-1-902930-16-9}}.</ref> In the mid-17th century, all three kingdoms [[Wars of the Three Kingdoms|were involved in a series of connected wars]] (including the [[English Civil War]]) which led to the temporary overthrow of the monarchy, with [[Execution of Charles I|the execution]] of [[Charles I of England|King Charles I]], and the establishment of the short-lived [[unitary republic]] of the [[Commonwealth of England]], Scotland and Ireland.<ref>{{Cite encyclopedia |title=English Civil Wars |encyclopedia=Encyclopædia Britannica |url=https://www.britannica.com/EBchecked/topic/187936/English-Civil-Wars |access-date=28 April 2013 |archive-date=2 May 2015 |archive-url=https://web.archive.org/web/20150502204708/https://www.britannica.com/EBchecked/topic/187936/English-Civil-Wars |url-status=live}}; {{Cite web |date=14 March 2010 |title=Scotland and the Commonwealth: 1651–1660 |url=http://www.archontology.org/nations/uk/scotland/01_laws.php |access-date=9 March 2015 |publisher=Archontology.org |archive-date=16 July 2012 |archive-url=https://web.archive.org/web/20120716194016/http://www.archontology.org/nations/uk/scotland/01_laws.php |url-status=live}}</ref> Although the [[Restoration (1660)|monarchy was restored]], the [[Interregnum (1649–1660)|Interregnum]] along with the [[Glorious Revolution]] of 1688 and the subsequent [[Bill of Rights 1689]] in England and [[Claim of Right Act 1689]] in Scotland ensured that, unlike much of the rest of Europe, [[royal absolutism]] would not prevail, and a professed Catholic could never accede to the throne. The [[British constitution]] would develop on the basis of [[constitutional monarchy]] and the [[parliamentary system]].<ref>{{Cite book |last=Lodge |first=Richard |url=https://books.google.com/books?id=EBSpvBxGyqcC |title=The History of England&nbsp;– From the Restoration to the Death of William III (1660–1702) |publisher=Read Books |year=2007 |isbn=978-1-4067-0897-4 |page=8 |orig-date=1910 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328140723/https://books.google.com/books?id=EBSpvBxGyqcC |url-status=live}}</ref> With the founding of the [[Royal Society]] in 1660, science was greatly encouraged. During this period, particularly in England, the development of [[English navy|naval power]] and the interest in [[Age of Discovery|voyages of discovery]] led to the acquisition and settlement of overseas colonies, particularly in North America and the Caribbean.<ref>{{Cite web |title=Tudor Period and the Birth of a Regular Navy |url=http://www.royal-navy.org/lib/index.php?title=Tudor_Period_and_the_Birth_of_a_Regular_Navy_Part_Two |archive-url=https://web.archive.org/web/20111103013901/http://www.royal-navy.org/lib/index.php?title=Tudor_Period_and_the_Birth_of_a_Regular_Navy_Part_Two |archive-date=3 November 2011 |access-date=8 March 2015 |website=Royal Navy History |url-status=usurped |publisher=Institute of Naval History}}; {{Cite book |last=Canny |first=Nicholas |url=https://books.google.com/books?id=eQHSivGzEEMC |title=The Origins of Empire, The Oxford History of the British Empire Volume I |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924676-2 |ref=refOHBEv1 |access-date=29 September 2020 |archive-date=11 January 2023 |archive-url=https://web.archive.org/web/20230111135256/https://books.google.com/books?id=eQHSivGzEEMC |url-status=live}}</ref> Though previous attempts at uniting the two kingdoms within Great Britain in 1606, 1667 and 1689 had proved unsuccessful, the attempt initiated in 1705 led to the [[Treaty of Union]] of 1706 being agreed and ratified by both parliaments. {{Clear left}} === Union of England and Scotland === {{Main|Treaty of Union|Kingdom of Great Britain}} [[File:Articles of Union between England and Scotland 28 Jan 1707.png|thumb|right|170px|The [[Treaty of Union]] which unified the [[Kingdom of England]] and [[Kingdom of Scotland]] on 1 May 1707]] On 1 May 1707 the Kingdom of Great Britain was formed, the result of the [[Acts of Union 1707]] between the [[Kingdom of England]] and [[Kingdom of Scotland]].<ref>{{Cite web |title=Articles of Union with Scotland 1707 |url=http://www.nationalarchives.gov.uk/pathways/citizenship/rise_parliament/docs/articles_union.htm |access-date=19 October 2008 |publisher=UK Parliament |archive-date=8 June 2012 |archive-url=https://web.archive.org/web/20120608152446/http://www.nationalarchives.gov.uk/pathways/citizenship/rise_parliament/docs/articles_union.htm |url-status=live}}; {{Cite web |title=Acts of Union 1707 |url=http://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny |access-date=6 January 2011 |publisher=UK Parliament |archive-date=27 December 2010 |archive-url=https://web.archive.org/web/20101227033859/http://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny/ |url-status=live}}; {{Cite web |title=Treaty (act) of Union 1706 |url=http://www.scotshistoryonline.co.uk/union.html |archive-url=https://web.archive.org/web/20190527074630/http://www.scotshistoryonline.co.uk/union.html |archive-date=27 May 2019 |access-date=3 February 2011 |publisher=Scottish History online}}</ref> In the 18th century cabinet government developed under [[Robert Walpole]], who is considered the ''[[de facto]]'' first [[Prime Minister of the United Kingdom|prime minister]] from 1721 to 1742. A series of [[Jacobite uprisings]] sought to remove the Protestant [[House of Hanover]] from the throne and restore the Catholic [[House of Stuart]]. In 1746, the Jacobites were defeated at the [[Battle of Culloden]], after which the [[Scottish Highlanders]] were forcibly assimilated into Scotland by revoking the feudal independence of [[Scottish clan chief|clan chiefs]]. The British colonies in North America that broke away in the [[American Revolutionary War|American War of Independence]] became the [[United States]]. British imperial ambition turned towards Asia, particularly to [[British Raj|India]].<ref>Library of Congress, [https://books.google.com/books?id=BQDgr_XvsHoC&pg=PA73 ''The Impact of the American Revolution Abroad''] {{Webarchive|url=https://web.archive.org/web/20240328140724/https://books.google.com/books?id=BQDgr_XvsHoC&pg=PA73 |date=28 March 2024 }}, p. 73.</ref> British merchants played a leading part in the [[Atlantic slave trade]], mainly between 1662 and 1807 when British or British-colonial [[slave ships]] transported nearly 3.3&nbsp;million slaves from Africa.<ref>{{Cite book |last=Morgan |first=Kenneth |url=https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA12 |title=Slavery and the British Empire: From Africa to America |publisher=Oxford University Press, USA |year=2007 |isbn=978-0-19-156627-1 |page=12 |access-date=5 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141229/https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA12#v=onepage&q&f=false |url-status=live}}</ref> The slaves were taken to [[Plantation economy|work on plantations]], principally [[History of the British West Indies|in the Caribbean]] but also [[British America|in North America]].<ref>{{Cite book |last=Morgan |first=Kenneth |url=https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA15 |title=Slavery and the British Empire: From Africa to America |publisher=Oxford University Press, US |year=2007 |isbn=978-0-19-156627-1 |page=15 |access-date=5 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141229/https://books.google.com/books?id=SGcwgJz5rQMC&pg=PA15#v=onepage&q&f=false |url-status=live}}</ref> However, with pressure from the [[Abolitionism in the United Kingdom|abolitionist movement]], Parliament banned the trade in 1807, banned slavery in the British Empire in 1833, and Britain took a leading role in the movement to abolish slavery worldwide through the [[blockade of Africa]] and pressing other nations to end their trade with a series of treaties.<ref>[https://www.bbc.co.uk/devon/content/articles/2007/03/20/abolition_navy_feature.shtml Sailing against slavery] {{Webarchive|url=https://web.archive.org/web/20081103004954/https://www.bbc.co.uk/devon/content/articles/2007/03/20/abolition_navy_feature.shtml |date=3 November 2008 }}. BBC Devon. 2007.; {{Cite book |last=Lovejoy |first=Paul E. |url=https://archive.org/details/transformationsi0000love/page/290 |title=Transformations in Slavery: A History of Slavery in Africa |publisher=Cambridge University Press |year=2000 |isbn=978-0-521-78012-4 |edition=2nd |location=New York |page=[https://archive.org/details/transformationsi0000love/page/290 290]}}</ref> === United Kingdom of Great Britain and Ireland === {{Main|History of the United Kingdom|Acts of Union 1800|United Kingdom of Great Britain and Ireland}} [[File:Victoria in her Coronation robes.jpg|upright|thumb|[[Queen Victoria|Victoria]] reigned as [[Monarchy of the United Kingdom|Queen of the United Kingdom]] and [[Empress of India]] during the 19th century.]] In 1800, the parliaments of Great Britain and Ireland each passed an Act of Union, uniting the two kingdoms and creating the United Kingdom of Great Britain and Ireland on 1 January 1801.<ref>{{Cite web |title=The Act of Union |url=http://www.actofunion.ac.uk/actofunion.htm#act |archive-url=https://web.archive.org/web/20120415061235/http://www.actofunion.ac.uk/actofunion.htm#act |archive-date=15 April 2012 |access-date=15 May 2006 |publisher=Act of Union Virtual Library}}</ref> After the defeat of France at the end of the [[French Revolutionary Wars]] and [[Napoleonic Wars]] (1792–1815), the United Kingdom emerged as the principal naval and imperial power (with London the [[List of largest cities throughout history|largest city in the world from about 1830]]).<ref>Tellier, L.-N. (2009). ''Urban World History: an Economic and Geographical Perspective''. Quebec: PUQ. p. 463. {{ISBN|978-2-7605-1588-8}}.</ref> [[History of the Royal Navy (after 1707)#Pax Britannica, 1815–1914|Unchallenged at sea]], British dominance was later described as the ''[[Pax Britannica]]'' ("British Peace"), a period of [[International relations of the Great Powers (1814–1919)|relative peace amongst the great powers]] (1815–1914) during which the British Empire became the global [[hegemon]]<ref>{{Cite book |last=Mathias |first=P. |title=The First Industrial Nation: the Economic History of Britain, 1700–1914 |publisher=Routledge |year=2001 |isbn=978-0-415-26672-7 |location=London}}; {{Cite book |last=Ferguson |first=Niall |url=https://archive.org/details/empire00nial |title=Empire: The rise and demise of the British world order and the lessons for global power |publisher=Basic Books |year=2004 |isbn=978-0-465-02328-8 |location=New York |url-access=registration}}</ref><ref>{{Cite encyclopedia |title=20th-century international relations |encyclopedia=[[Encyclopædia Britannica]] |url=https://www.britannica.com/topic/20th-century-international-relations-2085155 |access-date=6 May 2023 |last=McDougall |first=Walter A. |date=4 May 2023 |author-link=Walter A. McDougall |archive-url=https://web.archive.org/web/20190712124130/https://www.britannica.com/topic/20th-century-international-relations-2085155 |archive-date=12 July 2019 |url-status=live}}</ref> and adopted the role of [[global policeman]].<ref>Sondhaus, L. (2004). ''Navies in Modern World History''. London: Reaktion Books. p. 9. {{ISBN|978-1-86189-202-7}}.</ref><ref>{{Cite book |last=Porter |first=Andrew |url=https://books.google.com/books?id=oo3F2X8IDeEC |title=The Nineteenth Century, The Oxford History of the British Empire Volume III |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924678-6 |page=332 |ref=refOHBEv3}}</ref> From 1853 to 1856 Britain took part in the [[Crimean War]], allied with the [[Ottoman Empire]] against [[Russian Empire|Tsarist Russia]].<ref>{{Cite journal |last=Benn |first=David Wedgwood |title=The Crimean War and its lessons for today |journal=[[International Affairs (journal)|International Affairs]] |volume=88 |issue=2 |date=March 2012 |pages=387–391 |jstor=41428613 |publisher=Oxford University Press |doi=10.1111/j.1468-2346.2012.01078.x}}</ref> Following the [[Indian Rebellion of 1857]] the British government led by [[Henry John Temple, 3rd Viscount Palmerston|Lord Palmerston]] assumed [[direct rule]] over [[British Raj|India]]. Alongside the formal control it exerted over its own colonies, British dominance of much of world trade meant that it [[Informal empire|effectively controlled]] the economies of regions such as [[East Asia]] and [[Latin America]].<ref>{{Cite book |last=Porter |first=Andrew |url=https://books.google.com/books?id=oo3F2X8IDeEC |title=The Nineteenth Century, The Oxford History of the British Empire Volume III |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924678-6 |page=8 |ref=refOHBEv3}}; {{Cite book |last=Marshall |first=P.J. |url=https://books.google.com/books?id=S2EXN8JTwAEC |title=The Cambridge Illustrated History of the British Empire |publisher=Cambridge University Press |year=1996 |isbn=978-0-521-00254-7 |pages=156–157 |ref=refMarshall |access-date=29 September 2020 |archive-date=16 January 2023 |archive-url=https://web.archive.org/web/20230116094154/https://books.google.com/books?id=S2EXN8JTwAEC |url-status=live}}</ref> Throughout the [[Victorian era]] (1837–1901) political attitudes favoured [[free trade]] and ''[[laissez-faire]]'' policies. Beginning with the [[Great Reform Act]] in 1832, Parliament gradually [[Reform Acts|widened the voting franchise]], with the [[Representation of the People Act 1884|1884 Reform Act]] championed by [[William Ewart Gladstone|William Gladstone]] granting [[suffrage]] to a majority of males for the first time. The British population increased at a dramatic rate, accompanied by rapid [[urbanisation]], causing significant social and economic stresses.<ref>{{Cite book |last=Tompson |first=Richard S. |url=https://books.google.com/books?id=H5kcJqmXk2oC&pg=PA63 |title=Great Britain: a reference guide from the Renaissance to the present |publisher=Facts on File |year=2003 |isbn=978-0-8160-4474-0 |location=New York |page=63}}</ref> By the late 19th century, [[Conservative Party (UK)|Conservative governments]] under [[Benjamin Disraeli]] and [[Robert Gascoyne-Cecil, 3rd Marquess of Salisbury|Lord Salisbury]] accelerated [[Scramble for Africa|imperial expansion in Africa]], sustained a foreign policy of "[[splendid isolation]]" from European alliances, and intensified strategic containment of the [[Russian Empire]] in [[Central Asia]], a competition known as the [[Great Game]].<ref>{{Cite journal |last=Fromkin |first=David |date=1980 |title=The Great Game in Asia |url=https://www.jstor.org/stable/20040512 |journal=Foreign Affairs |volume=58 |issue=4 |pages=936–951 |doi=10.2307/20040512 |jstor=20040512 |issn=0015-7120 |access-date=4 June 2023 |archive-date=12 April 2021 |archive-url=https://web.archive.org/web/20210412053528/https://www.jstor.org/stable/20040512 |url-status=live |url-access=subscription}}</ref> During this time, [[Canada]], [[Australia]] and [[New Zealand]] were granted self-governing [[dominion]] status.<ref>{{Cite book |last=Hosch, William L. |title=World War I: People, Politics, and Power |publisher=Britannica Educational Publishing |year=2009 |isbn=978-1-61530-048-8 |series=America at War |location=New York |page=21}}</ref> At the turn of the 20th century, Britain's industrial dominance became challenged by the [[German Empire]] and the [[United States]].<ref>{{Cite book |last=Zarembka |first=Paul |url=https://books.google.com/books?id=NSrwpggmHigC&pg=PP1 |title=Contradictions: Finance, Greed, and Labor Unequally Paid |date=2013 |publisher=Emerald Group Publishing |isbn=978-1-78190-670-5 |access-date=21 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141231/https://books.google.com/books?id=NSrwpggmHigC&pg=PP1#v=onepage&q&f=false |url-status=live}}</ref> The [[Edwardian era]] (1901–1910) saw [[Liberal welfare reforms|social reform]] and [[Irish Home Rule movement|home rule for Ireland]] become important domestic issues, while the [[Labour Party (UK)|Labour Party]] emerged from an alliance of [[Trade unions in the United Kingdom|trade unions]] and small socialist groups in 1900, and [[suffragettes]] campaigned for women's right to vote.<ref>Sophia A. Van Wingerden, ''The women's suffrage movement in Britain, 1866–1928'' (1999) ch 1.</ref> === World wars and partition of Ireland === {{Main|History of the United Kingdom during the First World War|Partition of Ireland|Interwar Britain|United Kingdom home front during the Second World War|Military history of the United Kingdom during World War II}} [[File:Wreaths Are Laid at the Cenotaph, London During Remembrance Sunday Service MOD 45152052.jpg|thumb|Wreaths being laid during the [[Remembrance Sunday]] service at the [[The Cenotaph|Cenotaph]] in [[Whitehall]], London]] [[File:Spitfire and Hurricane in the Battle of Britain Memorial Flight.jpg|thumb|A [[Supermarine Spitfire|Spitfire]] and a [[Hawker Hurricane|Hurricane]] as flown in the [[Battle of Britain]] during the [[Second World War]]]] Britain was one of the principal [[Allies of World War I|Allies]] that defeated the [[Central Powers]] in the [[First World War]] (1914–1918). Alongside their French, Russian and (after 1917) American counterparts,<ref>Turner, John (1988). ''Britain and the First World War''. London: Unwin Hyman. pp. 22–35. {{ISBN|978-0-04-445109-9}}.</ref> British armed forces were engaged across much of the British Empire and in several regions of Europe, particularly on the [[Western Front (World War I)|Western Front]].<ref name="Westwell&Cove" /> The high fatalities of [[trench warfare]] caused the loss of much of a generation of men, with lasting social effects in the nation and a great disruption in the social order. Britain had suffered 2.5&nbsp;million casualties and finished the war with a huge national debt.<ref name="Westwell&Cove">Westwell, I.; Cove, D. (eds) (2002). ''History of World War I, Volume 3''. London: Marshall Cavendish. pp. 698, 705. {{ISBN|978-0-7614-7231-5}}.</ref> The consequences of the war persuaded the government to expand the right to vote in national and local elections to all adult men and most adult women with the [[Representation of the People Act 1918]].<ref name="Westwell&Cove" /> After the war Britain became a permanent member of the Executive Council of the [[League of Nations]] and received [[League of Nations mandate|a mandate]] over a number of former German and [[Ottoman Empire|Ottoman]] colonies. Under the leadership of [[David Lloyd George]], the British Empire reached its greatest extent, covering a fifth of the world's land surface and a quarter of its population.<ref>Turner, J. (1988). ''Britain and the First World War''. Abingdon: Routledge. p. 41. {{ISBN|978-0-04-445109-9}}.</ref> By the mid-1920s most of the British population could listen to [[BBC]] radio programmes.<ref>{{Cite web |date=15 June 2020 |title=100 years of radio since Marconi's big breakthrough |url=https://www.ofcom.org.uk/about-ofcom/latest/features-and-news/100-years-of-radio |access-date=17 November 2020 |website=Ofcom |archive-date=4 August 2020 |archive-url=https://web.archive.org/web/20200804031332/https://www.ofcom.org.uk/about-ofcom/latest/features-and-news/100-years-of-radio |url-status=live}}</ref><ref>{{Cite web |title=History of the BBC: The origins of BBC Local Radio |url=https://www.bbc.com/historyofthebbc/research/local-radio |access-date=18 September 2022 |website=[[BBC]] |last=Linfoot |first=Matthew |archive-date=20 September 2022 |archive-url=https://web.archive.org/web/20220920232207/https://www.bbc.com/historyofthebbc/research/local-radio/ |url-status=live}}</ref> Experimental [[Television in the United Kingdom|television]] broadcasts [[History of television#United Kingdom|began in 1929]] and the [[First day of BBC television|first scheduled BBC Television Service]] commenced in 1936.<ref>{{Cite web |title=History of the BBC: 1920s |url=https://www.bbc.com/historyofthebbc/timelines/1920s |access-date=18 September 2022 |website=[[BBC]] |archive-date=26 September 2022 |archive-url=https://web.archive.org/web/20220926064808/https://www.bbc.com/historyofthebbc/timelines/1920s |url-status=live}}</ref> The rise of [[Irish nationalism]], and disputes within Ireland over the terms of [[Irish Home Rule]], led eventually to the [[Partition of Ireland|partition of the island]] in 1921.<ref>[[SR&O 1921]]/533 of 3 May 1921.</ref> [[The Troubles in Ulster (1920–1922)|A period of conflict in what is now Northern Ireland]] occurred from June 1920 until June 1922. The [[Irish Free State]] became independent, initially with [[Dominion]] status in 1922, and [[Statute of Westminster 1931#Irish Free State|unambiguously independent in 1931]]. Northern Ireland remained part of the United Kingdom.<ref>{{Cite web |title=The Anglo-Irish Treaty, 6&nbsp;December 1921 |url=http://cain.ulst.ac.uk/issues/politics/docs/ait1921.htm |access-date=15 May 2006 |website=CAIN Web Service |archive-date=14 May 2012 |archive-url=https://web.archive.org/web/20120514145108/http://cain.ulst.ac.uk/issues/politics/docs/ait1921.htm |url-status=live}}</ref> The [[1928 Equal Franchise Act]] gave women electoral equality with men in national elections. Strikes in the mid-1920s culminated in the [[General Strike of 1926]]. Still suffering from the long-term economic effects of the First World War, Britain was severely impacted by the [[Great Depression in the United Kingdom|Great Depression]] (1929–1932), which intensified hardship in old industrial areas in traditional sectors, led to mass unemployment peaking near 3 million, and precipitated widespread political instability and social unrest. [[National Government (1931)|A coalition government]] was formed in 1931.<ref>Rubinstein, W.D. (2004). ''Capitalism, Culture, and Decline in Britain, 1750–1990''. Abingdon: Routledge. p. 11. {{ISBN|978-0-415-03719-8}}.</ref> Nonetheless, Britain was described as "a very wealthy country, formidable in arms, ruthless in pursuit of its interests and sitting at the heart of a global production system."<ref name="Edgerton2012">{{Cite book |last=Edgerton |first=David |date=2012 |title=Britain's War Machine |url=https://www.penguin.co.uk/books/55731/britain-s-war-machine/9780141026107.html |access-date=10 May 2020 |publisher=Penguin |postscript=none |archive-date=28 April 2020 |archive-url=https://web.archive.org/web/20200428080558/https://www.penguin.co.uk/books/55731/britain-s-war-machine/9780141026107.html |url-status=live}}; {{Cite web |title=Britain's War Machine: Weapons, Resources and Experts in the Second World War |url=https://reviews.history.ac.uk/review/1114 |access-date=10 May 2020 |website=Reviews in History |archive-date=12 June 2020 |archive-url=https://web.archive.org/web/20200612173058/https://reviews.history.ac.uk/review/1114 |url-status=live}}</ref> After [[Nazi Germany]]'s [[invasion of Poland]] in 1939, Britain entered the [[Second World War]]. Despite the defeat of its European allies in the first year, Britain and its empire continued the war against Germany.<ref name="Edgerton2012" /> In 1940 the [[Royal Air Force]] successfully defended British airspace by repelling the German ''[[Luftwaffe]]'' in the [[Battle of Britain]]. Urban areas suffered heavy bombing during [[the Blitz]]. The [[Grand Alliance (World War II)|Grand Alliance]] of Britain, the United States and the [[Soviet Union]] formed in 1941, leading the [[Allies of World War II|Allies]] against the [[Axis powers]]. There were eventual hard-fought victories in the [[Battle of the Atlantic]], the [[North Africa campaign]] and the [[Italian campaign (World War II)|Italian campaign]]. British forces played important roles in the [[Normandy landings]] of 1944 and the [[liberation of Europe]]. The British Army led the [[Burma campaign]] against Japan, and the [[British Pacific Fleet]] fought Japan at sea. [[British contribution to the Manhattan Project|British scientists contributed]] to the American [[Manhattan Project]], whose task was to build a [[nuclear weapon]].<ref>{{cite book |author=Septimus H. Paul |url=https://books.google.com/books?id=fSZpgW-N628C&pg=PA1 |title=Nuclear Rivals: Anglo-American Atomic Relations, 1941–1952 |publisher=Ohio State U.P. |year=2000 |isbn=978-0-8142-0852-6 |pages=1–5}}</ref> === Post-war 20th century === {{Main|Post-war Britain (1945–1979)|Social history of post-war Britain (1945–1979)}} [[File:British Empire 1921.png|thumb|right|upright=1.4|The [[British Empire]] at its territorial peak in 1921]] The United Kingdom was one of the [[Big Three (World War II)|Big Three]] powers (with the United States and the Soviet Union) who met to plan the [[Aftermath of World War II|post-war world]];<ref>{{Cite book |last1=Doenecke |first1=Justus D. |url=https://books.google.com/books?id=xdMF9rX6mX8C&pg=PA62 |title=Debating Franklin D. Roosevelt's foreign policies, 1933–1945 |last2=Stoler |first2=Mark A. |year=2005 |publisher=Rowman & Littlefield |isbn=978-0-8476-9416-7 |access-date=19 March 2016 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141231/https://books.google.com/books?id=xdMF9rX6mX8C&pg=PA62#v=onepage&q&f=false |url-status=live|author-link=Justus Drew Doenecke}}; {{Cite book |last=Kelly |first=Brian |url=https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=37681 |title=The Four Policemen and Postwar Planning, 1943–1945: The Collision of Realist and Idealist Perspectives |publisher=Indiana University of Pennsylvania |access-date=25 August 2015 |archive-date=22 October 2015 |archive-url=https://web.archive.org/web/20151022125442/https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=37681 |url-status=live}}</ref> it drafted the [[Declaration by United Nations]] with the United States and became one of the five permanent members of the [[United Nations Security Council]]. It worked closely with the United States to establish the [[International Monetary Fund]], the [[World Bank]] and [[NATO]].<ref>{{Cite web |date=22 July 2010 |title=The "Special Relationship" between Great Britain and the United States Began with FDR |work=Roosevelt Institute |url=http://rooseveltinstitute.org/special-relationship-between-great-britain-and-united-states-began-fdr |archive-url=https://web.archive.org/web/20180125021103/http://rooseveltinstitute.org/special-relationship-between-great-britain-and-united-states-began-fdr |archive-date=25 January 2018 |access-date=24 January 2018 |quote=and the joint efforts of both powers to create a new post-war strategic and economic order through the drafting of the Atlantic Charter; the establishment of the International Monetary Fund and the World Bank; and the creation of the United Nations.}}; {{Cite press release |title=Remarks by the President Obama and Prime Minister Cameron in Joint Press Conference |date=22 April 2016 |publisher=The White House |url=https://obamawhitehouse.archives.gov/the-press-office/2016/04/22/remarks-president-obama-and-prime-minister-cameron-joint-press |quote=That's what we built after World War II. The United States and the UK designed a set of institutions – whether it was the United Nations, or the Bretton Woods structure, IMF, World Bank, NATO, across the board. |access-date=24 January 2018 |archive-date=8 June 2021 |archive-url=https://web.archive.org/web/20210608110653/https://obamawhitehouse.archives.gov/the-press-office/2016/04/22/remarks-president-obama-and-prime-minister-cameron-joint-press |url-status=live}}</ref> The war left the UK severely weakened and financially dependent on the American [[Marshall Plan]],<ref>{{Cite news |date=28 December 2006 |title=Britain to make its final payment on World War II loan from U.S. |work=The New York Times |url=https://www.nytimes.com/2006/12/28/business/worldbusiness/28iht-nazi.4042453.html |access-date=25 August 2011 |archive-date=20 August 2017 |archive-url=https://web.archive.org/web/20170820022220/http://www.nytimes.com/2006/12/28/business/worldbusiness/28iht-nazi.4042453.html |url-status=live}}</ref> but it was spared the total war that devastated [[eastern Europe]].<ref>{{Cite news |last=Reynolds |first=David |date=17 April 2011 |title=Britain's War Machine by David Edgerton – review |work=The Guardian |location=London |url=https://www.theguardian.com/books/2011/apr/17/britains-war-machine-david-edgerton-review |access-date=10 May 2020 |archive-date=12 June 2020 |archive-url=https://web.archive.org/web/20200612130213/https://www.theguardian.com/books/2011/apr/17/britains-war-machine-david-edgerton-review |url-status=live}}</ref> In the immediate post-war years the [[Labour Government 1945–1951|Labour government]] under [[Clement Attlee]] initiated a radical programme of reforms, which significantly affected British society [[Post-war consensus|in the following decades]].<ref>{{Cite book |last=Francis |first=Martin |title=Ideas and policies under Labour, 1945–1951: Building a new Britain |publisher=Manchester University Press |year=1997 |isbn=978-0-7190-4833-3 |pages=225–233}}</ref> Major industries and public utilities were [[nationalised]], a [[welfare state]] was established, and a comprehensive, publicly funded healthcare system, the [[National Health Service]], was created.<ref>{{Cite book |last=Lee |first=Stephen J. |url=https://archive.org/details/aspectsbritishpo00lees |title=Aspects of British political history, 1914–1995 |publisher=Routledge |year=1996 |isbn=978-0-415-13103-2 |location=London; New York |pages=[https://archive.org/details/aspectsbritishpo00lees/page/n183 173]–199 |url-access=limited}}</ref> The rise of nationalism in the colonies coincided with Britain's much-diminished economic position after [[History of the United Kingdom during the First World War|its involvement in the First World War]] and [[Military history of the United Kingdom during World War II|in the Second World War]], so that a policy of [[decolonisation]] was unavoidable.<ref>{{cite book |last=Brown |first=Judith |author-link=Judith M. Brown |url=https://books.google.com/books?id=CpSvK3An3hwC |title=The Twentieth Century, The Oxford History of the British Empire Volume IV |publisher=Oxford University Press |year=1998 |isbn=978-0-19-924679-3 |ref=refOHBEv4 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20140103114315/http://books.google.com/books?id=CpSvK3An3hwC |archive-date=3 January 2014 |url-status=live}} p. 319.</ref><ref>{{cite book |last=Louis |first=Wm. Roger |url=https://books.google.com/books?id=NQnpQNKeKKAC |title=Ends of British Imperialism: The Scramble for Empire, Suez and Decolonization |publisher=I.B. Tauris |year=2006 |isbn=978-1-84511-347-6 |ref=refLouis2006 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20170222045215/https://books.google.com/books?id=NQnpQNKeKKAC |archive-date=22 February 2017 |url-status=live}} p. 337.</ref><ref>{{cite book |last=Abernethy |first=David |url=https://books.google.com/books?id=ennqNS1EOuMC |title=The Dynamics of Global Dominance, European Overseas Empires 1415–1980 |publisher=Yale University Press |year=2000 |isbn=978-0-300-09314-8 |ref=refAbernethy2000 |access-date=22 July 2009 |archive-url=https://web.archive.org/web/20111214082531/http://books.google.com/books?id=ennqNS1EOuMC |archive-date=14 December 2011 |url-status=live}} p. 146.</ref> Independence was granted to India and Pakistan in 1947.<ref>{{Cite book |last=Larres |first=Klaus |url=https://books.google.com/books?id=7D66_9YOof4C&pg=PA118 |title=A companion to Europe since 1945 |publisher=Wiley-Blackwell |year=2009 |isbn=978-1-4051-0612-2 |location=Chichester |page=118 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141350/https://books.google.com/books?id=7D66_9YOof4C&pg=PA118 |url-status=live}}</ref> Over the next three decades, most colonies of the British Empire gained their independence, and many became members of the [[Commonwealth of Nations]].<ref>{{Cite web |date=19 March 2009 |title=Country List |url=http://www.thecommonwealth.org/Templates/System/YearbookHomePage.asp?NodeID=152099&load=countrylist |archive-url=https://web.archive.org/web/20130506071236/http://www.thecommonwealth.org/Templates/System/YearbookHomePage.asp?NodeID=152099&load=countrylist |archive-date=6 May 2013 |access-date=8 March 2015 |publisher=[[Commonwealth Secretariat]]}}</ref> The UK was the third country to develop [[Nuclear weapons and the United Kingdom|a nuclear weapons arsenal]], with its first atomic bomb test, [[Operation Hurricane]], in 1952, although the post-war limitations of Britain's international role were illustrated by the [[Suez Crisis]] of 1956. As a result of a shortage of workers in the 1950s, the government [[Modern immigration to the United Kingdom|encouraged immigration]] from [[Commonwealth countries]]. In the following decades the UK became a more [[Multiracialism|multiracial]] and [[Multiculturalism|multicultural]] society.<ref>{{Cite book |last=Julios |first=Christina |url=https://books.google.com/books?id=s3RQ4dsFEkoC&pg=PA84 |title=Contemporary British identity: English language, migrants, and public discourse |publisher=Ashgate |year=2008 |isbn=978-0-7546-7158-9 |series=Studies in migration and diaspora |location=Aldershot |page=84 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141350/https://books.google.com/books?id=s3RQ4dsFEkoC&pg=PA84 |url-status=live}}</ref> Despite rising living standards in the late 1950s and 1960s, the United Kingdom's economic performance was less successful than many of its main competitors such as France, [[West Germany]] and Japan. In 1969, the United Kingdom was the first democratic nation to [[Representation of the People Act 1969|lower its voting age to 18]].<ref>{{Cite journal |last1=Loughran |first1=Thomas |last2=Mycock |first2=Andrew |last3=Tonge |first3=Jonathan |date=3 April 2021 |title=A coming of age: how and why the UK became the first democracy to allow votes for 18-year-olds |url=https://www.tandfonline.com/doi/full/10.1080/13619462.2021.1890589 |journal=Contemporary British History |volume=35 |issue=2 |pages=284–313 |doi=10.1080/13619462.2021.1890589 |issn=1361-9462 |s2cid=233956982 |access-date=24 May 2024 |archive-date=4 June 2023 |archive-url=https://web.archive.org/web/20230604093606/https://www.tandfonline.com/doi/full/10.1080/13619462.2021.1890589 |url-status=live |url-access=subscription}}</ref> In the decades-long process of [[European integration]] the UK was a founding member of the [[Western European Union]], established with the [[London and Paris Conferences]] in 1954. In 1960 the UK was one of the seven founding members of the [[European Free Trade Association]] (EFTA), but in 1973 it left to join the [[European Communities]] (EC). In a [[1975 United Kingdom European Communities membership referendum|1975 referendum]] 67 per cent voted to stay in it.<ref>{{Cite news |title=1975: UK embraces Europe in referendum |work=BBC News |url=http://news.bbc.co.uk/onthisday/hi/dates/stories/june/6/newsid_2499000/2499297.stm |access-date=8 March 2015 |archive-date=20 June 2018 |archive-url=https://web.archive.org/web/20180620044520/http://news.bbc.co.uk/onthisday/hi/dates/stories/june/6/newsid_2499000/2499297.stm |url-status=live}}</ref> When the EC became the [[European Union]] (EU) in 1993, the UK was one of the 12 founding member states. From the late 1960s, Northern Ireland experienced communal and [[paramilitary]] violence, sometimes affecting other parts of the UK, known as [[the Troubles]]. It is usually considered to have ended with the 1998 [[Belfast Agreement|Belfast "Good Friday" Agreement]].<ref>{{Cite book |last=Aughey |first=Arthur |url=https://archive.org/details/politicsnorthern00augh |title=The Politics of Northern Ireland: Beyond the Belfast Agreement |publisher=Routledge |year=2005 |isbn=978-0-415-32788-6 |location=London |page=[https://archive.org/details/politicsnorthern00augh/page/n15 7] |url-access=limited}}; "The troubles were over, but the killing continued. Some of the heirs to Ireland's violent traditions refused to give up their inheritance." {{Cite book |last=Holland |first=Jack |url=https://archive.org/details/hopeagainsthisto00holl/page/221 |title=Hope against History: The Course of Conflict in Northern Ireland |publisher=Henry Holt |year=1999 |isbn=978-0-8050-6087-4 |location=New York |page=[https://archive.org/details/hopeagainsthisto00holl/page/221 221]}}; Elliot, Marianne (2007). ''The Long Road to Peace in Northern Ireland: Peace Lectures from the Institute of Irish Studies at Liverpool University.'' University of Liverpool Institute of Irish Studies, Liverpool University Press. p. 2. {{ISBN|978-1-84631-065-2}}.</ref> Following a period of widespread economic slowdown and industrial strife in the 1970s, the [[Conservative Party (UK)|Conservative]] government of the 1980s led by [[Margaret Thatcher]] initiated a radical policy of [[monetarism]], [[deregulation]], particularly of the financial sector (for example, the [[Big Bang (financial markets)|Big Bang]] in 1986) and labour markets, the sale of state-owned companies (privatisation), and the withdrawal of subsidies to others.<ref>{{Cite book |last=Dorey |first=Peter |title=British politics since 1945 |publisher=Blackwell |year=1995 |isbn=978-0-631-19075-2 |series=Making contemporary Britain |location=Oxford |pages=164–223}}</ref> In 1982, [[Argentina]] invaded the British territories of [[South Georgia and the South Sandwich Islands|South Georgia]] and the [[Falkland Islands]], leading to the 10-week [[Falklands War]] in which Argentine forces were defeated. The inhabitants of the islands strongly favour British sovereignty, expressed in a [[2013 Falkland Islands sovereignty referendum|2013 referendum]]. From 1984 the British economy was helped by the inflow of substantial [[North Sea oil]] revenues.<ref>{{Cite book |last1=Griffiths, Alan |url=http://vig.pearsoned.co.uk/catalog/uploads/Griffiths_C01.pdf |title=Applied Economics |last2=Wall, Stuart |publisher=Financial Times Press |year=2007 |isbn=978-0-273-70822-3 |edition=11th |location=Harlow |page=6 |access-date=26 December 2010 |archive-date=23 August 2009 |archive-url=https://web.archive.org/web/20090823124048/http://vig.pearsoned.co.uk/catalog/uploads/Griffiths_C01.pdf |url-status=dead}}</ref> Another British Overseas Territory, [[Gibraltar]],<ref>{{cite wikisource |title=Peace and Friendship Treaty of Utrecht between Spain and Great Britain}}</ref> is [[Port of Gibraltar|a key military base]]; a [[2002 Gibraltar sovereignty referendum|referendum in 2002]] on shared sovereignty with Spain was rejected. Around the end of the 20th century, major changes were made to the governance of the UK with the establishment of [[devolution|devolved]] administrations for Scotland, Wales and Northern Ireland.<ref>{{Cite journal |last=Keating |first=Michael |date=1 January 1998 |title=Reforging the Union: Devolution and Constitutional Change in the United Kingdom |journal=Publius: The Journal of Federalism |volume=28 |issue=1 |pages=217–234 |doi=10.1093/oxfordjournals.pubjof.a029948}}</ref> [[Human Rights Act 1998|The statutory incorporation]] followed acceptance of the [[European Convention on Human Rights]]. The UK remained a [[List of modern great powers#United Kingdom|great power]] with global diplomatic and military influence and a leading role in the United Nations and NATO.<ref name="David M. McCourt">{{Cite book |last=McCourt |first=David |url=https://books.google.com/books?id=lwpOnwEACAAJ&q=Britain+and+World+Power+Since+1945:+Constructing+a+Nation%27s+Role+in+International+Politics |title=Britain and World Power Since 1945: Constructing a Nation's Role in International Politics |publisher=[[University of Michigan Press]] |year=2014 |isbn=978-0-472-07221-7 |access-date=21 October 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141741/https://books.google.com/books?id=lwpOnwEACAAJ&q=Britain+and+World+Power+Since+1945:+Constructing+a+Nation%27s+Role+in+International+Politics |url-status=live}}</ref> === 21st century === {{Main|Political history of the United Kingdom (1979–present)|Social history of the United Kingdom (1979–present)}} [[File:Johnson signed Brexit Withdrawal Agreement.jpg|thumb|Prime Minister [[Boris Johnson]] signs the [[Brexit withdrawal agreement]] in 2020, formally [[Brexit|withdrawing the UK]] from the [[European Union]] (EU).]] The United Kingdom broadly supported the United States' approach to the "[[war on terror]]" in the early 21st century.<ref>{{Cite news |last=McSmith |first=Andy |date=5 July 2016 |title=The inside story of how Tony Blair led Britain to war in Iraq |work=Independent |location=London |url=https://www.independent.co.uk/news/uk/politics/chilcot-report-iraq-war-inquiry-tony-blair-george-bush-us-uk-what-happened-a7119761.html |access-date=17 February 2022 |archive-date=4 July 2016 |archive-url=https://web.archive.org/web/20160704200931/https://www.independent.co.uk/news/uk/politics/chilcot-report-iraq-war-inquiry-tony-blair-george-bush-us-uk-what-happened-a7119761.html |url-status=live}}</ref> British troops fought in the [[War in Afghanistan (2001–2021)|war in Afghanistan]], but controversy surrounded Britain's [[Iraq War|military deployment in Iraq]], which saw the [[15 February 2003 anti-war protests|largest protest in British history]] in opposition to the government led by [[Tony Blair]].<ref>{{Cite news |last=Adams |first=Tim |date=11 February 2023 |title='A beautiful outpouring of rage': did Britain's biggest ever protest change the world? |work=The Observer |location=London |url=https://www.theguardian.com/uk-news/2023/feb/11/slugs-iraq-war-london-protest-2003-legacy |access-date=5 June 2023 |archive-date=6 April 2023 |archive-url=https://web.archive.org/web/20230406052000/https://www.theguardian.com/uk-news/2023/feb/11/slugs-iraq-war-london-protest-2003-legacy |url-status=live}}</ref> The [[Great Recession]] (2007–2010) severely affected the British economy,<ref name="Latest UK GDP data">{{cite web |date=20 December 2013 |title=Quarterly National Accounts – National accounts aggregates (ABMI Gross Domestic Product: chained volume measures: Seasonally adjusted £m, constant prices) |url=http://www.ons.gov.uk/ons/datasets-and-tables/data-selector.html?cdid=ABMI&dataset=qna&table-id=A2 |publisher=Office for National Statistics |access-date=28 July 2023 |archive-date=29 September 2015 |archive-url=https://web.archive.org/web/20150929150429/http://www.ons.gov.uk/ons/datasets-and-tables/data-selector.html?cdid=ABMI&dataset=qna&table-id=A2 |url-status=live}}</ref> and was followed by a period of weak growth and stagnation.<ref>{{Cite web |last=Harari |first=Daniel |date=16 July 2024 |title=Low growth: The economy's biggest challenge |url=https://commonslibrary.parliament.uk/low-growth-the-economys-biggest-challenge/#:~: |access-date=16 April 2025 |website=House of Commons Library}}</ref><ref>{{Cite news |last1=Rees |first1=Tom |last2=Atkinson |first2=Andrew |last3=Aldrick |first3=Philip |date=12 March 2023 |title=A Lost Decade Worse Than Japan's Threatens to Change UK Forever |url=https://www.bloomberg.com/news/articles/2023-03-12/a-lost-decade-worse-than-japan-s-threatens-to-change-uk-forever |access-date=16 April 2025 |work=[[Bloomberg News]] |archive-date=13 March 2023 |archive-url=https://web.archive.org/web/20230313051724/https://www.bloomberg.com/news/articles/2023-03-12/a-lost-decade-worse-than-japan-s-threatens-to-change-uk-forever |url-status=live }}</ref> The [[Cameron–Clegg coalition]] government of 2010 introduced [[United Kingdom government austerity programme|austerity measures]] intended to tackle the substantial public deficits.<ref>{{Cite news |date=7 November 2022 |title=What is austerity and where could 'eye-watering' cuts fall now? |work=BBC News |url=https://www.bbc.com/news/63304224 |access-date=28 July 2023 |archive-date=28 July 2023 |archive-url=https://web.archive.org/web/20230728105646/https://www.bbc.com/news/63304224 |url-status=live}}</ref> [[2014 Scottish independence referendum|A referendum]] on [[Scottish independence]] in 2014 resulted in the Scottish electorate voting by 55.3 to 44.7 per cent to remain part of the United Kingdom.<ref>{{Cite web |title=Scottish independence referendum – Results |url=https://www.bbc.co.uk/news/events/scotland-decides/results |access-date=18 February 2022 |website=BBC News |archive-date=18 September 2014 |archive-url=https://web.archive.org/web/20140918212409/https://www.bbc.co.uk/news/events/scotland-decides/results |url-status=live}}</ref> In 2016, 51.9 per cent of voters in the UK [[2016 United Kingdom European Union membership referendum|voted to leave the European Union]] (EU).<ref>{{Cite news |date=24 June 2016 |title=In stunning decision, Britain votes to leave the E.U. |newspaper=[[The Washington Post]] |url=https://www.washingtonpost.com/world/britons-head-to-the-polls-for-historic-vote-on-eu/2016/06/23/0d466fb0-34a7-11e6-ab9d-1da2b0f24f93_story.html |access-date=24 June 2016 |first1=Griff |last1=Witte |first2=Karla |last2=Adam |first3=Dan |last3=Balz |archive-date=30 November 2022 |archive-url=https://web.archive.org/web/20221130215030/https://www.washingtonpost.com/world/britons-head-to-the-polls-for-historic-vote-on-eu/2016/06/23/0d466fb0-34a7-11e6-ab9d-1da2b0f24f93_story.html |url-status=live}}</ref> The [[Brexit|UK left the EU]] in 2020.<ref>{{Cite news |date=1 January 2021 |title=Brexit: New era for UK as it completes separation from European Union |work=BBC News |url=https://www.bbc.com/news/uk-politics-55502781 |access-date=18 February 2022 |archive-date=14 January 2021 |archive-url=https://web.archive.org/web/20210114212309/https://www.bbc.com/news/uk-politics-55502781 |url-status=live}}</ref> On 1 May 2021 the [[EU–UK Trade and Cooperation Agreement]], a free trade agreement between the UK and the EU, came into force.<ref name="commission.europa.eu">{{Cite web |title=The EU-UK Trade and Cooperation Agreement |url=https://commission.europa.eu/strategy-and-policy/relations-non-eu-countries/relations-united-kingdom/eu-uk-trade-and-cooperation-agreement_en |archive-url=https://web.archive.org/web/20230325155905/https://commission.europa.eu/strategy-and-policy/relations-non-eu-countries/relations-united-kingdom/eu-uk-trade-and-cooperation-agreement_en |archive-date=25 March 2023 |access-date=25 March 2023}}</ref><ref>{{Cite web |access-date=12 September 2025 |title=Free Trade Agreements EU-UK |url=https://rtais.wto.org/UI/PublicShowRTAIDCard.aspx?rtaid=1137}}</ref> The [[COVID-19 pandemic in the United Kingdom|COVID-19 pandemic]] had a severe [[Economic impact of the COVID-19 pandemic in the United Kingdom|impact on the British economy]], caused major [[Impact of the COVID-19 pandemic on education in the United Kingdom|disruptions to education]] and had [[Social impact of the COVID-19 pandemic in the United Kingdom|far-reaching impacts on society and politics]] in 2020 and 2021.<ref name="GOVUK">{{cite web |url=https://coronavirus.data.gov.uk/ |title=Coronavirus (COVID-19) in the UK |website=[[gov.uk]] |publisher=Government of the United Kingdom |access-date=15 April 2020 |archive-url=https://web.archive.org/web/20210501022145/https://coronavirus.data.gov.uk/ |archive-date=1 May 2021}}</ref><ref>{{Cite web |title=Coronavirus and the impact on output in the UK economy: April 2020 |url=https://www.ons.gov.uk/economy/grossdomesticproductgdp/articles/coronavirusandtheimpactonoutputintheukeconomy/april2020 |access-date=2 August 2020 |publisher=Government of the United Kingdom |website=ons.gov.uk |archive-date=2 August 2020 |archive-url=https://web.archive.org/web/20200802031859/https://www.ons.gov.uk/economy/grossdomesticproductgdp/articles/coronavirusandtheimpactonoutputintheukeconomy/april2020 |url-status=live}}</ref><ref>{{Cite news |last=Walker |first=Andrew |date=10 June 2020 |title=Coronavirus: UK economy could be among worst hit of leading nations, says OECD |work=BBC News |url=https://www.bbc.com/news/business-52991913 |access-date=2 August 2020 |archive-date=18 August 2020 |archive-url=https://web.archive.org/web/20200818031423/https://www.bbc.com/news/business-52991913 |url-status=live}}</ref> The United Kingdom was the first country in the world to use an approved [[COVID-19 vaccine]]. Developing a [[Oxford–AstraZeneca COVID-19 vaccine|vaccine in the UK]] allowed the rollout to be amongst the fastest in the world.<ref>{{Cite web |title=Landmark moment as first NHS patient receives COVID-19 vaccination |url=https://www.england.nhs.uk/2020/12/landmark-moment-as-first-nhs-patient-receives-covid-19-vaccination/ |archive-url=https://web.archive.org/web/20230225194320/https://www.england.nhs.uk/2020/12/landmark-moment-as-first-nhs-patient-receives-covid-19-vaccination/ |archive-date=25 February 2023 |website=NHS |date=8 December 2020}}</ref><ref>{{Cite web |title=Oxford University/AstraZeneca COVID-19 vaccine approved |url=https://www.gov.uk/government/news/oxford-universityastrazeneca-covid-19-vaccine-approved |archive-url=https://web.archive.org/web/20230225194442/https://www.gov.uk/government/news/oxford-universityastrazeneca-covid-19-vaccine-approved |archive-date=25 February 2023 |website=UK Government}}</ref> == Geography == {{Main|Geography of the United Kingdom|Fauna of Great Britain|Flora of Great Britain and Ireland}} [[File:MODIS - Great Britain and Northern Ireland - 2012-06-04 during heat wave (cropped).jpg|thumb|upright|A satellite image of the United Kingdom excluding [[Shetland]]]] The total area of the United Kingdom is approximately {{Convert|244376|km2|sqmi|order=flip}},{{efn|name=ONSArea}}<ref name="ONS Standard Area Measurement" /> with a land area of {{convert|242741|km2|sqmi|order=flip}}.<ref name="ONS Standard Area Measurement" /> It occupies the major part of the [[British Isles]]<ref>[[Oxford English Dictionary]]: "British Isles: a geographical term for the islands comprising Great Britain and Ireland with all their offshore islands including the Isle of Man and the Channel Islands."</ref> and includes the island of Great Britain, the north-eastern one-sixth of the island of Ireland and [[List of islands of the United Kingdom|some smaller surrounding islands]], meaning it comprises [[England]], [[Scotland]], [[Wales]] and [[Northern Ireland]].<ref name="ONS Geography Guide">{{cite web |url=https://geoportal.statistics.gov.uk/datasets/d1f39e20edb940d58307a54d6e1045cd/about |title=A Beginner's Guide to UK Geography (2023) |author=<!--Not stated--> |date=4 February 2025 |website=Open Geography Portal |publisher=Office for National Statistics |access-date=14 May 2025}}</ref> Geographically, the United Kingdom lies between the [[North Atlantic Ocean]] and the [[North Sea]] with the southeast coast coming within {{Convert|35|km|mi|0|order=flip}} of the coast of northern France, from which it is separated by the [[English Channel]].<ref name="factbook">{{Cite web |title=United Kingdom |url=https://www.cia.gov/the-world-factbook/countries/united-kingdom |access-date=21 January 2007 |website=[[The World Factbook]] |publisher=Central Intelligence Agency |archive-date=9 January 2021 |archive-url=https://web.archive.org/web/20210109221834/https://www.cia.gov/the-world-factbook/countries/united-kingdom |url-status=dead}}</ref> The nearby island polities of the [[Isle of Man]], [[Jersey]] and [[Guernsey]] are [[Crown Dependencies]], in union with the [[Monarchy of the United Kingdom|British monarch]], but do not strictly form part of the United Kingdom or any of its three jurisdictions or four countries, although the British government retains responsibility for their external affairs. The Isle of Man lies roughly midway between Great Britain and the [[Ireland|island of Ireland]] in the [[Irish Sea]], while the Channel Islands lie just off the northern French coast. The [[Royal Observatory, Greenwich|Royal Greenwich Observatory]] in London was chosen as the defining point of the [[Prime Meridian]]<ref>{{Cite web |last=ROG Learning Team |date=23 August 2002 |title=The Prime Meridian at Greenwich |url=http://www.rmg.co.uk/explore/astronomy-and-time/astronomy-facts/history/the-prime-meridian-at-greenwich |archive-url=https://web.archive.org/web/20151107023957/http://www.rmg.co.uk/explore/astronomy-and-time/astronomy-facts/history/the-prime-meridian-at-greenwich |archive-date=7 November 2015 |access-date=11 September 2012 |website=Royal Museums Greenwich}}</ref> at the [[International Meridian Conference]] in 1884.<ref>{{Cite news |date=13 August 2015 |title=Greenwich Royal Observatory: How the Prime Meridian line is actually 100 metres away from where it was believed to be |work=Independent |location=London |url=https://www.independent.co.uk/news/science/greenwich-royal-observatory-how-the-prime-meridian-line-is-actually-100-metres-away-from-where-it-10452386.html |access-date=13 December 2018 |archive-date=23 March 2019 |archive-url=https://web.archive.org/web/20190323081414/https://www.independent.co.uk/news/science/greenwich-royal-observatory-how-the-prime-meridian-line-is-actually-100-metres-away-from-where-it-10452386.html |url-status=live}}</ref> The UK lies between latitudes [[49th parallel north|49°]] and [[61st parallel north|61° N]], and longitudes [[9th meridian west|9° W]] and [[2nd meridian east|2° E]]. Northern Ireland shares a {{Convert|499|km|mi|0|adj=on|order=flip}} land boundary with the Republic of Ireland<ref name="factbook" /> and has a {{Convert|650|km|mi|0|adj=on|order=flip}} coastline.<ref name="NI coastline">{{Cite web |title=Northern Ireland Coastal and Marine Forum |url=https://library2.nics.gov.uk/pdf/dard/2014/EEUD.pdf |archive-url=https://web.archive.org/web/20241123094028/https://library2.nics.gov.uk/pdf/dard/2014/EEUD.pdf |archive-date=23 November 2024 |access-date=13 March 2025 |publisher=Northern Ireland Coastal and Marine Forum}}</ref> The length of coastline of Great Britain plus its principal islands is about {{Convert|31368|km|mi|0|order=flip}} long, with the coastline of the main island Great Britain being {{Convert|17820|km|mi|0|order=flip}} of that,<ref name="UK coastline">{{Cite web |last=Darkes |first=Giles |date=January 2008 |title=How long is the UK coastline? |url=http://www.cartography.org.uk/default.asp?contentID=749 |archive-url=https://web.archive.org/web/20120522042745/http://www.cartography.org.uk/default.asp?contentID=749 |archive-date=22 May 2012 |access-date=24 January 2015 |publisher=The [[British Cartographic Society]]}}</ref> though measurements can vary greatly due to the [[coastline paradox]].<ref>{{Cite web |last=Weiner |first=Sophie |date=3 March 2018 |title=Why it's Impossible to Accurately Measure a Coastline |url=https://www.popularmechanics.com/science/environment/a19068718/why-its-impossible-to-accurately-measure-a-coastline/ |access-date=29 June 2024 |website=Popular Mechanics |archive-date=29 June 2024 |archive-url=https://web.archive.org/web/20240629025825/https://www.popularmechanics.com/science/environment/a19068718/why-its-impossible-to-accurately-measure-a-coastline/ |url-status=live}}</ref> It is connected to continental Europe by the [[Channel Tunnel]], which at {{Convert|50|km|mi|0|order=flip}} ({{Convert|38|km|mi|0|order=flip}} underwater) is the longest underwater tunnel in the world.<ref>{{Cite web |title=The Channel Tunnel |url=http://www.eurotunnel.com/ukcP3Main/ukcCorporate/ukcTunnelInfrastructure/ukcInfrastructure |archive-url=https://web.archive.org/web/20101218114514/http://www.eurotunnel.com/ukcP3Main/ukcCorporate/ukcTunnelInfrastructure/ukcInfrastructure |archive-date=18 December 2010 |access-date=8 March 2015 |publisher=Eurotunnel}}</ref> The UK contains four terrestrial [[ecoregion]]s: [[Celtic broadleaf forests]], [[English Lowlands beech forests]], [[North Atlantic moist mixed forests]], and [[Caledonian Forest|Caledonian conifer forests]].<ref>{{Cite journal |last1=Dinerstein |first1=Eric |last2=Olson |first2=David |last3=Joshi |first3=Anup |last4=Vynne |first4=Carly |last5=Burgess |first5=Neil D. |last6=Wikramanayake |first6=Eric |last7=Hahn |first7=Nathan |last8=Palminteri |first8=Suzanne |last9=Hedao |first9=Prashant |last10=Noss |first10=Reed |last11=Hansen |first11=Matt |last12=Locke |first12=Harvey |last13=Ellis |first13=Erle C |last14=Jones |first14=Benjamin |last15=Barber |first15=Charles Victor |display-authors=1 |year=2017 |title=An Ecoregion-Based Approach to Protecting Half the Terrestrial Realm |journal=BioScience |volume=67 |issue=6 |pages=534–545 |doi=10.1093/biosci/bix014 |issn=0006-3568 |pmc=5451287 |pmid=28608869 |doi-access=free |last16=Hayes |first16=Randy |last17=Kormos |first17=Cyril |last18=Martin |first18=Vance |last19=Crist |first19=Eileen |last20=Sechrest |first20=Wes |last21=Price |first21=Lori |last22=Baillie |first22=Jonathan E. M. |last23=Weeden |first23=Don |last24=Suckling |first24=Kierán |last25=Davis |first25=Crystal |last26=Sizer |first26=Nigel |last27=Moore |first27=Rebecca |last28=Thau |first28=David |last29=Birch |first29=Tanya |last30=Potapov |first30=Peter |last31=Turubanova |first31=Svetlana |last32=Tyukavina |first32=Alexandra |last33=de Souza |first33=Nadia |last34=Pintea |first34=Lilian |last35=Brito |first35=José C. |last36=Llewellyn |first36=Othman A. |last37=Miller |first37=Anthony G. |last38=Patzelt |first38=Annette |last39=Ghazanfar |first39=Shahina A. |last40=Timberlake |first40=Jonathan |last41=Klöser |first41=Heinz |last42=Shennan-Farpón |first42=Yara |last43=Kindt |first43=Roeland |last44=Lillesø |first44=Jens-Peter Barnekow |last45=van Breugel |first45=Paulo |last46=Graudal |first46=Lars |last47=Voge |first47=Maianna |last48=Al-Shammari |first48=Khalaf F. |last49=Saleem |first49=Muhammad}}</ref> The area of woodland in the UK was estimated to be 3.25&nbsp;million hectares in 2023, which represents 13 per cent of its land area.<ref>{{Cite web |url=https://www.forestresearch.gov.uk/tools-and-resources/statistics/statistics-by-topic/woodland-statistics/ |title=Woodland Statistics, Key findings |work=Forest Research |access-date=8 July 2023 |archive-date=2 August 2023 |archive-url=https://web.archive.org/web/20230802030149/https://www.forestresearch.gov.uk/tools-and-resources/statistics/statistics-by-topic/woodland-statistics/ |url-status=live}}</ref> === Climate === {{Main|Climate of the United Kingdom|Climate change in the United Kingdom}} {{Further|Climate of England|Climate of Scotland|Climate of Wales|Climate of Northern Ireland}} Most of the United Kingdom has a temperate climate, with generally cool temperatures and plentiful rainfall all year round.<ref name="factbook" /> The temperature varies with the seasons seldom dropping below {{Convert|0|C|lk=on}} or rising above {{Convert|30|C}}.<ref>{{Cite web |title=Hottest day of each year from 1900 |url=https://www.trevorharley.com/hottest-day-of-each-year-from-1900.html |website=trevorharley.com |access-date=23 November 2019 |archive-date=16 June 2023 |archive-url=https://web.archive.org/web/20230616173152/https://www.trevorharley.com/hottest-day-of-each-year-from-1900.html |url-status=live}}; {{Cite web |title=Coldest day of each year from 1900 |url=https://www.trevorharley.com/coldest-days-of-each-year-from-1900.html |website=trevorharley.com |access-date=23 November 2019 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709173537/https://www.trevorharley.com/coldest-days-of-each-year-from-1900.html |url-status=live}}</ref> Some parts, away from the coast, of upland England, Wales, Northern Ireland and most of Scotland, experience a [[subpolar oceanic climate]]. Higher elevations in Scotland experience a [[Subarctic climate|continental subarctic climate]] and the mountains experience a [[tundra climate]].<ref>{{Cite web |date=9 August 2016 |title=English: A map of Köppen climate types in the United Kingdom (SVG version) |url=https://commons.wikimedia.org/wiki/File:UK_K%C3%B6ppen.svg |access-date=23 November 2019 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709202702/https://commons.wikimedia.org/wiki/File:UK_K%C3%B6ppen.svg |url-status=live}}</ref> The prevailing wind is from the southwest and bears frequent spells of mild and wet weather from the Atlantic Ocean,<ref name="factbook" /> although the eastern parts are mostly sheltered from this wind. Since the majority of the rain falls over the western regions, the eastern parts are the driest. Atlantic currents, warmed by the [[Gulf Stream]], bring mild winters, especially in the west where winters are wet and even more so over high ground. Summers are warmest in the southeast of England and coolest in the north. Heavy snowfall can occur in winter and early spring on high ground, and occasionally settles to great depth away from the hills.<ref>{{Cite web |title=Atlantic Ocean Circulation (Gulf Stream) |url=http://ukclimateprojections.metoffice.gov.uk/23152 |access-date=8 March 2015 |website=UK Climate Projections |publisher=Met Office |archive-date=17 October 2018 |archive-url=https://web.archive.org/web/20181017162552/http://ukclimateprojections.metoffice.gov.uk/23152 |url-status=live}}</ref> The average total annual sunshine in the United Kingdom was 1,339.7 hours between 1971 and 2000.<ref name="ukaverages">{{cite web |title=UK 1971–2000 averages |url=http://www.metoffice.gov.uk/climate/uk/averages/19712000/areal/uk.html |url-status=dead |archive-url=https://web.archive.org/web/20090705140124/http://www.metoffice.gov.uk/climate/uk/averages/19712000/areal/uk.html |archive-date=5 July 2009 |access-date=4 August 2007 |publisher=Met Office}}</ref> The hours of sunshine vary from 1,200 to about 1,580 hours per year.<ref name="met off climate series">{{Cite web |url=https://www.metoffice.gov.uk/research/climate/maps-and-data/uk-temperature-rainfall-and-sunshine-time-series |title=UK temperature, rainfall and sunshine time series |website=Met Office |access-date=31 December 2022 |archive-date=17 October 2019 |archive-url=https://web.archive.org/web/20191017203556/https://www.metoffice.gov.uk/research/climate/maps-and-data/uk-temperature-rainfall-and-sunshine-time-series |url-status=live}}</ref> Climate change has serious impacts on the country. A third of food price rise in 2023 was attributed to it.<ref>{{cite web |last1=Smeeton |first1=George |title=Families hit by £605 food bill as extreme weather and energy crisis bites |url=https://eciu.net/media/press-releases/2023/families-hit-by-605-food-bill-as-extreme-weather-and-energy-crisis-bites |website=Energy & Climate Intelligence Unit |date=28 November 2023 |access-date=19 July 2024 |archive-date=16 July 2024 |archive-url=https://web.archive.org/web/20240716124143/https://eciu.net/media/press-releases/2023/families-hit-by-605-food-bill-as-extreme-weather-and-energy-crisis-bites |url-status=live}}</ref> In 2024 the United Kingdom ranked 5th out of 180 countries in the [[Environmental Performance Index]].<ref>{{Cite web |title=2024 Environmental Performance Index |url=https://epi.yale.edu/measure/2024/EPI |access-date=27 May 2025 |website=Environmental Performance Index |language=en |archive-date=10 July 2024 |archive-url=https://web.archive.org/web/20240710023935/https://epi.yale.edu/measure/2024/EPI |url-status=live }}</ref> A law has been passed that [[Greenhouse gas emissions by the United Kingdom|UK greenhouse gas emissions]] will be [[net zero]] by 2050.<ref>{{Cite web |title=UK net zero target |url=https://www.instituteforgovernment.org.uk/explainers/net-zero-target#:~:text=In%20June%202019%2C%20parliament%20passed,to%201990%20levels%20by%202050.&text=Prior%20to%20this%2C%20the%20UK,1990%20levels%2C%20also%20by%202050. |access-date=20 March 2024 |website=Institute for Government |date=20 April 2020|last=Shepheard|first=Marcus}}</ref>{{Update after|2050|01|01|category|reason=Hello from 2024! By the time you're reading this, that law will be a little older than 30 years old. Could you check if the UK ever ended up hitting that net zero GHG target?}} === Topography === [[File:uk topo en.jpg|thumb|right|The United Kingdom's topography]] [[Geography of England|England]] accounts for 53 per cent of the UK, covering {{Convert|130395|km2|sqmi|order=flip|-1}}.<ref>{{Cite news |date=11 February 2010 |title=England&nbsp;– Profile |work=BBC News |url=http://news.bbc.co.uk/2/hi/europe/country_profiles/7327029.stm |access-date=9 October 2010 |archive-date=15 April 2018 |archive-url=https://web.archive.org/web/20180415064122/http://news.bbc.co.uk/1/hi/world/europe/country_profiles/7327029.stm |url-status=live}}</ref> Most of the country consists of lowland terrain,<ref name="Atlapedia">{{Cite web |last=Latimer Clarke Corporation Pty Ltd |title=United Kingdom – Atlapedia Online |url=http://www.atlapedia.com/online/countries/unitedki.htm |access-date=26 October 2010 |website=Atlapedia.com |archive-date=21 March 2012 |archive-url=https://web.archive.org/web/20120321191308/http://www.atlapedia.com/online/countries/unitedki.htm |url-status=live}}{{better source needed|date=July 2023}}</ref> with upland and mountainous terrain northwest of the [[Tees–Exe line]] which roughly divides the UK into [[lowland and upland]] areas. Lowland areas include [[Cornwall]], the [[New Forest]], the [[South Downs]] and the [[The Broads|Norfolk Broads]]. Upland areas include the [[Lake District]], the [[Pennines]], the [[Yorkshire Dales]], [[Exmoor]] and [[Dartmoor]]. The main rivers and estuaries are the [[River Thames|Thames]], [[River Severn|Severn]], and the [[Humber]]. England's highest mountain is [[Scafell Pike]], at {{Convert|978|m|ft|0}} in the Lake District; its largest island is the [[Isle of Wight]]. [[Geography of Scotland|Scotland]] accounts for 32 per cent of the UK, covering {{Convert|78772|km2|sqmi|order=flip|-1}}.<ref>{{Cite web |title=Scotland Facts |url=http://www.scotland.org/about/fact-file/index.html |archive-url=https://web.archive.org/web/20080621045248/http://www.scotland.org/about/fact-file/index.html |archive-date=21 June 2008 |access-date=16 July 2008 |publisher=Scotland Online Gateway}}</ref> This includes [[List of islands of Scotland|nearly 800 islands]],<ref>{{Cite news |last=Winter |first=Jon |date=1 June 2000 |title=The complete guide to the ... Scottish Islands |work=Independent |location=London |url=https://www.independent.co.uk/travel/uk/the-complete-guide-to-the--scottish-islands-633851.html |access-date=8 March 2015 |archive-date=2 April 2015 |archive-url=https://web.archive.org/web/20150402164423/http://www.independent.co.uk/travel/uk/the-complete-guide-to-the--scottish-islands-633851.html |url-status=live}}</ref> notably the [[Hebrides]], [[Orkney]] Islands and [[Shetland Islands]]. Scotland is the most mountainous constituent country of the UK. The [[Scottish Highlands|Highlands]] to the north and west are the more rugged region containing the majority of Scotland's mountainous land, including the [[Cairngorms]], [[Loch Lomond and The Trossachs]] and [[Ben Nevis]] which at {{Convert|1345|m|ft|0}}<ref>{{Cite web |date=18 March 2016 |title=Great Britain's tallest mountain is taller |work=Ordnance Survey Blog |url=https://www.ordnancesurvey.co.uk/blog/2016/03/britains-tallest-mountain-is-taller |access-date=9 September 2018 |publisher=Ordnance Survey |archive-date=9 September 2018 |archive-url=https://web.archive.org/web/20180909000504/https://www.ordnancesurvey.co.uk/blog/2016/03/britains-tallest-mountain-is-taller/ |url-status=live}}</ref> is the highest point in the British Isles.<ref>{{Cite web |title=Ben Nevis Weather |url=http://www.bennevisweather.co.uk/index.asp |archive-url=https://web.archive.org/web/20120510193022/http://www.bennevisweather.co.uk/index.asp |archive-date=10 May 2012 |access-date=26 October 2008 |publisher=Ben Nevis Weather}}</ref> [[Geography of Wales|Wales]] accounts for less than 9 per cent of the UK, covering {{Convert|20779|km2|sqmi|order=flip|-1}}.<ref>{{Cite news |date=9 June 2010 |title=Profile: Wales |work=BBC News |url=http://news.bbc.co.uk/2/hi/europe/country_profiles/6233450.stm |access-date=7 November 2010 |archive-date=26 August 2018 |archive-url=https://web.archive.org/web/20180826085704/http://news.bbc.co.uk/2/hi/europe/country_profiles/6233450.stm |url-status=live}}</ref> It is mostly mountainous, though [[South Wales]] is less mountainous than [[North Wales|North]] and [[Mid Wales]]. The highest mountains in Wales are in [[Snowdonia]] and include [[Snowdon]] ({{Langx|cy|Yr Wyddfa}}) which, at {{Convert|1085|m|ft|0}}, is the highest peak in Wales.<ref name="Atlapedia" /> Wales has over {{Convert|1680|mi|0|abbr=off}} of coastline including the [[Pembrokeshire Coast]].<ref name="UK coastline" /> Several islands lie off the Welsh mainland, the largest of which is [[Anglesey]] (''Ynys Môn''). [[Geography of Ireland|Northern Ireland]], separated from Great Britain by the [[Irish Sea]] and [[North Channel (Great Britain and Ireland)|North Channel]], has an area of {{Convert|14160|km2|sqmi|order=flip|-1}} and is mostly hilly. It includes [[Lough Neagh]] which, at {{Convert|388|km2|sqmi|order=flip|0}}, is the largest lake in the British Isles by area,<ref>{{Cite web |title=Geography of Northern Ireland |url=http://cain.ulst.ac.uk/ni/geog.htm |access-date=22 May 2006 |publisher=University of Ulster |archive-date=18 January 2012 |archive-url=https://web.archive.org/web/20120118133131/http://cain.ulst.ac.uk/ni/geog.htm |url-status=live}}</ref> [[Lough Erne]], which has over 150 islands, and the [[Giant's Causeway]], which is listed by [[UNESCO]] as a [[World Heritage Site]]. The highest peak in Northern Ireland is [[Slieve Donard]] in the [[Mourne Mountains]] at {{Convert|852|m|ft|0}}.<ref name="Atlapedia" /> == Government and politics == {{Main|Politics of the United Kingdom|Government of the United Kingdom|Monarchy of the United Kingdom}} {{Further|Constitution of the United Kingdom}}{{Multiple image | direction = horizontal | align = right | caption_align = center | total_width = 320 | image1 = King Charles III (July 2023).jpg | image2 = Prime Minister Sir Keir Starmer Official Portrait (cropped).jpg | caption1 = {{nowrap|[[Charles III]]}}<br>[[Monarch of the United Kingdom|King]] | caption2 = {{nowrap|[[Keir Starmer]]}}<br>{{nowrap|[[Prime Minister of the United Kingdom|Prime Minister]]}} | alt1 = | alt2 = }} The United Kingdom is a [[constitutional monarchy]] and a [[parliamentary democracy]]<ref>[http://www.royal.gov.uk/MonarchUK/HowtheMonarchyworks/Whatisconstitutionalmonarchy.aspx The British Monarchy, "What is constitutional monarchy?"] {{Webarchive|url=https://web.archive.org/web/20190604151257/http://www.royal.gov.uk/MonarchUK/HowtheMonarchyworks/Whatisconstitutionalmonarchy.aspx|date=4 June 2019}}. Retrieved 17 July 2013; [https://www.cia.gov/the-world-factbook/countries/united-kingdom/ "United Kingdom"] {{Webarchive|url=https://web.archive.org/web/20210109221834/https://www.cia.gov/the-world-factbook/countries/united-kingdom/|date=9 January 2021}} CIA ''The World Factbook''. Retrieved 17 July 2013</ref> operating under the [[Westminster system]], otherwise known as a "democratic parliamentary monarchy".<ref>{{Cite journal |last1=Stepan |first1=Alfred |last2=Linz |first2=Juan J. |last3=Minoves |first3=Juli F. |date=2014 |title=Democratic Parliamentary Monarchies |url=http://muse.jhu.edu/content/crossref/journals/journal_of_democracy/v025/25.2.stepan.html |journal=Journal of Democracy |volume=25 |issue=2 |pages=35–36 |doi=10.1353/jod.2014.0032 |issn=1086-3214 |s2cid=154555066 |url-access=subscription |archive-date=31 January 2026 |access-date=11 January 2023 |archive-url=https://web.archive.org/web/20260131155632/https://muse.jhu.edu/content/crossref/journals/journal_of_democracy/v025/25.2.stepan.html |url-status=live }}</ref> It is a [[Centralized government|centralised]], [[unitary state]]<ref>{{Cite web |last=Lewer |first=Andrew |date=5 May 2021 |title=The UK is one of the most centralised advanced democracies – it's time that changed |url=https://www.newstatesman.com/spotlight/2021/05/the-uk-is-one-of-the-most-centralised-advanced-democracies-its-time-that-changed |access-date=3 July 2023 |website=New Statesman |archive-date=3 July 2023 |archive-url=https://web.archive.org/web/20230703131907/https://www.newstatesman.com/spotlight/2021/05/the-uk-is-one-of-the-most-centralised-advanced-democracies-its-time-that-changed |url-status=live}}</ref><ref>{{Cite web |title=Centralisation Nation: Britain's system of local government and its impact on the national economy |url=https://www.centreforcities.org/?post_type=publication&p=40951 |access-date=3 July 2023 |website=Centre for Cities |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141833/https://www.centreforcities.org/publication/centralisation-nation/ |url-status=live}}</ref> wherein the [[Parliament of the United Kingdom]] is [[Parliamentary sovereignty in the United Kingdom|sovereign]].<ref>{{Cite web |title=Parliamentary Sovereignty |url=https://www.parliament.uk/site-information/glossary/parliamentary-sovereignty |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=11 August 2021 |archive-url=https://web.archive.org/web/20210811195135/https://www.parliament.uk/site-information/glossary/parliamentary-sovereignty/ |url-status=live}}</ref> Parliament is made up of the elected [[House of Commons of the United Kingdom|House of Commons]], the appointed [[House of Lords]] and [[the Crown]] (as personified by [[Monarchy of the United Kingdom|the monarch]]).{{Efn|British [[sovereignty]] derives from the Crown, a [[corporation sole]] occupied by the monarch. It is therefore by and through the monarch that Parliament exercises supreme legislative authority over both the executive and judiciary. Distinguished Professor of [[Public Law]] Maurice Sunkin opined the Crown symbolically occupies "...what in other places would be a core element of a written constitution."<ref>{{Cite web |url=https://www.ibanet.org/Relationship-between-UK-Crown-and-law-in-focus-as-Carolean-era-begins |title=Relationship between UK Crown and law in focus as Carolean era begins |author=Polly Botsford |publisher=International Bar Association |publication-date=22 September 2022 |access-date=4 July 2023 |archive-date=6 May 2023 |archive-url=https://web.archive.org/web/20230506211218/https://www.ibanet.org/Relationship-between-UK-Crown-and-law-in-focus-as-Carolean-era-begins |url-status=live}}</ref> As a result of this state of constitutional affairs, the monarch is formally referred to as "[[Sovereign|the Sovereign]]" in legislation.<ref>{{Cite web |url=https://www.legislation.gov.uk/ukpga/1978/30/section/10 |title=Interpretation Act 1978 (c. 30, s. 10) |publisher=The National Archives |access-date=4 July 2023 |archive-date=30 July 2023 |archive-url=https://web.archive.org/web/20230730073659/https://www.legislation.gov.uk/ukpga/1978/30/section/10 |url-status=live}}</ref>}}<ref name="parliament.uk">{{Cite web |title=Parliament |url=https://www.parliament.uk/about/how/role |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=18 February 2026 |archive-url=https://web.archive.org/web/20260218150954/https://www.parliament.uk/about/how/role/ |url-status=live }}</ref> The main business of Parliament takes place in the two houses,<ref name="parliament.uk" /> but [[royal assent]] is required for a bill to become an [[Act of Parliament (UK)|act of Parliament]] (that is, [[statute law]]).<ref>{{Cite web |title=Royal Assent |url=https://www.parliament.uk/about/how/laws/passage-bill/lords/lrds-royal-assent |access-date=19 July 2021 |website=[[parliament.uk]] |archive-date=16 July 2021 |archive-url=https://web.archive.org/web/20210716022947/https://www.parliament.uk/about/how/laws/passage-bill/lords/lrds-royal-assent/ |url-status=live}}</ref> As a result of parliamentary sovereignty, the [[Constitution of the United Kingdom|British constitution]] is [[Uncodified constitution|uncodified]], consisting mostly of disparate written sources, including parliamentary [[statute]]s, judge-made [[case law]] and international treaties, together with [[British Constitution#Conventions|constitutional conventions]].<ref>{{Cite web |last=Carter, Sarah |title=A Guide To the UK Legal System |url=http://www.llrx.com/features/uk2.htm#UK%20Legal%20System |archive-url=https://web.archive.org/web/20120505115306/http://www.llrx.com/features/uk2.htm |archive-date=5 May 2012 |access-date=16 May 2006 |publisher=[[University of Kent]] at Canterbury}}</ref> Nevertheless, the [[Supreme Court of the United Kingdom|Supreme Court]] recognises a number of principles underlying the British constitution, such as parliamentary sovereignty, the [[rule of law]], [[democracy]] and upholding [[Internationalism (politics)|international law]].<ref>See ''[[R (Miller) v Prime Minister]]'' [2019] UKSC 41 (Parliamentary sovereignty), ''[[R (UNISON) v Lord Chancellor]]'' [2017] [http://www.bailii.org/uk/cases/UKSC/2017/51.html UKSC 51] {{Webarchive|url=https://web.archive.org/web/20230104095357/https://www.bailii.org/uk/cases/UKSC/2017/51.html|date=4 January 2023}}, [67] ff (rule of law), ''[[R (Animal Defenders International) v Secretary of State for Culture Media and Sport]]'' [2008] UKHL 15, [48] (democracy), ''[[R v Lyons]]'' [2002] [https://www.bailii.org/uk/cases/UKHL/2002/44.html UKHL 44] {{Webarchive|url=https://web.archive.org/web/20230122064021/https://www.bailii.org/uk/cases/UKHL/2002/44.html|date=22 January 2023}}, [27] (international law).</ref> [[Charles III|King Charles III]] is the [[monarch]] and [[head of state]] of the United Kingdom and 14 other independent [[sovereign state]]s, referred to as "[[Commonwealth realm]]s". The monarch is formally vested with all executive authority as the personal embodiment of [[the Crown]] and is "fundamental to the law and working of government in the UK".<ref>{{Cite journal |url=https://kclpure.kcl.ac.uk/portal/en/publications/the-constitutional-role-and-working-of-the-monarchy-in-the-united |title=The Constitutional Role and Working of the Monarchy in the United Kingdom |author=Robert Blackburn |journal=Jahrbuch des Öffentlichen Rechts der Gegenwart |series=Neue Folge |year=2022 |volume=70 |pages=181–201 |editor=O. Lepsius |editor2=A. Nußberger |editor3=C. Schönberger |editor4=C. Waldhoff |editor5=C. Walter |name-list-style=amp |publisher=Mohr Siebeck |doi=10.1628/joer-2022-0009 |s2cid=257830288 |publication-date=2 June 2022 |access-date=19 June 2023 |archive-date=19 June 2023 |archive-url=https://web.archive.org/web/20230619174428/https://kclpure.kcl.ac.uk/portal/en/publications/the-constitutional-role-and-working-of-the-monarchy-in-the-united |url-status=live}}</ref> The disposition of such powers however, including those belonging to the [[Royal prerogative in the United Kingdom|royal prerogative]], is generally exercised only on the [[Advice (constitutional law)|advice]] of [[ministers of the Crown]] responsible to Parliament and thence to the electorate. Nevertheless, in the performance of official duties the monarch has "the right to be consulted, the right to encourage, and the right to warn".<ref>[[Walter Bagehot|Bagehot, Walter]] (1867). ''The English Constitution''. London: Chapman and Hall. p. 103.</ref> In addition the monarch has a number of [[Reserve power#United Kingdom|reserve powers]] at his disposal to uphold [[responsible government]] and prevent [[constitutional crisis|constitutional crises]].{{Efn|For instance, the monarch alone appoints the prime minister and confers [[Orders, decorations, and medals of the United Kingdom|state honours]] in the personal gift of the Crown. When necessary, the monarch may also refuse a [[dissolution of Parliament|dissolution]] or [[Prorogation in the United Kingdom|prorogation of Parliament]], withhold [[royal assent]] to [[Act of Parliament (UK)|primary legislation]], and prevent illegal use of the [[British Armed Forces]], amongst other reserve powers.<ref>{{Cite web |url=https://researchbriefings.files.parliament.uk/documents/CBP-8885/CBP-8885.pdf |title=The Crown and the Constitution |author=David Torrance |publisher=House of Commons Library |publication-date=11 January 2023 |access-date=19 June 2023 |pages=22 |archive-date=2 March 2023 |archive-url=https://web.archive.org/web/20230302033737/https://researchbriefings.files.parliament.uk/documents/CBP-8885/CBP-8885.pdf |url-status=live}}</ref>}} The prime minister is the [[head of government]] in the United Kingdom.<ref>{{Cite web |title=The Government, Prime Minister and Cabinet |url=http://direct.gov.uk/en/Governmentcitizensandrights/UKgovernment/Centralgovernmentandthemonarchy/DG_073444 |archive-url=https://web.archive.org/web/20120921004951/http://www.direct.gov.uk/en/Governmentcitizensandrights/UKgovernment/Centralgovernmentandthemonarchy/DG_073444 |archive-date=21 September 2012 |access-date=9 March 2015 |website=Public services all in one place |publisher=[[Directgov]]}}</ref> Acting under the direction and supervision of a [[Cabinet of the United Kingdom|Cabinet]] of senior ministers selected and led by the prime minister, [[His Majesty's Government]] serves as the principal instrument for public policymaking, administers public services and, through the [[Privy Council of the United Kingdom|Privy Council]], promulgates [[statutory instrument (UK)|statutory instruments]] and tenders advice to the monarch.<ref>{{Cite web |url=https://www.instituteforgovernment.org.uk/explainer/cabinet |title=Cabinet |author=Tim Durrant |date=25 March 2020 |publisher=Institute for Government |publication-date=25 March 2020 |access-date=4 July 2023 |archive-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704112925/https://www.instituteforgovernment.org.uk/explainer/cabinet |url-status=live}}</ref><ref>{{Cite web |url=https://www.parliament.uk/about/how/role/relations-with-other-institutions/parliament-government/ |title=Parliament and Government |publisher=UK Parliament |access-date=4 July 2023 |archive-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704112925/https://www.parliament.uk/about/how/role/relations-with-other-institutions/parliament-government/ |url-status=live}}</ref><ref>{{Cite book |url=https://books.google.com/books?id=mN6SzMefot4C |title=The Monarchy and the Constitution, Chapter 3 – The Basic Constitutional Rules: Influence and the Prerogative |author=Vernon Bogdanor |year=1995 |publisher=Clarendon Press |isbn=978-0-19-829334-7 |publication-date=1995 |access-date=4 July 2023}}</ref> Nearly all prime ministers have served concurrently as [[First Lord of the Treasury]]<ref>{{Cite web |last1=Blick |first1=Andrew |last2=Jones |first2=George |date=1 January 2012 |title=The Institution of Prime Minister – History of government |url=https://history.blog.gov.uk/2012/01/01/the-institution-of-prime-minister |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=21 July 2021 |archive-url=https://web.archive.org/web/20210721060401/https://history.blog.gov.uk/2012/01/01/the-institution-of-prime-minister/ |url-status=live}}</ref> and all prime ministers have continuously served as First Lord of the Treasury since 1905,<ref>{{Cite book |last=Brown |first=Jack |title=The Prime Ministers |publisher=[[Hodder & Stoughton]] |year=2020 |isbn=978-1-5293-1214-0 |editor-last=Dale |editor-first=Iain |page=303}}</ref> [[Minister for the Civil Service]] since 1968,<ref>{{Cite web |title=Minister for the Civil Service |url=https://www.gov.uk/government/ministers/minister-for-the-civil-service |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=2 September 2017 |archive-url=https://web.archive.org/web/20170902233116/https://www.gov.uk/government/ministers/minister-for-the-civil-service |url-status=live}}</ref> and [[Minister for the Union]] since 2019.<ref>{{Cite news |last=Woodcock |first=Andrew |date=26 July 2021 |title=Boris Johnson accused of 'cynical rebranding' after appointing himself 'Minister for the Union' |work=[[The Independent|Independent]] |url=https://www.independent.co.uk/news/uk/politics/boris-johnson-minister-union-scotland-independence-referendum-snp-a9022356.html |access-date=19 July 2021 |archive-date=27 July 2019 |archive-url=https://web.archive.org/web/20190727080405/https://www.independent.co.uk/news/uk/politics/boris-johnson-minister-union-scotland-independence-referendum-snp-a9022356.html |url-status=live}}; {{Cite web |title=Minister for the Union |url=https://www.gov.uk/government/ministers/minister-for-the-union |access-date=19 July 2021 |website=[[gov.uk]] |archive-date=19 July 2020 |archive-url=https://web.archive.org/web/20200719053618/https://www.gov.uk/government/ministers/minister-for-the-union |url-status=live}}</ref> While appointed by the monarch, in modern times the prime minister is, by [[Constitutional conventions of the United Kingdom|convention]], an MP, the leader of the political party with the most seats in the House of Commons, and holds office by virtue of their ability to [[Confidence motions in the United Kingdom|command the confidence]] of the House of Commons.<ref>{{Cite web |date=October 2011 |title=The Cabinet Manual |url=https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/60641/cabinet-manual.pdf |access-date=19 July 2021 |website=[[gov.uk]] |pages=7, 21 |archive-date=15 April 2018 |archive-url=https://web.archive.org/web/20180415090557/https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/60641/cabinet-manual.pdf |url-status=live}}</ref><ref>{{Cite book |last=Norton |first=Philip |title=Governing Britain: Parliament, Ministers and Our Ambiguous Constitution |publisher=[[Manchester University Press]] |year=2020 |isbn=978-1-5261-4545-1 |page=130}}</ref> The prime minister as at 2025 is [[Keir Starmer|Sir Keir Starmer]], the [[Leader of the Labour Party (UK)|leader of the Labour Party]]. Although not part of the United Kingdom, the three [[Crown Dependencies]] of [[Jersey]], [[Guernsey]] and the [[Isle of Man]], as well as the 14 [[British Overseas Territories]], are subject to the sovereignty of the British Crown.<ref>{{cite book |last=Palan |first=Rolen |editor-last1=Palan |editor-first1=Rolen |editor-last2=Halperin |editor-first2=Sandra |chapter=The second British Empire and the re-emergence of global finance |chapter-url=https://books.google.com/books?id=76QyCgAAQBAJ&dq=%22British+overseas+territories%22+%22crown+dependencies%22+UK+%22British+crown%22&pg=PA48 |title=Legacies of Empire: Imperial Roots of the Contemporary Global Order |year=2015 |publisher=Cambridge University Press |isbn=978-1-107-10946-9 |page=48 |access-date=13 April 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212946/https://books.google.com/books?id=76QyCgAAQBAJ&dq=%22British+overseas+territories%22+%22crown+dependencies%22+UK+%22British+crown%22&pg=PA48#v=onepage&q=%22British%20overseas%20territories%22%20%22crown%20dependencies%22%20UK%20%22British%20crown%22&f=false |url-status=live}}</ref> [[Democratic backsliding]] was found by the 2026 [[V-Dem Institute#Democracy Report|V-Dem Democracy Report]] for the United Kingdom.<ref name="j496">{{cite web | title=Democracy Report 2026, Unraveling The Democratic Era? | url=https://v-dem.net/documents/75/V-Dem_Institute_Democracy_Report_2026_lowres.pdf | access-date=2026-03-17}}</ref> ===Elections=== {{Main|Elections in the United Kingdom}} [[File:Houses of Parliament in 2022 (cropped).jpg|thumb|upright=1.25|alt=Large sand-coloured building of Gothic design beside brown river. The building has several large towers, including large clock tower.|The [[Palace of Westminster]] in London is the seat of both houses of the Parliament of the United Kingdom.]] For [[General elections in the United Kingdom|general elections]] (elections to the House of Commons), the United Kingdom is divided into 650 [[United Kingdom constituencies|constituencies]], each of which is represented by one [[Member of Parliament (United Kingdom)|member of Parliament]] (MP) elected by the [[First-past-the-post voting|first-past-the-post]] system.<ref name="parliament.uk-2">{{Cite web |title=General elections |url=https://www.parliament.uk/about/how/elections-and-voting/general |access-date=19 July 2021 |website=[[parliament.uk]]}}</ref> MPs hold office for up to five years and must then stand for re-election if they wish to continue to be an MP.<ref name="parliament.uk-2" /> The [[Conservative Party (UK)|Conservative Party]], colloquially known as the Tory Party or the Tories, and the [[Labour Party (UK)|Labour Party]] have been the dominant political parties in the country since the 1920s, leading to the UK being described as a [[two-party system]]. However, since the 1920s other [[List of political parties in the United Kingdom|political parties]] have won seats in the House of Commons, although never more than the Conservatives or Labour.<ref>{{Cite web |last=Raymond |first=C |date=2016 |title=Why British Politics is Not a Two-Party System |url=https://pureadmin.qub.ac.uk/ws/portalfiles/portal/107735631/The_United_Kingdom_is_Not_a_Two_Party_System.pdf |website=Queen's University Belfast |access-date=3 July 2023 |archive-date=9 July 2023 |archive-url=https://web.archive.org/web/20230709172832/https://pureadmin.qub.ac.uk/ws/portalfiles/portal/107735631/The_United_Kingdom_is_Not_a_Two_Party_System.pdf |url-status=live}}</ref> The 2020s marked the erosion of the two-party system and the growth of a multi-party system.<ref>{{Cite web |date=2026-05-08 |title=Sir John Curtice: Election results show politics in the UK has fragmented |url=https://www.bbc.com/news/articles/ce8p4yn448vo |access-date=2026-05-09 |website=[[BBC News]] |language=en-GB}}</ref> === Administrative divisions === {{Main|Countries of the United Kingdom|Administrative geography of the United Kingdom|List of counties in the United Kingdom}} [[File:United Kingdom labelled map7 vector.svg|thumb|upright=0.8|The four countries of the United Kingdom]] The geographical division of the United Kingdom into counties or [[shire]]s began in England and Scotland in the [[early Middle Ages]], and was completed throughout Great Britain and Ireland by the [[early modern period]].<ref>Hackwood Frederick William: ''The Story of the Shire, Being the Lore, History and Evolution of English County Institutions'' (1851)</ref> Modern [[local government]] by elected councils, partly based on the ancient counties, was established by separate Acts of Parliament: in England and Wales [[Local Government Act 1888|in 1888]], Scotland [[Local Government (Scotland) Act 1889|in 1889]] and Ireland [[Local Government (Ireland) Act 1898|in 1898]], meaning there is no consistent system of administrative or geographic demarcation across the UK,<ref>{{Cite web |last=United Nations Economic and Social Council |author-link=United Nations Economic and Social Council |date=August 2007 |title=Ninth UN Conference on the standardization of Geographical Names |url=http://unstats.un.org/unsd/geoinfo/UNGEGN/docs/9th-uncsgn-docs/report%20of%209th%20uncsgn%20n0750902%20en.pdf |url-status=live |archive-url=https://web.archive.org/web/20091211213055/http://unstats.un.org/unsd/geoinfo/9th-UNCSGN-Docs/E-CONF-98-48-Add1.pdf |archive-date=11 December 2009 |access-date=21 October 2008 |publisher=UN Statistics Division}}</ref> and [[English law|England and Wales]], [[Scots law|Scotland]] and [[Law of Northern Ireland|Northern Ireland]] each have their own distinct jurisdictions.<ref>{{Cite book |last1=Dewart |first1=Megan |url=https://books.google.com/books?id=XW_EtwEACAAJ |title=The Scottish Legal System |date=2019 |publisher=[[Bloomsbury Academic]] |isbn=978-1-5265-0633-7 |location=London |page=57 |quote=The laws and legal institutions of Scotland and of England and Wales were not merged by the Union of 1707. Thus, they remain separate 'law areas', with separate court systems (as does Northern Ireland), and it is necessary to distinguish Scots law and English law (and Northern Irish law). |access-date=4 July 2023 |archive-url=https://web.archive.org/web/20230704040048/https://books.google.com/books?id=XW_EtwEACAAJ |archive-date=4 July 2023 |url-status=live}}; {{Cite web |title=The justice system and the constitution |url=https://www.judiciary.uk/about-the-judiciary/our-justice-system/jud-acc-ind/justice-sys-and-constitution/#:~:text=The%20United%20Kingdom%20has%20three,of%20Union%201707%20and%201800. |archive-url=https://web.archive.org/web/20230521180341/https://www.judiciary.uk/about-the-judiciary/our-justice-system/jud-acc-ind/justice-sys-and-constitution/ |archive-date=21 May 2023 |access-date=13 June 2023 |publisher=Courts and Tribunals Judiciary |quote=The United Kingdom has three separate legal systems; one each for England and Wales, Scotland and Northern Ireland. This reflects its historical origins and the fact that both Scotland and Ireland, and later Northern Ireland, retained their own legal systems and traditions under the Acts of Union 1707 and 1800.}}</ref> Until the 19th century there was little change to those arrangements, but there has since been a constant evolution of role and function.<ref>{{Cite book |last=Barlow |first=I.M. |title=Metropolitan Government |publisher=Routledge |year=1991 |isbn=978-0-415-02099-2 |location=London}}</ref> [[Local government in England]] is complex, with the distribution of functions varying according to local arrangements. The upper-tier [[subdivisions of England]] are the nine [[Regions of England|regions]], used primarily for statistical purposes.<ref>{{Cite web |title=Welcome to the national site of the Government Office Network |url=http://www.gos.gov.uk/national |archive-url=https://web.archive.org/web/20090606073647/http://www.gos.gov.uk/national |archive-date=6 June 2009 |access-date=3 July 2008 |publisher=Government Offices}}</ref> One of the regions, [[Greater London Authority|Greater London]], has had a directly elected assembly and mayor since 2000 following popular support for the proposal in a [[1998 Greater London Authority referendum|1998 referendum]].<ref>{{Cite web |title=A short history of London government |url=http://www.london.gov.uk/london-life/city-government/history.jsp |archive-url=https://web.archive.org/web/20080421023053/http://www.london.gov.uk/london-life/city-government/history.jsp |archive-date=21 April 2008 |access-date=4 October 2008 |publisher=Greater London Authority}}</ref> [[Local government in Scotland]] is divided into [[subdivisions of Scotland|32 council areas]] with a wide variation in size and population. The cities of [[Glasgow]], Edinburgh, [[Aberdeen]] and [[Dundee]] are separate council areas, as is the [[Politics of the Highland council area|Highland Council]], which includes a third of Scotland's area but only just over 200,000&nbsp;people. Local councils are made up of elected councillors, of whom there are 1,223.<ref name="political-studies-association">{{Cite web |title=STV in Scotland: Local Government Elections 2007 |url=http://www.psa.ac.uk/2007/pps/Bennie.pdf |archive-url=https://web.archive.org/web/20110222124635/http://www.psa.ac.uk/2007/pps/Bennie.pdf |archive-date=22 February 2011 |access-date=2 August 2008 |publisher=Political Studies Association}}</ref> [[Local government in Wales]] consists of 22 [[Unitary authority|unitary authorities]], each led by a leader and cabinet elected by the council itself. These include the cities of Cardiff, [[Swansea]] and [[Newport, Wales|Newport]], which are unitary authorities in their own right.<ref name="unitary">{{Cite web |year=2014 |title=Unitary authorities |url=http://gov.wales/topics/localgovernment/local-authorities/?lang=en |archive-url=https://web.archive.org/web/20150310210146/http://gov.wales/topics/localgovernment/local-authorities/?lang=en |archive-date=10 March 2015 |access-date=9 March 2015 |publisher=Welsh Government}}</ref> Elections are held every four years under the first-past-the-post system.<ref name="unitary" /> [[Local government in Northern Ireland]] since 2015 has been organised into 11 district councils, each elected by single transferable vote. Their powers are limited to services such as waste collection, dog control, and maintaining parks and cemeteries.<ref name="Devenport">{{Cite news |last=Devenport |first=Mark |date=18 November 2005 |title=NI local government set for shake-up |work=BBC News |url=http://news.bbc.co.uk/1/hi/northern_ireland/4449092.stm |access-date=15 November 2008 |archive-date=12 December 2008 |archive-url=https://web.archive.org/web/20081212221731/http://news.bbc.co.uk/1/hi/northern_ireland/4449092.stm |url-status=live}}</ref> This system was introduced after a 2008 decision by the executive to replace the previous structure of 26 districts which had been in place since 1973.<ref>{{Cite press release |title=Foster announces the future shape of local government |date=13 March 2008 |publisher=Northern Ireland Executive |url=http://www.northernireland.gov.uk/news/news-doe/news-doe-130308-foster-announces-the.htm |access-date=20 October 2008 |archive-url=https://web.archive.org/web/20080725002254/http://www.northernireland.gov.uk/news/news-doe/news-doe-130308-foster-announces-the.htm |archive-date=25 July 2008}}</ref> === Devolution === {{Main|Devolution in the United Kingdom}} {{further|Devolved, reserved and excepted matters}} [[File:Council of Nations and Regions (54059219744) (cropped).jpg|thumb|right|Prime Minister Keir Starmer meets with the first ministers of Scotland, Northern Ireland and Wales during the [[Council of Nations and Regions]] summit.]] In the United Kingdom a process of devolution has transferred various powers from the UK Government to three of the four UK countries—Scotland, Northern Ireland and Wales—as well as to the regions of England, which since 1999 have their own governments and parliaments that control various devolved matters.<ref>{{Cite web |title=Devolution of powers to Scotland, Wales and Northern Ireland |url=https://www.gov.uk/devolution-of-powers-to-scotland-wales-and-northern-ireland#devolved-administrations |url-status=live |archive-url=https://web.archive.org/web/20130718065448/https://www.gov.uk/devolution-of-powers-to-scotland-wales-and-northern-ireland#devolved-administrations |archive-date=18 July 2013 |access-date=17 April 2013 |publisher=United Kingdom Government |quote=In a similar way to how the government is formed from members from the two Houses of Parliament, members of the devolved legislatures nominate ministers from amongst themselves to comprise executives, known as the devolved administrations...}}; {{Cite web |title=Country Overviews: United Kingdom |url=http://www.transport-research.info/web/countryprofiles/uk.cfm |archive-url=https://web.archive.org/web/20100404062853/http://www.transport-research.info/web/countryprofiles/uk.cfm |archive-date=4 April 2010 |access-date=28 March 2010 |url-status=usurped |publisher=Transport Research Knowledge Centre}}</ref> These powers vary and have been moved to the [[Scottish Government]], the [[Welsh Government]], the [[Northern Ireland Executive]] and (in England) to [[strategic authorities]]: the [[Greater London Authority]], [[Combined authorities and combined county authorities|combined authorities, and combined county authorities]].<ref>{{cite book |last1=Le Sueur |first1=Andrew |last2=Sunkin |first2=Maurice |last3=Murkens |first3=Jo Eric Khushal |title=Public Law: Text, Cases, and Materials |year=2023 |edition=5th |isbn=978-0-19-287061-2 |publisher=Oxford University Press |page=147 |url=https://books.google.com/books?id=6sLDEAAAQBAJ&dq=Le+sueur+Public+Law%C2%A0fifth+edition&pg=PR3 |access-date=13 April 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002213048/https://books.google.com/books?id=6sLDEAAAQBAJ&dq=Le+sueur+Public+Law%C2%A0fifth+edition&pg=PR3#v=onepage&q=Le%20sueur%20Public%20Law%C2%A0fifth%20edition&f=false |url-status=live}}</ref> Amongst the devolved parliaments across the United Kingdom, the [[Scottish Parliament]] has the most extensive responsibilities for [[Devolved, reserved and excepted matters|devolved powers]], and has been described as "one of the most powerful devolved parliaments in the world".<ref>{{cite web |title=The progress of devolution - Erskine May - UK Parliament |url=https://erskinemay.parliament.uk/section/4537/the-progress-of-devolution |website=erskinemay.parliament.uk |access-date=1 March 2025}}</ref><ref>{{cite web |title=David Mundell speech: 20 years of Scottish devolution |url=https://www.gov.uk/government/news/david-mundell-speech-20-years-of-scottish-devolution |website=GOV.UK |access-date=1 March 2025}}</ref> The United Kingdom has an [[uncodified constitution]] and constitutional matters are not amongst the powers that have been devolved. Under the doctrine of [[Parliamentary sovereignty in the United Kingdom|parliamentary sovereignty]], the UK Parliament could, in theory, therefore, abolish the Scottish Parliament, Senedd or Northern Ireland Assembly.<ref>{{Cite journal |last=Burrows |first=N. |year=1999 |title=Unfinished Business: The Scotland Act 1998 |journal=The Modern Law Review |volume=62 |issue=2 |pages=241–260 [p. 249] |doi=10.1111/1468-2230.00203 |quote=The UK Parliament is sovereign and the Scottish Parliament is subordinate. The White Paper had indicated that this was to be the approach taken in the legislation. The Scottish Parliament is not to be seen as a reflection of the settled will of the people of Scotland or of popular sovereignty but as a reflection of its subordination to a higher legal authority. Following the logic of this argument, the power of the Scottish Parliament to legislate can be withdrawn or overridden...}}; {{Cite journal |last=Elliot |first=M. |year=2004 |title=United Kingdom: Parliamentary sovereignty under pressure |journal=International Journal of Constitutional Law |volume=2 |issue=3 |pages=545–627, 553–554 |doi=10.1093/icon/2.3.545 |quote=Notwithstanding substantial differences among the schemes, an important common factor is that the UK Parliament has not renounced legislative sovereignty in relation to the three nations concerned. For example, the Scottish Parliament is empowered to enact primary legislation on all matters, save those in relation to which competence is explicitly denied&nbsp;... but this power to legislate on what may be termed "devolved matters" is concurrent with the Westminster Parliament's general power to legislate for Scotland on any matter at all, including devolved matters&nbsp;... In theory, therefore, Westminster may legislate on Scottish devolved matters whenever it chooses... |doi-access=free}}</ref> Though in the [[Scotland Act 2016]] and the [[Wales Act 2017]] it states that the Scottish Government and the Welsh Government "are a permanent part of the United Kingdom's constitutional arrangements".<ref>{{cite web |title=Scotland Act 2016 |url=https://www.legislation.gov.uk/ukpga/2016/11/part/1/crossheading/the-scottish-parliament-and-the-scottish-government#:~:text=(1)The%20Scottish%20Parliament%20and,the%20United%20Kingdom's%20constitutional%20arrangements. |website=Gov.uk |access-date=28 June 2024 |archive-date=28 June 2024 |archive-url=https://web.archive.org/web/20240628211304/https://www.legislation.gov.uk/ukpga/2016/11/part/1/crossheading/the-scottish-parliament-and-the-scottish-government#:~:text=(1)The%20Scottish%20Parliament%20and,the%20United%20Kingdom's%20constitutional%20arrangements. |url-status=live}}</ref><ref>{{cite web |title=Wales Act 2017 |url=https://www.legislation.gov.uk/ukpga/2017/4/section/1/enacted |access-date=13 July 2024 |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212916/https://www.legislation.gov.uk/ukpga/2017/4/section/1/enacted |url-status=live}}</ref> In practice it would be politically difficult for the UK Parliament to abolish devolution to the Scottish Parliament and the Senedd because these institutions were created by referendums.<ref>{{Cite journal |last=Gamble |first=A. |year=2006 |title=The Constitutional Revolution in the United Kingdom |journal=Publius |volume=36 |issue=1 |pages=19–35 [p. 29] |doi=10.1093/publius/pjj011 |quote=The British parliament has the power to abolish the Scottish parliament and the Welsh assembly by a simple majority vote in both houses, but since both were sanctioned by referenda, it would be politically difficult to abolish them without the sanction of a further vote by the people. In this way, several of the constitutional measures introduced by the Blair government appear to be entrenched and not subject to a simple exercise of parliamentary sovereignty at Westminster.}}</ref> The political constraints placed upon the UK Parliament's power to interfere with devolution in Northern Ireland are greater still, because devolution in Northern Ireland rests upon an international agreement with the [[Government of Ireland]].<ref>{{Cite journal |last=Meehan |first=E. |year=1999 |title=The Belfast Agreement – Its Distinctiveness and Points of Cross-Fertilization in the UK's Devolution Programme |journal=Parliamentary Affairs |volume=52 |issue=1 |pages=19–31 [p. 23] |doi=10.1093/pa/52.1.19 |quote=[T]he distinctive involvement of two governments in the Northern Irish problem means that Northern Ireland's new arrangements rest upon an intergovernmental agreement. If this can be equated with a treaty, it could be argued that the forthcoming distribution of power between Westminster and Belfast has similarities with divisions specified in the written constitutions of federal states...Although the Agreement makes the general proviso that Westminster's 'powers to make legislation for Northern Ireland' remains 'unaffected', without an explicit categorical reference to reserved matters, it may be more difficult than in Scotland or Wales for devolved powers to be repatriated. The retraction of devolved powers would not merely entail consultation in Northern Ireland backed implicitly by the absolute power of parliamentary sovereignty but also the renegotiation of an intergovernmental agreement. |doi-access=free}}</ref> The UK Parliament restricts the three devolved parliaments' legislative powers in economic policy matters through [[United Kingdom Internal Market Act 2020|an act]] passed in 2020.<ref name="UKIM" /> ==== England ==== Unlike Scotland, Northern Ireland and Wales, England does not have a separate devolved government or national parliament,<ref>{{cite web |title=English devolution |url=https://www.instituteforgovernment.org.uk/explainer/english-devolution#:~:text=After%201997%20Labour%20governments%20devolved,assembly%20were%20created%20in%202000. |publisher=Institute for Government |access-date=30 August 2024 |date=21 June 2024 |archive-date=30 August 2024 |archive-url=https://web.archive.org/web/20240830150949/https://www.instituteforgovernment.org.uk/explainer/english-devolution#:~:text=After%201997%20Labour%20governments%20devolved,assembly%20were%20created%20in%202000. |url-status=live}}</ref> rather a process of devolution of powers from the central government to local authorities has taken place, first in 1998.<ref>{{cite web |title=Devolution explained |url=https://www.local.gov.uk/topics/devolution/devolution-hub/devolution-explained |publisher=Local Government Association |access-date=30 August 2024 |archive-date=30 August 2024 |archive-url=https://web.archive.org/web/20240830152450/https://www.local.gov.uk/topics/devolution/devolution-hub/devolution-explained |url-status=live}}</ref> The [[Greater London Authority]] was set up following a [[1998 Greater London Authority referendum|referendum in 1998]]. Colloquially known as City Hall, it is the devolved regional government body for Greater London. It consists of two political branches: a directly elected [[Mayor of London]] and the [[London Assembly]], which serves as a check and balance on the Mayor. A [[Combined authorities and combined county authorities|combined authority]] is a type of local government institution introduced in England outside Greater London by the [[Local Democracy, Economic Development and Construction Act 2009]]. CAs allow a group of local authorities to pool appropriate responsibility and receive certain devolved functions from central government in order to deliver transport and economic policy more effectively over a wider area.<ref>{{Cite web |date=6 March 2023 |title=English devolution |url=https://www.instituteforgovernment.org.uk/explainer/english-devolution |access-date=4 February 2024 |publisher=Institute for Government |archive-date=2 October 2024 |archive-url=https://web.archive.org/web/20241002212917/https://www.instituteforgovernment.org.uk/explainer/english-devolution |url-status=live}}</ref> A combined county authority is a similar type of local-government institution introduced in England outside Greater London by the [[Levelling-up and Regeneration Act 2023]], but may only be formed by upper-tier authorities: [[county council]]s and [[Unitary authority|unitary authorities]].<ref>{{Cite web |date=6 April 2023 |title=Combined County Authorities – key differences to Combined Authorities |url=https://www.localgovernmentlawyer.co.uk/governance/314-governance-a-risk-articles/53464-combined-county-authorities-key-differences-to-combined-authorities |access-date=4 February 2024 |website=Local Government Lawyer |archive-date=4 February 2024 |archive-url=https://web.archive.org/web/20240204170903/https://www.localgovernmentlawyer.co.uk/governance/314-governance-a-risk-articles/53464-combined-county-authorities-key-differences-to-combined-authorities |url-status=live}}</ref> ==== Scotland ==== {{main|Responsibilities of the Scottish Government}} [[File:First Minister meets Prime Minister (53840421342).jpg|thumb|Prime Minister Keir Starmer meets with [[First Minister of Scotland]] [[John Swinney]], the head of the [[Scottish Government]], at [[Bute House]], Edinburgh.]] Since 1999 Scotland has had a devolved national government and parliament with wide-ranging powers over any matter that has not been specifically [[Reserved and excepted matters|reserved]] to the UK Parliament.<ref name="Scottish Parliament">{{cite web |title=Devolved and Reserved Powers |url=https://www.parliament.scot/about/how-parliament-works/devolved-and-reserved-powers |website=parliament.scot |publisher=Scottish Parliament |access-date=28 December 2023 |archive-date=20 September 2023 |archive-url=https://web.archive.org/web/20230920053732/https://www.parliament.scot/about/how-parliament-works/devolved-and-reserved-powers |url-status=live}}</ref><ref>{{Cite news |date=8 April 1999 |title=Scotland's Parliament&nbsp;– powers and structures |work=BBC News |url=http://news.bbc.co.uk/1/hi/events/scotland_99/the_scottish_parliament/310036.stm |access-date=21 October 2008 |archive-date=18 February 2007 |archive-url=https://web.archive.org/web/20070218234816/http://news.bbc.co.uk/1/hi/events/scotland_99/the_scottish_parliament/310036.stm |url-status=live}}</ref> Scotland has the most devolved powers of any of the three devolved parliaments in the United Kingdom, with full legislative control over [[Education in Scotland|education]], [[Scots law|law and order]], [[Economy of Scotland|the economy]], [[Health in Scotland|healthcare]], [[Elections in Scotland|elections]], [[Crown Estate Scotland]], the [[Planning system in Scotland|planning system]] and [[Housing in Scotland|housing]].<ref>{{cite web |title=Devolved and Reserved Matters - Visit & Learn Scottish Parliament |url=http://www.parliament.scot/visitandlearn/Education/18642.aspx |archive-url=https://web.archive.org/web/20170722092046/http://www.parliament.scot/visitandlearn/Education/18642.aspx |url-status=dead |archive-date=22 July 2017 |access-date=1 March 2025 |date=22 July 2017}}</ref> Additional powers were transferred to the Scottish Parliament via the [[Scotland Act 2012]] and the [[Scotland Act 2016]], such as [[Taxation in Scotland|some taxation powers]], including full control of [[Income tax in Scotland|income tax]] on income earned through employment, [[Land and Buildings Transaction Tax]], [[Scottish Landfill Tax|Landfill Tax]], Aggregates Levy, [[Air Departure Tax]] and [[Revenue Scotland]], as well as aspects of the [[Energy in Scotland|energy network]], including [[Renewable energy in Scotland|renewable energy]], energy efficiency and onshore [[Oil industry in Scotland|oil and gas licensing]].<ref name="Devolved Matters in Scotland">{{cite web |url=https://www.gov.scot/about/what-the-government-does/ |title=What the Scottish Government does |publisher=Scottish Government |access-date=8 August 2019 |archive-date=8 July 2019 |archive-url=https://web.archive.org/web/20190708045359/https://www.gov.scot/about/what-the-government-does/ |url-status=live}}</ref><ref name="Scottish Parliament" /> Their power over economic issues is significantly constrained by an [[United Kingdom Internal Market Act 2020|act of the UK Parliament]] passed in 2020.{{refn|name=UKIM|<ref name="Keating21">{{Cite journal |last=Keating |first=Michael |date=2 February 2021 |title=Taking back control? Brexit and the territorial constitution of the United Kingdom |journal=[[Journal of European Public Policy]] |location=Abingdon |publisher=[[Taylor & Francis]] |volume=28 |issue=4 |pages=6–7 |doi=10.1080/13501763.2021.1876156 |quote=The UK Internal Market Act gives ministers sweeping powers to enforce mutual recognition and non-discrimination across the four jurisdictions. Existing differences and some social and health matters are exempted but these are much less extensive than the exemptions permitted under the EU Internal Market provisions. Only after an amendment in the House of Lords, the Bill was amended to provide a weak and non-binding consent mechanism for amendments (equivalent to the Sewel Convention) to the list of exemptions. The result is that, while the devolved governments retain regulatory competences, these are undermined by the fact that goods and services originating in, or imported into, England can be marketed anywhere. |hdl-access=free |hdl=1814/70296 |s2cid=234066376}}</ref><ref name="KenMcEw21">{{Cite journal |last1=Kenny |first1=Michael |author-link=Michael Kenny (political scientist) |last2=McEwen |first2=Nicola |author-link2=Nicola McEwen |date=1 March 2021 |title=Intergovernmental Relations and the Crisis of the Union |journal=Political Insight |publisher=[[SAGE Publishing]] |volume=12 |issue=1 |pages=12–15 |doi=10.1177/20419058211000996 |quote=That phase of joint working was significantly damaged by the UK Internal Market Act, pushed through by the Johnson government in December 2020...the Act diminishes the authority of the devolved institutions, and was vehemently opposed by them. |doi-access=free |s2cid=232050477}}</ref><ref name="WolffeDevol">{{Cite journal |last=Wolffe |first=W James |author-link=James Wolffe |date=7 April 2021 |title=Devolution and the Statute Book |url=https://academic.oup.com/slr/advance-article/doi/10.1093/slr/hmab003/6213886 |journal=[[Statute Law Review]] |location=Oxford |publisher=[[Oxford University Press]] |doi=10.1093/slr/hmab003 |access-date=18 April 2021 |quote=the Internal Market Bill—a Bill that contains provisions which, if enacted, would significantly constrain, both legally and as a matter of practicality, the exercise by the devolved legislatures of their legislative competence; provisions that would be significantly more restrictive of the powers of the Scottish Parliament than either EU law or Articles 4 and 6 of the Acts of the Union...The UK Parliament passed the European Union (Withdrawal Agreement) Act 2020 and the Internal Market Act 2020 notwithstanding that, in each case, all three of the devolved legislatures had withheld consent. |archive-date=21 April 2021 |archive-url=https://web.archive.org/web/20210421145355/https://academic.oup.com/slr/advance-article/doi/10.1093/slr/hmab003/6213886 |url-status=live |url-access=subscription}}</ref><ref name="Wincott21">{{Cite journal |last1=Wincott |first1=Daniel |author-link=Daniel Wincott |last2=Murray |first2=C. R. G. |last3=Davies |first3=Gregory |date=17 May 2021 |title=The Anglo-British imaginary and the rebuilding of the UK's territorial constitution after Brexit: unitary state or union state? |journal=Territory, Politics, Governance |location=Abingdon/Brighton |publisher=[[Taylor & Francis]]; [[Regional Studies Association]] |volume=10 |issue=5 |pages=696–713 |doi=10.1080/21622671.2021.1921613 |quote=Taken as a whole, the Internal Market Act imposes greater restrictions upon the competences of the devolved institutions than the provisions of the EU Single Market which it replaced, in spite of pledges to use common frameworks to address these issues. [[David Hope, Baron Hope of Craighead|Lord Hope]], responsible for many of the leading judgments relating to the first two decades of devolution, regarded the legislation's terms as deliberately confrontational: 'this Parliament can do what it likes, but a different approach is essential if the union is to hold together'. |doi-access=free}}</ref><ref name="DouganMcEwen20">{{Cite report |url=https://www.centreonconstitutionalchange.ac.uk/publications/uk-and-internal-market-devolution-and-union |title=UK and the Internal Market, Devolution and the Union |last1=Dougan |first1=Michael |last2=Hayward |first2=Katy |date=2020 |publisher=[[University of Edinburgh]]; [[University of Aberdeen]] |pages=2–3 |last3=Hunt |first3=Jo |last4=McEwen |first4=Nicola |last5=McHarg |first5=Aileen |last6=Wincott |first6=Daniel |author-link=Michael Dougan |author-link2=Katy Hayward |access-date=16 October 2020 |author-link4=Nicola McEwen |author-link6=Daniel Wincott |department=Centre on Constitutional Change |archive-date=18 October 2020 |archive-url=https://web.archive.org/web/20201018185830/https://www.centreonconstitutionalchange.ac.uk/publications/uk-and-internal-market-devolution-and-union |url-status=live}}</ref><ref name="Dougan20Brief">{{Cite report |url=https://www.liverpool.ac.uk/media/livacuk/law/2-research/eull/UKIM,Briefing,Paper,-,Prof,Michael,Dougan,15,September,2020.pdf |title=Briefing Paper. United Kingdom Internal Market Bill: Implications for Devolution |last=Dougan |first=Michael |date=2020 |publisher=[[University of Liverpool]] |location=Liverpool |pages=4–5 |author-link=Michael Dougan |access-date=15 October 2020 |archive-date=26 October 2020 |archive-url=https://web.archive.org/web/20201026161836/https://www.liverpool.ac.uk/media/livacuk/law/2-research/eull/UKIM,Briefing,Paper,-,Prof,Michael,Dougan,15,September,2020.pdf |url-status=live}}</ref><ref name="DouHu22">{{cite journal |last1=Dougan |first1=Michael |last2=Hunt |first2=Jo |last3=McEwen |first3=Nicola |last4=McHarg |first4=Aileen |author-link1=Michael Dougan |author-link3=Nicola McEwen |title=Sleeping with an Elephant: Devolution and the United Kingdom Internal Market Act 2020 |journal=[[Law Quarterly Review]] |date=2022 |url=https://dro.dur.ac.uk/35167/ |location=London |publisher=[[Sweet & Maxwell]] |ssrn=4018581 |via=[[Durham University|Durham Research Online]] |access-date=4 March 2022 |quote=The Act has restrictive – and potentially damaging – consequences for the regulatory capacity of the devolved legislatures...This was not the first time since the Brexit referendum that the Convention had been set aside, but it was especially notable given that the primary purpose of the legislation was to constrain the capacity of the devolved institutions to use their regulatory autonomy...in practice, it constrains the ability of the devolved institutions to make effective regulatory choices for their territories in ways that do not apply to the choices made by the UK government and parliament for the English market. |issn=0023-933X |archive-date=2 August 2022 |archive-url=https://web.archive.org/web/20220802185022/https://dro.dur.ac.uk/35167/ |url-status=live}}</ref>}} The [[Scottish Government]] is a [[Scottish National Party]] (SNP) [[minority government]],<ref>{{cite web |title=Humza Yousaf's precarious position puts the SNP – and Scotland – at a crossroads |url=https://www.instituteforgovernment.org.uk/comment/humza-yousaf-snp-scotland-crossroads |website=Institute for Government |access-date=26 April 2024 |date=26 April 2024 |archive-date=26 April 2024 |archive-url=https://web.archive.org/web/20240426221203/https://www.instituteforgovernment.org.uk/comment/humza-yousaf-snp-scotland-crossroads |url-status=live}}</ref> led by the [[First Minister of Scotland|first minister]], currently [[John Swinney]], the [[leader of the SNP]]. In 2014 the [[2014 Scottish independence referendum|Scottish independence referendum]] was held, with 55.3 per cent voting against independence from the United Kingdom and 44.7 per cent voting in favour, resulting in Scotland staying within the United Kingdom. [[Local government in Scotland]] is divided into [[subdivisions of Scotland|32 council areas]] with a wide variation in size and population. Local councils are made up of elected councillors, of whom there are 1,223.<ref name="political-studies-association" /> The Scottish Parliament is separate from the Scottish Government. It is made up of 129 elected [[members of the Scottish Parliament]] (MSPs). It is the law-making body of Scotland, and thus it scrutinises the work of the incumbent Scottish Government and considers any piece of proposed legislation through parliamentary debates, committees and parliamentary questions.<ref name="Devolved Matters in Scotland"/> ==== Wales ==== Since 1999 Wales has had a devolved national government and legislature, known as the [[Senedd]]. Elections to the Senedd used the [[additional member system]] until 2026 when the voting system was changed to [[closed list]] proportional representation. The number of elected members also increased from 60 to 96, representing 16 [[Senedd constituencies|six-member constituencies]]. The Senedd has more limited powers than those devolved to Scotland.<ref>{{Cite news |date=9 April 1999 |title=Structure and powers of the Assembly |work=BBC News |url=http://news.bbc.co.uk/1/hi/events/wales_99/the_welsh_assembly/309033.stm |access-date=21 October 2008 |archive-date=7 February 2004 |archive-url=https://web.archive.org/web/20040207162926/http://news.bbc.co.uk/1/hi/events/wales_99/the_welsh_assembly/309033.stm |url-status=live}}</ref> It can legislate on any matter not specifically reserved to the UK Parliament by [[Acts of Senedd Cymru]]. The [[Welsh Government]] is currently a [[Plaid Cymru]] minority government led by the [[First Minister of Wales|first minister]], [[Rhun ap Iorwerth]]. [[Local government in Wales]] consists of 22 unitary authorities, each led by a leader and cabinet elected by the council itself. ==== Northern Ireland ==== The devolved form of government in Northern Ireland is based on the 1998 [[Good Friday Agreement]], which brought to an end a 30-year period of [[Unionism in Ireland|unionist]]-[[Irish nationalism|nationalist]] communal conflict known as [[the Troubles]]. The Agreement was [[1998 Northern Ireland Good Friday Agreement referendum|confirmed by referendum]] and implemented later that year. It established [[power sharing]] arrangements for a devolved government and legislature, referred to as the [[Northern Ireland Executive]] and the [[Northern Ireland Assembly]] respectively.<ref>{{cite web |title=Good Friday Agreement: What is it? |url=https://www.bbc.co.uk/news/uk-northern-ireland-61968177 |website=BBC News |date=3 April 2023 |access-date=11 April 2024 |archive-date=15 May 2024 |archive-url=https://web.archive.org/web/20240515131233/https://www.bbc.co.uk/news/uk-northern-ireland-61968177 |url-status=live}}</ref> Elections to the Assembly use the [[single transferable vote]] system. The Executive and Assembly have powers similar to those devolved to Scotland.<ref>{{Cite web |date=8 May 2019 |title=Devolution of powers to Scotland, Wales and Northern Ireland |url=https://www.gov.uk/guidance/devolution-of-powers-to-scotland-wales-and-northern-ireland |access-date=11 June 2024 |website=GOV.UK |archive-date=7 March 2023 |archive-url=https://web.archive.org/web/20230307093336/https://www.gov.uk/guidance/devolution-of-powers-to-scotland-wales-and-northern-ireland |url-status=live}}</ref> The Executive is led by a [[diarchy]] representing [[Designated Unionist|unionist]] and [[Designated Nationalist|nationalist]] members of the Assembly.<ref name="northernireland1">{{Cite web |date=25 September 2015 |title=Your Executive |url=https://www.northernireland.gov.uk/topics/your-executive |publisher=Northern Ireland Executive |access-date=14 August 2016 |archive-date=21 August 2016 |archive-url=https://web.archive.org/web/20160821135048/https://www.northernireland.gov.uk/topics/your-executive |url-status=live}}</ref> The [[First Minister and Deputy First Minister of Northern Ireland|first minister and deputy first minister of Northern Ireland]] are the joint heads of government of Northern Ireland.<ref>{{Cite news |title=Stormont: Why were NI leaders given unequal job titles? |work=BBC News |date=15 May 2022 |url=https://www.bbc.co.uk/news/uk-northern-ireland-61393736 |access-date=2 February 2024 |archive-url=https://web.archive.org/web/20240202190001/https://www.bbc.com/news/uk-northern-ireland-61393736 |archive-date=2 February 2024}}</ref><ref>{{Cite web |title=Northern Ireland Executive: Ministerial Code |date=28 September 2015 |url=https://www.northernireland.gov.uk/topics/your-executive/ministerial-code |access-date=2 February 2024 |archive-url=https://web.archive.org/web/20240202191115/https://www.northernireland.gov.uk/topics/your-executive/ministerial-code |archive-date=2 February 2024}}</ref> [[Local government in Northern Ireland]] since 2015 has been divided between 11 councils with limited responsibilities.<ref name="Devenport" /> === Foreign relations === {{Main|Foreign relations of the United Kingdom}} [[File:Trump-Starmer bilateral 2025-02-27-16-07.jpg|thumb|right|UK prime minister Keir Starmer and US president [[Donald Trump]] shaking hands in a joint press conference in 2025. The UK and the US share a "[[Special Relationship]]".]] The United Kingdom is [[Big Five (United Nations)|a permanent member]] of the [[United Nations Security Council]] and a member of [[NATO]], [[AUKUS]], the Commonwealth of Nations, the [[G7]], the [[G-20 major economies|G20]], the [[Organisation for Economic Co-operation and Development|OECD]], the [[World Trade Organization|WTO]], the [[Council of Europe]] and the [[Organization for Security and Co-operation in Europe|OSCE]].<ref>{{Cite web |last=May |first=Theresa |author-link=Theresa May |date=29 March 2017 |title=Prime Minister's letter to Donald Tusk triggering Article 50 |url=https://www.gov.uk/government/publications/prime-ministers-letter-to-donald-tusk-triggering-article-50/prime-ministers-letter-to-donald-tusk-triggering-article-50 |via=Gov.uk |access-date=19 June 2017 |archive-date=5 June 2017 |archive-url=https://web.archive.org/web/20170605184239/https://www.gov.uk/government/publications/prime-ministers-letter-to-donald-tusk-triggering-article-50/prime-ministers-letter-to-donald-tusk-triggering-article-50 |url-status=live}}</ref> It maintains the [[British Council]], an organisation specialising in international cultural and educational opportunities in over 100 countries. The UK remains a [[great power]] with considerable political, cultural, economic and military influence.<ref name="PaulWirtz2004">{{cite book |last1=Paul |first1=T.V. |url=https://books.google.com/books?id=9jy28vBqscQC&pg=PA59 |title=Balance of Power: Theory and Practice in the 21st century |last2=Wirtz |first2=James |last3=Fortmann |first3=Michel |date=2004 |publisher=Stanford University Press |isbn=978-0-8047-5017-2 |page=59}}</ref><ref>{{Cite news |date=10 May 2012 |title=United Kingdom country profile |url=https://www.bbc.com/news/world-europe-18023389 |access-date=6 July 2025 |work=BBC News |language=en-GB |archive-date=3 January 2023 |archive-url=https://web.archive.org/web/20230103160059/https://www.bbc.com/news/world-europe-18023389 |url-status=live }}</ref> The United Kingdom is said to have a "[[Special Relationship]]" with the United States and a close partnership with France – the "[[Entente cordiale]]" – and shares nuclear weapons technology with both countries;<ref>{{Cite web |last=Swaine |first=Jon |date=13 January 2009 |title=Barack Obama presidency will strengthen special relationship, says Gordon Brown |url=https://www.telegraph.co.uk/news/worldnews/barackobama/4226246/Barack-Obama-presidency-will-strengthen-special-relationship-says-Gordon-Brown.html |url-access=subscription |access-date=30 May 2011 |website=[[The Daily Telegraph|The Telegraph]] |publication-place=[[London]] |archive-date=4 July 2020 |archive-url=https://web.archive.org/web/20200704192159/https://www.telegraph.co.uk/news/worldnews/barackobama/4226246/Barack-Obama-presidency-will-strengthen-special-relationship-says-Gordon-Brown.html |url-status=live}}</ref><ref>{{Cite book |last1=Kirchner |first1=Emil Joseph |title=Global Security Governance: Competing Perceptions of Security in the 21st century |last2=Sperling |first2=James |publisher=[[Routledge]] |year=2007 |isbn=978-0-415-39162-7 |edition=illustrated |location=London |page=100}}</ref> the [[Anglo-Portuguese Alliance]] is considered to be the oldest binding military alliance in the world. The UK is also closely linked with the Republic of Ireland; the two countries share a [[Common Travel Area]] and co-operate through the [[British-Irish Intergovernmental Conference]] and the [[British-Irish Council]]. Britain's global presence and influence is further amplified through its trading relations, foreign investments, [[official development assistance]] and military engagements.<ref>{{Cite web |last=The Committee Office, House of Commons |date=19 February 2009 |title=DFID's expenditure on development assistance |url=http://www.parliament.the-stationery-office.co.uk/pa/cm200809/cmselect/cmintdev/220/22007.htm |archive-url=https://web.archive.org/web/20130112222226/http://www.parliament.the-stationery-office.co.uk/pa/cm200809/cmselect/cmintdev/220/22007.htm |archive-date=12 January 2013 |access-date=28 April 2013 |publisher=UK Parliament}}</ref> === Military === {{Main|British Armed Forces|Military history of the United Kingdom}} [[File:United Kingdom overseas military installations and operations.png|thumb|upright=1.4| {{Legend|#0000FF|Overseas military installations of the United Kingdom, and locally raised units of the [[British Overseas Territories]]}} {{Legend|#F0002B|Military interventions since 2000: [[British military intervention in the Sierra Leone Civil War|Palliser]] (Sierra Leone); [[Operation Herrick|Herrick]] (Afghanistan); [[Operation Enduring Freedom – Horn of Africa|Enduring Freedom]] (Horn of Africa); [[Operation Telic|Telic]] (Iraq); [[Operation Ellamy|Ellamy]] (Libya); and [[Operation Shader|Shader]] (Islamic State of Iraq and the Levant).}}]] The British Armed Forces consist of three professional service branches: the [[Royal Navy]] and [[Royal Marines]] (forming the [[Naval Service (United Kingdom)|Naval Service]]), the [[British Army]] and the [[Royal Air Force]].<ref>{{Cite web |title=Ministry of Defence |url=http://www.mod.uk/DefenceInternet/Home |access-date=21 February 2012 |publisher=Ministry of Defence |archive-date=19 February 2012 |archive-url=https://web.archive.org/web/20120219194140/http://mod.uk/DefenceInternet/Home/ |url-status=live}}</ref> The armed forces of the United Kingdom are managed by the [[Ministry of Defence (United Kingdom)|Ministry of Defence]] and controlled by the [[Defence Council of the United Kingdom|Defence Council]], chaired by the [[Secretary of State for Defence]]. The [[Commander-in-Chief]] is the [[Monarchy of the United Kingdom|British monarch]], to whom members of the forces swear an oath of allegiance.<ref>{{Cite web |date=30 March 2012 |title=Speaker addresses Her Majesty Queen Elizabeth II |url=http://www.parliament.uk/business/news/2012/march/speaker-addresses-hm-the-queen |access-date=28 April 2013 |publisher=UK Parliament |archive-date=1 May 2013 |archive-url=https://web.archive.org/web/20130501221305/http://www.parliament.uk/business/news/2012/march/speaker-addresses-hm-the-queen/ |url-status=live}}</ref> The armed forces are charged with protecting the United Kingdom and its overseas territories, promoting the UK's global security interests and supporting international peacekeeping efforts. They are active and regular participants in [[NATO]] (including the [[Allied Rapid Reaction Corps]]), the [[Five Power Defence Arrangements]], [[RIMPAC]] and other worldwide coalition operations. [[Overseas military bases of the United Kingdom|Overseas garrisons]] and facilities are maintained in [[RAF Ascension Island|Ascension Island]], [[Mina Salman|Bahrain]], [[Military of Belize|Belize]], [[Military Forces based in Brunei|Brunei]], [[British Army Training Unit Suffield|Canada]], [[British Forces Cyprus|Cyprus]], [[Diego Garcia]], the [[Military of the Falkland Islands|Falkland Islands]], [[British Forces Germany|Germany]], [[British Forces Gibraltar|Gibraltar]], [[British Army Training Unit Kenya|Kenya]], [[Oman]], [[Al Udeid Air Base|Qatar]] and [[Singapore]].<ref>{{Cite web |title=House of Commons Hansard |url=https://publications.parliament.uk/cgi-bin/newhtml_hl?DB=semukparl&STEMMER=en&WORDS=raf%20diego%20garcia&ALL=RAF&ANY=&PHRASE=%22Diego%20Garcia%20%22&CATEGORIES=&SIMPLE=&SPEAKER=&COLOUR=red&STYLE=s&ANCHOR=50221w33.html_spnew0&URL=/pa/cm200405/cmhansrd/vo050221/text/50221w33.htm#50221w33.html_spnew0 |archive-url=https://web.archive.org/web/20090309114107/http://www.publications.parliament.uk/cgi-bin/newhtml_hl?DB=semukparl&STEMMER=en&WORDS=raf%20diego%20garcia&ALL=RAF&ANY=&PHRASE=%22Diego%20Garcia%20%22&CATEGORIES=&SIMPLE=&SPEAKER=&COLOUR=red&STYLE=s&ANCHOR=50221w33.html_spnew0&URL=%2Fpa%2Fcm200405%2Fcmhansrd%2Fvo050221%2Ftext%2F50221w33.htm#50221w33.html_spnew0 |archive-date=9 March 2009 |access-date=23 October 2008 |publisher=UK Parliament}}; {{Cite web |title=House of Commons Hansard Written Answers for 17 Jun 2013 (pt 0002) |url=https://publications.parliament.uk/pa/cm201314/cmhansrd/cm130617/text/130617w0002.htm#13061746000236 |archive-url=https://web.archive.org/web/20150214025754/http://www.publications.parliament.uk/pa/cm201314/cmhansrd/cm130617/text/130617w0002.htm#13061746000236 |archive-date=14 February 2015 |access-date=4 March 2015 |publisher=Publications.parliament.uk}}</ref> According to the [[Stockholm International Peace Research Institute]]<ref>{{Cite web |date=April 2026|title=Trends in Military Expenditure 2025|url=https://www.sipri.org/sites/default/files/2026-04/2604_milex_2025.pdf#page=2|access-date=31 May 2026|publisher=[[Stockholm International Peace Research Institute]]}}</ref> and the [[International Institute for Strategic Studies]],<ref>{{Cite web |title=The Military Balance 2026: Global defence spending|url=https://www.iiss.org/publications/the-military-balance/2026/the-military-balance-2026/global-defence-spending/|access-date=2026-05-31|website=IISS|language=en}}</ref> the UK had the world's [[List of countries by military expenditures|sixth- or fifth-highest military expenditures]] in 2025. Total defence spending in 2024 was estimated at 2.3 per cent of [[gross domestic product]].<ref>{{Cite web |title=Rishi Sunak vows to boost UK defence spending to 2.5% of GDP by 2030 |url=https://www.bbc.co.uk/news/uk-politics-68880171 |access-date=24 April 2024 |publisher=BBC News |date=24 April 2024 |archive-date=23 April 2024 |archive-url=https://web.archive.org/web/20240423233438/https://www.bbc.co.uk/news/uk-politics-68880171 |url-status=live}}</ref> Following the end of the [[Cold War]], defence policy has a stated assumption that "the most demanding operations" will be undertaken as part of a coalition.<ref>''UK 2005: The Official Yearbook of the United Kingdom of Great Britain and Northern Ireland''. Office for National Statistics. p. 89.</ref> === Law and criminal justice === <!-- Copyedit done to here --> {{Main|Law of the United Kingdom|Crime in the United Kingdom}} {{Further|English law|Northern Ireland law|Scots law}} [[File:Middlesex Guildhall (cropped).jpg|thumb|The [[Supreme Court of the United Kingdom|Supreme Court]] is the final court of appeal for England, Wales and Northern Ireland, and for Scottish civil cases.]] The United Kingdom does not have a single legal system as the [[Treaty of Union|1706 Treaty of Union]] provided for the continuation of Scotland's separate legal system.<ref name="Acts of Union 1707" /> The UK has three distinct [[Legal systems of the world|systems of law]]: English law, Northern Ireland law and Scots law. A new [[Supreme Court of the United Kingdom]] came into being in October 2009 to replace the [[judicial functions of the House of Lords|Appellate Committee of the House of Lords]].<ref>{{Cite news |date=1 October 2009 |title=UK Supreme Court judges sworn in |work=BBC News |url=http://news.bbc.co.uk/1/hi/uk/8283939.stm |access-date=6 October 2009 |archive-date=7 February 2020 |archive-url=https://web.archive.org/web/20200207160453/http://news.bbc.co.uk/1/hi/uk/8283939.stm |url-status=live}}; {{Cite web |date=July 2003 |title=Constitutional reform: A Supreme Court for the United Kingdom |url=http://www.dca.gov.uk/consult/supremecourt/supreme.pdf |archive-url=http://webarchive.nationalarchives.gov.uk/20090117132005/http://www.dca.gov.uk/consult/supremecourt/supreme.pdf |archive-date=17 January 2009 |access-date=13 May 2013 |publisher=Department for Constitutional Affairs}}</ref> The [[Judicial Committee of the Privy Council]], including the same members as the Supreme Court, is the highest court of appeal for several independent Commonwealth countries, the [[British Overseas Territories]] and the [[Crown Dependencies]].<ref>{{Cite web |title=Role of the JCPC |url=http://www.jcpc.uk/about/role-of-the-jcpc.html |access-date=28 April 2013 |publisher=Judicial Committee of the Privy Council |archive-date=14 January 2014 |archive-url=https://web.archive.org/web/20140114165910/http://www.jcpc.uk/about/role-of-the-jcpc.html |url-status=live}}</ref> Both English law, which applies in England and Wales, and Northern Ireland law are based on [[common law]] (or [[case law]]) principles.<ref>{{Cite book |last=Bainham |first=Andrew |url=https://books.google.com/books?id=AF303DEl0MkC&pg=PA298 |title=The international survey of family law: 1996 |publisher=Martinus Nijhoff |year=1998 |isbn=978-90-411-0573-8 |location=The Hague |page=298 |access-date=29 September 2020 |archive-date=28 March 2024 |archive-url=https://web.archive.org/web/20240328141743/https://books.google.com/books?id=AF303DEl0MkC&pg=PA298#v=onepage&q&f=false |url-status=live}}</ref> It originated in England in the [[Middle Ages]] and is the basis for many legal systems around the world.<ref>{{Cite web |title=Common Law |url=https://www.britannica.com/topic/common-law |access-date=27 May 2024 |publisher=Britannica |date=19 May 2024 |archive-date=6 May 2021 |archive-url=https://web.archive.org/web/20210506134920/https://www.britannica.com/topic/common-law |url-status=live}}</ref> The [[courts of England and Wales]] are headed by the [[Senior Courts of England and Wales]], consisting of the [[Court of Appeal of England and Wales|Court of Appeal]], the [[High Court of Justice]] for civil cases and the [[Crown Court]] for criminal cases.<ref>{{Cite web |title=The Australian courts and comparative law |url=http://www.alpn.edu.au/node/66 |archive-url=https://web.archive.org/web/20130414202207/http://alpn.edu.au/node/66 |archive-date=14 April 2013 |access-date=9 March 2015 |publisher=Australian Law Postgraduate Network}}</ref> Scots law is a hybrid system based on common-law and [[Civil law (legal system)|civil-law]] principles. The chief courts are the [[Court of Session]], for civil cases,<ref>{{Cite web |title=Court of Session&nbsp;– Introduction |url=http://www.scotcourts.gov.uk/session/index.asp |archive-url=https://web.archive.org/web/20080731094308/http://www.scotcourts.gov.uk/session/index.asp |archive-date=31 July 2008 |access-date=8 March 2015 |publisher=Scottish Courts}}</ref> and the [[High Court of Justiciary]], for criminal cases.<ref>{{Cite web |title=High Court of Justiciary&nbsp;– Introduction |url=http://www.scotcourts.gov.uk/justiciary/index.asp |archive-url=https://web.archive.org/web/20080912204821/http://www.scotcourts.gov.uk/justiciary/index.asp |archive-date=12 September 2008 |access-date=9 March 2015 |publisher=Scottish Courts}}</ref> The Supreme Court of the United Kingdom serves as the highest court of appeal for civil cases under Scots law.<ref>{{Cite web |title=House of Lords&nbsp;– Practice Directions and Standing Orders Applicable to Civil Appeals |url=https://publications.parliament.uk/pa/ld199697/ldinfo/ld08judg/bluebook/bluebk03.htm |archive-url=https://web.archive.org/web/20131206120915/http://www.publications.parliament.uk/pa/ld199697/ldinfo/ld08judg/bluebook/bluebk03.htm |archive-date=6 December 2013 |access-date=8 March 2015 |publisher=UK Parliament}}</ref> The criminal justice system has been characterised by low [[conviction rate]]s and [[Justice delayed is justice denied|court delays]] for some crime types.<ref name="s576">{{cite journal | last1=Lovett | first1=Jo | last2=Hales | first2=Gavin | last3=Kelly | first3=Liz | last4=Khan | first4=Aneela | last5=Hardiman | first5=Margaret | last6=Trott | first6=Louise | title=What can We Learn from Police Data About Timeliness in Rape and Serious Sexual Offence Investigations in England and Wales? | journal=International Criminology | volume=2 | issue=3 | date=2022 | issn=2662-9976 | doi=10.1007/s43576-022-00069-8 | pages=286–298| pmc=9527390 }}</ref> Crime in England and Wales increased between 1981 and 1995. Since that peak there has been an overall fall of 66% in recorded crime from 1995 to 2015,<ref>{{Cite web |url=http://www.ons.gov.uk/ons/dcp171778_419450.pdf |title=Crime in England and Wales, Year Ending June 2015 |publisher=Office for National Statistics |website=UK Government Web Archive |access-date=16 March 2023 |archive-date=16 March 2023 |archive-url=https://web.archive.org/web/20230316221317/https://webarchive.nationalarchives.gov.uk/ukgwa/20160105160709/http://www.ons.gov.uk/ons/dcp171778_419450.pdf |url-status=bot: unknown}}</ref> according to [[Crime statistics in the United Kingdom|UK crime statistics]]. [[United Kingdom labour law|UK labour laws]] establish employment rights including [[National Minimum Wage Act 1998|a minimum wage]], a minimum of 28 days annual holiday, parental leave, statutory sick pay and [[Pensions Act 2008|a pension]]. [[Same-sex marriage]] has been legal in England, Scotland, and Wales since 2014, and in [[Northern Ireland]] since 2020.<ref>{{cite web |last1=Wratten |first1=Marcus |title=Tom Allen to host vital new BBC show marking 10th anniversary of same-sex marriage |url=https://www.thepinknews.com/2023/07/03/tom-allen-bbc-my-big-gay-wedding-same-sex-marriage/ |website=PinkNews |date=3 July 2023 |access-date=2 September 2023 |archive-date=2 September 2023 |archive-url=https://web.archive.org/web/20230902195143/https://www.thepinknews.com/2023/07/03/tom-allen-bbc-my-big-gay-wedding-same-sex-marriage/ |url-status=live}}</ref> [[LGBT rights in the United Kingdom|LGBT equality]] in the United Kingdom is considered advanced by modern standards.<ref>{{Cite web |date=5 June 2023 |title=The 203 Worst (& Safest) Countries for LGBTQ+ Travel in 2023 |url=https://www.asherfergusson.com/lgbtq-travel-safety/ |access-date=20 August 2023 |website=Asher & Lyric |archive-date=10 September 2021 |archive-url=https://web.archive.org/web/20210910063408/https://www.asherfergusson.com/lgbtq-travel-safety/ |url-status=live}}</ref><ref>{{cite web |last1=R. Flores |first1=Andrew |title=Social Acceptance of LGBTI People in 175 Countries and Locations |url=https://williamsinstitute.law.ucla.edu/publications/global-acceptance-index-lgbt/ |website=Williams Institute |access-date=11 September 2023 |archive-date=13 September 2023 |archive-url=https://web.archive.org/web/20230913091254/https://williamsinstitute.law.ucla.edu/publications/global-acceptance-index-lgbt/ |url-status=live}}</ref> Since leaving the [[European Union|EU]] most disputes under UK-EU agreements are addressed through consultation between the parties. If consultation fails to resolve the issue, either party can request [[arbitration]], typically at the [[Permanent Court of Arbitration|PCA]] in [[Peace Palace|The Hague]].<ref name="commission.europa.eu" /><ref>{{Cite web |title=Disputes under the Trade and Cooperation Agreement |date=November 2021 |url=https://www.instituteforgovernment.org.uk/explainer/disputes-trade-and-cooperation-agreement |access-date=26 January 2025 |publisher=Institute for Government}}</ref><ref>{{Cite web |title=Sandeel fishing ban to remain in place |date=2 May 2025 |url=https://www.bbc.co.uk/news/articles/ckgrwxxzxkjo |website=BBC |access-date=4 May 2025 |archive-url=https://web.archive.org/web/20250504203005/https://www.bbc.com/news/articles/ckgrwxxzxkjo |archive-date=4 May 2025}}</ref> The [[EU–UK Trade and Cooperation Agreement]] states that the UK and EU have to cooperate and negotiate with each other with 'full mutual respect and good faith', as defined by international law.<ref>{{Cite web |title=Good Faith in Public Law |date=20 January 2022 |url=https://www.law.ox.ac.uk/news/2022-01-20-good-faith-public-law |website=ox.ac.uk |access-date=13 May 2025 |archive-url=https://web.archive.org/web/20250513165454/https://www.law.ox.ac.uk/news/2022-01-20-good-faith-public-law |archive-date=13 May 2025}}</ref> Under the [[Windsor Framework]], [[Northern Ireland]] matters requiring interpretation of EU law go to the [[European Court of Justice|ECJ]], though the [[Stormont Brake]] can prevent new EU rules from taking effect. == Economy == {{Main|Economy of the United Kingdom}} {{Further|Economy of England|Economy of Scotland|Economy of Northern Ireland|Economy of Wales}} [[File:Bank junction - 2020-09-20 (2).jpg|thumb|[[City of London]] skyline from [[City Hall, London (Southwark)|London City Hall]]. [[London]] is Europe's largest financial centre.<ref>{{Cite web |last=Yanatma |first=Servet |date=16 March 2024 |title=Europe's top financial centres: Where's best to do business? |url=https://www.euronews.com/business/2024/03/16/europes-top-financial-centres-wheres-best-to-do-business |access-date=16 August 2025 |publisher=[[Euronews]] |quote=While the US dominates the upper end of the list, with New York taking the number one spot, London continues to lead in Europe.}}</ref>]] The United Kingdom has a highly developed [[social market economy]].<ref>{{Cite journal |last1=Thane |first1=Pat |year=2019 |title=The Origins of the British Welfare State |journal=The Journal of Interdisciplinary History |volume=50 |issue=3 |pages=427–433 |doi=10.1162/jinh_a_01448 |s2cid=208223636 |doi-access=free}}</ref><ref name="ftms">{{cite web |last1=Griffiths |first1=Alan |last2=Wall |first2=Stuart |date=16 July 2011 |title=Applied Economics |url=http://www.ftms.edu.my/pdf/Download/UndergraduateStudent/BusinessEconomics/BC215001S%20-%20BE%20Key%20Text%20-%20Applied%20Economics.pdf |url-status=dead |archive-url=https://web.archive.org/web/20130620120524/http://www.ftms.edu.my/pdf/Download/UndergraduateStudent/BusinessEconomics/BC215001S%20-%20BE%20Key%20Text%20-%20Applied%20Economics.pdf |archive-date=20 June 2013 |access-date=25 September 2014}}</ref> With an estimated nominal [[gross domestic product]] (GDP) of £2.819 trillion in 2025,<ref>{{Cite web |title=Data Explorer |url=https://data.imf.org/en/Data-Explorer?datasetUrn=IMF.RES:WEO(9.0.0) |access-date=2026-05-07 |website=data.imf.org}}</ref> it is the [[List of countries by GDP (nominal)|fifth-largest national economy]] in the world and the [[List of sovereign states in Europe by GDP (nominal)|second-largest]] in Europe. Its currency, the [[pound sterling]], is the [[Foreign exchange market#Most traded currencies by value|fourth-most-traded currency]] in the [[foreign exchange market]] and the world's fourth-largest [[reserve currency]], after the [[United States dollar]], the [[euro]] and the [[yen]].<ref>{{Cite web |title=World Currency Composition of Official Foreign Exchange Reserves |url=https://data.imf.org/regular.aspx?key=41175 |access-date=10 October 2021 |website=IMF Data |archive-date=12 May 2016 |archive-url=https://web.archive.org/web/20160512202858/https://data.imf.org/regular.aspx?key=41175 |url-status=live}}</ref> The pound sterling maintains its high nominal value through both its long history of stability and by never undergoing formal [[redenomination]]. Since 2022 the UK has been both the world's [[List of countries by exports|fourth-largest exporter]]<ref>{{Cite web |title=Exports of goods and services (BoP, current US$) |url=https://data.worldbank.org/indicator/BX.GSR.GNFS.CD?end=2024&most_recent_value_desc=true |access-date=22 September 2025 |website=[[World Bank]]}}</ref> and [[List of countries by imports|fourth-largest importer]]<ref>{{Cite web |title=Imports of goods and services (current US$) |url=https://data.worldbank.org/indicator/NE.IMP.GNFS.CD?most_recent_value_desc=true |access-date=22 September 2025 |website=[[World Bank]] |archive-date=13 September 2025 |archive-url=https://web.archive.org/web/20250913065521/https://data.worldbank.org/indicator/NE.IMP.GNFS.CD?most_recent_value_desc=true |url-status=live }}</ref> of goods and services. Despite having one of the highest levels of [[Income inequality in the United Kingdom|income inequality]] in the [[OECD]],<ref>{{Cite web |last1=Francis-Devine |first1=Brigid |title=House of Commons Research Briefing on Income inequality in the UK. |url=https://commonslibrary.parliament.uk/research-briefings/cbp-7484/ |url-status=live |archive-url=https://web.archive.org/web/20220210104536/https://commonslibrary.parliament.uk/research-briefings/cbp-7484/ |archive-date=10 February 2022 |access-date=1 July 2023 |website=UK Parliament}}</ref><ref>{{Cite web |title=Inequality – Income inequality – OECD Data |url=http://data.oecd.org/inequality/income-inequality.htm |archive-url=https://web.archive.org/web/20230629183322/https://data.oecd.org/inequality/income-inequality.htm |archive-date=29 June 2023 |access-date=3 July 2023 |website=theOECD}}</ref> the UK has a very high [[Human Development Index|HDI]] ranking, including when [[List of countries by inequality-adjusted Human Development Index|adjusted for inequality]]. As of 2025 the [[Unemployment in the United Kingdom|UK unemployment rate]] is 4.7%<ref>{{Cite web |last1=Labiak |first1=Mitchell |last2=Smith |first2=Oliver |date=17 July 2025 |title=UK jobs market weakens as unemployment rate rises |url=https://www.bbc.com/news/articles/cg754negn75o |access-date=25 September 2025 |website=www.bbc.com |language=en-GB |archive-date=15 September 2025 |archive-url=https://web.archive.org/web/20250915184829/https://www.bbc.com/news/articles/cg754negn75o |url-status=live }}</ref> and the annual [[List of countries by real GDP per capita growth|real GDP per head growth]] was 1.1%.<ref name="f919">{{cite web | title=GDP quarterly national accounts, UK | website=Office for National Statistics | date=2026 | url=https://www.ons.gov.uk/economy/grossdomesticproductgdp/bulletins/quarterlynationalaccounts/octobertodecember2025 | access-date=2026-04-24}}</ref> [[HM Treasury]], led by the [[Chancellor of the Exchequer]], is responsible for developing and executing the government's [[public finance]] and [[economic policy]]. The [[Department for Business and Trade]] is responsible for business, international trade, and enterprise. The [[Bank of England]] is the UK's [[central bank]] and responsible for issuing notes and coins in the pound sterling. Banks in Scotland and Northern Ireland retain the right to issue their own notes, subject to retaining enough Bank of England notes in reserve to cover their issue. === Industries and services === [[File:Bank-of-England.jpg|thumb|The [[Bank of England]] is the [[central bank]] of the United Kingdom and the model on which most modern central banks have been based.]] [[File:British Airways Concorde G-BOAC 03.jpg|thumb|[[Concorde]] was a [[Supersonic speed|supersonic]] airliner that reduced transatlantic flight time from 8 hours to 3.5 hours.<ref>{{Cite web |title=Celebrating Concorde |url=https://www.britishairways.com/en-gb/information/about-ba/history-and-heritage/celebrating-concorde |archive-url=https://web.archive.org/web/20230317103939/https://www.britishairways.com/en-gb/information/about-ba/history-and-heritage/celebrating-concorde |archive-date=17 March 2023 |access-date=30 March 2023}}</ref>]] The [[Tertiary sector of the economy|service sector]] made up around 80 per cent of the UK's [[Gross value added|GVA]] in 2023.<ref>{{Cite web |last=Hutton |first=Georgina |date=3 October 2024 |title=Industries in the UK |url=https://commonslibrary.parliament.uk/research-briefings/cbp-8353/ |access-date=19 May 2025 |website=UK Parliament: House of Commons Library |archive-date=7 October 2021 |archive-url=https://web.archive.org/web/20211007134640/https://commonslibrary.parliament.uk/research-briefings/cbp-8353/ |url-status=live }}</ref> As of 2023 it is the world's [[List of countries by service exports|second-largest exporter of services]]<ref>{{Cite web |title=Service exports (BoP, current US$) |url=https://data.worldbank.org/indicator/BX.GSR.NFSV.CD?most_recent_value_desc=true&year_high_desc=false |access-date=19 May 2025 |website=World Bank Open Data |archive-date=17 March 2023 |archive-url=https://web.archive.org/web/20230317140633/https://data.worldbank.org/indicator/BX.GSR.NFSV.CD?most_recent_value_desc=true&year_high_desc=false |url-status=live }}</ref> and in 2024 was the world's largest net exporter of [[Financial services in the United Kingdom|financial services]].<ref>{{Cite web |date=15 January 2025 |title=UK leads world in financial services trade surplus |url=https://www.thecityuk.com/news/uk-leads-world-in-financial-services-trade-surplus/ |access-date=2 June 2025 |website=TheCityUK |language=en}}</ref> [[London]] is the world capital for foreign exchange trading, with a market share of 37.8 per cent in 2022 of the global turnover.<ref>{{Cite web |date=30 September 2025 |title=BIS Triennial Survey of Foreign Exchange and Over-The-Counter Interest Rate Derivatives Markets in April 2025 – UK Data |url=https://www.bankofengland.co.uk/news/2025/september/bis-triennial-survey-of-foreign-exchange-and-over-the-counter-interest-rate-derivatives-markets |access-date=7 December 2025 |publisher=Bank of England}}</ref> It is the largest urban economy in Europe<ref>{{Cite web |last=Florida |first=Richard |date=16 March 2017 |title=The Economic Power of Cities Compared to Nations |url=https://www.bloomberg.com/news/articles/2017-03-16/top-metros-have-more-economic-power-than-most-nations |url-status=live |archive-url=https://web.archive.org/web/20240308074221/https://www.bloomberg.com/news/articles/2017-03-16/top-metros-have-more-economic-power-than-most-nations |archive-date=8 March 2024 |access-date=22 February 2024 |website=Bloomberg}}</ref> and, alongside [[New York City|New York]], the city in the world most integrated with the [[World economy|global economy]].<ref>{{Cite web |title=World Cities 2024 |url=https://gawc.lboro.ac.uk/gawc-worlds/the-world-according-to-gawc/world-cities-2024/ |access-date=21 September 2025 |website=GaWC |language=en-US |archive-date=3 July 2025 |archive-url=https://web.archive.org/web/20250703071437/https://gawc.lboro.ac.uk/gawc-worlds/the-world-according-to-gawc/world-cities-2024/ |url-status=live }}</ref> London is also one of the world's leading financial centres, ranking second in the 2025 [[Global Financial Centres Index]].<ref name="www.longfinance.net">{{Cite web |title=GFCI 36 Rank - Long Finance |url=https://www.longfinance.net/programmes/financial-centre-futures/global-financial-centres-index/gfci-36-explore-the-data/gfci-36-rank/ |access-date=19 May 2025 |website=www.longfinance.net |archive-date=25 September 2024 |archive-url=https://web.archive.org/web/20240925155927/https://www.longfinance.net/programmes/financial-centre-futures/global-financial-centres-index/gfci-36-explore-the-data/gfci-36-rank/ |url-status=live }}</ref> [[Edinburgh]], the UK's second-largest financial centre, ranks 29th in the world in the same index.<ref name="www.longfinance.net" /> The [[Manufacturing in the United Kingdom|UK's manufacturing sector]] in 2024 was the world's [[List of countries by manufacturing output|10th-largest]] and Europe's fourth-largest by value output.<ref>{{Cite web |title=World Bank Open Data |url=https://data.worldbank.org/indicator/NV.IND.MANF.CD?most_recent_value_desc=true |access-date=5 August 2025 |website=World Bank Open Data |archive-date=7 January 2020 |archive-url=https://web.archive.org/web/20200107135049/https://data.worldbank.org/indicator/NV.IND.MANF.CD?most_recent_value_desc=true |url-status=live }}</ref> At the end of 2024 manufacturing in the United Kingdom accounted for 8 per cent of the workforce and 8.6 per cent of national economic output.<ref>{{Cite web |date=22 May 2025 |title=Manufacturing industries: Economic indicators |url=https://commonslibrary.parliament.uk/research-briefings/sn05206/ |access-date=1 June 2025 |website=House of Commons Library}}</ref> As reported in 2017 the [[East Midlands Manufacturing|East Midlands]] and [[West Midlands Manufacturing|West Midlands]] (at 12.6 and 11.8 per cent respectively) were the regions with the highest proportion of employees in manufacturing. [[London manufacturing|London's manufacturing sector]] had the lowest at 2.8 per cent.<ref>Hennik Research. [http://www.themanufacturer.com/wp-content/uploads/2017/01/Annual-Manufacturing-Report-2017-Final-Version.pdf ''Annual Manufacturing Report: 2017'' (Dec. 2016)] {{Webarchive|url=https://web.archive.org/web/20170131192050/http://www.themanufacturer.com/wp-content/uploads/2017/01/Annual-Manufacturing-Report-2017-Final-Version.pdf|date=31 January 2017}}</ref> The [[Tourism in the United Kingdom|country's tourism sector]] is important to the British economy;<ref>{{Cite web |last1=Chan |first1=Kelvin |date=25 April 2023 |title=King Charles' coronation is bringing millions of tourists and a cash infusion to London but it probably won't save the British economy |url=https://fortune.com/2023/04/25/king-charles-coronation-tourists-money-london-british-economy/ |archive-url=https://web.archive.org/web/20230502144950/https://fortune.com/2023/04/25/king-charles-coronation-tourists-money-london-british-economy/ |archive-date=2 May 2023 |access-date=9 May 2023 |website=[[fortune.com]] |agency=The Associated Press}}</ref> The [[creative industries]] accounted for 5.9 per cent of the UK's GVA in 2019,<ref>{{Cite web |title=DCMS Economic Estimates 2019 (provisional): Gross Value Added |url=https://www.gov.uk/government/statistics/dcms-economic-estimates-2019-gross-value-added/dcms-economic-estimates-2019-provisional-gross-value-added |access-date=31 January 2023 |website=gov.uk |archive-date=31 January 2023 |archive-url=https://web.archive.org/web/20230131001226/https://www.gov.uk/government/statistics/dcms-economic-estimates-2019-gross-value-added/dcms-economic-estimates-2019-provisional-gross-value-added |url-status=live}}</ref> and contributed £111 billion to the UK economy in 2018.<ref>{{Cite web |year=2020 |title=UK's Creative Industries contributes almost £13 million to the UK economy every hour |url=https://www.gov.uk/government/news/uks-creative-industries-contributes-almost-13-million-to-the-uk-economy-every-hour |access-date=21 February 2023 |publisher=UK Government |archive-date=21 February 2023 |archive-url=https://web.archive.org/web/20230221131518/https://www.gov.uk/government/news/uks-creative-industries-contributes-almost-13-million-to-the-uk-economy-every-hour |url-status=live}}</ref> [[Lloyd's of London]], located in London, is the world's largest [[insurance]] and [[reinsurance]] market.<ref>{{Cite web |title=Lloyd's of London – value proposition |url=https://www.lloyds.com/about-lloyds/value-proposition-coverholder |archive-url=https://web.archive.org/web/20230227100951/https://www.lloyds.com/about-lloyds/value-proposition-coverholder |archive-date=27 February 2023 |website=Lloyd's of London}}</ref> [[WPP plc]] is one of the world's biggest advertising companies and also based in London.<ref>{{Cite web |title=Rankings 2025 - Creative 100 |url=https://www.warc.com/creative/rankings/creative-100 |website=WARC |access-date=12 June 2025 |archive-url=https://web.archive.org/web/20250612162216/https://www.warc.com/creative/rankings/creative-100 |archive-date=12 June 2025}}</ref> The UK is one of Europe's leading retail markets and its largest [[e-commerce]] market.<ref>{{Cite web |url=https://www.great.gov.uk/international/content/investment/sectors/retail/ |access-date=18 January 2024 |title=Retail |publisher=great.gov.uk |archive-date=18 January 2024 |archive-url=https://web.archive.org/web/20240118084416/https://www.great.gov.uk/international/content/investment/sectors/retail/ |url-status=live}}</ref> With [[Consumer spending|consumption expenditures]] of over US$2 trillion in 2023, it has the [[List of largest consumer markets|second-largest consumer market]] in Europe.<ref>{{Cite web |title=Households and NPISHs Final consumption expenditure (current US$) |url=https://data.worldbank.org/indicator/NE.CON.PRVT.CD?year_high_desc=true |access-date=17 August 2024 |website=World Bank Group |archive-date=12 June 2018 |archive-url=https://web.archive.org/web/20180612143614/https://data.worldbank.org/indicator/NE.CON.PRVT.CD?year_high_desc=true |url-status=live}}</ref> [[John Lewis Partnership|John Lewis]] is the UK's largest employee-owned business.<ref>{{Cite web |url=https://employeeownership.co.uk/resources/what-the-evidence-tells-us/ |access-date=18 January 2024 |title=Employee owned businesses - What the evidence tells us |archive-date=2 December 2023 |archive-url=https://web.archive.org/web/20231202155249/https://employeeownership.co.uk/resources/what-the-evidence-tells-us/ |url-status=live}}</ref> The [[Automotive industry in the United Kingdom|British automotive industry]] generates £47&nbsp;billion of exports (12 per cent of the UK's total exports of goods).<ref name="Auto Output 2025" /> In 2024 the UK produced 779,584 passenger vehicles and 125,649 commercial vehicles; 8 out of 10 cars produced in the UK are exported overseas.<ref name="Auto Output 2025">{{Cite web |date=15 May 2025 |title=SMMT Motor Industry Facts 2025 |url=https://www.smmt.co.uk/smmt-motor-industry-facts-2025/ |access-date=26 May 2025 |website=SMMT |archive-date=26 May 2025 |archive-url=https://web.archive.org/web/20250526074751/https://www.smmt.co.uk/smmt-motor-industry-facts-2025/ |url-status=live}}</ref> Britain is known for iconic cars like [[Mini Hatch|Mini]] and [[Jaguar Cars|Jaguar]],<ref>{{Cite web |date=19 November 2020 |title=Best British cars: Top 50 all-time greatest British-built cars revealed - page 2 |url=https://www.autoexpress.co.uk/best-cars-vans/351729/best-british-cars-top-50-all-time-greatest-british-built-cars-revealed/page-2 |access-date=9 March 2024 |website=Auto Express |archive-date=16 March 2024 |archive-url=https://web.archive.org/web/20240316184015/https://www.autoexpress.co.uk/best-cars-vans/351729/best-british-cars-top-50-all-time-greatest-british-built-cars-revealed/page-2 |url-status=live}}</ref> as well as luxury cars such as [[Rolls-Royce Motor Cars|Rolls-Royce]], [[Bentley]] and [[Range Rover]]. The UK is a major centre for engine manufacturing: 1.59&nbsp;million engines were produced in 2024.<ref name="Auto Output 2025" /> It was the world's [[List of countries by engine exports|third-largest exporter of engines]] by value in 2023.<ref>{{Cite web |title=Combustion Engines |url=https://oec.world/en/profile/hs/combustion-engines |access-date=26 May 2025 |website=OEC - The Observatory of Economic Complexity |archive-date=26 May 2025 |archive-url=https://web.archive.org/web/20250526073421/https://oec.world/en/profile/hs/combustion-engines |url-status=live}}</ref> The [[Motorsport in the United Kingdom|UK motorsport]] industry has an annual turnover of around £10&nbsp;billion.<ref>{{Cite web |year=2020 |title=UK motorsport industry in pole position for F1's 70th anniversary |url=https://www.gov.uk/government/news/uk-motorsport-industry-in-pole-position-for-f1s-70th-anniversary |access-date=19 February 2023 |publisher=UK Government |archive-date=19 February 2023 |archive-url=https://web.archive.org/web/20230219100712/https://www.gov.uk/government/news/uk-motorsport-industry-in-pole-position-for-f1s-70th-anniversary |url-status=live}}</ref> Seven of the eleven [[Formula One]] teams are based in the UK, with their technology being used in supercars and hypercars from [[McLaren Automotive|McLaren]], [[Aston Martin]] and [[Lotus Cars|Lotus]].{{Efn|Car brands here are classed as British based on several of the following criteria: historical heritage, cultural significance, design and engineering base, manufacturing location, headquarters location, UK registered company (even with overseas investors).}} The [[Aerospace industry in the United Kingdom|aerospace industry of the UK]] is the second-largest in the world<ref>{{cite web |title=United Kingdom - Country Commercial Guide: Aerospace and Defense |url=https://www.trade.gov/country-commercial-guides/united-kingdom-aerospace-and-defense |website=[[International Trade Administration]] |date=3 November 2023 |access-date=17 December 2024 |archive-date=12 June 2023 |archive-url=https://web.archive.org/web/20230612142750/https://www.trade.gov/country-commercial-guides/united-kingdom-aerospace-and-defense |url-status=live }}</ref> and has an annual turnover of around £30&nbsp;billion.<ref>{{Cite news |last=Tovey |first=Alan |date=29 June 2016 |title=Britain's aerospace sector soars amid fears Brexit could clip its wings |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/business/2016/06/29/britains-aerospace-sector-soars-amid-fears-brexit-could-clip-its |url-status=live |url-access=subscription |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/business/2016/06/29/britains-aerospace-sector-soars-amid-fears-brexit-could-clip-its |archive-date=10 January 2022}}{{Cbignore}}</ref> The [[British space programme|UK space industry]] was worth £17.5 billion in 2020/21 and employed around 48,800 people.<ref>{{cite web |title=UK space sector income reaches £17.5 billion as jobs and services grow |url=https://www.ukspace.org/uk-space-sector-income-reaches-17-5-billion-as-jobs-and-services-grow/ |website=UKspace |date=27 March 2023}}</ref><ref>{{cite web |title=UK space sector income reaches £17.5 billion as jobs and services grow |url=https://www.gov.uk/government/news/uk-space-sector-income-reaches-175-billion-as-jobs-and-services-grow |website=gov.uk |date=29 March 2023 |access-date=10 August 2025}}</ref> The [[UK Space Agency]] has stated in 2023 that it is investing £1.6&nbsp;billion in space-related projects.<ref>{{Cite web |url=https://www.gov.uk/government/news/new-funding-to-support-space-exploration-using-moon-resources-and-nuclear-power |title=New funding to support space exploration using Moon resources and nuclear power |access-date=11 March 2023 |archive-date=11 March 2023 |archive-url=https://web.archive.org/web/20230311195622/https://www.gov.uk/government/news/new-funding-to-support-space-exploration-using-moon-resources-and-nuclear-power}} <!-- (last checked 2023-03-11) --></ref> The [[Agriculture in the United Kingdom|British agriculture industry]] is intensive, highly mechanised and efficient by European standards, producing approximately 60 per cent of the country's overall food requirements and 73 per cent of its indigenous food needs, utilising around 0.9 per cent of the labour force (292,000 workers).<ref>{{Cite web |title=UK Food Security Index 2024 |url=https://www.gov.uk/government/publications/uk-food-security-index-2024/uk-food-security-index-2024 |access-date=19 May 2024 |publisher=Department for the Environment Food & Rural Affairs |archive-date=18 May 2024 |archive-url=https://web.archive.org/web/20240518072412/https://www.gov.uk/government/publications/uk-food-security-index-2024/uk-food-security-index-2024 |url-status=live}};{{Cite web |title=Agricultural workforce in England at 1 June 2023 |url=https://www.gov.uk/government/statistics/agricultural-workforce-in-england-at-1-june/agricultural-workforce-in-england-at-1-june-2023 |access-date=19 May 2024 |publisher=Department for the Environment Food & Rural Affairs |archive-date=19 May 2024 |archive-url=https://web.archive.org/web/20240519211112/https://www.gov.uk/government/statistics/agricultural-workforce-in-england-at-1-june/agricultural-workforce-in-england-at-1-june-2023 |url-status=live}}</ref> Around two-thirds of production is devoted to [[livestock]] and one-third to [[arable crops]]. The UK retains a significant though much reduced fishing industry, with at least 49 per cent of UK fish sustainably caught in 2020.<ref>{{Cite web |url=https://jncc.gov.uk/our-work/ukbi-b2-sustainable-fisheries |title=Sustainable fisheries: fish stocks harvested within safe limits |website=JNCC |access-date=14 December 2024}}</ref> The UK marine natural capital assets were estimated to have a value of £211 billion in 2021.<ref>{{Cite web |title=Marine accounts, natural capital, UK: 2021 |date=6 April 2021 |url=https://www.ons.gov.uk/economy/environmentalaccounts/bulletins/marineaccountsnaturalcapitaluk/2021 |website=ONS |access-date=21 May 2025 |archive-url=https://web.archive.org/web/20250521071820/https://www.ons.gov.uk/economy/environmentalaccounts/bulletins/marineaccountsnaturalcapitaluk/2021 |archive-date=21 May 2025}}</ref> It is rich in a variety of other natural resources including coal, [[petroleum]], [[natural gas]], tin, limestone, iron ore, salt, clay, chalk, [[gypsum]], lead, and silica and has an abundance of arable land.<ref>{{Cite web |url=http://www.bgs.ac.uk/mineralsuk/mines/coal/home.html |title=Coal |website=BGS Minerals UK |access-date=7 July 2015 |archive-date=26 April 2009 |archive-url=https://web.archive.org/web/20090426141109/http://www.bgs.ac.uk/ |url-status=live}}</ref> === Science and technology === {{Main|Science and technology in the United Kingdom|Telecommunications in the United Kingdom}} [[File:Cambridge Science Park Napp.jpg|thumb|The [[Cambridge Cluster]] is the most intensive research cluster for science and technology in the world.<ref>{{Cite book |last=WIPO |url=https://www.wipo.int/global_innovation_index/en/2022/index.html |title=Global Innovation Index 2022, 15th Edition |publisher=World Intellectual Property Organization |year=2022 |isbn=978-92-805-3432-0 |doi=10.34667/tind.46596 |access-date=16 November 2022 |archive-date=3 December 2022 |archive-url=https://web.archive.org/web/20221203061259/https://www.wipo.int/global_innovation_index/en/2022/index.html |url-status=live}}; {{Cite web |title=Global Innovation Index 2021 |url=https://www.wipo.int/global_innovation_index/en/2021 |access-date=5 March 2022 |website=[[World Intellectual Property Organization]] |publisher=[[United Nations]] |archive-date=5 March 2022 |archive-url=https://web.archive.org/web/20220305010458/https://www.wipo.int/global_innovation_index/en/2021/ |url-status=live}}; {{Cite web |title=Release of the Global Innovation Index 2020: Who Will Finance Innovation? |url=https://www.wipo.int/global_innovation_index/en/2020/index.html |access-date=2 September 2021 |website=World Intellectual Property Organization |archive-date=3 June 2021 |archive-url=https://web.archive.org/web/20210603121259/https://www.wipo.int/global_innovation_index/en/2020/index.html |url-status=live}}; {{Cite web |title=Global Innovation Index 2019 |url=https://www.wipo.int/global_innovation_index/en/2019/index.html |access-date=2 September 2021 |website=World Intellectual Property Organization |archive-date=2 September 2021 |archive-url=https://web.archive.org/web/20210902101818/https://www.wipo.int/global_innovation_index/en/2019/index.html |url-status=live}}; {{Cite web |title=RTD – Item |url=https://ec.europa.eu/newsroom/rtd/items/691898 |access-date=2 September 2021 |website=ec.europa.eu |archive-date=2 September 2021 |archive-url=https://web.archive.org/web/20210902140715/https://ec.europa.eu/newsroom/rtd/items/691898 |url-status=live}}</ref>]] England and Scotland were leading centres of the [[Scientific Revolution]] from the 17th century.<ref>Gascoin, J. "A reappraisal of the role of the universities in the Scientific Revolution", in Lindberg, David C. and Westman, Robert S., eds (1990), ''Reappraisals of the Scientific Revolution''. Cambridge University Press. p. 248. {{ISBN|978-0-521-34804-1}}.</ref> The United Kingdom led the [[Industrial Revolution]] from the 18th century, and has continued to produce scientists and [[List of British engineers|engineers]] credited with [[List of British innovations and discoveries|important advances]].<ref>Reynolds, E.E.; Brasher, N.H. (1966). ''Britain in the Twentieth Century, 1900–1964''. Cambridge University Press. p. 336. {{OCLC|474197910}}</ref> Major theorists from the 17th and 18th centuries include [[Isaac Newton]], whose [[Newton's laws of motion|laws of motion]] and illumination of [[gravitation|gravity]] have been seen as a keystone of modern science;<ref>Burtt, E.A. (2003) 1924.[https://books.google.com/books?id=G9WBMa1Rz_kC&pg=PA207 ''The Metaphysical Foundations of Modern Science''] {{Webarchive|url=https://web.archive.org/web/20230326164803/https://books.google.com/books?id=G9WBMa1Rz_kC&pg=PA207 |date=26 March 2023 }}. Mineola, NY: Courier Dover. p. 207. {{ISBN|978-0-486-42551-1}}.</ref> from the 19th century [[Charles Darwin]], whose theory of [[evolution]] by [[natural selection]] was fundamental to the development of modern biology, and [[James Clerk Maxwell]], who formulated classical [[electromagnetic theory]]; and more recently [[Stephen Hawking]], who advanced major theories in the fields of [[cosmology]], [[quantum gravity]] and the investigation of [[black holes]].<ref>Hatt, C. (2006). [https://books.google.com/books?id=BVBvehqrAPQC ''Scientists and Their Discoveries''] {{Webarchive|url=https://web.archive.org/web/20230326164803/https://books.google.com/books?id=BVBvehqrAPQC |date=26 March 2023 }}. London: Evans Brothers. pp. 16, 30 and 46. {{ISBN|978-0-237-53195-9}}.</ref> The [[Department for Science, Innovation and Technology]] (DSIT) is responsible for helping to develop and manage the UK's scientific, research, and technological outputs. Scientific research and development remains important in [[Universities in the United Kingdom|British universities]], with many establishing [[science park]]s to facilitate production and co-operation with industry.<ref>Castells, M.; Hall, P.; Hall, P.G. (2004). ''Technopoles of the World: the Making of Twenty-First-Century Industrial Complexes''. London: Routledge. pp. 98–100. {{ISBN|978-0-415-10015-1}}.</ref> In 2022, the UK produced [[List of countries by number of scientific and technical journal articles|6.0 per cent of the world's scientific research papers]] and had an 8.8 per cent share of scientific citations, the fourth and third highest among <abbr>G7</abbr> countries and Brazil, China, India, Russia, and South Korea. The UK ranked 1st among these countries for Field-Weighted Citation Impact.<ref>{{Cite web |title=International comparison of the UK research base, 2025 |url=https://www.gov.uk/government/publications/international-comparison-of-the-uk-research-base-2025/international-comparison-of-the-uk-research-base-2025 |access-date=2025-12-07 |website=GOV.UK |language=en}}</ref> Scientific journals produced in the UK include publications by the [[Royal Society]], ''[[Nature (journal)|Nature]]'', the ''[[BMJ|British Medical Journal]]'' and ''[[The Lancet]]''.<ref>{{Cite journal |last=McCook, Alison |year=2006 |title=Is peer review broken? |url=http://gaia.pge.utexas.edu/Good/Materials/scientist_02_28_2006.htm |journal=The Scientist |volume=20 |issue=2 |page=26 |archive-url=https://web.archive.org/web/20110816230933/http://gaia.pge.utexas.edu/Good/Materials/scientist_02_28_2006.htm |archive-date=16 August 2011 |access-date=22 June 2011}}</ref> By 2024 the UK tech sector reached a value of US$1.2 trillion surpassing the combined values of the French and German sectors.<ref>{{Cite web |last=Greenberg |first=Elizabeth |date=2025-01-14 |title=UK Innovation Economy Worth a Combined $1.2 trillion |url=https://www.digit.fyi/uk-innovation-economy-worth-a-combined-1-2-trillion/ |access-date=2026-05-26 |publisher=Digit News |language=en |quote=Valued at $1.2 trillion collectively, the UK innovation ecosystem is worth more than the French and German ecosystems combined.}}</ref> Cambridge was named the number one university in the world for producing successful technology founders.<ref>{{Cite web |title=UK tech sector retains #1 spot in Europe and #3 in world as sector resilience brings continued growth |date=21 December 2022 |url=https://www.gov.uk/government/news/uk-tech-sector-retains-1-spot-in-europe-and-3-in-world-as-sector-resilience-brings-continued-growth |website=gov.uk |access-date=27 May 2025 |archive-url=https://web.archive.org/web/20250527173044/https://www.gov.uk/government/news/uk-tech-sector-retains-1-spot-in-europe-and-3-in-world-as-sector-resilience-brings-continued-growth |archive-date=27 May 2025}}</ref> The [[Artificial intelligence industry in the United Kingdom|UK's artificial intelligence industry]] is the largest in Europe by value<ref>{{Cite web |date=11 June 2024 |title=UK AI sector most valuable in Europe, new report reveals |url=https://www.holyrood.com/news/view,uk-ai-sector-most-valuable-in-europe-new-report-reveals |access-date=20 July 2025 |website=[[Holyrood (magazine)|Holyrood]] |language=en}}</ref> and the country ranked fifth globally in a 2026 report on artificial intelligence development by [[Stanford University]].<ref>{{Cite web |title=Which countries are leading in AI? {{!}} Stanford HAI |url=https://hai.stanford.edu/ai-index/global-vibrancy-tool |access-date=2026-05-09 |website=hai.stanford.edu |language=en}}</ref> The UK ranked 6th in the 2025 [[Global Innovation Index]].<ref>{{Cite web |title=GII Innovation Ecosystems & Data Explorer 2025 |url=https://www.wipo.int/gii-ranking/en/united-kingdom |access-date=16 October 2025 |website=WIPO}}</ref><ref>{{Cite book |last1=Dutta |first1=Soumitra |url=https://www.wipo.int/web-publications/global-innovation-index-2025/en/index.html |title=Global Innovation Index 2025: Innovation at a Crossroads |last2=Lanvin |first2=Bruno |publisher=[[World Intellectual Property Organization]] |year=2025 |isbn=978-92-805-3797-0 |page=19 |language=en |doi=10.34667/tind.58864 |access-date=17 October 2025}}</ref> === Transport === {{Main|Transport in the United Kingdom}} {{further|Transport in England|Transport in Scotland|Transport in Wales|Transport in Northern Ireland}} [[File:An LNER Azuma train on the East Coast Railway Line, geograph 6275180 by Walter Baxter.jpg|thumb|A high-speed [[East Coast Main Line]] train in [[Northumberland]], England]] [[File:London City Airport Sunset.jpg|thumb|A plane taking off from [[London City Airport]]. [[Airports of London|London's airports]] make it the city with the [[List of busiest city airport systems by passenger traffic|busiest airport system]] in the world.]] In the UK, all traffic [[Left- and right-hand traffic|drives on the left]], with distance and speed being measured in miles, yards and miles per hour (mph). All vehicles manufactured for use in the UK have the steering wheel situated on the right side of the vehicle. A radial road network totals {{Convert|29145|mi|km}} of main roads, {{Convert|2173|mi|km}} of motorways and {{Convert|213750|mi|km}} of paved roads.<ref name="factbook" /> The [[M25 motorway|M25]], encircling London, is the largest and busiest bypass in the world.<ref>{{Cite book |last=Moran |first=Joe |url=https://archive.org/details/readingeveryday00mora |title=Reading the Everyday |date=16 November 2005 |publisher=Routledge |isbn=978-1-134-37216-4 |page=[https://archive.org/details/readingeveryday00mora/page/n107 95] |url-access=limited}}</ref> In 2024 there were 41.7&nbsp;million licensed vehicles in the UK.<ref>{{cite web |title=General facts and figures about roads and road use |url=https://www.racfoundation.org/motoring-faqs/mobility |access-date=31 May 2025 |archive-date=18 May 2025 |archive-url=https://web.archive.org/web/20250518191035/https://www.racfoundation.org/motoring-faqs/mobility}}</ref> The UK has an extensive railway network of {{Convert|10072|mi|0|abbr=out}}. In Great Britain, the [[British Rail]] network [[privatisation of British Rail|was privatised]] between 1994 and 1997, followed by a rapid rise in passengers. [[Great British Railways]] is a planned state-owned public body that will oversee [[rail transport in Great Britain]]. The UK was ranked eighth amongst national European rail systems in the 2017 European Railway Performance Index assessing intensity of use, quality of service and safety.<ref>{{Cite web |last1=Sylvain Duranton |last2=Agnès Audier |last3=Joël Hazan |last4=Mads Peter Langhorn |last5=Vincent Gauche |date=18 April 2017 |title=The 2017 European Railway Performance Index |url=https://www.bcg.com/en-ch/publications/2017/transportation-travel-tourism-2017-european-railway-performance-index.aspx |publisher=Boston Consulting Group |access-date=4 February 2019 |archive-date=31 May 2020 |archive-url=https://web.archive.org/web/20200531104458/https://www.bcg.com/en-ch/publications/2017/transportation-travel-tourism-2017-european-railway-performance-index.aspx |url-status=live}}</ref> A train runs directly from London to [[Paris]].<ref>{{Cite web |title=London to Paris Trains |url=https://www.eurostar.com/uk-en/train/london-to-paris |access-date=11 May 2024 |publisher=Eurostar |archive-url=https://web.archive.org/web/20240511114452/https://www.eurostar.com/uk-en/train/london-to-paris |archive-date=11 May 2024}}</ref> Called the [[Eurostar]], it travels through the [[Channel Tunnel]] under the [[English Channel]]. At 23.5&nbsp;miles long, it is the world's longest undersea tunnel.<ref>{{Cite web |title=Channel Tunnel, Tunnel, Europe |url=https://www.britannica.com/topic/Channel-Tunnel |access-date=11 May 2024 |publisher=Britannica |date=10 May 2024}}</ref> There is also a car service through the tunnel to France called [[LeShuttle]]. The [[Elizabeth line]], a rail link running between [[East London|East]] and [[West London]], was named in honour of [[Queen Elizabeth II]] in 2016 and opened in 2022.<ref>{{Cite news |date=2 January 2012 |title=Crossrail's giant tunnelling machines unveiled |work=BBC News |url=https://www.bbc.co.uk/news/av/uk-16289051 |access-date=20 June 2018 |archive-date=10 April 2016 |archive-url=https://web.archive.org/web/20160410034914/http://www.bbc.co.uk/news/uk-16289051 |url-status=live}}; {{Cite news |last=Leftly |first=Mark |date=29 August 2010 |title=Crossrail delayed to save £1bn |work=Independent |location=London |url=https://www.independent.co.uk/news/business/news/crossrail-delayed-to-save-1631bn-2064629.html |access-date=22 August 2017 |archive-date=16 November 2020 |archive-url=https://web.archive.org/web/20201116062835/https://www.independent.co.uk/news/business/news/crossrail-delayed-to-save-1631bn-2064629.html |url-status=live}}</ref><ref>{{Cite web |title=Crossrail to become the Elizabeth line in honour of Her Majesty the Queen |url=https://tfl.gov.uk/info-for/media/press-releases/2016/february/crossrail-to-become-the-elizabeth-line-in-honour-of-her-majesty-the-queen |archive-url=https://web.archive.org/web/20230225110413/https://tfl.gov.uk/info-for/media/press-releases/2016/february/crossrail-to-become-the-elizabeth-line-in-honour-of-her-majesty-the-queen |archive-date=25 February 2023 |website=Transport for London}}</ref> Another major infrastructure project is [[High Speed 2]] (HS2), a high-speed railway under construction since 2019. It will link London with [[Birmingham]], with the potential to extend further north and capable of speeds of up to 225&nbsp;mph.<ref>{{Cite web |title=What is HS2 |url=https://www.hs2.org.uk/what-is-hs2 |website=HS2 |access-date=22 June 2022 |archive-date=21 June 2022 |archive-url=https://web.archive.org/web/20220621190841/https://www.hs2.org.uk/what-is-hs2/ |url-status=live}}</ref><ref>{{Cite web |title=HS2 Trains |url=https://www.hs2.org.uk/building-hs2/trains/ |website=HS2 |access-date=24 February 2023 |archive-date=24 February 2023 |archive-url=https://web.archive.org/web/20230224183953/https://www.hs2.org.uk/building-hs2/trains/ |url-status=live}}</ref> In 2023 there were 4 billion bus journeys in the UK, 1.8 billion of which were in London.<ref>{{Cite web |title=Transport Statistics Great Britain: 2023 Domestic Travel |date=19 December 2024 |url=https://www.gov.uk/government/statistics/transport-statistics-great-britain-2024/transport-statistics-great-britain-2023-domestic-travel |website=gov.uk |access-date=14 March 2025}}</ref> The red [[Double-decker bus|double-decker]] bus has entered popular culture as an internationally recognised icon of London and England.<ref>{{Cite web |title=Our Collection |url=http://www.icons.org.uk/theicons/index.html |access-date=16 August 2014 |publisher=icons.org.uk}}</ref> The [[London Buses|London bus network]] is extensive, with over 6,800 scheduled services every weekday carrying about 6&nbsp;million passengers on over 700 different routes, making it one of the most extensive bus systems in the world and the largest in Europe.<ref>[http://www.tfl.gov.uk/corporate/modesoftransport/1548.aspx London Buses], Transport for London. Accessed 10 May 2007.</ref> During 2024 [[List of airports in the United Kingdom and the British Crown Dependencies|British airports]] handled nearly 292.5 million passengers.<ref name="caastats">{{Cite web |title=Size of Reporting Airports 2024 |url=https://www.caa.co.uk/Documents/Download/11910/4d230d1f-dab6-4c1a-992a-431b9cca89a2/16918 |access-date=17 January 2025 |publisher=Civil Aviation Authority}}</ref> In that period the three largest airports were [[London Heathrow Airport]] (83.9 million passengers), [[Gatwick Airport]] (43.2 million passengers) and [[Manchester Airport]] (30.8 million passengers).<ref name="caastats" /> London Heathrow Airport, located {{Convert|15|mi|km|}} west of the capital, is the world's [[List of busiest airports by passenger traffic|second-busiest airport by international passenger traffic]] and has the most international passenger traffic of any airport in the world;<ref>{{Cite news |date=25 June 2008 |title=Heathrow 'needs a third runway' |work=BBC News |url=http://news.bbc.co.uk/1/hi/business/7472432.stm |access-date=17 October 2008}}; {{Cite press release |title=Statistics: Top 30 World airports |date=July 2008 |publisher=Airports Council International |url=http://www.aci.aero/aci/aci/file/Press%20Releases/2008/TOP30_International%20Passengers_2007.pdf |access-date=15 October 2008}}</ref> it is the hub for the UK flag carrier [[British Airways]], as well as [[Virgin Atlantic]].<ref>{{Cite news |date=29 October 2008 |title=BMI being taken over by Lufthansa |work=BBC News |url=http://news.bbc.co.uk/2/hi/7697261.stm |access-date=23 December 2009}}</ref> During 2023, 18.3 million passengers travelled internationally by rail and 18.1 million by sea.<ref>{{Cite web |title=Transport Statistics Great Britain: 2023 International Travel |date=19 December 2024 |url=https://www.gov.uk/government/statistics/transport-statistics-great-britain-2024/transport-statistics-great-britain-2023-international-travel |website=gov.uk |access-date=4 March 2025}}</ref> === Energy === {{Main|Energy in the United Kingdom}} {{further|Energy in England|Energy in Scotland|Energy in Wales|Energy in Northern Ireland}} In 2021 the UK was the world's [[List of countries by energy consumption and production|14th-largest consumer and 22nd-largest producer of energy]].<ref name="United Kingdom Energy Profile">{{Cite web |title=United Kingdom Energy Profile |url=https://www.eia.gov/international/overview/country/GBR |archive-url=https://web.archive.org/web/20230228165225/https://www.eia.gov/international/overview/country/GBR |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=U.S. Energy Information Administration}}</ref> It is home to [[Big Six energy suppliers|many large energy companies]], including two of the six major oil and gas companies{{snd}}[[BP]] and [[Shell plc|Shell]].<ref>{{Cite news |last=Mason |first=Rowena |date=24 October 2009 |title=Let the battle begin over black gold |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/finance/newsbysector/energy/6424030/Let-the-battle-begin-over-black-gold.html |url-status=live |url-access=subscription |access-date=26 November 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/finance/newsbysector/energy/6424030/Let-the-battle-begin-over-black-gold.html |archive-date=10 January 2022}}{{Cbignore}}; {{Cite news |last=Heath |first=Michael |date=26 November 2010 |title=RBA Says Currency Containing Prices, Rate Level 'Appropriate' in Near Term |work=Bloomberg |location=New York |url=https://www.bloomberg.com/news/2010-11-25/rba-s-stevens-says-inflation-unlikely-to-fall-much-further.html |access-date=26 November 2010}}</ref> [[File:Ardrossan's fan club. - panoramio.jpg|thumb|Wind turbines overlooking [[Ardrossan]] in Scotland. The UK is [[Wind power in the United Kingdom|a major producer of wind energy]] in Europe.<ref>{{Cite web |date=13 September 2023 |title='Success story': Which European countries are leading the way on wind? |url=https://www.euronews.com/green/2023/09/13/winds-of-change-which-european-countries-are-generating-the-most-energy-from-wind |access-date=15 August 2025 |website=[[Euronews]] |language=en}}</ref>]] Renewable electricity sources provided 51 per cent of the electricity generated in the UK in 2024. [[Wind power in the United Kingdom|Wind power]] was the largest source of electricity in 2024, generating 30 per cent of the UK's total electricity.<ref name="2024 Energy">{{Cite report |title=Britain's Electricity Explained: 2024 Review |url=https://www.neso.energy/news/britains-electricity-explained-2024-review |archive-url=https://web.archive.org/web/20250126085830/https://www.neso.energy/news/britains-electricity-explained-2024-review |archive-date=26 January 2025 |access-date=26 January 2025 |publisher=NESO}}</ref> The UK has the largest offshore wind farm in the world, which is located off the coast of [[Yorkshire]].<ref>{{Cite report |date=14 June 2021 |title=Wind energy in the UK: June 2021 |work=UK Government |url=https://www.ons.gov.uk/economy/environmentalaccounts/articles/windenergyintheuk/june2021 |access-date=8 May 2023}}</ref> In 2023 the UK had nine nuclear reactors generating about 15 per cent of the UK's electricity.<ref name="coal-ref">{{Cite web |title=Nuclear Power in the United Kingdom |url=https://world-nuclear.org/information-library/country-profiles/countries-t-z/united-kingdom.aspx |archive-url=https://web.archive.org/web/20230228175735/https://world-nuclear.org/information-library/country-profiles/countries-t-z/united-kingdom.aspx |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=World Nuclear Association}}</ref> There are two reactors under construction and more planned.<ref>{{Cite web |date=April 2013 |title=Nuclear Power in the United Kingdom |url=http://www.world-nuclear.org/info/inf84.html |archive-url=https://web.archive.org/web/20130214061431/http://www.world-nuclear.org/info/inf84.html |archive-date=14 February 2013 |access-date=9 April 2013 |publisher=World Nuclear Association}}</ref><ref>{{Cite news |title=Nuclear energy: What you need to know |url=https://www.gov.uk/government/news/nuclear-energy-what-you-need-to-know |archive-url=https://web.archive.org/web/20230228181113/https://www.gov.uk/government/news/nuclear-energy-what-you-need-to-know |archive-date=28 February 2023 |access-date=28 February 2023 |publisher=UK Government}}</ref> In the late 1990s [[Nuclear power plants in the United Kingdom|nuclear power plants]] contributed around 25 per cent of the total annual electricity generation in the UK, but this has gradually declined as old plants have been shut down. The UK government is investing in [[small modular reactors]] that operate via [[nuclear fission]], as well as in research and development towards commercial [[fusion reactors]]. To that end the government entered into a partnership with the US in late 2023 to collaborate on fusion technology, with "a commercial grid-ready fusion reactor by 2040" stated as a goal.<ref>{{Cite news |title=UKAEA implementing the UK's fusion energy strategy |work=Open Access Government |date=7 March 2024 |url=https://www.openaccessgovernment.org/ukaea-implementing-the-uks-fusion-energy-strategy/174384/ |access-date=27 May 2024 |last1=Belderbos |first1=Harriet}};{{Cite magazine |title=UK nuclear fusion reactor sets new world record for energy output |url=https://www.newscientist.com/article/2415909-uk-nuclear-fusion-reactor-sets-new-world-record-for-energy-output/ |magazine=New Scientist |access-date=27 May 2024}}</ref> At the end of 2023 it was estimated that there were 1.1&nbsp;billion [[barrels of oil equivalent]] of "proven" and "probable" [[Oil and gas reserves and resource quantification|gas reserves]] and 2.3&nbsp;billion boe of "proven" and "probable" [[North Sea oil|oil reserves]] offshore, reducing reliance on imports for energy security and transitioning to renewables.<ref>{{Cite report |title=UK Oil and Gas Reserves and Resources |url=https://www.nstauthority.co.uk/media/vtjkyqnf/uk-reserves-and-resources-report-as-at-end-2023.pdf |archive-url=https://web.archive.org/web/20250113172052/https://www.nstauthority.co.uk/media/vtjkyqnf/uk-reserves-and-resources-report-as-at-end-2023.pdf |archive-date=13 January 2025 |access-date=1 February 2025 |publisher=North Sea Transition Authority}}</ref> Emissions from UK gas production are roughly four times lower than imported [[liquefied natural gas]] (LNG), according to the [[North Sea Transition Authority|UK's oil and gas regulator]].<ref>{{Cite news |title=North Sea oil and gas claims fact-checked |work=BBC |date=22 January 2024 |url=https://www.bbc.co.uk/news/science-environment-67945281 |archive-url=https://web.archive.org/web/20250201182137/https://www.bbc.com/news/science-environment-67945281 |archive-date=1 February 2025 |access-date=1 February 2025}}</ref> In September 2024 the last coal power station was closed, making [[coal]] no longer a power source in the UK.<ref name="2024 Energy" /> The UK currently has no [[fracking]] (hydraulic fracturing) for [[shale gas]] despite a large supply, due to environmental concerns.<ref>{{Cite news |title=UK's last fracking wells to be filled with cement despite dwindling gas stocks |date=29 January 2025 |url=https://www.cityam.com/uks-last-fracking-wells-to-be-filled-with-cement-despite-dwindling-gas-stocks/ |archive-url=https://web.archive.org/web/20250201182917/https://www.cityam.com/uks-last-fracking-wells-to-be-filled-with-cement-despite-dwindling-gas-stocks/ |archive-date=1 February 2025 |access-date=1 February 2025 |work=City AM}}</ref> === Water supply and sanitation === {{Main|Water supply and sanitation in the United Kingdom}} Access to improved water supply and sanitation in the UK is universal. It was estimated that 96 per cent of households were connected to the sewer network in 2022.<ref>{{Cite web |url=https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/69582/pb6655-uk-sewage-treatment-020424.pdf |title=Sewage Treatment in the UK |publisher=DEFRA |website=assets.publishing.service.gov.uk |date=March 2022 |page=3 |id=PB 6655 |access-date=8 April 2023}}</ref> According to the [[Environment Agency]], total water abstraction for public water supply in the UK was 16,406 [[megalitre]]s per day in 2007.<ref>{{Cite web |title=Environment Agency |url=http://www.environment-agency.gov.uk/research/library/data/112185.aspx |archive-url=https://web.archive.org/web/20091125040346/http://www.environment-agency.gov.uk/research/library/data/112185.aspx |archive-date=25 November 2009}}</ref> In England and Wales, water and sewerage services are provided by 10 private regional water and sewerage companies and 13 mostly smaller private "water only" companies. In Scotland, said services are provided by a single public company, [[Scottish Water]]. In Northern Ireland, they are also provided by a single public entity, [[Northern Ireland Water]].<ref>{{Cite web |title=About Us |url=https://www.niwater.com/about |access-date=29 August 2020 |publisher=niwater.com}}</ref> == Demographics == {{Main|Demographics of the United Kingdom|British people}} {{Further|Ceremonial counties of England|Subdivisions of Scotland|Subdivisions of Wales|Counties of Northern Ireland}} Whereas the censuses of England and Wales and of Northern Ireland went ahead as planned in 2021, the census in Scotland was delayed until 2022 due to the COVID-19 pandemic. The Office for National Statistics has estimated that the total population of the United Kingdom recorded in the census would have been 66,912,637 had it been conducted in all parts of the UK on 21 March 2021.<ref name=Ethnicity2021/> The UK population is the [[List of European countries by population|fourth-largest]] in Europe and the [[List of countries by population|22nd-largest]] in the world. In 2012 and 2013 births contributed the most to population growth, while in 2014 and 2015 net international migration contributed more.<ref name="pop2015">{{Cite web |date=23 June 2016 |title=Population Estimates for UK, England and Wales, Scotland and Northern Ireland, Mid-2015 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/latest |publisher=Office for National Statistics}}</ref> Between 2001 and 2011 the population increased at an average annual rate of 0.7 per cent.<ref name="2011census">{{Cite web |date=21 December 2022 |title=Population estimates for the UK, England, Wales, Scotland and Northern Ireland: mid-2021 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/mid2021 |access-date=16 April 2025 |publisher=Office for National Statistics}}</ref> The [[2011 United Kingdom census|2011 census]] also showed that, over the previous 100 years, the proportion of the population aged 0–14 fell from 31 to 18 per cent, and the proportion of people aged 65 and over rose from 5 to 16 per cent.<ref name="2011census" /> In 2018 the [[median age]] of the UK population was 41.7 years.<ref name="factbook" /> The 2021 census put Scotland's population at 5.48&nbsp;million, Wales's at 3.1&nbsp;million and Northern Ireland's at 1.9&nbsp;million.<ref name="2011census" /> <!-- Self-maintaining population table --> {{UK population table}} England's population in 2021 was 56&nbsp;million, representing some 84 per cent of the UK total.<ref name="2011census" /> England is one of the [[List of countries and dependencies by population density|most-densely-populated countries]] in the world, with 434&nbsp;people per square kilometre in mid-2021,<ref name="2011census" /> with a particular concentration in London and the south-east.<ref>{{Cite news |last=Khan |first=Urmee |date=16 September 2008 |title=England is most crowded country in Europe |url=https://www.telegraph.co.uk/news/newstopics/politics/2967374/England-is-most-crowded-country-in-Europe.html |archive-url=https://web.archive.org/web/20080918221002/http://www.telegraph.co.uk/news/newstopics/politics/2967374/England-is-most-crowded-country-in-Europe.html |archive-date=18 September 2008 |access-date=5 September 2009 |work=The Telegraph |location=London}}</ref> [[London metropolitan area|London's wider metropolitan area]] is the largest in [[Western Europe]], with a population of 14.9&nbsp;million in 2024.<ref>{{Cite web |title=Major Agglomerations |url=http://citypopulation.de/en/world/agglomerations |url-status=live |archive-url=https://web.archive.org/web/20231004094531/https://www.citypopulation.de/en/world/agglomerations/ |archive-date=4 October 2023 |access-date=16 October 2023}}</ref> {| class="wikitable sortable" style="text-align:right;" |+ Population of England by region ({{UK subdivision statistics year}})<ref name="ONS mid-year pop est">{{UK subdivision statistics citation}}</ref> |- ! Rowspan=2 | Region ! Colspan=2 | Land area ! Colspan=2 | Population ! Rowspan=2 | Density<br />(/km<sup>2</sup>) |- ! (km<sup>2</sup>) ! (%) ! People ! (%) |- | style="text-align:left;" | [[North East England|North East]] | 8,581 | 6% | 2,683,040 | 5% | 313 |- | style="text-align:left;" | [[North West England|North West]] | 14,108 | 11% | 7,516,113 | 13% | 533 |- | style="text-align:left;" | [[Yorkshire and the Humber]] | 15,404 | 12% | 5,541,262 | 10% | 360 |- | style="text-align:left;" | [[East Midlands]] | 15,624 | 12% | 4,934,939 | 9% | 316 |- | style="text-align:left;" | [[West Midlands (region)|West Midlands]] | 12,998 | 10% | 6,021,653 | 11% | 463 |- | style="text-align:left;" | [[East of England]] | 19,116 | 15% | 6,398,497 | 11% | 335 |- | style="text-align:left;" | [[Greater London]] | 1,572 | 1% | 8,866,180 | 15% | 5,640 |- | style="text-align:left;" | [[South East England|South East]] | 19,072 | 15% | 9,379,833 | 16% | 492 |- | style="text-align:left;" | [[South West England|South West]] | 23,836 | 18% | 5,764,881 | 10% | 242 |- ! style="text-align:left;" | England ! style="text-align:right;" | 130,310 ! style="text-align:right;" | 100% ! style="text-align:right;" | 57,106,398 ! style="text-align:right;" | 100% ! style="text-align:right;" | 438 |} In 2021 the [[total fertility rate]] across the UK was 1.53 children born per woman,<ref>{{Cite web |title=Vital statistics: population and health reference tables |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/vitalstatisticspopulationandhealthreferencetables |access-date=6 March 2018 |website=Office for National Statistics}}</ref> which remains considerably below the [[Mid-20th century baby boom|baby boom]] peak of 2.95 children per woman in 1964,<ref>{{Cite news |last=Boseley |first=Sarah |date=14 July 2008 |title=The question: What's behind the baby boom? |url=https://www.theguardian.com/lifeandstyle/2008/jul/14/familyandrelationships.women |access-date=28 August 2009 |work=The Guardian |location=London |page=3}}</ref> or the high of 6.02 children born per woman in 1815<ref>{{Citation |last=Roser |first=Max |title=Total Fertility Rate around the world over the last centuries |date=2014 |work=[[Our World in Data]], [[Gapminder Foundation]] |url=https://ourworldindata.org/grapher/children-born-per-woman?year=1800&country=GBR |access-date=10 December 2019 |archive-url=https://web.archive.org/web/20190705121623/https://ourworldindata.org/grapher/children-born-per-woman?year=1800&country=GBR |archive-date=5 July 2019}}</ref> and below the replacement rate of 2.1. In 2011, 47.3 per cent of births in the UK were to unmarried women.<ref>[http://epp.eurostat.ec.europa.eu/tgm/table.do?tab=table&plugin=0&language=en&pcode=tps00018 Tables, Graphs and Maps Interface (TGM) table]. Eurostat (26 February 2013). Retrieved 12 July 2013.</ref> The [[Office for National Statistics]] reported in 2015 that amongst the UK population aged 16 and over, 1.7 per cent identify as gay, lesbian, or bisexual (2.0 per cent of males and 1.5 per cent of females); 4.5 per cent of respondents responded with "other", "I don't know", or did not respond.<ref>{{Cite web |date=5 October 2016 |title=Sexual identity, UK: 2015 – Experimental Official Statistics on sexual identity in the UK in 2015 by region, sex, age, marital status, ethnicity and NS-SEC |url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/sexuality/bulletins/sexualidentityuk/2015 |access-date=19 January 2017 |publisher=[[Office for National Statistics]]}}</ref> The number of [[transgender]] people in the UK was estimated to be between 65,000 and 300,000 by research between 2001 and 2008.<ref>{{Cite web |title=Research report 27: Trans research review |url=http://www.equalityhumanrights.com/about-us/our-work/key-projects/trans-inequalities-reviewed/introduction-to-the-review |url-status=dead |archive-url=https://web.archive.org/web/20150706020643/http://www.equalityhumanrights.com/about-us/our-work/key-projects/trans-inequalities-reviewed/introduction-to-the-review |archive-date=6 July 2015 |access-date=26 November 2021 |website=equalityhumanrights.com |page=v}}</ref> {{Largest Urban Areas of the United Kingdom}} === Ethnicity === {{Main|Ethnic groups in the United Kingdom}} Historically, indigenous British people were thought to be [[Genetic history of the British Isles|descended from ethnic groups]] that settled there before the 12th century: the [[Celts]], Romans, Anglo-Saxons, Norse and the [[Normans]]. [[Welsh people]] could be the oldest ethnic group in the UK.<ref>{{Cite news |date=19 June 2012 |title=Welsh people could be most ancient in UK, DNA suggests |url=https://www.bbc.co.uk/news/uk-wales-18489735 |access-date=28 April 2013 |work=BBC News}}</ref> The UK has a history of non-white immigration with [[Liverpool]] having the oldest black population in the country dating from at least the 1730s,<ref>{{Cite book |last=Winder |first=Robert |url=https://books.google.com/books?id=7ORcaQIgdcEC&q=combed&pg=PT94 |title=Bloody Foreigners: The Story of Immigration to Britain |date=2010 |publisher=Little, Brown Book |isbn=978-0-7481-2396-4}}; {{Cite book |last=Costello |first=Ray |title=Black Liverpool: The Early History of Britain's Oldest Black Community 1730–1918 |date=2001 |publisher=Picton Press |isbn=978-1-873245-07-1 |location=Liverpool}}</ref> in addition to having the oldest [[British Chinese|Chinese]] community in Europe dating from the 19th century.<ref>{{Cite web |title=Culture and Ethnicity Differences in Liverpool&nbsp;– Chinese Community |url=http://www.mersey-gateway.org/server.php?show=ConWebDoc.1369 |archive-url=https://web.archive.org/web/20090724204513/http://www.mersey-gateway.org/server.php?show=ConWebDoc.1369 |archive-date=24 July 2009 |access-date=9 March 2015 |publisher=Chambré Hardman Trust}}</ref> In 2021, 83.1 per cent of the UK population was classified as white, 8.6 per cent as Asian or Asian British, 3.7 per cent as Black or Black British, 2.7 per cent as mixed ethnicity, and 2.0 per cent other.<ref name=Ethnicity2021/> Ethnic diversity varies significantly across the UK. In 2021, 46.2 per cent of London's population was from a non-white ethnic minority,<ref name=Regionaldiversity>{{cite news|url=https://www.ethnicity-facts-figures.service.gov.uk/uk-population-by-ethnicity/national-and-regional-populations/regional-ethnic-diversity/latest/|title=Regional ethnic diversity|publisher=Office for National Statistics|date=22 December 2022|access-date=28 March 2026}}</ref> compared less than 10 per cent in the South West and North East of England, Wales,<ref name=Regionaldiversity/> Scotland<ref>{{cite news|url=https://www.scotlandscensus.gov.uk/census-results/at-a-glance/ethnicity/|title=Ethnicity|publisher=National Records of Scotland|date=4 February 2025|access-date=28 March 2026}}</ref> and Northern Ireland.<ref>{{cite web|url=https://www.nisra.gov.uk/system/files/statistics/census-2021-ms-b01.xlsx|title=MS-B01: Ethnic group|publisher=Northern Ireland Statistics and Research Agency|date=30 November 2023|access-date=28 March 2026}}</ref> === Language === {{Main|Languages of the United Kingdom}} The [[English language]] is the ''[[de facto]]'' official and most widely spoken language in the United Kingdom.<ref>{{Cite web |title=English language&nbsp;– Government, citizens and rights |url=http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012519 |archive-url=http://webarchive.nationalarchives.gov.uk/20121015000000/http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_10012519 |archive-date=15 October 2012 |access-date=23 August 2011 |website=[[Directgov]]}}</ref><ref>{{Cite journal |last=Mac Sithigh |first=Daithí |date=17 May 2018 |title=Official status of languages in the UK and Ireland |url=https://pureadmin.qub.ac.uk/ws/portalfiles/portal/141540053/Status_OA_Feb_2018.pdf |journal=Common Law World Review |publisher=Queen's University, Belfast |volume=47 |issue=1 |pages=77–102 |doi=10.1177/1473779518773642 |s2cid=219987922}}</ref> The UK promotes the language globally to build connections, understanding and trust between people in the UK and countries worldwide.<ref>British Council {{Cite web |title=British Council &#124; the UK's international culture and education organisation |url=https://www.britishcouncil.org/ |url-status=live |archive-url=https://web.archive.org/web/20230201181104/https://www.britishcouncil.org/ |archive-date=1 February 2023 |access-date=5 December 2018}} (last checked 6 February 2023)</ref><ref>{{Cite web |title=About BBC Learning English |url=https://www.bbc.com/learningenglish/english/hygiene |url-status=live |archive-url=https://web.archive.org/web/20230204204233/https://www.bbc.com/learningenglish/english/hygiene |archive-date=4 February 2023 |access-date=9 February 2023 |website=BBC}}</ref> In the UK, the English language is spoken with distinctive characteristics that collectively form what is known as [[British English]]. The variety of dialects and accents is often noted, with nearby regions frequently having highly distinct variations. [[Received Pronunciation]] is traditionally associated with educated speakers in southern England.<ref>{{Cite web |title=British English Pronunciations |url=https://www.oed.com/information/understanding-entries/pronunciation/british-english-pronunciations/?tl=true |archive-url=https://web.archive.org/web/20250605075115/https://www.oed.com/information/understanding-entries/pronunciation/british-english-pronunciations/?tl=true |archive-date=5 June 2025 |access-date=5 June 2025 |website=OED}}</ref> The main national dialects are [[Scottish English]], [[Welsh English]] and [[Northern Irish English]]. Distinctive regional varieties include [[Brummie dialect|Brummie]], [[Cockney]], [[Geordie]], [[Manchester dialect|Mancunian]], [[Scouse]], [[West Country English|West Country]], [[Yorkshire dialect|Yorkshire]] and [[Multicultural London English|MLE]] (Multicultural London English).<ref>{{Cite web |title=10 British dialects you need to know |url=https://www.ef.com/wwen/blog/language/british-dialects-you-need-to-know/ |website=EF |access-date=5 June 2025}}</ref> [[File:Bilingual welcome sign Newry.jpg|thumb|[[Bilingual sign]] ([[Irish language|Irish]] and [[English language|English]]) in [[Newry]], Northern Ireland]]Three indigenous [[Celtic languages]] are spoken in the UK: [[Welsh language|Welsh]], [[Irish language|Irish]] and [[Scottish Gaelic]]. [[Cornish language|Cornish]], which became extinct as a first language in the late-18th century, is being revived and has a small group of second-language speakers.<ref>{{Cite book |last1=Track |first1=Robert Lawrence |url=https://books.google.com/books?id=oLx9AgAAQBAJ&q=%E2%80%9Cthese+people+speak+the+dead+language+as+a+second+language%E2%80%9D&pg=PA63 |title=Language and Linguistics: The Key Concepts |last2=Stockwell, Peter |date=2007 |isbn=978-0-415-41358-9 |page=63 |publisher=Routledge |access-date=4 August 2019}}; {{Cite web |title=Framework Convention for the Protection of National Minorities, Strasbourg, 1.II.1995 |url=http://conventions.coe.int/Treaty/en/Treaties/Html/157.htm |access-date=9 March 2015 |publisher=Council of Europe |archive-date=22 February 2005 |archive-url=https://web.archive.org/web/20050222193410/http://conventions.coe.int/Treaty/EN/treaties/Html/157.htm |url-status=dead}}; {{Cite web |title=European Charter for Regional or Minority Languages, Strasbourg, 5.XI.1992 |url=http://conventions.coe.int/treaty/en/Treaties/Html/148.htm |access-date=9 March 2015 |publisher=Council of Europe |archive-date=26 February 2011 |archive-url=https://web.archive.org/web/20110226052008/http://conventions.coe.int/Treaty/EN/Treaties/HTML/148.htm |url-status=dead}}</ref><ref name="reglang" /> In the [[2021 United Kingdom census|2021 census]] the [[Welsh-speaking population]] of Wales aged three or older was 538,300 (17.8 per cent).<ref>{{Cite web |date=6 December 2022 |title=Welsh language in Wales (Census 2021) |url=https://gov.wales/welsh-language-wales-census-2021-html |access-date=6 December 2022 |website=gov.wales}}</ref> In addition it is estimated that about 200,000 Welsh-speakers live in England.<ref>{{Cite web |last=Wynn Thomas |first=Peter |date=March 2007 |title=Welsh today |url=https://www.bbc.co.uk/voices/multilingual/welsh.shtml |access-date=5 July 2011 |website=Voices |publisher=BBC}}</ref> In the 2021 census in Northern Ireland 12.4 per cent of people had some [[Irish language in Northern Ireland|Irish language]] ability and 10.4 per cent had some facility in the [[Ulster Scots dialect|Ulster-Scots]] language.<ref>{{Cite web |title=Census 2021: Main statistics for Northern Ireland |url=https://www.nisra.gov.uk/system/files/statistics/census-2021-main-statistics-for-northern-ireland-phase-1-statistical-bulletin-language.pdf |archive-url=https://web.archive.org/web/20240210110853/https://www.nisra.gov.uk/system/files/statistics/census-2021-main-statistics-for-northern-ireland-phase-1-statistical-bulletin-language.pdf |archive-date=10 February 2024 |access-date=10 February 2024}}</ref> In 2001, over 92,000 people in Scotland, just under 2 per cent of the population, had some Gaelic language ability, including 72 per cent of those living in the [[Outer Hebrides]].<ref>{{Cite web |title=Scotland's Census 2001&nbsp;– Gaelic Report |url=http://www.gro-scotland.gov.uk/press/news2005/scotlands-census-2001-gaelic-report.html |archive-url=https://web.archive.org/web/20130522110328/http://www.gro-scotland.gov.uk/press/news2005/scotlands-census-2001-gaelic-report.html |archive-date=22 May 2013 |access-date=28 April 2013 |publisher=General Register Office for Scotland}}</ref> The number of children being taught either Welsh or Scottish Gaelic is increasing.<ref>{{Cite news |date=12 February 2009 |title=Local UK languages 'taking off' |url=http://news.bbc.co.uk/1/hi/education/7885493.stm |work=BBC News}}</ref> [[Scots language|Scots]], a language descended from early northern [[Middle English]], has limited [[European Charter for Regional or Minority Languages|recognition]] alongside its regional variant, [[Ulster Scots dialects|Ulster Scots]] in Northern Ireland, without specific commitments to protection and promotion.<ref name="reglang" /><ref>{{Cite web |title=Language Data&nbsp;– Scots |url=http://www.eurolang.net/index.php?option=com_content&task=view&id=2449&Itemid=52&lang=en |archive-url=https://web.archive.org/web/20070623185445/http://eurolang.net/index.php?option=com_content&task=view&id=2449&Itemid=52&lang=en |archive-date=23 June 2007 |access-date=2 November 2008 |publisher=European Bureau for Lesser-Used Languages}}</ref> As of April 2020 there are around 151,000 users of [[British Sign Language]] (BSL), a [[sign language]] used by deaf people, in the UK.<ref>{{Cite news |last=Brown |first=Hannah |date=23 April 2020 |title='People are dying because of this': Calls for UK Gov to follow Scotland with sign language interpreter at Covid-19 briefing |url=https://www.scotsman.com/news/politics/people-are-dying-because-calls-uk-gov-follow-scotland-sign-language-interpreter-covid-19-briefing-2547989 |access-date=19 December 2021 |work=The Scotsman}}</ref> In 2013, it was estimated that 95 per cent of the UK's population were [[monolingual]] English speakers.<ref name="BBC languages">{{Cite web |title=Languages across Europe: United Kingdom |url=https://www.bbc.co.uk/languages/european_languages/countries/uk.shtml |access-date=4 February 2013 |website=BBC}}</ref> In 2013, over 5 per cent of the population were estimated to speak languages brought to the UK as a result of immigration.<ref name="BBC languages" /> [[South Asian languages]] are the largest group, which includes [[Punjabi language|Punjabi]], [[Urdu]], [[Bengali language|Bengali]], [[Sylheti language|Sylheti]], [[Hindi]], [[Pahari-Pothwari]], [[Tamil language|Tamil]] and [[Gujarati language|Gujarati]].<ref>Carl Skutsch (2013). ''Encyclopedia of the World's Minorities''. pp.1261. Routledge. Retrieved 3 December 2020.</ref> In the 2011 census [[Polish language|Polish]] was the second-largest language spoken in England, with 546,000 speakers.<ref>{{Cite news |last=Booth |first=Robert |date=30 January 2013 |title=Polish becomes England's second language |url=https://www.theguardian.com/uk/2013/jan/30/polish-becomes-englands-second-language |access-date=4 February 2012 |work=The Guardian |location=London}}</ref> In 2019 some three-quarters of a million people spoke little or no English.<ref>{{Cite news |date=23 April 2019 |title=The teenagers who translate for their parents |url=https://www.bbc.co.uk/news/av/uk-47982494 |access-date=23 April 2019 |work=BBC News}}</ref> === Religion === {{Main|Religion in the United Kingdom|Freedom of religion in the United Kingdom}} [[File:Westminster_Abbey_St_Peter.jpg|thumb|The [[Westminster Abbey]] in [[London]]. This was the [[Coronation of the British monarch|coronation]] site of 40 monarchs, 18 royal burials, and at least 16 royal weddings since 1100.]] [[Christianity]] has dominated religious life in the United Kingdom for [[History of Christianity in Britain|more than 1,400 years]].<ref>Cannon, John, ed. (2nd edn., 2009). [https://books.google.com/books?id=TYnfhTq2M7EC&pg=PA144 ''A Dictionary of British History'']. Oxford University Press. p. 144. {{ISBN|978-0-19-955037-1}}.</ref> Although a majority of citizens still identify with Christianity in surveys, regular church attendance has fallen dramatically since the middle of the 20th century,<ref>Field, Clive D. (November 2009). [http://www.brin.ac.uk/wp-content/uploads/2011/12/development-of-religious-statistics.pdf "British religion in numbers"]. BRIN Discussion Series on Religious Statistics, Discussion Paper 001. Retrieved 7 March 2015.</ref> while immigration and demographic change have contributed to the growth of Islam and other faiths.<ref>Yilmaz, Ihsan (2005). [https://books.google.com/books?id=ryrD2YODzxUC&pg=PA291 ''Muslim Laws, Politics and Society in Modern Nation States: Dynamic Legal Pluralisms in England, Turkey, and Pakistan'']. Aldershot: Ashgate Publishing. pp. 55–56. {{ISBN|978-0-7546-4389-0}}.</ref> This has led some commentators to describe the UK as a multi-faith,<ref>Brown, Callum G. (2006). [https://books.google.com/books?id=ryrD2YODzxUC&pg=PA291 ''Religion and Society in Twentieth-Century Britain'']. Harlow: Pearson Education. p. 291. {{ISBN|978-0-582-47289-1}}.</ref> [[secularised]],<ref>Norris, Pippa; Inglehart, Ronald (2004). [https://books.google.com/books?id=dto-P2YfWJIC&pg=PA84 ''Sacred and Secular: Religion and Politics Worldwide'']. Cambridge University Press. p. 84. {{ISBN|978-0-521-83984-6}}.</ref> or [[post-Christian]] society.<ref>Fergusson, David (2004). [https://books.google.com/books?id=Owz4aBSEINgC&pg=PA94 ''Church, State and Civil Society'']. Cambridge University Press. p. 94. {{ISBN|978-0-521-52959-4}}.</ref> In the 2021 census of England and Wales, 46.2 per cent of respondents reported that they were Christians, with the next largest faiths being [[Islam in the United Kingdom|Islam]] (6.5 per cent), [[Hinduism in the United Kingdom|Hinduism]] (1.7 per cent), [[Sikhism in the United Kingdom|Sikhism]] (0.9 per cent), [[Buddhism in the United Kingdom|Buddhism]] (0.5 per cent), [[Judaism in the United Kingdom|Judaism]] (0.5 per cent), and all other religions (0.6 per cent). Of the respondents, 37.2 per cent stated that they had [[Irreligion in the United Kingdom|no religion]] and a further 6.0 per cent did not answer the optional question.<ref>{{cite news|url=https://www.ons.gov.uk/peoplepopulationandcommunity/culturalidentity/religion/bulletins/religionenglandandwales/census2021|title=Religion, England and Wales: Census 2021|publisher=Office for National Statistics|first=Michael|last=Roskams|date=29 November 2022|access-date=28 March 2026}}</ref> In the census of Northern Ireland, 42.3 per cent of the population was recorded as Catholic, 37.7% as Protestant or other Christian, 1.3 per cent as belonging to other religions, 17.4 per cent as having no religion and 1.6 per cent did not state a religion.<ref>{{cite web|url=https://www.nisra.gov.uk/system/files/statistics/census-2021-ms-b19.xlsx|title=MS-B19: Religion|publisher=Northern Ireland Statistics and Research Agency|date=30 November 2023}}</ref> In Scotland's 2022 census, 51.1 per cent of the population stated that they had no religion, 20.4 per cent were recorded as Church of Scotland, 13.3 per cent as Catholic, 5.1 per cent as other Christian, 2.2 per cent as Muslim and 0.6 per cent as Hindu, with 1.2 per cent belonging to other religions and 6.2 per cent not stating a religion.<ref>{{cite web|url=https://www.scotlandscensus.gov.uk/2022-reports/scotland-s-census-2022-ethnic-group-national-identity-language-and-religion/|title=Scotland's Census 2022 - Ethnic group, national identity, language and religion|publisher=National Records of Scotland|date=21 May 2024|access-date=28 March 2026}}</ref> A [[Tearfund]] survey in 2007 showed that one Briton in ten attends church weekly.<ref>{{Cite web |date=4 April 2007 |title=United Kingdom: New Report Finds Only One in 10 Attend Church |url=http://news.adventist.org/2007/04/uite-kigom-ew-report-fis-oly-oe-i-10-atte-church.html |archive-url=https://web.archive.org/web/20111213155625/http://news.adventist.org/2007/04/uite-kigom-ew-report-fis-oly-oe-i-10-atte-church.html |archive-date=13 December 2011 |access-date=9 March 2015 |website=News.adventist.org}}</ref> Between the 2001 and 2011 censuses there was a 12 per cent decrease in those who identified as Christian, while the percentage reporting no religious affiliation doubled. This contrasted with growth in the other main religious group categories, with the number of [[Muslims]] increasing the most to about 5 per cent.<ref>{{Cite news |last=Philby |first=Charlotte |date=12 December 2012 |title=Less religious and more ethnically diverse: Census reveals a picture of Britain today |url=https://www.independent.co.uk/news/uk/home-news/less-religious-and-more-ethnically-diverse-census-reveals-a-picture-of-britain-today-8406506.html |work=[[The Independent|Independent]] |location=London}}</ref> The [[Church of England]] is the [[State religion|established church]] in England.<ref>{{Cite web |date=2004 |title=The History of the Church of England |url=http://www.cofe.anglican.org/about/history/ |url-status=dead |archive-url=https://web.archive.org/web/20100221212004/http://www.cofe.anglican.org/about/history |archive-date=21 February 2010 |access-date=23 November 2008 |website=The Church of England}}</ref> It retains [[Lords Spiritual|representation]] in the UK Parliament, and the British monarch is its [[Supreme Governor of the Church of England|Supreme Governor]].<ref>{{Cite web |title=Queen and Church of England |url=http://www.royalinsight.gov.uk/output/Page4708.asp |archive-url=https://web.archive.org/web/20061008203611/http://www.royalinsight.gov.uk/output/Page4708.asp |archive-date=8 October 2006 |access-date=5 June 2010 |publisher=British Monarchy Media Centre}}</ref> In [[religion in Scotland|Scotland]] the [[Church of Scotland]] is the [[national church]]. It is not subject to state control, and the British monarch is an ordinary member, required to swear an oath to "maintain and preserve the Protestant Religion and [[Presbyterian polity|Presbyterian Church Government]]" upon his or her accession.<ref>{{Cite web |title=Queen and the Church |url=http://www.royal.gov.uk/MonarchUK/QueenandChurch/History.aspx |url-status=live |archive-url=https://web.archive.org/web/20110605025533/http://www.royal.gov.uk/MonarchUK/QueenandChurch/History.aspx |archive-date=5 June 2011 |publisher=The British Monarchy (Official Website)}}</ref><ref name="reglang" /><ref>{{Cite web |date=22 February 2010 |title=Our structure |url=https://www.churchofscotland.org.uk/about-us/our-structure |url-status=live |archive-url=https://web.archive.org/web/20200125192732/https://www.churchofscotland.org.uk/about-us/our-structure |archive-date=25 January 2020 |website=churchofscotland.org.uk}}</ref> The [[Church in Wales]] was disestablished in 1920 and, because the [[Church of Ireland]] was disestablished in 1870 before the [[partition of Ireland]], there is no established church in Northern Ireland.<ref>Weller, Paul (2005). [https://books.google.com/books?id=tHc88PzAPLMC&pg=PA80 ''Time for a Change: Reconfiguring Religion, State, and Society'']. London: Continuum. pp. 79–80. {{ISBN|978-0-567-08487-3}}.</ref> Although there are no UK-wide data in the 2001 census on adherence to individual Christian denominations, it has been estimated that 62 per cent of Christians are Anglican, 13.5 per cent Catholic, 6 per cent Presbyterian, and 3.4 per cent Methodist, with smaller numbers of other denominations.<ref>Peach, Ceri, [https://books.google.com/books?id=i6ER_z8gcD4C "United Kingdom, a major transformation of the religious landscape"], in H. Knippenberg. ed. (2005). ''The Changing Religious Landscape of Europe''. Amsterdam: Het Spinhuis. pp. 44–58. {{ISBN|978-90-5589-248-8}}.</ref> === Migration === {{Main|Historical immigration to Great Britain|Modern immigration to the United Kingdom}} {{See also|Foreign-born population of the United Kingdom}} [[File:United Kingdom foreign born population by country of birth.png|thumb|upright=1.35|Estimated foreign-born population by country of birth from April 2007&nbsp;to March 2008]] [[File:British expats countrymap.svg|thumb|upright=1.35|Estimated number of British citizens living overseas by country in 2006: {{legend|#002255|Greater than or equal to 1,000,000}} {{legend|#003380|500,000 - 999,999}} {{legend|#0044aa|100,000 - 499,999}} {{legend|#0055d4|50,000 - 99,999}} {{legend|#0066ff|10,000 - 49,999}} {{legend|#2a7fff|5,000 - 9,999}} {{legend|#5599ff|1,000 - 4,999}} {{legend|#80b3ff|100 - 999}} {{legend|#afc6e9|Less than 100 or no data}} {{legend|#000000|UK}} ]] Immigration is contributing to a rising population in the United Kingdom,<ref>{{Cite news |date=21 August 2008 |title=Immigration and births to non-British mothers pushes British population to record high |url=https://www.standard.co.uk/news/immigration-and-births-to-nonbritish-mothers-pushes-british-population-to-record-high-6816318.html |work=London Evening Standard}}</ref><ref name="bbc-23-05-2024">{{cite news |title=Migration: How many people come to the UK and how are the salary rules changing? |url=https://www.bbc.com/news/uk-48785695 |work=BBC News |date=23 May 2024}}</ref> with arrivals and UK-born children of migrants accounting for about half of the population increase between 1991 and 2001. According to statistics released in 2015, 27 per cent of UK live births in 2014 were to mothers born outside the UK.<ref>{{Cite web |date=15 July 2015 |title=Births in England and Wales: 2014 |url=http://www.ons.gov.uk/ons/rel/vsob1/birth-summary-tables--england-and-wales/2014/index.html |website=Office for National Statistics }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> In 2013 approximately 208,000 foreign nationals were naturalised as British citizens, the highest number since 1962. This figure fell to around 125,800 in 2014. Between 2009 and 2013 the average number of British citizenships granted annually was 195,800. The most common origins of those naturalised in 2024 were Pakistani, Indian, [[Nigeria]]n, [[Philippines|Filipino]], [[Bangladesh]]i, Italian, Turkish, Romanian and Iranian. The number of grants of settlement, which confer [[Permanent residency|permanent residence]] in the UK but not [[British citizenship|citizenship]],<ref>{{Cite web |last=Blinder |first=Scott |date=11 June 2014 |title=Settlement in the UK |url=http://www.migrationobservatory.ox.ac.uk/briefings/settlement-uk |archive-url=https://web.archive.org/web/20150906232123/http://migrationobservatory.ox.ac.uk/briefings/settlement-uk |archive-date=6 September 2015 |access-date=1 August 2015 |publisher=The Migration Observatory, University of Oxford}}</ref> was approximately 154,700 in 2013, higher than the previous two years.<ref name="Blinder2015">{{Cite web |last=Blinder |first=Scott |date=27 March 2015 |title=Naturalisation as a British Citizen: Concepts and Trends |url=http://www.migrationobservatory.ox.ac.uk/sites/files/migobs/Briefing%20-%20Naturalisation%20as%20a%20British%20Citizen%20-%20Concepts%20and%20Trends_0.pdf |archive-url=https://web.archive.org/web/20150916052200/http://www.migrationobservatory.ox.ac.uk/sites/files/migobs/Briefing%20-%20Naturalisation%20as%20a%20British%20Citizen%20-%20Concepts%20and%20Trends_0.pdf |archive-date=16 September 2015 |access-date=1 August 2015 |publisher=The Migration Observatory, University of Oxford}}</ref> Long-term net migration (the number of people immigrating minus the number emigrating) reached a record of 860,000 in 2023, with immigration at 1.326&nbsp;million and emigration at 466,000. In comparison, in 2024 net migration was estimated to be 431,000 with immigration at 948,000 and emigration at 517,000.<ref>{{Cite web |title=Long-term international migration, provisional: year ending December 2024 |date=22 May 2025 |url=https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/internationalmigration/bulletins/longterminternationalmigrationprovisional/yearendingdecember2024 |website=gov.uk |access-date=22 May 2025}}</ref> [[British diaspora|Emigration]] was an important feature of British society in the 19th century. Between 1815 and 1930, around 11.4&nbsp;million people emigrated from Britain and 7.3&nbsp;million from Ireland.<ref>{{Cite book |last=Hammar |first=Tomas |url=https://www.cambridge.org/core/books/european-immigration-policy/10B639425685B0C101619FA11522C409 |title=European Immigration Policy: A Comparative Study |date=1985 |publisher=Cambridge University Press |isbn=978-0-521-12437-9 |series=Comparative Ethnic and Race Relations |location=Cambridge}}</ref><ref name="richards-2018">{{Cite book |last=Richards |first=Eric |url=https://www.jstor.org/stable/j.ctvnb7rj2 |title=The genesis of international mass migration: The British case, 1750-1900 |date=2018 |publisher=Manchester University Press |edition=1 |jstor=j.ctvnb7rj2}}</ref> Estimates show that by the end of the 20th century, some 300&nbsp;million people of British and Irish descent were permanently settled around the globe.<ref name="richards-2018" /> In 2006 at least 5.5&nbsp;million UK-born people lived abroad,<ref name="BritsAbroad">{{Cite web |last1=Sriskandarajah |first1=Dhananjayan |last2=Drew |first2=Catherine |date=11 December 2006 |title=Brits Abroad: Mapping the scale and nature of British emigration |url=http://www.ippr.org/publicationsandreports/publication.asp?id=509 |archive-url=https://web.archive.org/web/20070828011816/http://www.ippr.org/publicationsandreports/publication.asp?id=509 |archive-date=28 August 2007 |access-date=9 March 2015 |publisher=Institute for Public Policy Research}}</ref><ref>{{Cite news |title=Brits Abroad: world overview |url=http://news.bbc.co.uk/1/shared/spl/hi/in_depth/brits_abroad/html/default.stm |access-date=20 April 2007 |publisher=BBC}}; {{Cite news |last=Casciani |first=Dominic |date=11 December 2006 |title=5.5&nbsp;m Britons 'opt to live abroad' |work=BBC News |url=http://news.bbc.co.uk/2/hi/uk_news/6210358.stm |access-date=20 April 2007}}</ref> mainly in Australia, Spain, the United States and Canada.<ref name="BritsAbroad" /><ref>{{Cite news |date=11 December 2006 |title=Brits Abroad: Country-by-country |url=http://news.bbc.co.uk/2/hi/uk_news/6161705.stm |work=BBC News}}</ref> === Education === {{Main|Education in the United Kingdom|Universities in the United Kingdom}} {{Further|Education in England|Education in Scotland|Education in Wales|Education in Northern Ireland}} Education in the United Kingdom is a [[Devolution|devolved]] matter, with each country having a separate education system. About 38 per cent of the United Kingdom population has a university or [[college degree]], the highest percentage in Europe and one of the highest in the world.<ref>{{Cite web |date=24 September 2012 |title=The Most Educated Countries in the World |url=https://finance.yahoo.com/news/the-most-educated-countries-in-the-world.html;_ylt=AlaWy8IcyeBaviKi7_.WJyhE6odG;_ylu=X3oDMTJrY2d2NGZyBG1pdANDeFMgRmluYW5jaWFsbHkgRml0IEFydGljbGUgQXJ0aWNsZSBCb2R5IFByb2QEcG9zAzMEc2VjA01lZGlhQXJ0aWNsZUJvZHlBc3NlbWJseQ--;_ylg=X3oDMTNjdGVoaXJqBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDY2IyOTRhMGEtYmY2OS0zYTdlLThlYTUtZWFlNTU3YWI1ZTc3BHBzdGNhdANleGNsdXNpdmVzfGZpbmFuY2lhbGx5Zml0BHB0A3N0b3J5cGFnZQ--;_ylv=3?page=1 |archive-url=https://web.archive.org/web/20160204213400/http://finance.yahoo.com/news/the-most-educated-countries-in-the-world.html%3B_ylt%3DAlaWy8IcyeBaviKi7_.WJyhE6odG%3B_ylu%3DX3oDMTJrY2d2NGZyBG1pdANDeFMgRmluYW5jaWFsbHkgRml0IEFydGljbGUgQXJ0aWNsZSBCb2R5IFByb2QEcG9zAzMEc2VjA01lZGlhQXJ0aWNsZUJvZHlBc3NlbWJseQ--%3B_ylg%3DX3oDMTNjdGVoaXJqBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDY2IyOTRhMGEtYmY2OS0zYTdlLThlYTUtZWFlNTU3YWI1ZTc3BHBzdGNhdANleGNsdXNpdmVzfGZpbmFuY2lhbGx5Zml0BHB0A3N0b3J5cGFnZQ--%3B_ylv%3D3?page=1 |archive-date=4 February 2016 |access-date=20 April 2016 |website=Yahoo Finance }}; {{Cite magazine |date=27 September 2012 |title=And the World's Most Educated Country Is... |url=https://newsfeed.time.com/2012/09/27/and-the-worlds-most-educated-country-is/ |magazine=Time |location=New York |access-date=20 April 2016 |archive-date=30 April 2018 |archive-url=https://web.archive.org/web/20180430040213/http://newsfeed.time.com/2012/09/27/and-the-worlds-most-educated-country-is/ |url-status=dead }}</ref> The UK is home to [[List of universities in the United Kingdom|many universities]], including the [[University of Oxford]] and [[University of Cambridge]], which often achieve first place on global rankings.<ref>{{Cite web |title=The Times Higher Education World University Rankings 2024 |date=25 September 2023 |url=https://www.timeshighereducation.com/world-university-rankings/2024/world-ranking |access-date=17 April 2024}}</ref><ref>{{Cite web |title=QS World University Rankings 2024 |url=https://www.topuniversities.com/university-rankings/world-university-rankings/2024 |access-date=17 April 2024}}</ref> University education has varied [[Student loans and grants in the United Kingdom|tuition fees]] in different regions of the UK. England and Wales have a fixed maximum annual fee for all UK citizens, contingent on attaining a certain level of income. Only those who reach a certain salary threshold pay this fee through [[Taxation in the United Kingdom|general taxation]].<ref>{{Cite web |title=Repaying your student loan |url=https://www.gov.uk/repaying-your-student-loan/what-you-pay |website=gov.uk |access-date=21 June 2025}}</ref> Northern Ireland and Scotland have a reduced maximum fee or no fee for citizens where it is their home region. Some NHS courses have bursaries which pay the fee and in 2017 it was stated that each doctor gets subsidised by £230,000 during their training.<ref>{{Cite web |date=20 October 2014 |title=Undergraduate Tuition Fess and Student Loans |url=https://www.ucas.com/money-and-student-life/money/student-finance/undergraduate-tuition-fees-and-student-loans |access-date=24 February 2024 |website=UCAS}}</ref><ref>{{Cite web |title=More undergraduate medical education places |url=https://www.gov.uk/government/news/more-undergraduate-medical-education-places |access-date=24 February 2024 |website=gov.uk}}</ref> In 2022 the [[Programme for International Student Assessment]] (PISA), coordinated by the [[OECD]], ranked the overall knowledge and skills of British 15-year-olds as 14th in the world in reading, mathematics and science. The average British student scored 494, above the OECD average of 478.<ref>{{Cite web |title=PISA 2022 UK Results |url=https://www.oecd.org/publication/pisa-2022-results/country-notes/united-kingdom-9c15db47#chapter-d1e11 |access-date=24 February 2024 |website=OECD |date=4 December 2023}}</ref> === Health === {{Main|Health in the United Kingdom|Healthcare in the United Kingdom}} {{Further|Healthcare in England|Healthcare in Scotland|Healthcare in Wales|Healthcare in Northern Ireland}} [[File:QEUH.jpg|thumb|[[NHS Scotland]]'s [[Queen Elizabeth University Hospital]] in Glasgow, the largest hospital campus in Europe]] The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the creation of the [[National Health Service]] (NHS) in 1949 is the primary healthcare provider in the United Kingdom. The widespread popularity of the NHS has led to it being described as a "national religion".<ref>{{Cite news |last=Gill |first=Martha |date=9 July 2023 |title=To those who claim the NHS has turned into a British religion, I say: keep the faith |url=https://www.theguardian.com/commentisfree/2023/jul/09/nhs-british-religion-keep-faith-nhs-at-75 |access-date=16 July 2023 |work=The Observer}}</ref><ref>{{Cite web |date=14 April 2020 |title=Is the NHS our new national religion? – Religion Media Centre |url=https://religionmediacentre.org.uk/news/is-the-nhs-our-new-national-religion/ |access-date=16 July 2023 |website=religionmediacentre.org.uk}}</ref> Healthcare in the United Kingdom is a [[Devolution|devolved matter]] and each country has its own system of universal publicly funded healthcare ([[NHS England]], [[NHS Scotland]], [[Health and Social Care (Northern Ireland)]] and [[NHS Wales]]), although private healthcare is also available. Public healthcare is provided to all [[British nationality law|UK permanent residents]] and is mostly free at the point of need, being paid for from [[Taxation in the United Kingdom|general taxation]]. The [[World Health Organization]], in 2000, ranked the provision of healthcare in the United Kingdom as fifteenth-best in Europe and eighteenth in the world.<ref>{{Cite book |url=https://archive.org/details/worldhealthrepor00worl |title=The world health report 2000&nbsp;– Health systems: improving performance |publisher=World Health Organization |date=2000 |isbn=978-92-4-156198-3 |editor-last=Haden |editor-first=Angela |location=Geneva |access-date=5 July 2011 |editor-last2=Campanini |editor-first2=Barbara}}; {{Cite web |last=World Health Organization |author-link=World Health Organization |title=Measuring overall health system performance for 191 countries |url=http://pages.stern.nyu.edu/~wgreene/Statistics/WHO-COMP-Study-30.pdf |access-date=5 July 2011 |publisher=New York University}}</ref> Since 1979 expenditure on healthcare has increased significantly.<ref>{{Cite journal |last=Fisher |first=Peter |title=The NHS from Thatcher to Blair |url=http://www.healthp.org/node/71 |journal=NHS Consultants Association |archive-url=https://web.archive.org/web/20181120124807/http://www.healthp.org/node/71 |archive-date=20 November 2018 |access-date=19 December 2018 |quote=The Budget&nbsp;... was even more generous to the NHS than had been expected amounting to an annual rise of 7.4 per cent above the rate of inflation for the next five years. This would take us to 9.4 per cent of GDP spent on health ie around EU average.}}</ref> The 2018 [[OECD]] data, which incorporates in health a chunk of what in the UK is classified as social care, has the UK spending £3,121 per person.<ref>{{Cite news |date=24 September 2019 |title=Swindells: They aren't 'your' patients |url=https://www.hsj.co.uk/policy-and-regulation/swindells-they-arent-your-patients/7025988.article? |access-date=19 November 2019 |publisher=Health Service Journal}}</ref> In 2017 the UK spent £2,989 per person on healthcare, near the median for members of the Organisation for Economic Co-operation and Development.<ref>{{Cite news |date=29 August 2019 |title=How does UK healthcare spending compare with other countries? |url=https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/healthcaresystem/articles/howdoesukhealthcarespendingcomparewithothercountries/2019-08-29 |access-date=5 October 2019 |publisher=Office of National Statistics}}</ref> Regulatory bodies are organised on a UK-wide basis such as the [[General Medical Council]], the [[Nursing and Midwifery Council]] and non-governmental-based, such as the [[Medical royal college|Royal College]]s. Political and operational responsibility for healthcare lies with four national [[governments]]; healthcare in England is the responsibility of the UK Government; healthcare in Northern Ireland is the responsibility of the Northern Ireland Executive; healthcare in Scotland is the responsibility of the Scottish Government; and healthcare in Wales is the responsibility of the Welsh Government. Each National Health Service has different policies and priorities.<ref>{{Cite news |date=28 August 2008 |title='Huge contrasts' in devolved NHS |url=http://news.bbc.co.uk/1/hi/health/7586147.stm |work=BBC News}}; {{Cite news |last=Triggle |first=Nick |date=2 January 2008 |title=NHS now four different systems |work=BBC News |url=http://news.bbc.co.uk/1/hi/health/7149423.stm}}</ref> == Culture == {{Main|Culture of the United Kingdom}} {{Further|Culture of England|Culture of Scotland|Culture of Wales|Culture of Northern Ireland}} The culture of the United Kingdom is influenced by the nation's island status, its history, and being a [[political union]] of four countries with each preserving distinctive traditions, customs and symbolism. British influence can be observed in the language, culture and [[Common law|legal systems]] of many of [[List of countries that have gained independence from the United Kingdom|its former colonies]], in particular the United States, Australia, Canada, New Zealand and Ireland, a common culture known as the Anglosphere.<ref>{{Cite book |last=Julian Go |title=Constitutionalism and political reconstruction |date=2007 |publisher=Brill |isbn=978-90-04-15174-1 |editor-last=Arjomand |editor-first=Saïd Amir |pages=92–94 |chapter=A Globalizing Constitutionalism?, Views from the Postcolony, 1945–2000 |chapter-url=https://books.google.com/books?id=kYmmnYKEvE0C&pg=PA94}}</ref>{{Sfn|Ferguson|2004|p=307}} Most of its former colonies are Commonwealth countries, bonded by a shared British inheritance.<ref>{{Cite web |title=The Commonwealth |url=https://www.mfat.govt.nz/en/peace-rights-and-security/the-commonwealth/ |access-date=8 January 2024 |website=[[New Zealand Ministry of Foreign Affairs and Trade]] |language=en-NZ}}</ref><ref>{{Cite web |title=Commonwealth of Nations |url=https://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny/parliament-and-empire/contemporary-context/ |access-date=2026-02-22 |publisher=UK Parliament |language=en}}</ref><ref>{{Cite book |last1=Mazrui |first1=Ali Al Amin |title=Anglo-African Commonwealth |last2=Taylor |first2=D. |last3=Bradley |first3=Kenneth |date=1967 |publisher=Pergamon |isbn=978-0-08-012253-3 |pages=40–41 |quote=...in the ultimate analysis, what could a New Zealander have in common with a Jamaican or a Zambian, if not the bonds of a shared British-ness?}}</ref> A global survey in 2024 ranked the UK third in the 'Most Influential Countries' rankings, behind the US and China.<ref>{{Cite web |title=Most Influential Countries |url=https://www.usnews.com/news/best-countries/most-influential-countries |access-date=22 September 2025 |website=[[U.S. News & World Report]]}}</ref> === Literature and drama === {{Main|British literature|Theatre of the United Kingdom}} {{Further|Literature of England|Scottish literature|Welsh literature|Literature of Northern Ireland}} {{multiple image | align = right | total_width = 320 | image1 = PG 1063Burns Naysmith.jpg | alt1 = Robert Burns | caption1 = [[Robert Burns]] (1759–1796) | image2 = William Shakespeare by John Taylor, edited.jpg | alt2 = William Shakespeare | caption2 = [[William Shakespeare]] (1564–1616) | footer = Burns and Shakespeare are considered the [[national poet]]s of Scotland and England respectively. }} British literature includes that associated with the United Kingdom, the [[Isle of Man]] and the [[Channel Islands]]. Most British literature is in English. In 2022, 669&nbsp;million physical books were sold in the UK, the most ever.<ref>{{Cite web |title=UK publishing industry reports record-breaking year in 2022 |url=https://www.theguardian.com/books/2023/apr/17/uk-publishing-industry-reports-record-breaking-year-in-2022 |access-date=9 May 2024 |work=[[The Guardian]] |date=17 April 2023}}</ref> Britain is renowned for [[Literature for children|children's literature]]; writers include [[Daniel Defoe]], [[Rudyard Kipling]], [[Lewis Carroll]] and [[Beatrix Potter]], who also illustrated her own books. Other writers include [[A. A. Milne]], [[Enid Blyton]], [[J. R. R. Tolkien]], [[Roald Dahl]], [[Terry Pratchett]] and [[J. K. Rowling]], who wrote ''[[Harry Potter]]'', the [[List of best-selling book series|best-selling book series]] of all time.<ref>{{Cite web |title=Best-selling Book Series Of All Time |url=https://wordsrated.com/best-selling-book-series-of-all-time-statistics/ |access-date=18 May 2024 |publisher=Wordsrated |date=20 July 2023}}</ref> The playwright and poet [[William Shakespeare]] is generally regarded as the greatest dramatist ever and the [[national poet]] of England.<ref>{{Cite web |title=William Shakespeare (English author) |url=https://www.britannica.com/EBchecked/topic/537853/William-Shakespeare |access-date=26 February 2006 |publisher=[[Encyclopædia Britannica]]}}; {{Cite encyclopedia |title=MSN Encarta Encyclopedia article on Shakespeare |url=http://encarta.msn.com/encyclopedia_761562101/Shakespeare.html |access-date=26 February 2006 |archive-url=https://web.archive.org/web/20060209154055/http://encarta.msn.com/encyclopedia_761562101/Shakespeare.html |archive-date=9 February 2006}}; {{Cite web |title=William Shakespeare |work=TheFreeDictionary.com |publisher=Columbia Electronic Encyclopedia |url=http://encyclopedia2.thefreedictionary.com/Shakespeare%2c+William |access-date=26 February 2006}}</ref> Theatre of United Kingdom plays an important part in British culture and has had a vibrant tradition of [[theatre]] since the Renaissance with roots going back to the Roman occupation. Other important figures in the literature of England are [[Geoffrey Chaucer]], known for ''[[The Canterbury Tales]]'', the poet [[William Wordsworth]], and other [[Romantic Poetry|Romantic poets]], also the novelists [[Charles Dickens]], [[H. G. Wells]], [[George Orwell]], [[Aldous Huxley]] and [[Ian Fleming]]. The 20th-century English crime writer [[Agatha Christie]] is the [[List of best-selling fiction authors|best-selling novelist]] in history.<ref>{{Cite news |date=19 December 2005 |title=Mystery of Christie's success is solved |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/uknews/1505799/Mystery-of-Christies-success-is-solved.html |url-status=live |url-access=subscription |access-date=14 November 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/news/uknews/1505799/Mystery-of-Christies-success-is-solved.html |archive-date=10 January 2022}}{{Cbignore}}</ref> Twelve of the top 25 of 100 novels by British writers chosen by a BBC poll of global critics were written by women; these included works by [[George Eliot]], [[Virginia Woolf]], [[Charlotte Brontë]], [[Emily Brontë]], [[Mary Shelley]], [[Jane Austen]], [[Doris Lessing]] and [[Zadie Smith]].<ref>{{Cite news |last=Ciabattari |first=Jane |date=December 2015 |title=The 25 greatest British novels |work=BBC Culture |url=https://www.bbc.com/culture/article/20151204-the-25-greatest-british-novels |access-date=29 December 2021}}</ref> Scottish literature includes [[Arthur Conan Doyle]] (the creator of [[Sherlock Holmes]]), [[Walter Scott|Sir Walter Scott]], [[J. M. Barrie]], [[Robert Louis Stevenson]] (whose novel ''[[Treasure Island]]'' strongly influenced the portrayal of [[pirates in the arts and popular culture]]), and the poet [[Robert Burns]], who is considered the national poet of Scotland. More recently [[Hugh MacDiarmid]] and [[Neil M. Gunn]] contributed to the [[Scottish Renaissance]], with grimmer works from [[Ian Rankin]] and [[Iain Banks]]. Edinburgh was UNESCO's first worldwide [[City of Literature]].<ref>{{Cite web |year=2004 |title=Edinburgh, United Kingdom, UNESCO City of Literature |url=http://www.unesco.org/new/en/culture/themes/creativity/creative-industries/creative-cities-network/literature/edinburgh |archive-url=https://web.archive.org/web/20130528152834/http://www.unesco.org/new/en/culture/themes/creativity/creative-industries/creative-cities-network/literature/edinburgh |archive-date=28 May 2013 |url-status=dead |access-date=9 March 2015 |work=Unesco}}</ref> Welsh literature includes Britain's oldest known poem, ''[[Y Gododdin]]'', most likely composed in the late 6th century. It was written in [[Cumbric language|Cumbric]] or [[Old Welsh]] and contains the earliest known reference to [[King Arthur]].<ref>{{Cite web |title=Early Welsh poetry |url=https://www.bbc.co.uk/wales/history/sites/themes/society/language_poetry.shtml |access-date=29 December 2010 |work=BBC Wales}}</ref> The [[Arthurian legend]] was further developed by [[Geoffrey of Monmouth]].<ref>{{Cite book |last=Lang, Andrew |url=https://books.google.com/books?id=dKJiPyyTevgC |title=History of English Literature from Beowulf to Swinburne |publisher=Wildside Press |year=2003 |isbn=978-0-8095-3229-2 |location=Holicong, PA |page=42 |orig-date=1913}}</ref> [[Dafydd ap Gwilym]] (''fl.''&nbsp;1320–1370) is widely regarded as one of the greatest European poets of his age.<ref>{{Cite web |year=2011 |title=Dafydd ap Gwilym |url=http://www.academi.org/dafydd-ap-gwilym-eng |archive-url=https://web.archive.org/web/20120324034938/http://www.literaturewales.org/dafydd-ap-gwilym-eng |archive-date=24 March 2012 |url-status=dead |access-date=3 January 2011 |website=[[Literature Wales|Academi.org]] |quote=Dafydd ap Gwilym is widely regarded as one of the greatest Welsh poets of all time, and amongst the leading European poets of the Middle Ages.}}</ref> [[Daniel Owen]] is credited as the first Welsh-language novelist, publishing ''[[Rhys Lewis (novel)|Rhys Lewis]]'' in 1885. The best-known of the [[Anglo-Welsh poetry|Anglo-Welsh poets]] are [[Dylan Thomas]] and [[R. S. Thomas]], the latter nominated for the [[Nobel Prize in Literature]] in 1996. Leading Welsh novelists of the twentieth century include [[Richard Llewellyn]] and [[Kate Roberts (author)|Kate Roberts]].<ref>{{Cite web |url=http://newsalerts.bbc.co.uk/1/low/wales/551486.stm |title=True birthplace of Wales's literary hero |archive-url=https://web.archive.org/web/20200316173733/http://newscdn.bbc.net.uk/2/hi/uk_news/wales/551486.stm |archive-date=16 March 2020 |url-status=dead |website=BBC News |date=5 December 1999 |access-date=28 April 2012}}</ref><ref>{{Cite web |title=Kate Roberts: Biography |url=https://www.bbc.co.uk/wales/northwest/halloffame/arts/kateroberts.shtml |url-status=dead |access-date=19 February 2017 |website=BBC Wales |archive-url=https://web.archive.org/web/20130308000646/https://www.bbc.co.uk/wales/northwest/halloffame/arts/kateroberts.shtml |archive-date=8 March 2013}}</ref> Northern Ireland's most popular writer is [[C. S. Lewis]], who was born in Belfast and wrote ''[[The Chronicles of Narnia]]''.<ref>{{Cite web |title=The Chronicles of Narnia Book Series Statistics |url=https://wordsrated.com/the-chronicles-of-narnia-book-series-statistics/ |access-date=18 May 2024 |publisher=Wordsrated |date=19 July 2023}}</ref> Irish writers, living at a time when all of Ireland was part of the United Kingdom, include [[Oscar Wilde]],<ref>{{Cite book |last=Varty |first=Anne |title=A Preface to Oscar Wilde |date=2014 |publisher=Routledge |isbn=978-1-317-89231-1 |pages=[https://books.google.com/books?id=A9YFBAAAQBAJ&pg=PA231 231–232]}}; {{Cite encyclopedia |title=Oscar Wilde |encyclopedia=[[Encyclopedia.com]] |publisher=[[Cengage]] |url=https://www.encyclopedia.com/people/literature-and-arts/english-literature-19th-cent-biographies/oscar-wilde |access-date=10 December 2019}}</ref> [[Bram Stoker]] (who wrote ''[[Dracula]]'')<ref>{{Cite book |last=Moss |first=Joyce |url=https://archive.org/details/isbn_9780787637286 |title=British and Irish Literature and Its Times: The Victorian Era to the Present (1837–) |publisher=Gale Group |year=2001 |isbn=978-0-7876-3729-3 |page=[https://archive.org/details/isbn_9780787637286/page/107 107] |url-access=registration}}</ref> and [[George Bernard Shaw]].<ref>{{Cite book |last=Holroyd |first=Michael |url=https://archive.org/details/bernardshaw00holr/page/384 |title=Bernard Shaw, Volume 2: 1898–1918: The Pursuit of Power |publisher=Chatto & Windus |year=1989 |isbn=978-0-7011-3350-4 |page=[https://archive.org/details/bernardshaw00holr/page/384 384]}}; {{Cite web |title=G B Shaw |url=https://www.bl.uk/people/g-b-shaw |access-date=10 December 2019 |website=Discovering Literature: 20th century |publisher=[[British Library]] |archive-date=9 August 2020 |archive-url=https://web.archive.org/web/20200809155152/https://www.bl.uk/people/g-b-shaw |url-status=dead}}</ref> There have been many authors whose origins were from outside the United Kingdom but who moved to the UK, including [[Joseph Conrad]],<ref>{{Cite book |last=Middleton |first=Tim |url=https://books.google.com/books?id=Azd1f8NBpUoC&pg=PA159 |title=Joseph Conrad |publisher=Routledge |year=2006 |isbn=978-0-415-26851-6 |page=159}}</ref> [[T. S. Eliot]],<ref>{{Cite book |last=Cooper |first=John Xiros |url=https://books.google.com/books?id=XqmNjQzhwV4C&pg=PA111 |title=The Cambridge Introduction to T. S. Eliot |date=2006 |publisher=Cambridge University Press |isbn=978-1-139-45790-3 |page=111}}</ref> [[Kazuo Ishiguro]],<ref>{{Cite book |last=Sim |first=Wai-chew |url=https://books.google.com/books?id=WcKLAgAAQBAJ&pg=PT201 |title=Kazuo Ishiguro |date=2009 |publisher=Routledge |isbn=978-1-135-19867-1 |page=201}}</ref> Sir [[Salman Rushdie]]<ref>{{Cite web |title=Salman Rushdie |url=https://www.oxfordreference.com/view/10.1093/oi/authority.20110803100433765 |access-date=10 December 2019 |website=Oxford Reference |publisher=[[Oxford University Press]]}}</ref> and [[Ezra Pound]].<ref>{{Cite news |last=Campbell |first=James |date=17 May 2008 |title=Home from home |work=The Guardian |url=https://www.theguardian.com/books/2008/may/17/poetry3 |access-date=10 December 2019}}; {{Cite book |last=Nadel |first=Ira |url=https://books.google.com/books?id=ECiGDAAAQBAJ&pg=PA90 |title=Ezra Pound: A Literary Life |date=2004 |publisher=Palgrave Macmillan |isbn=978-0-230-37881-0 |page=90}}</ref> === Philosophy === {{Main|British philosophy}} The United Kingdom is famous for "[[British Empiricism]]", a branch of the philosophy that states that only knowledge verified by experience is valid, and 'Scottish Philosophy', sometimes referred to as the '[[Scottish School of Common Sense]]'.<ref>{{Cite book |url=http://www.rrbltd.co.uk/bibliographies/scottish_v5_bibliog.pdf |title=A bibliography of Scottish common sense philosophy: Sources and origins |publisher=Thoemmes Press |year=2000 |editor-last=Fieser, James |location=Bristol |access-date=17 December 2010 |archive-date=9 April 2023 |archive-url=https://web.archive.org/web/20230409171906/https://www.rrbltd.co.uk/bibliographies/scottish_v5_bibliog.pdf |url-status=dead}}</ref> The most famous philosophers of British Empiricism are [[John Locke]], [[George Berkeley]]{{Efn|Berkeley is in fact Irish but was called a 'British empiricist' due to the territory of what is now known as the [[Republic of Ireland]] being in the UK at the time.}} and [[David Hume]]; while [[Dugald Stewart]], [[Thomas Reid]] and [[Sir William Hamilton, 9th Baronet|William Hamilton]] were major exponents of the Scottish "common sense" school. Two Britons are also notable for the ethical theory of [[utilitarianism]], a moral philosophy first used by [[Jeremy Bentham]] and later by [[John Stuart Mill]] in his short work ''[[Utilitarianism (book)|Utilitarianism]]''.<ref>{{Cite book |last=Palmer, Michael |url=https://books.google.com/books?id=s7y5MJOuN30C&pg=PA66 |title=Moral Problems in Medicine: A Practical Coursebook |publisher=Lutterworth Press |year=1999 |isbn=978-0-7188-2978-0 |location=Cambridge |page=66}}; {{Cite book |last=Scarre, Geoffrey |url=https://books.google.com/books?id=8A4xLnzfqYwC&pg=PA82 |title=Utilitarianism |publisher=Routledge |year=1995 |isbn=978-0-415-12197-2 |location=London |page=82}}</ref> === Media === {{Main|Media of the United Kingdom|Censorship in the United Kingdom}} {{Further|Media of England|Media of Scotland|Media of Wales|Media of Northern Ireland}} The [[BBC]], founded in 1922, is the United Kingdom's publicly funded radio, television and Internet broadcasting corporation, and is the oldest and largest broadcaster in the world.<ref name="MediaNewsline">{{Cite web |title=BBC: World's largest broadcaster & Most trusted media brand |url=http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-url=https://web.archive.org/web/20101005004930/http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-date=5 October 2010 |access-date=23 September 2010 |publisher=Media Newsline}}</ref><ref name="ProspectMag">{{Cite web |title=Digital license |url=http://www.prospectmagazine.co.uk/?p=64654 |archive-url=https://web.archive.org/web/20111107024637/http://www.prospectmagazine.co.uk/2009/07/digitallicense |archive-date=7 November 2011 |access-date=9 March 2015 |publisher=Prospect}}</ref><ref name="AboutBBC">{{Cite news |title=About the BBC&nbsp;– What is the BBC |work=BBC Online |url=https://www.bbc.co.uk/info/purpose/what.shtml |access-date=9 March 2015 |archive-url=https://web.archive.org/web/20100116202334/http://www.bbc.co.uk/info/purpose/what.shtml |archive-date=16 January 2010}}</ref> It operates television and radio stations across the UK and abroad and its domestic services are funded by the [[Television licensing in the United Kingdom|television licence]].<ref>{{Cite journal |date=13 August 2009 |title=BBC: World's largest broadcaster & Most trusted media brand |url=http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |journal=Media Newsline |archive-url=https://web.archive.org/web/20110510090842/http://www.medianewsline.com/news/151/ARTICLE/4930/2009-08-13.html |archive-date=10 May 2011 |access-date=19 June 2011}}; {{Cite web |date=April 2010 |title=TV Licence Fee: facts & figures |url=https://www.bbc.co.uk/pressoffice/keyfacts/stories/licencefee.shtml |url-status=live |archive-url=https://web.archive.org/web/20110427080539/http://www.bbc.co.uk/pressoffice/keyfacts/stories/licencefee.shtml |archive-date=27 April 2011 |publisher=BBC Press Office}}</ref> The [[BBC World Service]] is an [[International broadcasting|international broadcaster]] owned and operated by the BBC, and the world's largest.<ref>{{Cite web |title=Microsoft Word – The Work of the BBC World Service 2008–09 HC 334 FINAL.doc |url=https://publications.parliament.uk/pa/cm200910/cmselect/cmfaff/334/334.pdf |archive-url=https://web.archive.org/web/20201021001645/https://publications.parliament.uk/pa/cm200910/cmselect/cmfaff/334/334.pdf |archive-date=21 October 2020 |access-date=16 February 2011}}</ref> It broadcasts radio news, speech and discussions in more than 40 languages.<ref>{{Cite web |title=News in your language – BBC News |url=https://www.bbc.co.uk/ws/languages |website=BBC}}; {{Cite web |title=BBC World Service |url=https://www.facebook.com/pages/category/Media-News-Company/bbcworldservice/about |website=Facebook.com}}</ref> Other major players in the UK media include [[ITV plc|ITV]], which operates 11 of the 15 regional television broadcasters that make up the [[ITV (TV network)|ITV Network]],<ref>{{Cite web |title=Publications & Policies: The History of ITV |url=http://www.itv.com/aboutitv/publications-policies |archive-url=https://web.archive.org/web/20110411224117/http://www.itv.com/aboutitv/publications-policies |archive-date=11 April 2011 |website=ITV.com}}</ref> and [[Sky UK|Sky]].<ref>{{Cite journal |title=Direct Broadcast Satellite Television |url=http://www.newscorp.com/operations/dbst.html |journal=News Corporation |archive-url=https://web.archive.org/web/20110604095622/http://www.newscorp.com/operations/dbst.html |archive-date=4 June 2011}}</ref> Newspapers produced in the United Kingdom include the ''[[Daily Mail]]'', ''[[The Guardian]]'', ''[[The Daily Telegraph|The Telegraph]]'', ''[[The Times]]'', and the ''[[Financial Times]]''.<ref>{{Cite news |date=10 October 2008 |title=ABCs: National daily newspaper circulation September 2008 |work=The Guardian |location=London |url=https://www.theguardian.com/media/table/2008/oct/10/abcs-pressandpublishing |access-date=17 October 2008}}</ref> Magazines and journals published in the United Kingdom that have achieved worldwide circulation include ''[[The Spectator]]'', ''[[The Economist]]'', ''[[New Statesman]]'' and ''[[Radio Times]]''. [[File:Media City Footbridge and BBC Offices (geograph 2685261).jpg|thumb|[[MediaCityUK]] in [[Salford]], [[Greater Manchester]], is one of the largest media production facilities in Europe.]]London dominates the media sector in the UK: national newspapers and television and radio are largely based there, although [[MediaCityUK]] in Manchester is also a significant national media centre. Edinburgh and Glasgow, and Cardiff, are important centres of newspaper and broadcasting production in Scotland and Wales, respectively.<ref>William, D. (2010). [https://books.google.com/books?id=7yg45P35KDMC ''UK Cities: A Look at Life and Major Cities in England, Scotland, Wales and Northern Ireland'']. Eastbourne: Gardners Books. {{ISBN|978-9987-16-021-1}}, pp. 22, 46, 109 and 145.</ref> The UK publishing sector, including books, directories and databases, journals, magazines and business media, newspapers and news agencies, has a combined turnover of around £20&nbsp;billion and employs 167,000 people.<ref>{{Cite web |title=Publishing |url=http://www.culture.gov.uk/what_we_do/creative_industries/3280.aspx |url-status=live |archive-url=https://web.archive.org/web/20110505104322/http://www.culture.gov.uk/what_we_do/creative_industries/3280.aspx |archive-date=5 May 2011 |publisher=Department of Culture, Media and Sport}}</ref> In 2015 the UK published 2,710 book titles per million inhabitants, more than any other country, with much of this exported to other [[Anglophone]] countries.<ref>{{Cite web |last=<!--Not stated--> |date=2016 |title=Annual Report 2015–2016 |url=https://www.internationalpublishers.org/images/reports/Annual_Report_2016/IPA_Annual_Report_2015-2016_interactive.pdf |access-date=14 January 2021 |website=internationalpublishers.org |publisher=International Publishers Association |page=16 |archive-date=31 August 2023 |archive-url=https://web.archive.org/web/20230831205753/https://www.internationalpublishers.org/images/reports/Annual_Report_2016/IPA_Annual_Report_2015-2016_interactive.pdf |url-status=dead}}</ref> In 2010, 82.5 per cent of the UK population were Internet users, the [[List of countries by number of Internet users|highest proportion]] amongst the 20 countries with the largest total number of users in that year.<ref>{{Cite journal |title=Top 20 countries with the highest number of Internet users |url=http://www.internetworldstats.com/top20.htm |journal=Internet World Stats |archive-url=https://web.archive.org/web/20110610104435/http://www.internetworldstats.com/top20.htm |archive-date=10 June 2011 |access-date=19 June 2011}}</ref> The [[Video games in the United Kingdom|British video game industry]] is the largest in Europe, and since 2022 the UK has the [[List of video games markets by country|largest video game market]] in Europe by sales, surpassing [[Video games in Germany|Germany]].<ref>{{Cite web |last=Dring |first=Christopher |date=12 January 2023 |title=European console and PC game sales fall 7.1% in 2022 |url=https://www.gamesindustry.biz/european-console-and-pc-game-sales-fall-71-over-2021 |access-date=30 September 2023 |website=GamesIndustry.biz}}</ref> It is the world's third-largest producer of video games after [[Video games in Japan|Japan]] and the [[Video games in the United States|United States]].<ref>{{Cite web |title=About UK Video Games Industry |url=https://tiga.org/about-tiga-and-our-industry/about-uk-video-games-industry |access-date=6 June 2023 |website=TIGA}}</ref> === Visual art === {{Main|Art of the United Kingdom|Architecture of the United Kingdom}} [[File:Angel of the North - 6150534524.jpg|thumb|The [[Angel of the North]] sculpture by [[Antony Gormley]] has become a symbol of [[Northern England]].]] Major British artists include the [[Romanticism|Romantic]] artists [[William Blake]], [[John Constable]], [[Samuel Palmer]], and [[J. M. W. Turner]]; the [[portrait]] painters [[Joshua Reynolds|Sir Joshua Reynolds]] and [[Lucian Freud]]; the landscape artists [[Thomas Gainsborough]] and [[L. S. Lowry]]; the pioneer of the [[Arts and Crafts movement]] [[William Morris]]; the figurative painter [[Francis Bacon (artist)|Francis Bacon]]; the [[Pop artist]]s [[Peter Blake (artist)|Peter Blake]], [[Richard Hamilton (artist)|Richard Hamilton]] and [[David Hockney]]; the pioneers of [[conceptual art]] movement [[Art & Language]];<ref>{{Cite news |last=Tate |title=Art & Language – Art Term {{!}} Tate |work=Tate |url=https://www.tate.org.uk/art/art-terms/a/art-language |access-date=8 September 2018}}</ref> the collaborative duo [[Gilbert and George]]; the [[Abstract art|abstract]] artist [[Howard Hodgkin]]; and the sculptors [[Antony Gormley]], [[Anish Kapoor]] and [[Henry Moore]]. During the late 1980s and 1990s the [[Saatchi Gallery]] in London helped to bring to public attention a group of multi-genre artists who would become known as the "[[Young British Artists]]": [[Damien Hirst]], [[Chris Ofili]], [[Rachel Whiteread]], [[Tracey Emin]], [[Mark Wallinger]], [[Steve McQueen (director)|Steve McQueen]], [[Sam Taylor-Wood]] and the [[Jake and Dinos Chapman|Chapman Brothers]] are amongst the better-known members of this loosely affiliated movement. The [[Royal Academy]] in London is a key organisation for the promotion of the visual arts in the United Kingdom. Major schools of art in the UK include: the six-school [[University of the Arts London]], which includes the [[Central Saint Martins College of Art and Design]] and [[Chelsea College of Art and Design]]; [[Goldsmiths, University of London]]; the [[Slade School of Fine Art]] (part of [[University College London]]); the [[Glasgow School of Art]]; the [[Royal College of Art]]; and [[The Ruskin School of Drawing and Fine Art]] (part of the University of Oxford). The [[Courtauld Institute of Art]] is a leading centre for the teaching of the [[history of art]]. Important art galleries in the United Kingdom include the [[National Gallery]], [[National Portrait Gallery (London)|National Portrait Gallery]], [[Tate Britain]], and [[Tate Modern]] (the most-visited modern art gallery in the world, with around 4.7&nbsp;million visitors per year).<ref>{{Cite news |last=Bayley |first=Stephen |date=24 April 2010 |title=The startling success of Tate Modern |work=[[The Times]] |location=London |url=http://entertainment.timesonline.co.uk/tol/arts_and_entertainment/visual_arts/article7105032.ece |archive-url=https://web.archive.org/web/20110429173928/http://entertainment.timesonline.co.uk/tol/arts_and_entertainment/visual_arts/article7105032.ece |url-status=dead |archive-date=29 April 2011 |access-date=19 January 2011}} {{Subscription required}}</ref> === Music === {{Main|Music of the United Kingdom}} {{Further|Music of England (disambiguation){{!}}Music of England|Music of Scotland|Music of Wales|Music of Northern Ireland}} <!----Caution should be taken to ensure that the sections are not simply a listing of names or mini biographies of individuals accomplishments.----> [[File:Royal Albert Hall, BBC Proms 2017.jpg|thumb|[[The Proms]] is a classical music festival, most closely associated with [[Henry Wood]] and held at the [[Royal Albert Hall]] in London, which regularly plays music by [[Edward Elgar]] and other British composers.]] Various styles of music have become popular in the UK, including the [[folk music]] of [[Folk music of England|England]], [[Folk music of Scotland|Scotland]], [[Music of Wales#Folk music|Wales]] and [[Folk music of Northern Ireland|Northern Ireland]]. English folk features melodic ballads with strong lyrics and music for country dancing often using accordion and fiddles.<ref>{{Cite web |access-date=15 September 2025 |title=Songs of England |url=https://www.english-heritage.org.uk/visit/inspire-me/songs-of-england}}</ref> Scottish folk features bagpipes and fiddles playing traditional dance tunes with bouncy tempos.<ref>{{Cite web |access-date=15 September 2025 |title=The influence of traditional Scottish Music |url=https://www.visitscotland.com/things-to-do/events/music-festivals/traditional-folk}}</ref> Welsh folk has harps and vocal harmonies often sung in Welsh.<ref>{{Cite web |access-date=15 September 2025 |title=Celtic connections: the story of folk music in Wales |date=17 February 2020 |url=https://www.wales.com/culture-and-sport/music-and-performance/roots-and-shoots-welsh-folk-music}}</ref> Northern Irish folk blends fiddles with flutes merging Scottish and Irish influences.<ref>{{Cite web |access-date=15 September 2025 |title=Why you should experience traditional music in Ireland |url=https://www.ireland.com/en-us/magazine/music/traditional-music/}}</ref> Historically, there has been [[Renaissance music]] from the [[Tudor period]], with [[Mass (music)|masses]], [[madrigal]]s and [[lute]] music by [[Thomas Tallis]], [[John Taverner]], [[William Byrd]], [[Orlando Gibbons]] and [[John Dowland]]. After the [[Stuart Restoration]], an English tradition of dramatic [[masque]]s, anthems and airs became established, led by [[Henry Purcell]], followed by [[Thomas Arne]] and others. [[George Frideric Handel]] composed the anthem ''[[Zadok the Priest]]'' for the [[coronation of George II]]; it became the traditional ceremonial music for anointing all future monarchs. Handel's many oratorios, such as his famous ''[[Messiah (Handel)|Messiah]]'', were written in English.<ref>{{Cite web |date=20 July 2009 |title=British Citizen by Act of Parliament: George Frideric Handel |url=http://www.parliament.uk/parliamentary_publications_and_archives/parliamentary_archives/handel_and_naturalisation.cfm |archive-url=https://web.archive.org/web/20100326164147/http://www.parliament.uk/parliamentary_publications_and_archives/parliamentary_archives/handel_and_naturalisation.cfm |archive-date=26 March 2010 |access-date=9 March 2015 |publisher=UK Parliament}}; {{Cite news |last=Andrews |first=John |date=14 April 2006 |title=Handel all'inglese |work=Playbill |location=New York |url=http://www.playbillarts.com/features/article/4236.html |access-date=11 September 2009 |archive-url=https://web.archive.org/web/20080516210558/http://www.playbillarts.com/features/article/4236.html |archive-date=16 May 2008}}</ref> In the second half of the 19th century, [[Arthur Sullivan]] and his librettist [[W. S. Gilbert]] wrote their popular [[Savoy opera]]s, and [[Edward Elgar]] composed a wide range of music. Increasingly, composers became inspired by the English countryside and its [[folk music]], notably [[Gustav Holst]], [[Ralph Vaughan Williams]] and [[Benjamin Britten]], a pioneer of modern British opera. Amongst the many post-war composers, some of the most notable have made their own personal choice of musical identity: [[Peter Maxwell Davies]] (Orkney), [[Harrison Birtwistle]] (mythological), and [[John Tavener]] (religious).<ref>{{Cite Grove |title=Great Britain |first1=Nicholas |last1=Iemperley |date=2002 |url=https://doi.org/10.1093/gmo/9781561592630.article.O006236 |url-access=subscription}}; {{Cite Grove |title=England (i) |date=2001 |url=https://doi.org/10.1093/gmo/9781561592630.article.40044 |url-access=subscription |first1=Stephen |last1=Banfield |first2=Ian |last2=Russell}}; {{Cite Grove |title=Wales |date=2001 |first1=Geraint |last1=Lewis |first2=Lyn |last2=Davies |first3=Phyllis |last3=Kinney |url=https://doi.org/10.1093/gmo/9781561592630.article.41108 |url-access=subscription}}; {{Cite Grove |title=Scotland |first1=Kenneth |last1=Elliott |first2=Francis |last2=Collinson |first3=Peggy |last3=Duesenberry |url=https://doi.org/10.1093/gmo/9781561592630.article.40113 |url-access=subscription |date=2001}}; {{Cite Grove |title=Ireland |first1=Harry |last1=White |first2=Nicholas |last2=Carolan |url=https://doi.org/10.1093/gmo/9781561592630.article.13901 |url-access=subscription |date=2011}}; {{Cite web |title=British 20th century composers |url=https://www.bbc.co.uk/bitesize/guides/zdjw7p3/revision/1 |access-date=21 April 2022 |website=[[BBC]]}}</ref> Recent classical singers include [[Alfie Boe]], [[Bryn Terfel]], [[Katherine Jenkins]], [[Michael Ball]], [[Roderick Williams]], [[Russell Watson]] and [[Sarah Brightman]], while [[Nicola Benedetti]] and [[Nigel Kennedy]] are renowned for their violin ability.<ref>{{Cite web |date=21 June 2022 |title=30 of the greatest violinists on record |url=https://www.gramophone.co.uk/features/article/30-of-the-greatest-violinists-on-record |access-date=4 March 2024 |website=Gramophone}};{{Cite web |date=1 January 2020 |title=Katherine Jenkins has officially sold the most classical albums this century |url=https://www.classicfm.com/radio/shows-presenters/classic-fm-chart/katherine-jenkins-most-classical-albums/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=6 May 2023 |title=Who is Roderick Williams, the British baritone and composer at the King's coronation? |url=https://www.classicfm.com/discover-music/roderick-williams-composer-baritone-singing-roles/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=23 February 2024 |title=Michael Ball |url=https://www.eno.org/artists/michael-ball-2/ |access-date=4 March 2024 |website=English National Opera}};{{Cite web |title=Alfie Bow |url=https://www.classicfm.com/artists/alfie-boe/ |access-date=4 March 2024 |website=Classic FM}};{{Cite web |date=11 July 2023 |title=Sarah Brightman facts |url=https://www.smoothradio.com/news/music/sarah-brightman-age-husband-songs/ |access-date=4 March 2024 |website=Smooth Radio}}</ref> According to ''[[The New Grove Dictionary of Music and Musicians]]'' the term "[[pop music]]" originated in Britain in the mid-1950s to describe [[rock and roll]]'s fusion with the "new youth music".<ref>R. Middleton, et al., [http://www.oxfordmusiconline.com/public/book/omo_gmo "Pop"], ''Grove music online'', retrieved 14 March 2010. {{Subscription required}} {{Webarchive|url=https://web.archive.org/web/20110113160329/http://www.oxfordmusiconline.com/public/book/omo_gmo|date=13 January 2011}}</ref> ''The Oxford Dictionary of Music'' states that artists such as [[the Beatles]] and [[the Rolling Stones]] drove pop music to the forefront of popular music in the early 1960s.<ref>"Pop", [http://www.oxfordmusiconline.com/public/book/omo_t237 ''The Oxford Dictionary of Music''], retrieved 9 March 2010.{{Subscription required}} {{Webarchive|url=https://web.archive.org/web/20171112170116/http://www.oxfordmusiconline.com/public/book/omo_t237|date=12 November 2017}}</ref> Birmingham became known as the birthplace of [[heavy metal music|heavy metal]], with the band [[Black Sabbath]] starting there in the 1960s.<ref>{{Cite news |title=Birmingham, England ... the unlikely birthplace of heavy metal |work=CNN |date=1 July 2011 |first1=Laura |last1=Allsop |url=http://www.cnn.com/2011/WORLD/europe/07/01/birmingham.home.of.metal/index.html |access-date=28 February 2022 |postscript=;}} {{Cite web |last=Bentley |first=David |date=4 June 2013 |title=Midlands rocks! How Birmingham's industrial heritage made it the birthplace of heavy metal |url=http://www.birminghampost.co.uk/whats-on/music/birmingham-birthplace-of-heavy-metal-4031445 |access-date=28 February 2022 |website=[[Birmingham Post]]}}</ref> In the following years, Britain took part in the development of [[rock music]], with British acts pioneering [[hard rock]],<ref>{{Cite web |title=The Rolling Stones {{!}} Biography & History |url=https://www.allmusic.com/artist/the-rolling-stones-mn0000894465/biography |access-date=22 July 2020 |website=AllMusic}}</ref> [[raga rock]], heavy metal,<ref>{{Cite book |last=Tom Larson |url=https://books.google.com/books?id=vGJ7XmA8rjIC&pg=PA183 |title=History of Rock and Roll |publisher=Kendall/Hunt Pub. |year=2004 |isbn=978-0-7872-9969-9 |pages=183–187}}</ref> [[space rock]], [[glam rock]],<ref>{{Cite encyclopedia |title=Glam Rock |url=http://encarta.msn.com/dictionary_561509274/glam_rock.html |access-date=21 December 2008 |archive-url=https://web.archive.org/web/20090828224412/http://encarta.msn.com/dictionary_561509274/glam_rock.html |archive-date=28 August 2009 |encyclopedia=[[Encarta]]}}</ref> [[Gothic rock]],<ref>{{Cite web |year=2004 |title=NME Originals: Goth |url=https://www.nme.com/originals/4 |archive-url=https://web.archive.org/web/20080126150121/http://www.nme.com/originals/4 |archive-date=26 January 2008 |access-date=30 September 2013 |website=[[NME]]}}</ref> [[psychedelic rock]]<ref>{{Cite web |title=Pop/Rock » Psychedelic/Garage |url=https://www.allmusic.com/subgenre/psychedelic-garage-ma0000002800 |access-date=6 August 2020 |publisher=[[AllMusic]]}}</ref> and [[punk rock]].<ref>{{cite magazine |author1=Charles M. Young |title=Rock is Sick and Living in London |url=https://www.rollingstone.com/feature/a-report-on-the-sex-pistols-119989/ |magazine=Rolling Stone |access-date=23 February 2026 |date=20 October 1977 |archive-url=https://web.archive.org/web/20250328094721/https://www.rollingstone.com/feature/a-report-on-the-sex-pistols-119989/ |archive-date=28 March 2025}}</ref> British acts also developed [[neo soul]] and created [[dubstep]].<ref>Henderson, Alex (1 August 2003). [https://web.archive.org/web/20101104165122/http://allmusic.com/explore/essay/british-soul-t2160 British Soul]. Allmusic. Retrieved 6 March 2011.; [http://www.allmusic.com/style/dubstep-ma0000004465 AllMusic – Dubstep] {{Webarchive|url=https://web.archive.org/web/20170923151236/http://www.allmusic.com/style/dubstep-ma0000004465|date=23 September 2017}} "Absorbed and transfigured elements of techno, drum'n' bass and dub"; {{Cite news |last=Goldman |first=Vivien |date=31 January 2012 |title=Local Groove Does Good: The Story Of Trip-Hop's Rise From Bristol |work=NPR |url=https://www.npr.org/sections/therecord/2012/01/31/142607358/local-groove-does-good-the-story-of-trip-hops-rise-from-bristol}}</ref> The UK has produced some of the most prominent English-speaking [[rappers]] along with the United States, including [[Stormzy]], [[Kano (rapper)|Kano]], [[Yxng Bane]], [[Ramz (rapper)|Ramz]], [[Little Simz]] and [[Skepta]].<ref>{{Cite magazine |title=5 U.K. Rappers Primed to Take Over America in 2018 |url=https://www.billboard.com/music/rb-hip-hop/uk-rappers-to-watch-2018-8097878/ |magazine=Billboard |access-date=18 June 2018}}</ref> [[File:The SSE Hydro arena - geograph.org.uk - 6725739.jpg|thumb|right|The [[OVO Hydro]] in [[Glasgow]], Scotland, a 14,500-capacity arena consistently ranked within the top ten busiest venues worldwide<ref>{{cite web |title=OVO Hydro {{!}} SEC |url=https://www.sec.co.uk/organise-an-event/event-spaces/the-ovo-hydro |website=www.sec.co.uk |access-date=9 February 2026 |language=en}}</ref>]] The Beatles have international sales of over 1&nbsp;billion units and are the [[List of best-selling music artists|biggest-selling band]], in addition to being [[Cultural impact of the Beatles|widely regarded as the most influential band]] in the history of popular music.<ref name="Beatles sales">{{Cite web |title=1960–1969 |url=http://www.emimusic.com/about/history/1960-1969/# |archive-url=https://web.archive.org/web/20140425011032/http://www.emimusic.com/about/history/1960-1969 |archive-date=25 April 2014 |access-date=9 March 2015 |publisher=EMI Group}}</ref><ref name="McCartney">{{Cite magazine |date=8 June 1992 |title=Paul At Fifty |url=http://www.time.com/time/magazine/article/0,9171,975715-2,00.html |magazine=Time |location=New York |archive-url=https://web.archive.org/web/20090206120350/http://www.time.com/time/magazine/article/0,9171,975715-2,00.html |archive-date=6 February 2009}}</ref><ref name="Guinness">[https://books.google.com/books?id=rdU1xtIWJz0C Most Successful Group] ''[[The Guinness Book of Records]]'' 1999, p. 230. Retrieved 19 March 2011.</ref><ref>{{Cite news |date=25 November 2010 |title=Beatles a big hit with downloads |work=Belfast Telegraph |url=http://www.belfasttelegraph.co.uk/entertainment/music/news/beatles-a-big-hit-with-downloads-15013117.html |access-date=16 May 2011}}</ref> Other prominent British contributors to popular music over the last 50 years include the Rolling Stones, [[Pink Floyd]], [[Queen (band)|Queen]], [[Led Zeppelin]], the [[Bee Gees]] and [[Elton John]], all of whom have worldwide record sales of 200&nbsp;million or more.<ref>{{Cite press release |title=British rock legends get their own music title for PlayStation3 and PlayStation2 |date=2 February 2009 |publisher=[[EMI]] |url=http://www.emimusic.com/news/2009/singstar®-queen-to-be-launched-by-sony-computer-entertainment-europe |access-date=9 March 2015 |archive-url=https://web.archive.org/web/20140423012539/http://www.emimusic.com/news/2009/singstar%C2%AE-queen-to-be-launched-by-sony-computer-entertainment-europe |archive-date=23 April 2014}}; {{Cite news |last=Khan |first=Urmee |date=17 July 2008 |title=Sir Elton John honoured in Ben and Jerry ice cream |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/newstopics/celebritynews/2305273/Sir-Elton-John-honoured-in-Ben-and-Jerry-ice-cream.html |archive-url=https://web.archive.org/web/20080730164432/http://www.telegraph.co.uk/news/newstopics/celebritynews/2305273/Sir-Elton-John-honoured-in-Ben-and-Jerry-ice-cream.html |archive-date=30 July 2008}}; {{Cite news |last=Alleyne |first=Richard |date=19 April 2008 |title=Rock group Led Zeppelin to reunite |work=The Telegraph |location=London |url=https://www.telegraph.co.uk/news/uknews/1562875/Rock-group-Led-Zeppelin-to-reunite.html |url-status=live |url-access=subscription |access-date=31 March 2010 |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/news/uknews/1562875/Rock-group-Led-Zeppelin-to-reunite.html |archive-date=10 January 2022}}{{Cbignore}}; {{Cite news |date=11 July 2006 |title=Floyd 'true to Barrett's legacy' |work=BBC News |url=http://news.bbc.co.uk/1/hi/entertainment/5170644.stm}}; {{Cite news |last=Holton |first=Kate |date=17 January 2008 |title=Rolling Stones sign Universal album deal |work=Reuters |url=https://www.reuters.com/article/entertainmentNews/idUSL1767761020080117 |access-date=26 October 2008}}; {{Cite news |last=Walker |first=Tim |date=12 May 2008 |title=Jive talkin': Why Robin Gibb wants more respect for the Bee Gees |work=Independent |location=London |url=https://www.independent.co.uk/arts-entertainment/music/features/jive-talkin-why-robin-gibb-wants-more-respect-for-the-bee-gees-826116.html |access-date=26 October 2008 |archive-url=https://web.archive.org/web/20111013215157/http://www.independent.co.uk/arts-entertainment/music/features/jive-talkin-why-robin-gibb-wants-more-respect-for-the-bee-gees-826116.html |archive-date=13 October 2011}}</ref> The [[Brit Awards]] are the [[British Phonographic Industry|BPI]]'s annual music awards, and some of the British recipients of the [[Brit Award for Outstanding Contribution to Music|Outstanding Contribution to Music]] award include [[the Who]], [[David Bowie]], [[Eric Clapton]], [[Rod Stewart]], [[the Police]] and [[Fleetwood Mac]] (who are a British-American band).<ref>[https://www.theguardian.com/news/datablog/2012/feb/22/brit-awards-winners-list-2012 "Brit awards winners list 2012: every winner since 1977"]. ''The Guardian'' (London). Retrieved 28 February 2012.</ref> <!-- Please note that the following list of recent musicians and groups includes only those selling more than 30&nbsp;million records. -->More recent UK music acts that have had international success include [[George Michael]], [[Oasis (band)|Oasis]], [[Spice Girls]], [[Radiohead]], [[Coldplay]], [[Arctic Monkeys]], [[Robbie Williams]], [[Amy Winehouse]], [[Susan Boyle]], [[Adele]], [[Ed Sheeran]], [[Lewis Capaldi]], [[One Direction]], [[Harry Styles]] and [[Dua Lipa]].<ref>{{Cite web |date=12 January 2020 |title=Harry Styles Has Weathered the Post-Boy Band Storm Better Than Most |url=https://consequence.net/2020/01/harry-styles-solo-career/ |access-date=15 September 2020 |website=Consequence of Sound}}; {{Cite magazine |date=16 July 2020 |title=10 Years of One Direction: The Story of the World's Biggest Boy Band, Told With the Fans Who Made It Happen |magazine=Billboard |url=https://www.billboard.com/music/pop/one-direction-ten-year-anniversary-fan-interviews-9419436/ |access-date=15 September 2020}}; {{Cite news |last=Corner, Lewis |date=16 February 2012 |title=Adele, Coldplay biggest-selling UK artists worldwide in 2011 |work=Digital Spy |url=http://www.digitalspy.co.uk/music/news/a366130/adele-coldplay-biggest-selling-uk-artists-worldwide-in-2011.html |access-date=22 March 2012}}; {{Cite web |title=Ed Sheeran's career journey: From street busker to global superstar |url=https://planetradio.co.uk/hits-radio/entertainment/celebrity/ed-sheeran-career-timeline/ |access-date=7 January 2023 |website=PlanetRadio.co.uk |last=Magliola |first=Anna Sky |date=30 November 2022}}; {{Cite web |url=https://open.spotify.com/artist/6M2wZ9GZgrQXHCFfjv46we |title=Dua Lipa, 77.5M Monthly listeners |date=6 May 2024 |publisher=Spotify}}</ref> As of 2024 the UK is the world's [[List of largest music markets|third-largest music market]] behind the US and Japan,<ref>{{Cite web |last=Paine |first=Andre |date=10 September 2024 |title=IFPI report reveals EU risks falling behind in global market - UK still among top music exporters |url=https://www.musicweek.com/labels/read/ifpi-report-reveals-eu-risks-falling-behind-in-global-market-uk-still-among-top-music-exporters/090424 |access-date=17 November 2025 |website=[[Music Week]] |language=en}}</ref> and in 2021 was the second-largest exporter of music behind the US.<ref>{{Cite news |last=Savage |first=Mark |date=16 June 2021 |title=British music exports reach a record high |url=https://www.bbc.com/news/entertainment-arts-57486272 |access-date=17 November 2025 |work=[[BBC]] |language=en-GB}}</ref> Many British cities are known for their music. Acts from Liverpool have had 54 UK chart number 1 hit singles, more per capita than any other city worldwide.<ref>{{Cite news |last=Hughes |first=Mark |date=14 January 2008 |title=A tale of two cities of culture: Liverpool vs Stavanger |work=Independent |location=London |url=https://www.independent.co.uk/news/uk/this-britain/a-tale-of-two-cities-of-culture-liverpool-vs-stavanger-770076.html?r=RSS |access-date=2 August 2009 |archive-url=https://web.archive.org/web/20180618175425/https://www.independent.co.uk/news/uk/this-britain/a-tale-of-two-cities-of-culture-liverpool-vs-stavanger-770076.html?r=RSS |archive-date=18 June 2018}}</ref> Glasgow's contribution was recognised in 2008 when it was named a [[City of Music (UNESCO)|City of Music]] by [[UNESCO]].<ref>{{Cite news |date=20 August 2008 |title=Glasgow gets city of music honour |work=BBC News |url=http://news.bbc.co.uk/1/hi/scotland/glasgow_and_west/7570915.stm |access-date=2 August 2009}}</ref> Manchester played a role in the spread of dance music such as [[acid house]], and from the mid-1990s, [[Britpop]]. London and Bristol are closely associated with the origins of [[electronic music]] sub-genres such as [[drum and bass]] and [[trip hop]].<ref>{{Cite web |title=Out of the melting pot: The origins and evolution of drum'n'bass |url=https://www.redbull.com/gb-en/history-of-drum-and-bass-music |access-date=1 August 2021 |website=Red Bull |date=25 June 2020}}</ref> UK dance music traces its roots back to the black British [[Sound system (Jamaican)|Sound System Culture]] and the [[New Age travellers|New Age Traveller]] movement of the 60s and 70s,<ref>{{Cite web |date=3 August 2023 |title=Parties, protest and police: the neglected histories of UK dance music |url=https://www.dazeddigital.com/music/article/60511/1/ed-gillet-new-book-party-lines-politics-history-uk-dance-music-clubbing |access-date=27 February 2024 |website=Dazed}}</ref> it also has influences from the [[House music|Chicago House]] and [[Detroit techno|Detroit Techno]] scenes. In the late 80's, dance music exploded with [[Rave]] culture mainly [[Acid House]] tracks which were made mainstream with novelty records (such as Smart E's [[Sesame's Treet]] and the Prodigy's [[Charly (song)|Charly]])<ref>{{Cite web |date=20 January 2001 |title=Rave |url=https://www.oxfordmusiconline.com/search?q=rave |access-date=27 February 2024 |website=Oxford Music Online}}</ref> and the [[Balearic beat|Balearic sound]] brought back from the Ibiza club scene. This led on to genres such as [[UK Garage]], [[Speed Garage]], [[Drum and bass]], [[Jungle music|Jungle]], [[Trance music|Trance]], and [[Dubstep]]. Influential UK dance acts past and present include [[808 State]], [[Orbital (band)|Orbital]], [[the Prodigy]], [[Underworld (band)|Underworld]], [[Roni Size]], [[Leftfield]], [[Massive Attack]], [[Groove Armada]], [[Fatboy Slim]], [[Faithless]], [[Basement Jaxx]], [[Chemical Brothers]], [[Disclosure (band)|Disclosure]], [[Calvin Harris]], and [[Fred Again]].<ref>{{Cite web |title=Mixmag's Greatest Dance Act of all Time Revealed |date=19 January 2012 |url=http://www.mixmag.net/words/news/mixmags-greatest-dance-act-revealed |archive-date=14 April 2012 |archive-url=https://web.archive.org/web/20120414045620/http://www.mixmag.net/words/news/mixmags-greatest-dance-act-revealed}};{{Cite web |date=26 February 2024 |title=Fred Again: who is the DJ who has thousands queuing for a 'secret rave' at the Sydney Opera House? |url=https://www.theguardian.com/music/2024/feb/27/fred-again-dj-sydney-opera-house-secret-show-tickets-sell-out-profile-bio-details |access-date=27 February 2024 |website=The Guardian}}</ref> Other influential UK DJs include [[Judge Jules]], [[Pete Tong]], [[Carl Cox]], [[Paul Oakenfold]], [[John Digweed]] and [[Sasha (dj)|Sasha]].<ref>{{Cite web |title=Top 100 DJs Poll results 2003 |url=http://djmag.com/top100chart.asp |archive-date=7 December 2003 |archive-url=https://web.archive.org/web/20031207071739/http://djmag.com/top100chart.asp}}</ref> === Cinema === {{Main|Cinema of the United Kingdom|Independent cinema in the United Kingdom}} The United Kingdom has had a considerable influence on the history of the cinema. The British directors [[Alfred Hitchcock]], whose film ''[[Vertigo (film)|Vertigo]]'' is considered by some critics as the [[List of films considered the best|best film of all time]],<ref>{{Cite news |date=2 August 2012 |title=Vertigo is named 'greatest film of all time' |work=BBC News |url=https://www.bbc.co.uk/news/entertainment-arts-19078948 |access-date=18 August 2012}}</ref> and [[David Lean]], who directed ''[[Lawrence of Arabia (film)|Lawrence of Arabia]]'', are amongst the most critically acclaimed directors ever.<ref>{{Cite web |title=The Directors' Top Ten Directors |url=http://www.bfi.org.uk/sightandsound/topten/poll/directors-directors.html |url-status=dead |archive-url=https://web.archive.org/web/20120517155218/http://www.bfi.org.uk/sightandsound/topten/poll/directors-directors.html |archive-date=17 May 2012 |publisher=British Film Institute}}</ref> Recent popular directors include [[Christopher Nolan]], [[Sam Mendes]], [[Steve McQueen (director)|Steve McQueen]], [[Richard Curtis]], [[Danny Boyle]], [[Tony Scott]] and [[Ridley Scott]].<ref>{{Cite web |title=The 24 Best British Directors of All Time |date=13 May 2023 |url=https://movieweb.com/best-british-directors-of-all-time/ |access-date=17 February 2024 |publisher=Movieweb}}</ref><ref>{{Cite web |title=Top 22 U.K. Film Directors |url=https://www.imdb.com/list/ls062383258/ |access-date=17 February 2024 |publisher=IMDb}}</ref><ref>{{Cite web |title=5 of the best ... Richard Curtis films |url=https://www.thetimes.com/culture/tv-radio/article/5-of-the-best-richard-curtis-films-tzxx9fv2h |work=The Times |access-date=4 June 2024 |date=17 April 2024}}</ref><ref>{{Cite web |title=The UK's top 50 film directors |date=23 May 2012 |url=https://www.televisual.com/news/the-uk-s-top-50-film-directors_bid-357/ |access-date=17 February 2024 |publisher=Televisual}}</ref> Many British actors have achieved international fame and critical success. Some of the most commercially successful films have been produced in the United Kingdom, including two of the [[List of highest-grossing film series|highest-grossing film franchises]] (''[[Harry Potter (film series)|Harry Potter]]'' and ''[[James Bond (film series)|James Bond]]'').<ref>{{Cite news |date=11 September 2007 |title=Harry Potter becomes highest-grossing film franchise |work=The Guardian |location=London |url=https://www.theguardian.com/film/2007/sep/11/jkjoannekathleenrowling |access-date=2 November 2010}}</ref> 2019 was a particularly good year for British films which grossed around £10.3&nbsp;billion globally, accounting for 28.7 per cent of global box office revenue.<ref>{{Cite web |title=UK Film Industry Statistics 2023 |date=10 April 2023 |url=https://www.socialfilms.co.uk/blog/uk-film-industry-statistics |archive-url=https://web.archive.org/web/20240217211749/https://www.socialfilms.co.uk/blog/uk-film-industry-statistics |archive-date=17 February 2024 |access-date=17 February 2024}}</ref> UK box-office takings totalled £1.25&nbsp;billion in 2019, with around 176&nbsp;million admissions.<ref>{{Cite web |title=The UK box office in 2019 |url=https://www2.bfi.org.uk/sites/bfi.org.uk/files/downloads/bfi-uk-box-office-2019.pdf |archive-url=https://web.archive.org/web/20240217214846/https://www2.bfi.org.uk/sites/bfi.org.uk/files/downloads/bfi-uk-box-office-2019.pdf |archive-date=17 February 2024 |access-date=17 February 2024}}</ref> In 2023 UK film and television studio stage space stood at 6.9&nbsp;million sq ft, with 1&nbsp;million sq ft added in the past year with more in development.<ref>{{Cite web |title=UK Film and Television Studios Market Report |url=https://content.knightfrank.com/research/2439/documents/en/uk-film-and-television-studios-market-2023-10567.pdf |access-date=17 February 2024 |publisher=Knight Frank}}</ref> The annual [[British Academy Film Awards|BAFTA Film Awards]] are hosted by the [[British Academy of Film and Television Arts]].<ref>{{Cite news |date=26 February 2001 |title=Baftas fuel Oscars race |work=BBC News |url=http://news.bbc.co.uk/1/hi/entertainment/1190562.stm |access-date=14 February 2011}}</ref> === Cuisine === {{Main|British cuisine}} {{Further|English cuisine|Scottish cuisine|Welsh cuisine|Northern Irish cuisine}} [[File:Fish, chips and mushy peas.jpg|thumb|[[Fish and chips]], a traditional British dish, served with lemon, tartar sauce and mushy peas]] British cuisine developed from influences reflective of its land, settlements, [[Immigration to the United Kingdom|arrivals of new settlers and immigrants]], trade and colonialism. The food of England has historically been characterised by simplicity of approach and a reliance on the high quality of natural produce.<ref>{{Cite book |last=Else |first=David |title=Inghilterra |publisher=EDT srl |date=2007 |isbn=978-88-6040-136-6 |page=76}}</ref> The traditional [[Sunday roast]] is one example, featuring a [[roasting|roast joint]] (usually of beef), lamb, chicken, or pork, often [[free range]] (and generally grass-fed, in the case of beef). Roasts are served with either roasted or boiled vegetables, [[Yorkshire pudding]] and [[gravy]]. Other traditional meals include [[meat pie]]s and [[stew]]s. A poll by [[YouGov]] in 2019 rated classic British food, with more than 80 per cent liking the Sunday roast, Yorkshire pudding, [[fish and chips]], [[crumpet]]s and the [[full English breakfast]].<ref>{{Cite web |url=https://yougov.co.uk/topics/consumer/articles-reports/2019/06/12/classic-british-cuisine-ranked-britons |date=11 June 2019 |title=Classic British cuisine ranked by Britons }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> The UK is home to a large selection of [[fine dining]]. The nation hosts multiple restaurant guides such as ''[[The Good Food Guide]]'' and ''[[Harden's]]''. In 2025 there were 197 restaurants with a [[Michelin Star]]; [[List of Michelin 3-star restaurants in the United Kingdom|ten of which have received a three-star rating]].<ref>{{cite web |url=https://guide.michelin.com/en/gb/restaurants/all-starred |title=United Kingdom |publisher=Michelin Guide |access-date=12 May 2025}}</ref> Sweet foods are common within British cuisine, and there is a long list of [[List of British desserts|British desserts]]. Afternoon tea is a light afternoon meal served with tea in tea rooms and hotels around the United Kingdom, with the tradition dating back to around 1840.<ref>{{Cite web |title=The tea-rific history of Victorian afternoon tea |work=The British Museum |url=https://www.britishmuseum.org/blog/tea-rific-history-victorian-afternoon-tea |access-date=11 April 2023}}</ref> A poll from July 2024 revealed that 3 per cent of the UK population follow a [[vegan]] diet, 6 per cent are [[vegetarian]], and 13 per cent identify as [[flexitarian]] (following a mainly vegetarian diet).<ref>{{Cite web |title=Dietary choices of Brits (e.g. vegeterian, flexitarian, meat-eater etc) |url=https://yougov.co.uk/topics/society/trackers/dietery-choices-of-brits-eg-vegeterian-flexitarian-meat-eater-etc |access-date=26 November 2024 |date=8 July 2024 |website=YouGov.co.uk}}</ref> The British Empire facilitated knowledge of [[Indian cuisine]] with its "strong, penetrating spices and herbs". British cuisine has absorbed the cultural influence of those who have settled in Britain, producing hybrid dishes, such as [[chicken tikka masala]].<ref>{{Cite news |date=19 April 2001 |title=Robin Cook's chicken tikka masala speech |work=The Guardian |location=London |url=https://www.theguardian.com/world/2001/apr/19/race.britishidentity |access-date=7 September 2021}}; {{Cite news |last=BBC E-Cyclopedia |date=20 April 2001 |title=Chicken tikka masala: Spice and easy does it |publisher=BBC |url=http://news.bbc.co.uk/1/hi/special_report/1999/02/99/e-cyclopedia/1285804.stm |access-date=28 September 2007}}</ref> The British have embraced world cuisine and regularly eat recipes or fast food from other European countries, the Caribbean and Asia. The UK has many [[gastropub]]s and is the birthplace of many alcoholic drinks including several beer styles such as [[pale ale]], [[India pale ale]], [[bitter (beer)|bitter]], [[brown ale]], [[porter (beer)|porter]], and [[stout]]. The number of [[craft beer]]s and microbreweries has expanded rapidly in the last two decades.<ref>{{Cite web |title=A guide to British Beer |url=https://www.expatica.com/uk/lifestyle/food-drink/british-beer-469903/ |access-date=25 November 2024 |website=Expatica}}</ref> Other popular alcoholic drinks produced in the UK include [[Scotch whisky]], [[Wine from the United Kingdom|English wine]], [[gin]], [[perry]] and [[cider]]. === Sport === {{Main|Sport in the United Kingdom|Great Britain at the Olympics}} {{Further|Sport in England|Sport in Scotland|Sport in Wales|Sport in Northern Ireland}} [[File:City vs United FA Cup final 2023.jpg|thumb|right|The [[2023 FA Cup final]] at [[Wembley Stadium]] between [[Manchester City]] and [[Manchester United]]]] [[File:Old 18th tee lr.jpg|thumb|right|Golf originated from the [[Old Course at St Andrews]] in Scotland.]] [[Association football]], [[tennis]], [[table tennis]], [[badminton]], [[rugby union]], [[rugby league]], [[rugby sevens]], [[golf]], [[boxing]], [[netball]], [[water polo]], [[field hockey]], [[English billiards|billiards]], [[darts]], [[Rowing (sport)|rowing]], [[rounders]] and [[cricket]] originated or were substantially developed in the UK, with the rules and codes of many modern sports invented and codified in the Victorian era.{{efn|In 2012, the president of the IOC, [[Jacques Rogge]], stated, "This great, sports-loving country is widely recognised as the birthplace of modern sport. It was here that the concepts of sportsmanship and fair play were first codified into clear rules and regulations. It was here that sport was included as an educational tool in the school curriculum."<ref>{{Cite web |url=http://www.olympic.org/Documents/Games_London_2012/London_2012_Opening_ceremony_Speech_Jacques_Rogge.pdf |title=Opening Ceremony of the Games of the XXX Olympiad |website=Olympic.org |access-date=30 November 2013 |date=27 July 2012 |archive-date=19 August 2013 |archive-url=https://web.archive.org/web/20130819135346/http://www.olympic.org/Documents/Games_London_2012/London_2012_Opening_ceremony_Speech_Jacques_Rogge.pdf |url-status=dead}}</ref><ref>{{Cite web |url=http://uk.reuters.com/article/uk-oly-preview-ad-idUKBRE86M0I720120723 |title=Unparalleled Sporting History |work=Reuters |access-date=30 November 2013 |last=Mehaffey |first=John |location=London |archive-date=25 May 2017 |archive-url=https://web.archive.org/web/20170525164121/http://uk.reuters.com/article/uk-oly-preview-ad-idUKBRE86M0I720120723 |url-status=dead}}</ref>}} A poll in 2003 found that football is the most popular sport in the UK.<ref name="sports poll">{{Cite web |date=22 December 2003 |title=Rugby Union 'Britain's Second Most Popular Sport' |url=http://www.ipsos-mori.com/researchpublications/researcharchive/928/Rugby-Union-Britains-Second-Most-Popular-Sport.aspx |access-date=28 April 2013 |publisher=Ipsos-Mori}}</ref> England is recognised by [[FIFA]] as the birthplace of club football, and the [[Football Association]] is the oldest of its kind, with the [[Laws of the Game (association football)|rules of football]] first drafted in 1863 by [[Ebenezer Cobb Morley]].<ref>{{Cite news |last=Rudd |first=Alyson |date=7 April 2008 |title=The father of football deserves much more |work=The Times |location=London |url=http://www.timesonline.co.uk/tol/sport/football/article3694775.ece |url-access=subscription |access-date=29 January 2015 |archive-date=4 June 2011 |archive-url=https://web.archive.org/web/20110604183514/http://www.timesonline.co.uk/tol/sport/football/article3694775.ece |url-status=dead}}; {{Cite web |date=24 October 2007 |title=Sheffield FC: 150 years of history |url=https://www.fifa.com/worldfootball/clubfootball/news/newsid=621801.html |archive-url=https://web.archive.org/web/20071025033006/http://www.fifa.com/worldfootball/clubfootball/news/newsid=621801.html |archive-date=25 October 2007 |access-date=29 January 2015 |publisher=[[FIFA]]}}</ref> Each of the [[Home Nations]] (England, Scotland, Wales and Northern Ireland) has its own football association, national team and [[league system]], and each is individually a governing member of the [[International Football Association Board]] alongside FIFA. The English top division, the [[Premier League]], is the most watched football league in the world.<ref>{{Cite news |last=Ebner |first=Sarah |date=2 July 2013 |title=History and time are key to power of football, says Premier League chief |work=The Times |location=London |url=http://www.thetimes.co.uk/tto/public/ceo-summit/article3804923.ece |url-access=subscription |access-date=30 November 2013}}</ref> The first international football match was contested by [[England national football team|England]] and [[Scotland national football team|Scotland]] on 30&nbsp;November 1872.<ref>{{Cite web |last=Mitchell, Paul |author-link=Paul Mitchell (broadcaster) |date=November 2005 |title=The first international football match |url=https://www.bbc.co.uk/scotland/sportscotland/asportingnation/article/0012/index.shtml |access-date=15 December 2013 |publisher=BBC Sport Scotland}}</ref> England, Scotland, [[Wales national football team|Wales]] and [[Northern Ireland national football team|Northern Ireland]] usually compete as separate countries in international competitions.<ref>{{Cite news |last=Harlow |first=Phil |date=5 August 2008 |title=Why is there no GB Olympics football team? |work=[[BBC Sport]] |url=http://news.bbc.co.uk/sport1/hi/olympics/football/7529807.stm |access-date=31 December 2010}}</ref> In 2003 rugby union was ranked the second-most-popular sport in the UK.<ref name="sports poll" /> The sport was created in [[Rugby School]], Warwickshire, and the [[1871 England versus Scotland rugby union match|first rugby international]] took place on 27&nbsp;March 1871 between [[England national rugby union team|England]] and [[Scotland national rugby union team|Scotland]].<ref>{{Cite web |url=https://www.bbc.co.uk/news/uk-england-coventry-warwickshire-25946757 |title=Six ways the town of Rugby helped change the world |work=BBC News |access-date=29 January 2015 |date=1 February 2014}}</ref><ref>{{Cite book |last1=Godwin |first1=Terry |last2=Rhys |first2=Chris |year=1981 |title=The Guinness Book of Rugby Facts & Feats |page=10 |publisher=Guinness Superlatives |isbn=978-0-85112-214-4}}</ref> England, Scotland, [[Wales national rugby union team|Wales]], [[Ireland national rugby union team|Ireland]], [[France national rugby union team|France]] and [[Italy national rugby union team|Italy]] compete in the [[Six Nations Championship]], the premier international rugby union tournament in the northern hemisphere. [[Sports governing bodies]] in [[Rugby union in England|England]], [[Rugby union in Scotland|Scotland]], [[Rugby union in Wales|Wales]] and [[Rugby union in Ireland|Ireland]] organise and regulate the game separately.<ref>{{Cite book |last1=Louw, Jaco |url=https://books.google.com/books?id=0-IiowvNomMC&pg=PA95 |title=The Girlfriends Guide to Rugby |last2=Nesbit, Derrick |publisher=South Publishers |year=2008 |isbn=978-0-620-39541-0 |location=Johannesburg}}</ref> Every four years the Home Nations make a combined team known as the [[British and Irish Lions]] which tours Australia, New Zealand and South Africa. The United Kingdom hosted the [[Summer Olympic Games]] in [[1908 Summer Olympics|1908]], [[1948 Summer Olympics|1948]] and [[2012 Summer Olympics|2012]], with London acting as the host city on all three occasions. Birmingham hosted the [[2022 Commonwealth Games]], the seventh time a country of the United Kingdom hosted the [[Commonwealth Games]] (England, Scotland and Wales have each hosted the Commonwealth Games at least once).<ref>{{Cite news |title=The journey of India in Commonwealth Games in 2022 |work=The Times of India |url=https://timesofindia.indiatimes.com/readersblog/allaboutsports/the-journey-of-india-in-commonwealth-games-in-2022-44477/ |access-date=29 June 2023}}</ref> === Symbols === {{Main|Symbols of the United Kingdom, the Channel Islands and the Isle of Man|l1 = Symbols of the United Kingdom}} [[File:Queen Elizabeth II Platinum Jubilee 2022 - Platinum Pageant (52123378222).jpg|thumb|Union Jack flags on [[The Mall, London|The Mall]], London]] The [[flag of the United Kingdom]] is the [[Union Flag]], which is also referred to as the Union Jack.<ref>{{Cite web |title=Union Jack or Union Flag? |url=https://www.flaginstitute.org/wp/uk-flags/the-union-jack-or-the-union-flag |access-date=26 September 2022 |website=The Flag Institute}}</ref> It was created in 1606 by the superimposition of the [[flag of England]], representing [[Saint George]], on the [[flag of Scotland]], representing [[Saint Andrew]], and was updated in 1801 with the addition of [[Saint Patrick's Flag]].<ref>{{Cite web |title=college-of-arms.gov.uk |url=https://www.college-of-arms.gov.uk/resources/union-flag-approved-designs |access-date=14 January 2022 |publisher=The College of Arms}}</ref> Wales is not represented in the Union Flag, as Wales had been conquered and [[annexed]] to England prior to the formation of the United Kingdom. The possibility of redesigning the Union Flag to include representation of Wales was discussed in 2007.<ref>{{Cite news |date=27 November 2007 |title=Welsh dragon call for Union flag |work=BBC News |url=http://news.bbc.co.uk/1/hi/uk/7114248.stm |access-date=17 October 2008}}</ref> The [[national anthem]] of the United Kingdom is "[[God Save the King]]", with "King" replaced with "Queen" in the lyrics whenever the monarch is a woman. [[Britannia]] is a [[national personification]] of the United Kingdom, originating from [[Roman Britain]].<ref>{{Cite web |title=Britannia on British Coins |url=http://www.24carat.co.uk/britanniaframe.html |access-date=25 June 2006 |publisher=Chard}}</ref> Beside [[The Lion and the Unicorn]] and the [[Welsh Dragon|dragon]] of heraldry, the [[bulldog]] is an iconic animal and commonly represented with the Union Flag.<ref>{{Cite book |last=Baker |first=Steve |title=Picturing the Beast |publisher=University of Illinois Press |year=2001 |isbn=978-0-252-07030-3 |page=52}}</ref> A rare personification is a character originating in the 18th century, [[John Bull]].<ref>{{Cite web |last=<!--Not stated--> |title=Who is John Bull |url=https://www.loc.gov/wiseguide/jan04/johnbull.html |access-date=11 January 2022 |publisher=The Library of Congress}}</ref> [[National symbols of England|England]], [[National symbols of Wales|Wales]] and [[National symbols of Scotland|Scotland]] each have their own national symbols, including their national flags. [[National symbols of Ireland, the Republic of Ireland and Northern Ireland|Northern Ireland]] also has symbols, many of which are shared with the [[Republic of Ireland]]. == See also == {{Portal|United Kingdom|England|Northern Ireland|Scotland|Wales}} * [[Outline of the United Kingdom]] ** [[Outline of England]] ** [[Outline of Northern Ireland]] ** [[Outline of Scotland]] ** [[Outline of Wales]] * [[International rankings of the United Kingdom]] * [[Historiography of the United Kingdom]] * [[Historiography of the British Empire]] * [[United Kingdom–Crown Dependencies Customs Union]] == Notes == {{Notelist}} == References == {{Reflist}} == External links == {{Sister project links|auto=yes}} * [https://www.bbc.co.uk/news/world-europe-18023389 United Kingdom] from [[BBC News]] * [https://web.archive.org/web/20260118175542/https://www.cia.gov/the-world-factbook/countries/united-kingdom/ United Kingdom]. ''[[The World Factbook]]''. [[Central Intelligence Agency]]. * [https://web.archive.org/web/20090406224510/http://ucblibraries.colorado.edu/govpubs/for/british.htm United Kingdom] from ''UCB Libraries GovPubs'' (archived 6 April 2009) * {{Wikiatlas|United Kingdom}} * {{OSM relation|62149}} * [http://www.ifs.du.edu/ifs/frm_CountryProfile.aspx?Country=GB Key Development Forecasts for the United Kingdom] from [[International Futures]] === Government === * [https://www.gov.uk/ Official website of HM Government] * [https://www.royal.uk/ Official website of the British Monarchy] * [https://www.gov.uk/government/organisations/prime-ministers-office-10-downing-street Official website of the British Prime Minister's Office] === Travel === * [http://www.visitbritain.com/en/ Official tourist guide to Britain] <!-- Please discuss links on the talk page before adding them to this list – remember to read the WP:EL guideline.--> {{United Kingdom topics}} {{Navboxes | list = {{United Kingdom constituents and affiliations}} {{British Isles}} {{Sovereign states of Europe}} {{Commonwealth realms}} {{English official language clickable map}} {{The Commonwealth}} }} {{Authority control}} {{Coord|55|N|3|W|type:country_region:GB|display=title}} [[Category:United Kingdom| ]] [[Category:British Islands]] [[Category:Countries in Europe]] [[Category:Countries and territories where English is an official language]] [[Category:G20 members]] [[Category:Island countries]] [[Category:Member states of NATO]] [[Category:Member states of the Commonwealth of Nations]] [[Category:Member states of the Council of Europe]] [[Category:Member states of the United Nations]] [[Category:OECD members]] [[Category:States and territories established in 1707]] [[Category:States and territories established in 1801]] [[Category:States and territories established in 1922]] fhvytuxn1gpa6ayvzfjjoso68aip63w 117296 117263 2026-07-16T11:46:32Z Tumbuka Arch 6863 Redirected page to [[Great Britain]] 117296 wikitext text/x-wiki #REDIRECT [[Great Britain]] ozaon2gajgughty1mjuz2pb3kr0y3hk Template:Reflist/styles.css 10 9191 116815 114941 2025-12-13T15:43:44Z en>Anomie 0 Update to reduce differences in behavior between {{reflist}} and <references/>. See talk. Note, if this breaks some custom styles you have, likely they were already broken with <references/> and you should take this opportunity to update them. 116815 sanitized-css text/css /* {{pp|small=yes}} */ /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Match Vector 2022 after [[gerrit:1185300]]. */ body.skin-vector-2022 .reflist-columns-2 { column-width: 27em; } body.skin-vector-2022 .reflist-columns-3 { column-width: 22.5em; } /* These should probably be moved to MediaWiki:Common.css to work with <references> as well. */ .references[data-mw-group=upper-alpha] { list-style-type: upper-alpha; } .references[data-mw-group=upper-roman] { list-style-type: upper-roman; } .references[data-mw-group=lower-alpha] { list-style-type: lower-alpha; } .references[data-mw-group=lower-greek] { list-style-type: lower-greek; } .references[data-mw-group=lower-roman] { list-style-type: lower-roman; } /* Liststyle param. */ div.reflist-liststyle-upper-alpha .references { list-style-type: upper-alpha; } div.reflist-liststyle-upper-roman .references { list-style-type: upper-roman; } div.reflist-liststyle-lower-alpha .references { list-style-type: lower-alpha; } div.reflist-liststyle-lower-greek .references { list-style-type: lower-greek; } div.reflist-liststyle-lower-roman .references { list-style-type: lower-roman; } 0y79vyw9wqc26bp1ubg1khshuusjvc4 116816 116815 2026-07-16T10:31:06Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Reflist/styles.css]] 116815 sanitized-css text/css /* {{pp|small=yes}} */ /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Match Vector 2022 after [[gerrit:1185300]]. */ body.skin-vector-2022 .reflist-columns-2 { column-width: 27em; } body.skin-vector-2022 .reflist-columns-3 { column-width: 22.5em; } /* These should probably be moved to MediaWiki:Common.css to work with <references> as well. */ .references[data-mw-group=upper-alpha] { list-style-type: upper-alpha; } .references[data-mw-group=upper-roman] { list-style-type: upper-roman; } .references[data-mw-group=lower-alpha] { list-style-type: lower-alpha; } .references[data-mw-group=lower-greek] { list-style-type: lower-greek; } .references[data-mw-group=lower-roman] { list-style-type: lower-roman; } /* Liststyle param. */ div.reflist-liststyle-upper-alpha .references { list-style-type: upper-alpha; } div.reflist-liststyle-upper-roman .references { list-style-type: upper-roman; } div.reflist-liststyle-lower-alpha .references { list-style-type: lower-alpha; } div.reflist-liststyle-lower-greek .references { list-style-type: lower-greek; } div.reflist-liststyle-lower-roman .references { list-style-type: lower-roman; } 0y79vyw9wqc26bp1ubg1khshuusjvc4 Module:Color contrast 828 9250 116759 37143 2025-03-30T20:30:40Z en>Pppery 0 Tweak default color per request 116759 Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or 'white' local v2 = color2lum(c2) local c3 = args[3] or 'black' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p bx0blwcv5isqzm2jrxnp01lj4148n73 116760 116759 2026-07-15T18:13:33Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Color_contrast]] 116759 Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or 'white' local v2 = color2lum(c2) local c3 = args[3] or 'black' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p bx0blwcv5isqzm2jrxnp01lj4148n73 Module:Lang 828 12864 117202 114899 2026-05-12T23:20:12Z en>Andrybak 0 make_error_span, make_error_msg: use CSS variable `--color-error` to improve readability 117202 Scribunto text/plain --[=[ Lua support for the {{lang}}, {{langx}}, {{lang-??}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_Latin() and is_rtl() local yesno = require ('Module:Yesno'); local sandbox = (mw.getCurrentFrame():getTitle():match ('/sandbox') or ''); -- when called from a sandbox template or module load sandbox data and sandbox configuration local lang_data = mw.loadData ('Module:Lang/data' .. sandbox); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local cfg = mw.loadData ('Module:Lang/configuration' .. sandbox); -- for internationalization local is_latn_data = mw.loadData ('Module:Lang/data/is latn data'); local sizeof_ranges_t = is_latn_data.sizeof_ranges_t; local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< M A K E _ E R R O R _ S P A N >-------------------------------------------------- ]] local function make_error_span (template, msg) return table.concat ({'<span style="color:var(--color-error,#d33)">', cfg.misc_text_t.error, ': ', template, msg, '</span>'}) end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Substitutes $1, $2, etc in <message> with data from <data_t>. Returns plain-text substituted string when <data_t> not nil; returns <message> else. ]] local function substitute (message, data_t) return data_t and mw.message.newRawMessage (message, data_t):plain() or message; end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- Assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args_t, template) local category; local text; -- handle the oddity that is {{langx}} if cfg.templates_t.langxx == template then text = args_t.text or args_t[1]; -- for {{lang-xx}} else text = args_t.text or args_t[2]; -- for {{lang}}, {{langx}}, and {{transliteration}} end if cfg.templates_t.transliteration == template then category = cfg.make_error_msg_t.xlit_err_cat; else category = cfg.make_error_msg_t.lang_err_cat; end local category_link = ((0 == namespace or 10 == namespace) and not args_t.nocat) and substitute ('[[Category:$1]]', {category}) or ''; return substitute ('[$1] <span style="color:var(--color-error,#d33)">$2: &#x7B;{$3}}: $4 ([[:Category:$5|$6]])</span>$7', -- &#x7B; prevents template name from being treated as a template call in certain situations { text or cfg.make_error_msg_t.undefined, cfg.misc_text_t.error, template, msg, category, cfg.misc_text_t.help, category_link }) end --[[--------------------------< P A R A M E T E R _ V A L I D A T E >------------------------------------------ ]] local function parameter_validate (args_t, template) local err_msg = cfg.parameter_validate_t.invalid_param; if cfg.templates_t.lang == template then -- for {{lang}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_lang_t[param] and -- unique {{lang}} parameters not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end elseif cfg.templates_t.langx == template then -- for {{langx}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_langx_t[param] and -- unique {{langx}} parameters not cfg.known_params_t.params_x_t[param] and -- common to {{langx}} and {{lang-xx}} not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end elseif cfg.templates_t.langxx == template then -- for {{lang-xx}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_lang_xx_t[param] and -- unique {{lang-xx}} parameters not cfg.known_params_t.params_x_t[param] and -- common to {{langx}} and {{lang-xx}} not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end end end --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set (var) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their HTML numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ Validates |italic= or |italics= assigned values. When |italic= is set and has an acceptable assigned value, return the matching CSS font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptable assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or xlit function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-??}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-??}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {[cfg.keywords_t.affirmative] = 'italic', [cfg.keywords_t.negative] = 'normal', [cfg.keywords_t.unset] = 'inherit', [cfg.keywords_t.invert] = 'invert', [cfg.keywords_t.default] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, cfg.validate_italic_t.multi_italic; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-??}} templates is to add categorization when the templates are used in main space. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack. ]] local function in_array (needle, haystack) if needle == nil then return false; end for n,v in ipairs (haystack) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ Prettify IETF tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- Extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid. Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-??}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=). Returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. See http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1. ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- IETF tag parts if not is_set (source) then return nil, nil, nil, nil, nil, cfg.get_ietf_parts_t.missing_lang_tag; end local pattern = { -- table of tables holding acceptable IETF tag patterns and short names of the IETF part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured IETF tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named IETF parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_tag, {source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_code, {code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, substitute (cfg.get_ietf_parts_t.maint_promo_cat, {code})); table.insert (maint_msgs, substitute (cfg.get_ietf_parts_t.maint_promo_msg, {code, synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_scr; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_scr_code, {script, code}); -- language code OK, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.script_code, {script, code}); -- language code OK, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_reg; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_reg_code, {region, code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_var; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var, {variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code_scr, {variant, code, script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code_reg, {variant, code, region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code, {variant, code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_pri, {private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- Adds <i> and </i> tags to list-item text or to implied <p>..</p> text. Mixed not supported. ]] local function div_markup_add (text, style) if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics MediaWiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each implied p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each implied p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ Makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in HTML markup. This because the lang= attribute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag. ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the HTML markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default HTML tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> HTML tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of Wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening HTML tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> HTML tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = substitute ('$1 $2', {language, cfg.make_text_html_t.zxx}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = substitute ('$1 $2', {language, cfg.make_text_html_t.collective}); -- for collective languages else title_text = substitute ('$1-$2', {language, cfg.make_text_html_t.individual}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] For English: [[Category:Articles containing explicitly cited English-language text]] For ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return substitute ('[[$1 $2]]', {cfg.make_category_t.collective_cat, language_name}); end if this_wiki_lang_tag == code then return substitute ('[[$1 $2 $3-$4]]', { -- unique category name for the local language cfg.make_category_t.cat_prefix, cfg.make_category_t.explicit_cat, language_name, cfg.make_category_t.cat_postfix, }); else return substitute ('[[$1 $2-$3]]', { -- category for individual languages cfg.make_category_t.cat_prefix, language_name, cfg.make_category_t.cat_postfix, }); end end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- Return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string. The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript). This function is used by both lang_xx() and xlit() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style xlit() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided. ]] local function make_translit (code, language_name, translit, std, tscript, style, engvar) local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = substitute ('$1-$2', {title_text, cfg.misc_text_t.language}); -- skip this text (individual and macro languages only) end title_text = substitute ('$1 $2', {title_text, mw.ustring.lower (cfg.engvar_t[engvar]['romanisz_lc'])}); -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = substitute ('$1$2 ($3 $4) $5', { -- add the appropriate text to the tool tip title_text, title_t[std][tscript:lower()], script_table[tscript], cfg.make_translit_t.script, cfg.make_translit_t.transliteration, }); else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (xlit may not provide a language code) local fmt_str = '$1$2 ($3 $4) $5'; -- generic format string for tool tip if language_name:match ('languages') then fmt_str = '$1$2 ($3) $5'; -- format string for collective languages tool tip end title_text = substitute (fmt_str, { -- add the appropriate text to the tool tip title_text, title_t[std][code:lower()], language_name, cfg.misc_text_t.language, cfg.make_translit_t.transliteration, }); else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = substitute ('$1$2-$3 $4', { -- write a script tool tip title_text, language_name, cfg.make_translit_t.script, cfg.make_translit_t.transliteration, }); elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = substitute ('$1-$2', { -- skip this text (individual and macro languages only) title_text, cfg.misc_text_t.language, }); end title_text = substitute ('$1 $2', { -- finish the tool tip title_text, cfg.make_translit_t.transliteration, }); else title_text = substitute ('$1 $2', { -- generic tool tip (can we ever get here?) title_text, cfg.make_translit_t.transliteration, }); end end end local tag if is_set (code) then -- when a language code is provided (always with {{lang-??}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style tag = '<i lang="%s-Latn">%s</i>' else tag = '<span style="font-style: %s" lang="%s-Latn">%s</span>' -- non-standard style, construct a span tag for it tag = string.format(tag, style, "%s", "%s") end tag = string.format(tag, code, "%s") else tag = '<span>%s</span>' -- when no language code: no lang= attribute, not italic ({{transliteration}} only) end tag = string.format(tag, translit) -- add the translit text if '' == title_text then -- when there is no need for a tool-tip return tag; -- done else title_text = cfg.engvar_sel_t.gb == engvar and title_text:gsub ('([Rr]omani)z', '%1s') or title_text; -- gb eng when engvar specifies gb eng; us eng else return title_wrapper_make (title_text, tag, 'span'); -- wrap with a tool-tip span and done end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg (cfg.validate_text_t.no_text, args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg (cfg.validate_text_t.malformed_markup, args, template); end local style = args.italic; if (cfg.keywords_t.unset ~= style) and (cfg.keywords_t.invert ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg (cfg.validate_text_t.italic_markup, args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ Render mainenance messages and categories. ]] local function render_maint (nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ For proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing. proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac. ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ Looks for a poem strip marker in text; returns true when found; false else. Auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate HTML tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- Validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns nil with <proto_param> as second return value for use in error message. ]] local function validate_proto (proto_param) if cfg.keywords_t.affirmative == proto_param then return true; elseif cfg.keywords_t.negative == proto_param then return false; elseif is_set (proto_param) then return nil, proto_param; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- Common function to return language name from the data set according to IETF tag. Returns language name if found in data tables; nil else. ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to IANA active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the IANA deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, substitute (cfg.language_name_get_t.deprecated_cat, {code})); table.insert (maint_msgs, substitute (cfg.language_name_get_t.deprecated_msg, {code})); end return name; -- name from data tables or nil end --[[--------------------------< T E X T _ S C R I P T _ M A T C H _ T E S T >---------------------------------- IETF script subtag should match the script of the <text>. This module does not attempt to know all scripts and what they look like. It does know what Latn script looks like so when <text> is written using other than the Latn script, the IETF script subtag, if present, should not be Latn. Conversely, when <text> is written using the Latn script, the IETF script subtag, if present, should be Latn. For the purposes of this test, Latf (Fraktur) and Latg (Gaelic) are considered to be equivalent to Latn because unicode treats these two scripts as font-specific variants of Latn. Returns an error message when mismatch detected; nil else. ]] local function text_script_match_test (script, is_latn_text, pos, char) local scripts_t = {['latf'] = true, ['latg'] = true, ['latn'] = true}; -- unicode 'latn' scripts; 'latf' and 'latg' are font variants so there are no Fraktur or Gaelic codepoints if is_set (script) then -- don't bother with the rest of this if <script> is nil or empty string script = script:lower(); -- lower case to index into <scripts_t> if is_latn_text then -- when text is wholly Latn script if not scripts_t[script] then -- but a non-Latn script is specified return cfg.text_script_match_test_t.latn_txt_mismatch; -- emit an error message end else -- when text is not wholly Latn script if scripts_t[script] then -- but a Latn script is specified return substitute (cfg.text_script_match_test_t.latn_scr_mismatch, {pos, char}); -- emit an error message with position of first offending character end end end end --[[--------------------------< B I N A R Y _ S E A R C H >--------------------------------------------------- conducts a binary search of <ranges_t> for a sub-range that holds <target>. returns boolean true if a sub-range holding <target> is found; boolean false else. ]] local function binary_search (target, ranges_t) local idx_bot = 1; -- initialize to index of first key local idx_top = sizeof_ranges_t; -- initialize to index of last key (number of keys) if (target < ranges_t[idx_bot][1]) or (target > ranges_t[idx_top][2]) then -- invalid; target out of range return; -- abandon end local idx_mid; -- calculated index of range midway between top index and bottom index local flag = false; -- flag to tell us when we've evaluated last (highest) range in <ranges_t> while 1 do idx_mid = math.ceil ((idx_bot + idx_top) / 2); -- get the mid-point in the <ranges_t> sequence if (target >= ranges_t[idx_mid][1]) and (target <= ranges_t[idx_mid][2]) then -- indexed range low value <= target <= indexed range high value return true; -- we found the range that holds the <target> character; return true elseif (target > ranges_t[idx_mid][2]) then -- is <target> > indexed range high value? idx_bot = idx_mid; -- adjust <idx_bot> up else -- here when <target> less than indexed range low value idx_top = idx_mid - 1; -- adjust <idx_top> down end if flag then break; -- here when we just evaluated the last range and <target> not found end if not flag and (idx_bot == idx_top) then -- set true just before we evaluate the last (highest) range in <ranges_t> flag = true; end end end --[[--------------------------< I S _ L A T I N >-------------------------------------------------------------- compare <text> as codepoints to lists of known codepoints accepted as Latn script returns boolean true and modified <text> when <text> is wrapped in accept-as-written markup returns boolean true and <text> when codepoint is known returns boolean false, <text>, non-Latn codepoint position in <text> (left to right), and the codepoint character when codepoint is not known TODO: when text has accept-as-written markup, return a non-boolean value to indicate that <text> is not wholly latn script? Use that return value to create non-Latn HTML lang= attribute because <text> isn't really latn so lang=und (undetermined)? or instead, omit the -Latn subtag? (without -Latn need to force |italic=yes) ]] local function is_latin (text, tag) local count; text, count = text:gsub ('^%(%((.+)%)%)$', '%1'); -- remove accept-as-written markup if present if 0 ~= count then return true, text; -- markup present so assume that <text> is Latn-script end local pos = 0; -- position counter for error messaging for codepoint in mw.ustring.gcodepoint (text) do -- fetch each code point pos = pos + 1; -- bump the position counter if not is_latn_data.singles_t[codepoint] and -- codepoint not found in the singles list? not binary_search (codepoint, is_latn_data.ranges_t) and -- codepoint not a member of a listed range? not (tag and is_latn_data.specials_t[codepoint] and is_latn_data.specials_t[codepoint][tag]) then -- not a language-specific codepoint? return false, text, pos, mw.ustring.char (codepoint); -- codepoint not known; return false with codepoint position and character representation end end return true, text; -- is known; return <text> end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- Entry point for {{lang}}. There should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> Parameters are received from the template's frame (parent frame). ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or cfg.templates_t.lang; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {'1', cfg.lang_t.conflict_n_param_types.code}), args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {'2', cfg.lang_t.conflict_n_param_types.text}), args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate HTML tag with text trimmed accordingly args.rtl = args.rtl == cfg.keywords_t.affirmative; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (substitute (cfg.lang_t.invalid_proto, {msg}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg (msg, args, template); end local is_latn_text, pos, char; is_latn_text, args.text, pos, char= is_latin (args.text, code); -- make a boolean msg = text_script_match_test (subtags.script, is_latn_text, pos, char) if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and is_latn_text) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try IETF tag first, then code w/o variant then code w/ variant if cfg.keywords_t.invert == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint (args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- Entry point for {{lang}}. There should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> Parameters are received from the template's frame (parent frame). ]] local function lang (frame) local args_t = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); args_t.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang|...}} local msg = parameter_validate (args_t, cfg.templates_t.lang); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args_t, cfg.templates_t.lang); -- when template has unsupported params, abandon with error message end return _lang (args_t); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- Stand-alone function to create literal translation of main text. Also used by {{lang-x2}}. ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> HTML tag if cfg.keywords_t.negative == args_t.link then table.insert (translation_t, substitute ('<abbr title="$1">$2</abbr>', {cfg.translation_make_t.lit_xlation, cfg.translation_make_t.lit_abbr})); -- unlinked form else table.insert (translation_t, make_wikilink (cfg.translation_make_t.lit_xlation, cfg.translation_make_t.lit_abbr)); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> HTML tag end table.insert (translation_t, table.concat ({ -- user styling spans match spand from {{gloss}} '<span class="gloss-quot">\'</span>', -- user styling span for quote marks; use HTML entities to avoid wiki markup confusion '<span class="gloss-text">', -- open user styling span for the translation args_t.translation, -- the translation '</span>', -- close user styling span for the translation '<span class="gloss-quot">\'</span>' -- user styling span for quote marks })); return table.concat (translation_t); -- make a big string and done end --[[--------------------------< _ L A N G _ X X >-------------------------------------------------------------- For the {{lang-??}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-??}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-??}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-??}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-??}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args, base_template) -- base_template will be either of 'langx' or 'lang-xx' local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or base_template; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; local text_idx = (cfg.templates_t.langx == base_template) and 2 or 1; -- for {{langx}} 'text' positional parameter is '2' local translit_idx = (cfg.templates_t.langx == base_template) and 3 or 2; local xlate_idx = (cfg.templates_t.langx == base_template) and 4 or 3; if args[text_idx] and args.text then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {text_idx, cfg.lang_t.conflict_n_param_types.text}), args, template); else args.text = args[text_idx] or args.text; -- prefer positional 'text' parameter end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate HTML tag with text trimmed accordingly if args[translit_idx] and args.translit then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {translit_idx, cfg.lang_t.conflict_n_param_types.translit}), args, template); else args.translit = args[translit_idx] or args.translit -- prefer positional 'translit' parameter end args.engvar = cfg.engvar_sel_t[args.engvar] or cfg.default_engvar; -- |engvar= when valid; cfg.default_engvar else if args[xlate_idx] and (args.translation or args.lit) then return make_error_msg (substitute (cfg.lang_xx_t.conflict_n_lit, {xlate_idx}), args, template); elseif args.translation and args.lit then return make_error_msg (cfg.lang_xx_t.conflict_lit, args, template); else args.translation = args[xlate_idx] or args.translation or args.lit; -- prefer positional 'translation' parameter end if args.links and args.link then return make_error_msg (cfg.lang_xx_t.conflict_link, args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == cfg.keywords_t.affirmative; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end if args.translit then local latn, pos, char; latn, args.translit, pos, char = is_latin (args.translit, (('' ~= subtags.private) and (code .. '-x-' .. subtags.private)) or code); if not latn then return make_error_msg (substitute (cfg.lang_xx_t.translit_nonlatn, {pos, char}), args, template); end end local is_latn_text, text, pos, char = is_latin (args.text, code); -- make a boolean args.text = text; -- may have been modified (accept-as-written markup removed) msg = text_script_match_test (subtags.script, is_latn_text, pos, char) if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if cfg.templates_t.langx == base_template then -- auto-italics for {{langx}} templates; adapted from {{lang}} (no support for poem tag) if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and is_latn_text) then -- text is not this wiki's language, no script specified and is wholly latn script (auto-italics) args.italic = 'italic'; -- set font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end else -- {{lang-xx}} does not do auto italics; retained for those wikis that don't support {{langx}} if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (substitute (cfg.lang_t.invalid_proto, {args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try IETF tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if cfg.keywords_t.negative == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[args.code:lower()] then -- is IETF tag in article name over ride? table.insert (out, make_wikilink (lang_data.article_name[args.code:lower()], language_name)); -- language name with wikilink from override data elseif lang_data.article_name[code] then -- is language tag in article override table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (substitute ('$1 $2', {language_name, cfg.misc_text_t.language}), language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if cfg.keywords_t.invert == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not is_latn_text then -- transliteration; not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end local translit_title_obj = mw.title.makeTitle (0, substitute ('$1 $2',{cfg.lang_xx_t.romanization, translit_script_name})); -- make a title object; no engvar, article titles use US spelling if translit_title_obj.exists and (cfg.keywords_t.negative ~= args.link) then table.insert (out, make_wikilink (substitute ('$1 $2', {cfg.lang_xx_t.romanization, translit_script_name or language_name}), substitute ('$1', {cfg.engvar_t[args.engvar]['romanisz_pt']})) .. ':'); -- make a wikilink if there is an article to link to; engvar the display text else table.insert (out, substitute ('$1:', {cfg.engvar_t[args.engvar]['romanisz_pt']})); -- else plain text per engvar end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script'], nil, args.engvar) if is_set (translit) then table.insert (out, translit); else return make_error_msg (substitute ('$1: $2', {cfg.lang_xx_t.invalid_xlit_std, args['translit-std'] or '[missing]'}), args, template); end elseif is_set (args.translit) and is_latn_text then -- when creating a transliteration of Latn script <text> return make_error_msg (cfg.lang_xx_t.xlit_of_latn, args, template); -- emit error message and abandon end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- Common function to get args table from {{lang-??}} templates. Returns table of args. Text positional parameters are not trimmed here but are selectively trimmed at html_tag_select(). ]] local function lang_xx_args_get (frame, base_template) local args_t = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if ((cfg.templates_t.langx == base_template) and 2 or 1) == key then -- the 'text' positional parameter; 1 for {{lang-??}}, 2 for {{langx}}; do not trim wite space return value; -- return untrimmed 'text' positional parameter elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args_t; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-??}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame, cfg.templates_t.langxx); args.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang_xx_italic|...}} local msg = parameter_validate (args, cfg.templates_t.langxx); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args, cfg.templates_t.langxx); -- when template has unsupported params, abandon with error message end initial_style_state = 'italic'; return _lang_xx (args, cfg.templates_t.langxx) .. '[[Category:Pages using Lang-xx templates]]'; -- temporary category end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point from another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args, cfg.templates_t.langxx); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-??}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame, cfg.templates_t.langxx); args.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang_xx_inherit|...}} local msg = parameter_validate (args, cfg.templates_t.langxx); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args, cfg.templates_t.langxx); -- when template has unsupported params, abandon with error message end initial_style_state = 'inherit'; return _lang_xx (args, cfg.templates_t.langxx) .. '[[Category:Pages using Lang-xx templates]]'; -- temporary category end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args, cfg.templates_t.langxx); end --[[--------------------------< _ L A N G X >------------------------------------------------------------------ Entry point from another module. ]] local function _langx (args_t) local langx_data = mw.loadData ('Module:Lang/langx'); -- get necessary data local rtl_t = langx_data.rtl_t; -- get list of language tags for languages that are rendered right-to-left local link_t = langx_data.link_t; -- get list of language tags for {{lang-??}} templates that set |link=<something> local size_t = langx_data.size_t; -- get list of language tags for {{lang-??}} templates that set |size=<something> local msg = parameter_validate (args_t, cfg.templates_t.langx); if msg then return make_error_msg (msg, args_t, cfg.templates_t.langx); end args_t.code = args_t[1] or args_t.code; -- get the language tag; must be {{{1}}} or |code= if not args_t.code then return make_error_msg (cfg.get_ietf_parts_t.missing_lang_tag, args_t, cfg.templates_t.langx); end args_t.rtl = args_t.rtl or (rtl_t[args_t.code] and cfg.keywords_t.affirmative); -- prefer |rtl= in template call, use rtl_t else args_t.link = args_t.link or link_t[args_t.code]; -- prefer |link= in template call, use link_t felse args_t.size = args_t.size or size_t[args_t.code]; -- prefer |size= in template call, use size_t else args_t[1] = nil; -- unset to mimic {{lang-??}} templates which set |code=xx local lang_subtag = args_t.code; -- use only the base language subtag for unsupported tag test; some args_t.code are modified by |script= etc return _lang_xx (args_t, cfg.templates_t.langx); end --[[--------------------------< L A N G X >-------------------------------------------------------------------- Entry point for {{langx}}. this function calls _lang_xx() to render non-English text. The {{lang-??}} templates have three positional paramters but {{langx}} has four: | 1 | 2 | 3 | 4 {{lang-xx |<text> |<xlit> |<xlat> }} {{langx |<tag> |<text> |<xlit> |<xlat> }} The calls to lang_xx_args_get() and _lang_xx() use 'langx' as a flag for those functions to select the proper positional parameters. {{lang-??}} depends on the calling template to select 'inherit' or 'italic' to establish the default rendering. {{langx}} can't do that. The initial version of {{langx}} relied on a list of language tags (inherit_t in ~/langx) scraped from those {{lang-??}} templates that call lang_xx_inherit() to render text in upright font. langx() now uses auto-italics code adapted from {{lang}} (doesn't support poem tags). ]] local function langx (frame) local args_t = lang_xx_args_get (frame, cfg.templates_t.langx); -- get the arguments; 'langx' is the <base_template> used to decide which positional param is 'text', 'translit', 'lit' return _langx (args_t); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Module entry point from another module. ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the IETF language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the IETF language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module. ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = cfg.keywords_t.affirmative == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return make_error_span (template, msg); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try IETF tag first, then code w/o variant then code w/ variant if 'yes' ~= args.raw then language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them end if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[raw_code:lower()] then -- is IETF tag in article name override? language_name = make_wikilink (lang_data.article_name[raw_code:lower()], label or language_name); -- language name with wikilink from override data elseif lang_data.article_name[code] then -- is language tag in article name override? language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (substitute ('$1 $2', {language_name, cfg.misc_text_t.language}), label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function name_from_tag (frame) -- entry point from an {{#invoke:lang|name_from_tag|<IETF tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the IETF language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module. ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = substitute (cfg.tag_from_name_t.lang_not_found, {args[1]}); -- language name not found, error message end else msg = cfg.tag_from_name_t.missing_lang_name; -- language name not found, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return make_error_span (template, msg); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function tag_from_name (frame) -- entry point from an {{#invoke:lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}}. ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ X L I T >-------------------------------------------------------------------- Module entry point from another module. ]] local function _xlit (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message local template = args.template or cfg.templates_t.transliteration; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (substitute (cfg.transl_t.unrecog_xlit_std, {args.translit_std}), args, template); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg (cfg.transl_t.no_text, args, template); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg (cfg.transl_t.missing_lang_scr, args, template); end end end if is_set (args[1]) then -- IANA language code used for HTML lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (substitute (cfg.transl_t.unrecog_lang_scr, {args[1]}), args, template); -- invalid language / script code end else return make_error_msg (cfg.transl_t.missing_lang_scr, args, template); -- missing language / script code so quit end local is_latn_text, pos, char; is_latn_text, args.text, pos, char= is_latin (args.text, args.code); -- is latn text? strip accept-as-written markup if not is_latn_text then -- when text is not latn return make_error_msg (substitute (cfg.lang_xx_t.translit_nonlatn, {pos, char}), args, template); -- abandon with error message end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end args.engvar = cfg.engvar_sel_t[args.engvar] or cfg.default_engvar; -- |engvar= when valid; cfg.default_engvar else if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (substitute (cfg.transl_t.unrecog_lang_scr, {args.code}), args, template); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic, args.engvar); end --[[--------------------------< X L I T >---------------------------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function xlit (frame) return _xlit (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Module entry point from another module. ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = cfg.keywords_t.affirmative == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return make_error_span (template, msg); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try IETF tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function category_from_tag (frame) -- entry point from an {{#invoke:lang|category_from_tag|<IETF tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, -- frame entry points when this module is #invoke:ed into templates/wikitext lang = lang, -- entry point for {{lang}} langx = langx, -- entry point for {{langx}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns IETF tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates xlit = xlit, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- API entry points when this module is require()d into other modules _lang = _lang, _langx = _langx, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _xlit = _xlit, _translation_make = translation_make, }; 4lchs3y6tbwcup48cwp3ayuhrxmusvw 117203 117202 2026-07-16T11:41:53Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang]] 117202 Scribunto text/plain --[=[ Lua support for the {{lang}}, {{langx}}, {{lang-??}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_Latin() and is_rtl() local yesno = require ('Module:Yesno'); local sandbox = (mw.getCurrentFrame():getTitle():match ('/sandbox') or ''); -- when called from a sandbox template or module load sandbox data and sandbox configuration local lang_data = mw.loadData ('Module:Lang/data' .. sandbox); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local cfg = mw.loadData ('Module:Lang/configuration' .. sandbox); -- for internationalization local is_latn_data = mw.loadData ('Module:Lang/data/is latn data'); local sizeof_ranges_t = is_latn_data.sizeof_ranges_t; local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< M A K E _ E R R O R _ S P A N >-------------------------------------------------- ]] local function make_error_span (template, msg) return table.concat ({'<span style="color:var(--color-error,#d33)">', cfg.misc_text_t.error, ': ', template, msg, '</span>'}) end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Substitutes $1, $2, etc in <message> with data from <data_t>. Returns plain-text substituted string when <data_t> not nil; returns <message> else. ]] local function substitute (message, data_t) return data_t and mw.message.newRawMessage (message, data_t):plain() or message; end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- Assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args_t, template) local category; local text; -- handle the oddity that is {{langx}} if cfg.templates_t.langxx == template then text = args_t.text or args_t[1]; -- for {{lang-xx}} else text = args_t.text or args_t[2]; -- for {{lang}}, {{langx}}, and {{transliteration}} end if cfg.templates_t.transliteration == template then category = cfg.make_error_msg_t.xlit_err_cat; else category = cfg.make_error_msg_t.lang_err_cat; end local category_link = ((0 == namespace or 10 == namespace) and not args_t.nocat) and substitute ('[[Category:$1]]', {category}) or ''; return substitute ('[$1] <span style="color:var(--color-error,#d33)">$2: &#x7B;{$3}}: $4 ([[:Category:$5|$6]])</span>$7', -- &#x7B; prevents template name from being treated as a template call in certain situations { text or cfg.make_error_msg_t.undefined, cfg.misc_text_t.error, template, msg, category, cfg.misc_text_t.help, category_link }) end --[[--------------------------< P A R A M E T E R _ V A L I D A T E >------------------------------------------ ]] local function parameter_validate (args_t, template) local err_msg = cfg.parameter_validate_t.invalid_param; if cfg.templates_t.lang == template then -- for {{lang}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_lang_t[param] and -- unique {{lang}} parameters not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end elseif cfg.templates_t.langx == template then -- for {{langx}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_langx_t[param] and -- unique {{langx}} parameters not cfg.known_params_t.params_x_t[param] and -- common to {{langx}} and {{lang-xx}} not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end elseif cfg.templates_t.langxx == template then -- for {{lang-xx}} for param, _ in pairs (args_t) do if not cfg.known_params_t.params_lang_xx_t[param] and -- unique {{lang-xx}} parameters not cfg.known_params_t.params_x_t[param] and -- common to {{langx}} and {{lang-xx}} not cfg.known_params_t.common_params_all_t[param] then -- common to all return substitute (err_msg, {param}); -- <param> not found so abandon end end end end --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set (var) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their HTML numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ Validates |italic= or |italics= assigned values. When |italic= is set and has an acceptable assigned value, return the matching CSS font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptable assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or xlit function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-??}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-??}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {[cfg.keywords_t.affirmative] = 'italic', [cfg.keywords_t.negative] = 'normal', [cfg.keywords_t.unset] = 'inherit', [cfg.keywords_t.invert] = 'invert', [cfg.keywords_t.default] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, cfg.validate_italic_t.multi_italic; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-??}} templates is to add categorization when the templates are used in main space. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack. ]] local function in_array (needle, haystack) if needle == nil then return false; end for n,v in ipairs (haystack) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ Prettify IETF tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- Extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid. Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-??}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=). Returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. See http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1. ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- IETF tag parts if not is_set (source) then return nil, nil, nil, nil, nil, cfg.get_ietf_parts_t.missing_lang_tag; end local pattern = { -- table of tables holding acceptable IETF tag patterns and short names of the IETF part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured IETF tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named IETF parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_tag, {source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_code, {code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, substitute (cfg.get_ietf_parts_t.maint_promo_cat, {code})); table.insert (maint_msgs, substitute (cfg.get_ietf_parts_t.maint_promo_msg, {code, synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_scr; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_scr_code, {script, code}); -- language code OK, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, substitute (cfg.get_ietf_parts_t.script_code, {script, code}); -- language code OK, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_reg; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_reg_code, {region, code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, cfg.get_ietf_parts_t.redundant_var; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var, {variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code_scr, {variant, code, script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code_reg, {variant, code, region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_var_code, {variant, code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, substitute (cfg.get_ietf_parts_t.unrecog_pri, {private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- Adds <i> and </i> tags to list-item text or to implied <p>..</p> text. Mixed not supported. ]] local function div_markup_add (text, style) if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics MediaWiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each implied p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each implied p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ Makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in HTML markup. This because the lang= attribute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag. ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the HTML markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default HTML tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> HTML tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of Wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening HTML tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> HTML tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = substitute ('$1 $2', {language, cfg.make_text_html_t.zxx}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = substitute ('$1 $2', {language, cfg.make_text_html_t.collective}); -- for collective languages else title_text = substitute ('$1-$2', {language, cfg.make_text_html_t.individual}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] For English: [[Category:Articles containing explicitly cited English-language text]] For ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return substitute ('[[$1 $2]]', {cfg.make_category_t.collective_cat, language_name}); end if this_wiki_lang_tag == code then return substitute ('[[$1 $2 $3-$4]]', { -- unique category name for the local language cfg.make_category_t.cat_prefix, cfg.make_category_t.explicit_cat, language_name, cfg.make_category_t.cat_postfix, }); else return substitute ('[[$1 $2-$3]]', { -- category for individual languages cfg.make_category_t.cat_prefix, language_name, cfg.make_category_t.cat_postfix, }); end end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- Return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string. The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript). This function is used by both lang_xx() and xlit() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style xlit() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided. ]] local function make_translit (code, language_name, translit, std, tscript, style, engvar) local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = substitute ('$1-$2', {title_text, cfg.misc_text_t.language}); -- skip this text (individual and macro languages only) end title_text = substitute ('$1 $2', {title_text, mw.ustring.lower (cfg.engvar_t[engvar]['romanisz_lc'])}); -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = substitute ('$1$2 ($3 $4) $5', { -- add the appropriate text to the tool tip title_text, title_t[std][tscript:lower()], script_table[tscript], cfg.make_translit_t.script, cfg.make_translit_t.transliteration, }); else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (xlit may not provide a language code) local fmt_str = '$1$2 ($3 $4) $5'; -- generic format string for tool tip if language_name:match ('languages') then fmt_str = '$1$2 ($3) $5'; -- format string for collective languages tool tip end title_text = substitute (fmt_str, { -- add the appropriate text to the tool tip title_text, title_t[std][code:lower()], language_name, cfg.misc_text_t.language, cfg.make_translit_t.transliteration, }); else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = substitute ('$1$2-$3 $4', { -- write a script tool tip title_text, language_name, cfg.make_translit_t.script, cfg.make_translit_t.transliteration, }); elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = substitute ('$1-$2', { -- skip this text (individual and macro languages only) title_text, cfg.misc_text_t.language, }); end title_text = substitute ('$1 $2', { -- finish the tool tip title_text, cfg.make_translit_t.transliteration, }); else title_text = substitute ('$1 $2', { -- generic tool tip (can we ever get here?) title_text, cfg.make_translit_t.transliteration, }); end end end local tag if is_set (code) then -- when a language code is provided (always with {{lang-??}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style tag = '<i lang="%s-Latn">%s</i>' else tag = '<span style="font-style: %s" lang="%s-Latn">%s</span>' -- non-standard style, construct a span tag for it tag = string.format(tag, style, "%s", "%s") end tag = string.format(tag, code, "%s") else tag = '<span>%s</span>' -- when no language code: no lang= attribute, not italic ({{transliteration}} only) end tag = string.format(tag, translit) -- add the translit text if '' == title_text then -- when there is no need for a tool-tip return tag; -- done else title_text = cfg.engvar_sel_t.gb == engvar and title_text:gsub ('([Rr]omani)z', '%1s') or title_text; -- gb eng when engvar specifies gb eng; us eng else return title_wrapper_make (title_text, tag, 'span'); -- wrap with a tool-tip span and done end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg (cfg.validate_text_t.no_text, args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg (cfg.validate_text_t.malformed_markup, args, template); end local style = args.italic; if (cfg.keywords_t.unset ~= style) and (cfg.keywords_t.invert ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg (cfg.validate_text_t.italic_markup, args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ Render mainenance messages and categories. ]] local function render_maint (nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ For proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing. proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac. ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ Looks for a poem strip marker in text; returns true when found; false else. Auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate HTML tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- Validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns nil with <proto_param> as second return value for use in error message. ]] local function validate_proto (proto_param) if cfg.keywords_t.affirmative == proto_param then return true; elseif cfg.keywords_t.negative == proto_param then return false; elseif is_set (proto_param) then return nil, proto_param; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- Common function to return language name from the data set according to IETF tag. Returns language name if found in data tables; nil else. ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to IANA active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the IANA deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, substitute (cfg.language_name_get_t.deprecated_cat, {code})); table.insert (maint_msgs, substitute (cfg.language_name_get_t.deprecated_msg, {code})); end return name; -- name from data tables or nil end --[[--------------------------< T E X T _ S C R I P T _ M A T C H _ T E S T >---------------------------------- IETF script subtag should match the script of the <text>. This module does not attempt to know all scripts and what they look like. It does know what Latn script looks like so when <text> is written using other than the Latn script, the IETF script subtag, if present, should not be Latn. Conversely, when <text> is written using the Latn script, the IETF script subtag, if present, should be Latn. For the purposes of this test, Latf (Fraktur) and Latg (Gaelic) are considered to be equivalent to Latn because unicode treats these two scripts as font-specific variants of Latn. Returns an error message when mismatch detected; nil else. ]] local function text_script_match_test (script, is_latn_text, pos, char) local scripts_t = {['latf'] = true, ['latg'] = true, ['latn'] = true}; -- unicode 'latn' scripts; 'latf' and 'latg' are font variants so there are no Fraktur or Gaelic codepoints if is_set (script) then -- don't bother with the rest of this if <script> is nil or empty string script = script:lower(); -- lower case to index into <scripts_t> if is_latn_text then -- when text is wholly Latn script if not scripts_t[script] then -- but a non-Latn script is specified return cfg.text_script_match_test_t.latn_txt_mismatch; -- emit an error message end else -- when text is not wholly Latn script if scripts_t[script] then -- but a Latn script is specified return substitute (cfg.text_script_match_test_t.latn_scr_mismatch, {pos, char}); -- emit an error message with position of first offending character end end end end --[[--------------------------< B I N A R Y _ S E A R C H >--------------------------------------------------- conducts a binary search of <ranges_t> for a sub-range that holds <target>. returns boolean true if a sub-range holding <target> is found; boolean false else. ]] local function binary_search (target, ranges_t) local idx_bot = 1; -- initialize to index of first key local idx_top = sizeof_ranges_t; -- initialize to index of last key (number of keys) if (target < ranges_t[idx_bot][1]) or (target > ranges_t[idx_top][2]) then -- invalid; target out of range return; -- abandon end local idx_mid; -- calculated index of range midway between top index and bottom index local flag = false; -- flag to tell us when we've evaluated last (highest) range in <ranges_t> while 1 do idx_mid = math.ceil ((idx_bot + idx_top) / 2); -- get the mid-point in the <ranges_t> sequence if (target >= ranges_t[idx_mid][1]) and (target <= ranges_t[idx_mid][2]) then -- indexed range low value <= target <= indexed range high value return true; -- we found the range that holds the <target> character; return true elseif (target > ranges_t[idx_mid][2]) then -- is <target> > indexed range high value? idx_bot = idx_mid; -- adjust <idx_bot> up else -- here when <target> less than indexed range low value idx_top = idx_mid - 1; -- adjust <idx_top> down end if flag then break; -- here when we just evaluated the last range and <target> not found end if not flag and (idx_bot == idx_top) then -- set true just before we evaluate the last (highest) range in <ranges_t> flag = true; end end end --[[--------------------------< I S _ L A T I N >-------------------------------------------------------------- compare <text> as codepoints to lists of known codepoints accepted as Latn script returns boolean true and modified <text> when <text> is wrapped in accept-as-written markup returns boolean true and <text> when codepoint is known returns boolean false, <text>, non-Latn codepoint position in <text> (left to right), and the codepoint character when codepoint is not known TODO: when text has accept-as-written markup, return a non-boolean value to indicate that <text> is not wholly latn script? Use that return value to create non-Latn HTML lang= attribute because <text> isn't really latn so lang=und (undetermined)? or instead, omit the -Latn subtag? (without -Latn need to force |italic=yes) ]] local function is_latin (text, tag) local count; text, count = text:gsub ('^%(%((.+)%)%)$', '%1'); -- remove accept-as-written markup if present if 0 ~= count then return true, text; -- markup present so assume that <text> is Latn-script end local pos = 0; -- position counter for error messaging for codepoint in mw.ustring.gcodepoint (text) do -- fetch each code point pos = pos + 1; -- bump the position counter if not is_latn_data.singles_t[codepoint] and -- codepoint not found in the singles list? not binary_search (codepoint, is_latn_data.ranges_t) and -- codepoint not a member of a listed range? not (tag and is_latn_data.specials_t[codepoint] and is_latn_data.specials_t[codepoint][tag]) then -- not a language-specific codepoint? return false, text, pos, mw.ustring.char (codepoint); -- codepoint not known; return false with codepoint position and character representation end end return true, text; -- is known; return <text> end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- Entry point for {{lang}}. There should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> Parameters are received from the template's frame (parent frame). ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or cfg.templates_t.lang; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {'1', cfg.lang_t.conflict_n_param_types.code}), args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {'2', cfg.lang_t.conflict_n_param_types.text}), args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate HTML tag with text trimmed accordingly args.rtl = args.rtl == cfg.keywords_t.affirmative; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (substitute (cfg.lang_t.invalid_proto, {msg}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg (msg, args, template); end local is_latn_text, pos, char; is_latn_text, args.text, pos, char= is_latin (args.text, code); -- make a boolean msg = text_script_match_test (subtags.script, is_latn_text, pos, char) if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and is_latn_text) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try IETF tag first, then code w/o variant then code w/ variant if cfg.keywords_t.invert == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint (args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- Entry point for {{lang}}. There should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> Parameters are received from the template's frame (parent frame). ]] local function lang (frame) local args_t = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); args_t.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang|...}} local msg = parameter_validate (args_t, cfg.templates_t.lang); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args_t, cfg.templates_t.lang); -- when template has unsupported params, abandon with error message end return _lang (args_t); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- Stand-alone function to create literal translation of main text. Also used by {{lang-x2}}. ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> HTML tag if cfg.keywords_t.negative == args_t.link then table.insert (translation_t, substitute ('<abbr title="$1">$2</abbr>', {cfg.translation_make_t.lit_xlation, cfg.translation_make_t.lit_abbr})); -- unlinked form else table.insert (translation_t, make_wikilink (cfg.translation_make_t.lit_xlation, cfg.translation_make_t.lit_abbr)); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> HTML tag end table.insert (translation_t, table.concat ({ -- user styling spans match spand from {{gloss}} '<span class="gloss-quot">\'</span>', -- user styling span for quote marks; use HTML entities to avoid wiki markup confusion '<span class="gloss-text">', -- open user styling span for the translation args_t.translation, -- the translation '</span>', -- close user styling span for the translation '<span class="gloss-quot">\'</span>' -- user styling span for quote marks })); return table.concat (translation_t); -- make a big string and done end --[[--------------------------< _ L A N G _ X X >-------------------------------------------------------------- For the {{lang-??}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-??}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-??}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-??}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-??}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args, base_template) -- base_template will be either of 'langx' or 'lang-xx' local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or base_template; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; local text_idx = (cfg.templates_t.langx == base_template) and 2 or 1; -- for {{langx}} 'text' positional parameter is '2' local translit_idx = (cfg.templates_t.langx == base_template) and 3 or 2; local xlate_idx = (cfg.templates_t.langx == base_template) and 4 or 3; if args[text_idx] and args.text then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {text_idx, cfg.lang_t.conflict_n_param_types.text}), args, template); else args.text = args[text_idx] or args.text; -- prefer positional 'text' parameter end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate HTML tag with text trimmed accordingly if args[translit_idx] and args.translit then return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {translit_idx, cfg.lang_t.conflict_n_param_types.translit}), args, template); else args.translit = args[translit_idx] or args.translit -- prefer positional 'translit' parameter end args.engvar = cfg.engvar_sel_t[args.engvar] or cfg.default_engvar; -- |engvar= when valid; cfg.default_engvar else if args[xlate_idx] and (args.translation or args.lit) then return make_error_msg (substitute (cfg.lang_xx_t.conflict_n_lit, {xlate_idx}), args, template); elseif args.translation and args.lit then return make_error_msg (cfg.lang_xx_t.conflict_lit, args, template); else args.translation = args[xlate_idx] or args.translation or args.lit; -- prefer positional 'translation' parameter end if args.links and args.link then return make_error_msg (cfg.lang_xx_t.conflict_link, args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == cfg.keywords_t.affirmative; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end if args.translit then local latn, pos, char; latn, args.translit, pos, char = is_latin (args.translit, (('' ~= subtags.private) and (code .. '-x-' .. subtags.private)) or code); if not latn then return make_error_msg (substitute (cfg.lang_xx_t.translit_nonlatn, {pos, char}), args, template); end end local is_latn_text, text, pos, char = is_latin (args.text, code); -- make a boolean args.text = text; -- may have been modified (accept-as-written markup removed) msg = text_script_match_test (subtags.script, is_latn_text, pos, char) if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if cfg.templates_t.langx == base_template then -- auto-italics for {{langx}} templates; adapted from {{lang}} (no support for poem tag) if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and is_latn_text) then -- text is not this wiki's language, no script specified and is wholly latn script (auto-italics) args.italic = 'italic'; -- set font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end else -- {{lang-xx}} does not do auto italics; retained for those wikis that don't support {{langx}} if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (substitute (cfg.lang_t.invalid_proto, {args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try IETF tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if cfg.keywords_t.negative == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[args.code:lower()] then -- is IETF tag in article name over ride? table.insert (out, make_wikilink (lang_data.article_name[args.code:lower()], language_name)); -- language name with wikilink from override data elseif lang_data.article_name[code] then -- is language tag in article override table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (substitute ('$1 $2', {language_name, cfg.misc_text_t.language}), language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if cfg.keywords_t.invert == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not is_latn_text then -- transliteration; not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end local translit_title_obj = mw.title.makeTitle (0, substitute ('$1 $2',{cfg.lang_xx_t.romanization, translit_script_name})); -- make a title object; no engvar, article titles use US spelling if translit_title_obj.exists and (cfg.keywords_t.negative ~= args.link) then table.insert (out, make_wikilink (substitute ('$1 $2', {cfg.lang_xx_t.romanization, translit_script_name or language_name}), substitute ('$1', {cfg.engvar_t[args.engvar]['romanisz_pt']})) .. ':'); -- make a wikilink if there is an article to link to; engvar the display text else table.insert (out, substitute ('$1:', {cfg.engvar_t[args.engvar]['romanisz_pt']})); -- else plain text per engvar end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script'], nil, args.engvar) if is_set (translit) then table.insert (out, translit); else return make_error_msg (substitute ('$1: $2', {cfg.lang_xx_t.invalid_xlit_std, args['translit-std'] or '[missing]'}), args, template); end elseif is_set (args.translit) and is_latn_text then -- when creating a transliteration of Latn script <text> return make_error_msg (cfg.lang_xx_t.xlit_of_latn, args, template); -- emit error message and abandon end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- Common function to get args table from {{lang-??}} templates. Returns table of args. Text positional parameters are not trimmed here but are selectively trimmed at html_tag_select(). ]] local function lang_xx_args_get (frame, base_template) local args_t = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if ((cfg.templates_t.langx == base_template) and 2 or 1) == key then -- the 'text' positional parameter; 1 for {{lang-??}}, 2 for {{langx}}; do not trim wite space return value; -- return untrimmed 'text' positional parameter elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args_t; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-??}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame, cfg.templates_t.langxx); args.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang_xx_italic|...}} local msg = parameter_validate (args, cfg.templates_t.langxx); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args, cfg.templates_t.langxx); -- when template has unsupported params, abandon with error message end initial_style_state = 'italic'; return _lang_xx (args, cfg.templates_t.langxx) .. '[[Category:Pages using Lang-xx templates]]'; -- temporary category end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point from another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args, cfg.templates_t.langxx); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-??}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame, cfg.templates_t.langxx); args.fn = nil; -- unset because not supported but this function might have been called by {{lang|fn=lang_xx_inherit|...}} local msg = parameter_validate (args, cfg.templates_t.langxx); -- verify that all supplied parameters are supported by {{lang-??}} if msg then return make_error_msg (msg, args, cfg.templates_t.langxx); -- when template has unsupported params, abandon with error message end initial_style_state = 'inherit'; return _lang_xx (args, cfg.templates_t.langxx) .. '[[Category:Pages using Lang-xx templates]]'; -- temporary category end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args, cfg.templates_t.langxx); end --[[--------------------------< _ L A N G X >------------------------------------------------------------------ Entry point from another module. ]] local function _langx (args_t) local langx_data = mw.loadData ('Module:Lang/langx'); -- get necessary data local rtl_t = langx_data.rtl_t; -- get list of language tags for languages that are rendered right-to-left local link_t = langx_data.link_t; -- get list of language tags for {{lang-??}} templates that set |link=<something> local size_t = langx_data.size_t; -- get list of language tags for {{lang-??}} templates that set |size=<something> local msg = parameter_validate (args_t, cfg.templates_t.langx); if msg then return make_error_msg (msg, args_t, cfg.templates_t.langx); end args_t.code = args_t[1] or args_t.code; -- get the language tag; must be {{{1}}} or |code= if not args_t.code then return make_error_msg (cfg.get_ietf_parts_t.missing_lang_tag, args_t, cfg.templates_t.langx); end args_t.rtl = args_t.rtl or (rtl_t[args_t.code] and cfg.keywords_t.affirmative); -- prefer |rtl= in template call, use rtl_t else args_t.link = args_t.link or link_t[args_t.code]; -- prefer |link= in template call, use link_t felse args_t.size = args_t.size or size_t[args_t.code]; -- prefer |size= in template call, use size_t else args_t[1] = nil; -- unset to mimic {{lang-??}} templates which set |code=xx local lang_subtag = args_t.code; -- use only the base language subtag for unsupported tag test; some args_t.code are modified by |script= etc return _lang_xx (args_t, cfg.templates_t.langx); end --[[--------------------------< L A N G X >-------------------------------------------------------------------- Entry point for {{langx}}. this function calls _lang_xx() to render non-English text. The {{lang-??}} templates have three positional paramters but {{langx}} has four: | 1 | 2 | 3 | 4 {{lang-xx |<text> |<xlit> |<xlat> }} {{langx |<tag> |<text> |<xlit> |<xlat> }} The calls to lang_xx_args_get() and _lang_xx() use 'langx' as a flag for those functions to select the proper positional parameters. {{lang-??}} depends on the calling template to select 'inherit' or 'italic' to establish the default rendering. {{langx}} can't do that. The initial version of {{langx}} relied on a list of language tags (inherit_t in ~/langx) scraped from those {{lang-??}} templates that call lang_xx_inherit() to render text in upright font. langx() now uses auto-italics code adapted from {{lang}} (doesn't support poem tags). ]] local function langx (frame) local args_t = lang_xx_args_get (frame, cfg.templates_t.langx); -- get the arguments; 'langx' is the <base_template> used to decide which positional param is 'text', 'translit', 'lit' return _langx (args_t); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Module entry point from another module. ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the IETF language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the IETF language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module. ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = cfg.keywords_t.affirmative == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return make_error_span (template, msg); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try IETF tag first, then code w/o variant then code w/ variant if 'yes' ~= args.raw then language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them end if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[raw_code:lower()] then -- is IETF tag in article name override? language_name = make_wikilink (lang_data.article_name[raw_code:lower()], label or language_name); -- language name with wikilink from override data elseif lang_data.article_name[code] then -- is language tag in article name override? language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (substitute ('$1 $2', {language_name, cfg.misc_text_t.language}), label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function name_from_tag (frame) -- entry point from an {{#invoke:lang|name_from_tag|<IETF tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the IETF language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module. ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = substitute (cfg.tag_from_name_t.lang_not_found, {args[1]}); -- language name not found, error message end else msg = cfg.tag_from_name_t.missing_lang_name; -- language name not found, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return make_error_span (template, msg); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function tag_from_name (frame) -- entry point from an {{#invoke:lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}}. ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ X L I T >-------------------------------------------------------------------- Module entry point from another module. ]] local function _xlit (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message local template = args.template or cfg.templates_t.transliteration; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (substitute (cfg.transl_t.unrecog_xlit_std, {args.translit_std}), args, template); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg (cfg.transl_t.no_text, args, template); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg (cfg.transl_t.missing_lang_scr, args, template); end end end if is_set (args[1]) then -- IANA language code used for HTML lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (substitute (cfg.transl_t.unrecog_lang_scr, {args[1]}), args, template); -- invalid language / script code end else return make_error_msg (cfg.transl_t.missing_lang_scr, args, template); -- missing language / script code so quit end local is_latn_text, pos, char; is_latn_text, args.text, pos, char= is_latin (args.text, args.code); -- is latn text? strip accept-as-written markup if not is_latn_text then -- when text is not latn return make_error_msg (substitute (cfg.lang_xx_t.translit_nonlatn, {pos, char}), args, template); -- abandon with error message end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end args.engvar = cfg.engvar_sel_t[args.engvar] or cfg.default_engvar; -- |engvar= when valid; cfg.default_engvar else if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (substitute (cfg.transl_t.unrecog_lang_scr, {args.code}), args, template); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic, args.engvar); end --[[--------------------------< X L I T >---------------------------------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function xlit (frame) return _xlit (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-??}} templates are supported by this function. Module entry point from another module. ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = cfg.keywords_t.affirmative == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return make_error_span (template, msg); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try IETF tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}}. ]] local function category_from_tag (frame) -- entry point from an {{#invoke:lang|category_from_tag|<IETF tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, -- frame entry points when this module is #invoke:ed into templates/wikitext lang = lang, -- entry point for {{lang}} langx = langx, -- entry point for {{langx}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns IETF tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates xlit = xlit, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- API entry points when this module is require()d into other modules _lang = _lang, _langx = _langx, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _xlit = _xlit, _translation_make = translation_make, }; 4lchs3y6tbwcup48cwp3ayuhrxmusvw Module:Lang/data 828 12866 117204 114887 2026-05-03T21:40:57Z en>Trappist the monk 0 +crb; 117204 Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> IANA registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source_t = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source_t) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source_t.active then -- for ~/iana_languages (active) for k, v in pairs (source_t.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source_t.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source_t.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source_t) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Lang/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Lang/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Lang/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Lang/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Lang/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Lang/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug console: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite existing name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fr-ca"] = "Canadian French", ["fr-gallo"] = "Gallo", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-gascon"] = "Gascon", ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["ro-md"] = "Moldovan", -- 'not deprecated' form ["ro-cyrl-md"] = "Moldovan", -- 'not deprecated' form ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["arx"] = "Aruá (Rondonia State)", -- Aruá (Rodonia State); to match en.wiki article ["ast-es"] = "Leonese", -- ast in IANA is Asturian; Leonese is a dialect ["bea"] = "Dane-zaa", -- Beaver; to match en.wiki article title ["bha"] = "Bhariati", -- Bharia; to match en.wiki article title ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["blc"] = "Nuxalk", -- Bella Coola; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["clm"] = "Klallam", -- Clallam; to match en.wiki article title ["crb"] = "Kalinago", -- Island Carib; to match en.wiki article ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hei"] = "Heiltsuk–Oowekyala", -- Heiltsuk; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco; this one for proper tool tip; also in <article_name> table ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ['qwm'] = "Cuman", -- Kuman (Russia); to match en.wiki article name ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["rsk"] = "Pannonian Rusyn", -- Ruthenian; en.wiki preferred name ["sco-ulster"] = "Ulster Scots", ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["tfn"] = "Denaʼina", -- to match en.wiki article title ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zkh"] = "Khorezmian Turkic", -- Khorezmian; to match en.wiki article title, avoiding the dab ["zkt"] = "Khitan", -- Kitan; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian Akkadian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ar-x-classic"] = "Classical Arabic", ["ar-x-nabat"] = "Nabataean Arabic", ["ar-x-safaitic"] = "Safaitic", ["art-x-uropi"] = "Uropi", -- art in IANA is Artificial languages ["ast-x-west"] = "Western Asturian", ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["ccs-x-proto"] = "Proto-Kartvelian", -- ccs in IANA is Kartvelian languages ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["et-x-seto"] = "Seto", -- to replace {{Lang-est-sea}} ["fa-x-classic"] = "Classical Persian", ["fiu-x-proto"] = "Proto-Finno-Ugric", -- fiu in IANA is Finno-Ugric languages ["fr-x-frainc"] = "Franc-Comtois", -- to replace {{Lang-fra-frc}} ["fr-x-quebec"] = "Quebec French", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmq-x-proto"] = "Proto-Norse", ["gmw-x-ecg"] = "East Central German", ["gmw-x-proto"] = "Proto-West Germanic", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-arcadcyp"] = "Arcadocypriot Greek", ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koine Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-pamph"] = "Pamphylian Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-anatolia"] = "Anatolian languages", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-church"] = "Ecclesiastical Latin", ["la-x-classic"] = "Classical Latin", ["la-x-late"] = "Late Latin", ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["la-x-old"] = "Old Latin", ["la-x-ren"] = "Renaissance Latin", ["la-x-vulgar"] = "Vulgar Latin", ["lmo-x-berg"] = "Bergamasque", -- lmo in IANA is Lombard; Bergamasque is a dialect ["lmo-x-cremish"] = "Cremish", -- lmo in IANA is Lombard; Cremish is a dialect ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["roa-x-proto"] = "Proto-Romance", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dadanit"] = "Dadanitic", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hasaitic"] = "Hasaitic", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-hismaic"] = "Hismaic", ["sem-x-nabat"] = "Nabataean Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["smi-x-proto"] = "Proto-Samic", -- smi in IANA is Samic languages ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["sq-x-proto"] = "Proto-Albanian", ["trk-x-oldanat"] = "Old Anatolian Turkish", -- to replace {{Lang-1ca}} ["urj-x-proto"] = "Proto-Uralic", -- urj in IANA is Uralic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsa-x-himyarit"] = "Himyaritic", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", ["zle-x-ruthenia"] = "Ruthenian", -- zle in IANA is East Slavic languages collective; moved to allow rsk for Pannonian Rusyn } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name> language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['aru'] = "Arawá language", -- Aruá (Amazonas State); to avoid Aruá dab page ['arx'] = "Aruá language (Rondônia)", -- Aruá (Rodonia State) overridden to Aruá (Rondonia State); to avoid Aruá dab page ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij-mc"] = "Monégasque dialect", -- Ligurian as spoken in Monaco ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian language (ancient)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{special|PermaLink/680078354}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['abkai'] = { -- Manchu romanization ['default'] = 'Abkai system of romanization', }, ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hu'] = { -- Manchu romanization ['default'] = 'Hu system of romanization', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['cyrs'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['cmn'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mdorff'] = { -- Manchu romanization ['default'] = 'Möllendorff system of romanization', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['thdl'] = { ['default'] = 'THL Simplified Phonetic Transcription', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, ['wylie'] = { ['default'] = 'Wylie transliteration', }, ['yaleko'] = { ['default'] = 'Yale romanization of Korean', }, ['zwpy'] = { ['default'] = 'Tibetan pinyin' }, }; --[[--------------------------< E N G _ V A R >---------------------------------------------------------------- Used at en.wiki so that spelling of 'romanized' (US, default) can be changed to 'romanised' to match the envar specified by a {{Use xxx English}}. This is accomplished by setting |engvar=gb; can, should be omitted in articles that use American English; no need for the clutter. ]] local engvar_sel_t = { -- select either UK English or US English ['au'] = 'gb_t', -- these match IANA region codes (except in lower case) ['ca'] = 'us_t', ['gb'] = 'gb_t', ['ie'] = 'gb_t', ['in'] = 'gb_t', ['nz'] = 'gb_t', ['us'] = 'us_t', -- default engvar ['za'] = 'gb_t' }; local engvar_t = { ['gb_t'] = { ['romanisz_lc'] = 'romanisation', -- lower case ['romanisz_uc'] = 'Romanisation', -- upper case ['romanisz_pt'] = 'romanised', -- past tense }, ['us_t'] = { -- default engvar ['romanisz_lc'] = 'romanization', -- lower case ['romanisz_uc'] = 'Romanization', -- upper case ['romanisz_pt'] = 'romanized', -- past tense } } --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, engvar_t = engvar_t, engvar_sel_t = engvar_sel_t, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; s0e87rcbxa4drtas1ou6pyjfr8z57z9 117205 117204 2026-07-16T11:41:53Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data]] 117204 Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> IANA registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source_t = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source_t) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source_t.active then -- for ~/iana_languages (active) for k, v in pairs (source_t.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source_t.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source_t.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source_t) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Lang/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Lang/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Lang/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Lang/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Lang/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Lang/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug console: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite existing name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fr-ca"] = "Canadian French", ["fr-gallo"] = "Gallo", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-gascon"] = "Gascon", ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["ro-md"] = "Moldovan", -- 'not deprecated' form ["ro-cyrl-md"] = "Moldovan", -- 'not deprecated' form ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["arx"] = "Aruá (Rondonia State)", -- Aruá (Rodonia State); to match en.wiki article ["ast-es"] = "Leonese", -- ast in IANA is Asturian; Leonese is a dialect ["bea"] = "Dane-zaa", -- Beaver; to match en.wiki article title ["bha"] = "Bhariati", -- Bharia; to match en.wiki article title ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["blc"] = "Nuxalk", -- Bella Coola; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["clm"] = "Klallam", -- Clallam; to match en.wiki article title ["crb"] = "Kalinago", -- Island Carib; to match en.wiki article ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hei"] = "Heiltsuk–Oowekyala", -- Heiltsuk; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco; this one for proper tool tip; also in <article_name> table ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ['qwm'] = "Cuman", -- Kuman (Russia); to match en.wiki article name ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["rsk"] = "Pannonian Rusyn", -- Ruthenian; en.wiki preferred name ["sco-ulster"] = "Ulster Scots", ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["tfn"] = "Denaʼina", -- to match en.wiki article title ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zkh"] = "Khorezmian Turkic", -- Khorezmian; to match en.wiki article title, avoiding the dab ["zkt"] = "Khitan", -- Kitan; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian Akkadian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ar-x-classic"] = "Classical Arabic", ["ar-x-nabat"] = "Nabataean Arabic", ["ar-x-safaitic"] = "Safaitic", ["art-x-uropi"] = "Uropi", -- art in IANA is Artificial languages ["ast-x-west"] = "Western Asturian", ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["ccs-x-proto"] = "Proto-Kartvelian", -- ccs in IANA is Kartvelian languages ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["et-x-seto"] = "Seto", -- to replace {{Lang-est-sea}} ["fa-x-classic"] = "Classical Persian", ["fiu-x-proto"] = "Proto-Finno-Ugric", -- fiu in IANA is Finno-Ugric languages ["fr-x-frainc"] = "Franc-Comtois", -- to replace {{Lang-fra-frc}} ["fr-x-quebec"] = "Quebec French", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmq-x-proto"] = "Proto-Norse", ["gmw-x-ecg"] = "East Central German", ["gmw-x-proto"] = "Proto-West Germanic", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-arcadcyp"] = "Arcadocypriot Greek", ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koine Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-pamph"] = "Pamphylian Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-anatolia"] = "Anatolian languages", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-church"] = "Ecclesiastical Latin", ["la-x-classic"] = "Classical Latin", ["la-x-late"] = "Late Latin", ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["la-x-old"] = "Old Latin", ["la-x-ren"] = "Renaissance Latin", ["la-x-vulgar"] = "Vulgar Latin", ["lmo-x-berg"] = "Bergamasque", -- lmo in IANA is Lombard; Bergamasque is a dialect ["lmo-x-cremish"] = "Cremish", -- lmo in IANA is Lombard; Cremish is a dialect ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["roa-x-proto"] = "Proto-Romance", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dadanit"] = "Dadanitic", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hasaitic"] = "Hasaitic", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-hismaic"] = "Hismaic", ["sem-x-nabat"] = "Nabataean Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["smi-x-proto"] = "Proto-Samic", -- smi in IANA is Samic languages ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["sq-x-proto"] = "Proto-Albanian", ["trk-x-oldanat"] = "Old Anatolian Turkish", -- to replace {{Lang-1ca}} ["urj-x-proto"] = "Proto-Uralic", -- urj in IANA is Uralic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsa-x-himyarit"] = "Himyaritic", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", ["zle-x-ruthenia"] = "Ruthenian", -- zle in IANA is East Slavic languages collective; moved to allow rsk for Pannonian Rusyn } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name> language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['aru'] = "Arawá language", -- Aruá (Amazonas State); to avoid Aruá dab page ['arx'] = "Aruá language (Rondônia)", -- Aruá (Rodonia State) overridden to Aruá (Rondonia State); to avoid Aruá dab page ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij-mc"] = "Monégasque dialect", -- Ligurian as spoken in Monaco ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian language (ancient)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{special|PermaLink/680078354}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['abkai'] = { -- Manchu romanization ['default'] = 'Abkai system of romanization', }, ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hu'] = { -- Manchu romanization ['default'] = 'Hu system of romanization', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['cyrs'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['cmn'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mdorff'] = { -- Manchu romanization ['default'] = 'Möllendorff system of romanization', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['thdl'] = { ['default'] = 'THL Simplified Phonetic Transcription', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, ['wylie'] = { ['default'] = 'Wylie transliteration', }, ['yaleko'] = { ['default'] = 'Yale romanization of Korean', }, ['zwpy'] = { ['default'] = 'Tibetan pinyin' }, }; --[[--------------------------< E N G _ V A R >---------------------------------------------------------------- Used at en.wiki so that spelling of 'romanized' (US, default) can be changed to 'romanised' to match the envar specified by a {{Use xxx English}}. This is accomplished by setting |engvar=gb; can, should be omitted in articles that use American English; no need for the clutter. ]] local engvar_sel_t = { -- select either UK English or US English ['au'] = 'gb_t', -- these match IANA region codes (except in lower case) ['ca'] = 'us_t', ['gb'] = 'gb_t', ['ie'] = 'gb_t', ['in'] = 'gb_t', ['nz'] = 'gb_t', ['us'] = 'us_t', -- default engvar ['za'] = 'gb_t' }; local engvar_t = { ['gb_t'] = { ['romanisz_lc'] = 'romanisation', -- lower case ['romanisz_uc'] = 'Romanisation', -- upper case ['romanisz_pt'] = 'romanised', -- past tense }, ['us_t'] = { -- default engvar ['romanisz_lc'] = 'romanization', -- lower case ['romanisz_uc'] = 'Romanization', -- upper case ['romanisz_pt'] = 'romanized', -- past tense } } --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, engvar_t = engvar_t, engvar_sel_t = engvar_sel_t, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; s0e87rcbxa4drtas1ou6pyjfr8z57z9 Module:Citation/CS1 828 12881 116876 114923 2026-02-28T15:14:46Z en>Trappist the monk 0 synch from sandbox; 116876 Scribunto text/plain require ('strict'); --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- each of these counts against the Lua upvalue limit ]] local validation; -- functions in Module:Citation/CS1/Date_validation local utilities; -- functions in Module:Citation/CS1/Utilities local z = {}; -- table of tables in Module:Citation/CS1/Utilities local identifiers; -- functions and tables in Module:Citation/CS1/Identifiers local metadata; -- functions in Module:Citation/CS1/COinS local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist --[[------------------< P A G E S C O P E V A R I A B L E S >--------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local added_deprecated_cat; -- boolean flag so that the category is added only once local added_vanc_errs; -- boolean flag so we only emit one Vancouver error / category local added_generic_name_errs; -- boolean flag so we only emit one generic name error / category and stop testing names once an error is encountered local added_numeric_name_errs; -- boolean flag so we only emit one numeric name error / category and stop testing names once an error is encountered local added_numeric_name_maint; -- boolean flag so we only emit one numeric name maint category and stop testing names once a category has been emitted local is_preview_mode; -- true when article is in preview mode; false when using 'Preview page with this template' (previewing the module) local is_sandbox; -- true when using sandbox modules to render citation local url_was_archive_today; -- boolean flag set to true when has_archive_today_url() has unset |url= because it held a deprecated archive.today url --[[--------------------------< F I R S T _ S E T >------------------------------------------------------------ Locates and returns the first set value in a table of values where the order established in the table, left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set. This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate the for-loop before it reached the actual end of the list. ]] local function first_set (list, count) local i = 1; while i <= count do -- loop through all items in list if utilities.is_set( list[i] ) then return list[i]; -- return the first set list member end i = i + 1; -- point to next end end --[[--------------------------< A D D _ V A N C _ E R R O R >---------------------------------------------------- Adds a single Vancouver system error message to the template's output regardless of how many error actually exist. To prevent duplication, added_vanc_errs is nil until an error message is emitted. added_vanc_errs is a Boolean declared in page scope variables above ]] local function add_vanc_error (source, position) if added_vanc_errs then return end added_vanc_errs = true; -- note that we've added this category utilities.set_message ('err_vancouver', {source, position}); end --[[--------------------------< I S _ S C H E M E >------------------------------------------------------------ does this thing that purports to be a URI scheme seem to be a valid scheme? The scheme is checked to see if it is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says: Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). returns true if it does, else false ]] local function is_scheme (scheme) return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern end --[=[-------------------------< I S _ D O M A I N _ N A M E >-------------------------------------------------- Does this thing that purports to be a domain name seem to be a valid domain name? Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5 BNF defined here: https://tools.ietf.org/html/rfc4234 Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15; see also [[Single-letter second-level domain]] list of TLDs: https://www.iana.org/domains/root/db RFC 952 (modified by RFC 1123) requires the first and last character of a hostname to be a letter or a digit. Between the first and last characters the name may use letters, digits, and the hyphen. Also allowed are IPv4 addresses. IPv6 not supported domain is expected to be stripped of any path so that the last character in the last character of the TLD. tld is two or more alpha characters. Any preceding '//' (from splitting a URL with a scheme) will be stripped here. Perhaps not necessary but retained in case it is necessary for IPv4 dot decimal. There are several tests: the first character of the whole domain name including subdomains must be a letter or a digit internationalized domain name (ASCII characters with .xn-- ASCII Compatible Encoding (ACE) prefix xn-- in the TLD) see https://tools.ietf.org/html/rfc3490 single-letter/digit second-level domains in the .org, .cash, and .today TLDs q, x, and z SL domains in the .com TLD i and q SL domains in the .net TLD single-letter SL domains in the ccTLDs (where the ccTLD is two letters) two-character SL domains in gTLDs (where the gTLD is two or more letters) three-plus-character SL domains in gTLDs (where the gTLD is two or more letters) IPv4 dot-decimal address format; TLD not allowed returns true if domain appears to be a proper name and TLD or IPv4 address, else false ]=] local function is_domain_name (domain) if not domain then return false; -- if not set, abandon end domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once if not domain:match ('^[%w]') then -- first character must be letter or digit return false; end if domain:match ('^%a+:') then -- hack to detect things that look like s:Page:Title where Page: is namespace at Wikisource return false; end local patterns = { -- patterns that look like URLs '%f[%w][%w][%w%-]+[%w]%.%a%a+$', -- three or more character hostname.hostname or hostname.tld '%f[%w][%w][%w%-]+[%w]%.xn%-%-[%w]+$', -- internationalized domain name with ACE prefix '%f[%a][qxz]%.com$', -- assigned one character .com hostname (x.com times out 2015-12-10) '%f[%a][iq]%.net$', -- assigned one character .net hostname (q.net registered but not active 2015-12-10) '%f[%w][%w]%.%a%a$', -- one character hostname and ccTLD (2 chars) '%f[%w][%w][%w]%.%a%a+$', -- two character hostname and TLD '^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?', -- IPv4 address '[%a%d]+%:?' -- IPv6 address } for _, pattern in ipairs (patterns) do -- loop through the patterns list if domain:match (pattern) then return true; -- if a match then we think that this thing that purports to be a URL is a URL end end for _, d in ipairs (cfg.single_letter_2nd_lvl_domains_t) do -- look for single letter second level domain names for these top level domains if domain:match ('%f[%w][%w]%.' .. d) then return true end end return false; -- no matches, we don't know what this thing is end --[[--------------------------< I S _ U R L >------------------------------------------------------------------ returns true if the scheme and domain parts of a URL appear to be a valid URL; else false. This function is the last step in the validation process. This function is separate because there are cases that are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external wikilinks. ]] local function is_url (scheme, domain) if utilities.is_set (scheme) then -- if scheme is set check it and domain return is_scheme (scheme) and is_domain_name (domain); else return is_domain_name (domain); -- scheme not set when URL is protocol-relative end end --[[--------------------------< S P L I T _ U R L >------------------------------------------------------------ Split a URL into a scheme, authority indicator, and domain. First remove Fully Qualified Domain Name terminator (a dot following TLD) (if any) and any path(/), query(?) or fragment(#). If protocol-relative URL, return nil scheme and domain else return nil for both scheme and domain. When not protocol-relative, get scheme, authority indicator, and domain. If there is an authority indicator (one or more '/' characters immediately following the scheme's colon), make sure that there are only 2. Any URL that does not have news: scheme must have authority indicator (//). TODO: are there other common schemes like news: that don't use authority indicator? Strip off any port and path; ]] local function split_url (url_str) local scheme, authority, domain; url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//') if url_str:match ('^//%S*') then -- if there is what appears to be a protocol-relative URL domain = url_str:match ('^//(%S*)') elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions if utilities.is_set (authority) then authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing; if utilities.is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then return scheme; -- return scheme only making domain nil which will cause an error message end else if not scheme:match ('^news:') then -- except for news:..., MediaWiki won't link URLs that do not have authority indicator; TODO: a better way to do this test? return scheme; -- return scheme only making domain nil which will cause an error message end end domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present end return scheme, domain; end --[[--------------------------< L I N K _ P A R A M _ O K >--------------------------------------------------- checks the content of |title-link=, |series-link=, |author-link=, etc. for properly formatted content: no wikilinks, no URLs Link parameters are to hold the title of a Wikipedia article, so none of the WP:TITLESPECIALCHARACTERS are allowed: # < > [ ] | { } _ except the underscore which is used as a space in wiki URLs and # which is used for section links returns false when the value contains any of these characters. When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid URL (the |<param>-link= parameter is ok); else false when value appears to be a valid URL (the |<param>-link= parameter is NOT ok). ]] local function link_param_ok (value) local scheme, domain; if value:find ('[<>%[%]|{}]') then -- if any prohibited characters return false; end scheme, domain = split_url (value); -- get scheme or nil and domain or nil from URL; return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid URL end --[[--------------------------< L I N K _ T I T L E _ O K >--------------------------------------------------- Use link_param_ok() to validate |<param>-link= value and its matching |<title>= value. |<title>= may be wiki-linked but not when |<param>-link= has a value. This function emits an error message when that condition exists check <link> for inter-language interwiki-link prefix. prefix must be a MediaWiki-recognized language code and must begin with a colon. ]] local function link_title_ok (link, lorig, title, torig) local orig; if utilities.is_set (link) then -- don't bother if <param>-link doesn't have a value if not link_param_ok (link) then -- check |<param>-link= markup orig = lorig; -- identify the failing link parameter elseif title:find ('%[%[') then -- check |title= for wikilink markup orig = torig; -- identify the failing |title= parameter elseif link:match ('^%a+:') then -- if the link is what looks like an interwiki local prefix = link:match ('^(%a+):'):lower(); -- get the interwiki prefix if cfg.inter_wiki_map[prefix] then -- if prefix is in the map, must have preceding colon orig = lorig; -- flag as error end end end if utilities.is_set (orig) then link = ''; -- unset utilities.set_message ('err_bad_paramlink', orig); -- URL or wikilink in |title= with |title-link=; end return link; -- link if ok, empty string else end --[[--------------------------< C H E C K _ U R L >------------------------------------------------------------ Determines whether a URL string appears to be valid. First we test for space characters. If any are found, return false. Then split the URL into scheme and domain portions, or for protocol-relative (//example.com) URLs, just the domain. Use is_url() to validate the two portions of the URL. If both are valid, or for protocol-relative if domain is valid, return true, else false. Because it is different from a standard URL, and because this module used external_link() to make external links that work for standard and news: links, we validate newsgroup names here. The specification for a newsgroup name is at https://tools.ietf.org/html/rfc5536#section-3.1.4 ]] local function check_url( url_str ) if nil == url_str:match ("^%S+$") then -- if there are any spaces in |url=value it can't be a proper URL return false; end local scheme, domain; scheme, domain = split_url (url_str); -- get scheme or nil and domain or nil from URL; if 'news:' == scheme then -- special case for newsgroups return domain:match('^[%a%d%+%-_]+%.[%a%d%+%-_%.]*[%a%d%+%-_]$'); end return is_url (scheme, domain); -- return true if value appears to be a valid URL end --[=[-------------------------< I S _ P A R A M E T E R _ E X T _ W I K I L I N K >---------------------------- Return true if a parameter value has a string that begins and ends with square brackets [ and ] and the first non-space characters following the opening bracket appear to be a URL. The test will also find external wikilinks that use protocol-relative URLs. Also finds bare URLs. The frontier pattern prevents a match on interwiki-links which are similar to scheme:path URLs. The tests that find bracketed URLs are required because the parameters that call this test (currently |title=, |chapter=, |work=, and |publisher=) may have wikilinks and there are articles or redirects like '//Hus' so, while uncommon, |title=[[//Hus]] is possible as might be [[en://Hus]]. ]=] local function is_parameter_ext_wikilink (value) local scheme, domain; if value:match ('%f[%[]%[%a%S*:%S+.*%]') then -- if ext. wikilink with scheme and domain: [xxxx://yyyyy.zzz] scheme, domain = split_url (value:match ('%f[%[]%[(%a%S*:%S+).*%]')); elseif value:match ('%f[%[]%[//%S+.*%]') then -- if protocol-relative ext. wikilink: [//yyyyy.zzz] scheme, domain = split_url (value:match ('%f[%[]%[(//%S+).*%]')); elseif value:match ('%a%S*:%S+') then -- if bare URL with scheme; may have leading or trailing plain text scheme, domain = split_url (value:match ('(%a%S*:%S+)')); elseif value:match ('^//%S+') or value:match ('%s//%S+') then -- if protocol-relative bare URL: //yyyyy.zzz; authority indicator (//) must be be preceded nothing or by whitespace scheme, domain = split_url (value:match ('(//%S+)')); -- what is left should be the domain else return false; -- didn't find anything that is obviously a URL end return is_url (scheme, domain); -- return true if value appears to be a valid URL end --[[--------------------------< I S _ A R C H I V E _ T O D A Y _ U R L >-------------------------------------- archive.today (and .ph, .is, .md, .li, .fo, .vn) are deprecated. See Wikipedia:Requests_for_comment/Archive.is_RFC_5 (Special:Permalink/1339352976) <val> is a string that may or may not be a url ]] local function is_archive_today_url (val) if is_parameter_ext_wikilink (val) then -- is <val> a url? local tld = val:match ('archive%.(%l+)'); -- get the tld return tld and cfg.archive_today_tlds_t[tld]; -- return true if <tld> is one of the archive.today tlds; nil else end end --[[--------------------------< H A S _ A R C H I V E _ T O D A Y _ U R L >------------------------------------ blank any parameter that holds one of the archive.today tlds (.today, .ph, .is, .md, .li, .fo, .vn) and also blank parameters that are dependent on the offending parameter. input <cite_args_t> is a table of all of this template's parameters This function modifies <cite_args_t> when |url= or its alias |URL= hold an archive.today url, this function sets the flag <url_was_archive_today> which is used later to suppress the missing url error message from {{citation}} when it has |website=<summat> or from the templates {{cite web}}, {{cite podcast}}, {{cite mailing list}} which all require a url. returns nothing ]] local function has_archive_today_url (cite_args_t) local unset_params_t = {}; -- to hold a sequence of parameters to unset from cite_args_t for p, v in pairs (cite_args_t) do -- look at each parameter in the template if is_archive_today_url (v:lower()) then -- if it has a parameter with an archive.today url table.insert (unset_params_t, p); -- add the url-holding parameter name to our list of parameters to unset (may or may not be a legitimate url parameter) if 'url' == p:lower() then -- if this parameter is |url= or |URL= url_was_archive_today = true; -- set a flag so that cite web / podcast / mailinglist don't emit a missing url error message end if cfg.dependencies_t[p] then -- if this url-holding parameter (<p>) has dependencies for _, dependent in ipairs (cfg.dependencies_t[p]) do -- loop through the url-holding parameter's dependency sequence table.insert (unset_params_t, dependent); -- add dependent parameter to the list to be unset end end end end if 0 < #unset_params_t then -- when there are parameters to unset if not is_preview_mode then -- when in preview mode do not suppress any parameters for _, unset_param in ipairs (unset_params_t) do -- loop through the sequence cite_args_t[unset_param] = nil; -- and unset the url-holding parameter and its dependent parameters to avoid parameter-requires-other-parameter errors end end utilities.set_message ('maint_deprecated_archive'); -- add a maintenance message end end --[[-------------------------< C H E C K _ F O R _ U R L >----------------------------------------------------- loop through a list of parameters and their values. Look at the value and if it has an external link, emit an error message. ]] local function check_for_url (parameter_list, error_list) for k, v in pairs (parameter_list) do -- for each parameter in the list if is_parameter_ext_wikilink (v) then -- look at the value; if there is a URL add an error message table.insert (error_list, utilities.wrap_style ('parameter', k)); end end end --[[--------------------------< S A F E _ F O R _ U R L >------------------------------------------------------ Escape sequences for content that will be used for URL descriptions ]] local function safe_for_url( str ) if str:match( "%[%[.-%]%]" ) ~= nil then utilities.set_message ('err_wikilink_in_url', {}); end return str:gsub( '[%[%]\n]', { ['['] = '&#91;', [']'] = '&#93;', ['\n'] = ' ' } ); end --[[--------------------------< E X T E R N A L _ L I N K >---------------------------------------------------- Format an external link with error checking ]] local function external_link (URL, label, source, access) local err_msg = ''; local domain; local path; local base_url; if not utilities.is_set (label) then label = URL; if utilities.is_set (source) then utilities.set_message ('err_bare_url_missing_title', {utilities.wrap_style ('parameter', source)}); else error (cfg.messages["bare_url_no_origin"]); -- programmer error; valid parameter name does not have matching meta-parameter end end if not check_url (URL) then utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)}); end domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the URL into scheme plus domain and path if path then -- if there is a path portion path = path:gsub ('[%[%]]', {['['] = '%5b', [']'] = '%5d'}); -- replace '[' and ']' with their percent-encoded values URL = table.concat ({domain, path}); -- and reassemble end base_url = table.concat ({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wiki-markup URL if utilities.is_set (access) then -- access level (subscription, registration, limited) base_url = utilities.substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon end return base_url; end --[[--------------------------< D E P R E C A T E D _ P A R A M E T E R >-------------------------------------- Categorize and emit an error message when the citation contains one or more deprecated parameters. The function includes the offending parameter name to the error message. Only one error message is emitted regardless of the number of deprecated parameters in the citation. added_deprecated_cat is a Boolean declared in page scope variables above ]] local function deprecated_parameter(name) if not added_deprecated_cat then added_deprecated_cat = true; -- note that we've added this category utilities.set_message ('err_deprecated_params', {name}); -- add error message end end --[=[-------------------------< K E R N _ Q U O T E S >-------------------------------------------------------- Apply kerning to open the space between the quote mark provided by the module and a leading or trailing quote mark contained in a |title= or |chapter= parameter's value. This function will positive kern either single or double quotes: "'Unkerned title with leading and trailing single quote marks'" " 'Kerned title with leading and trailing single quote marks' " (in real life the kerning isn't as wide as this example) Double single quotes (italic or bold wiki-markup) are not kerned. Replaces Unicode quote marks in plain text or in the label portion of a [[L|D]] style wikilink with typewriter quote marks regardless of the need for kerning. Unicode quote marks are not replaced in simple [[D]] wikilinks. Call this function for chapter titles, for website titles, etc.; not for book titles. ]=] local function kern_quotes (str) local cap = ''; local wl_type, label, link; wl_type, label, link = utilities.is_wikilink (str); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] if 1 == wl_type then -- [[D]] simple wikilink with or without quote marks if mw.ustring.match (str, '%[%[[\"“”\'‘’].+[\"“”\'‘’]%]%]') then -- leading and trailing quote marks str = utilities.substitute (cfg.presentation['kern-left'], str); str = utilities.substitute (cfg.presentation['kern-right'], str); elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks str = utilities.substitute (cfg.presentation['kern-left'], str); elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks str = utilities.substitute (cfg.presentation['kern-right'], str); end else -- plain text or [[L|D]]; text in label variable label = mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark) label = mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark) cap = mw.ustring.match (label, "^([\"\'][^\'].+)"); -- match leading double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-left'], cap); end cap = mw.ustring.match (label, "^(.+[^\'][\"\'])$") -- match trailing double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-right'], cap); end if 2 == wl_type then str = utilities.make_wikilink (link, label); -- reassemble the wikilink else str = label; end end return str; end --[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >---------------------------------------- |script-title= holds title parameters that are not written in Latin-based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped in italic markup. Regardless of language, all values provided by |script-title= are wrapped in <bdi>...</bdi> tags to isolate RTL languages from the English left to right. |script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO 639-1 language code and a colon: |script-title=ja:*** *** (where * represents a Japanese character) Spaces between the two-character code and the colon and the colon and the first script character are allowed: |script-title=ja : *** *** |script-title=ja: *** *** |script-title=ja :*** *** Spaces preceding the prefix are allowed: |script-title = ja:*** *** The prefix is checked for validity. If it is a valid ISO 639-1 language code, the lang attribute (lang="ja") is added to the <bdi> tag so that browsers can know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute is not added. At this time there is no error message for this condition. Supports |script-title=, |script-chapter=, |script-<periodical>= ]] local function format_script_value (script_value, script_param) local lang=''; -- initialize to empty string local name; if script_value:match('^%l%l%l?%s*:') then -- if first 3 or 4 non-space characters are script language prefix lang = script_value:match('^(%l%l%l?)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script if not utilities.is_set (lang) then utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing title part']}); -- prefix without 'title'; add error message return ''; -- script_value was just the prefix so return empty string end -- if we get this far we have prefix and script name = cfg.lang_tag_remap[lang] or mw.language.fetchLanguageName( lang, cfg.this_wiki_code ); -- get language name so that we can use it to categorize if utilities.is_set (name) then -- is prefix a proper ISO 639-1 language code? script_value = script_value:gsub ('^%l+%s*:%s*', ''); -- strip prefix from script -- is prefix one of these language codes? if utilities.in_array (lang, cfg.script_lang_codes) then utilities.add_prop_cat ('script', {name, lang}) else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['unknown language code']}); -- unknown script-language; add error message end lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['invalid language code']}); -- invalid language code; add error message lang = ''; -- invalid so set lang to empty string end else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing prefix']}); -- no language code prefix; add error message end script_value = utilities.substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is RTL return script_value; end --[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------ Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been wrapped in <bdi> tags. ]] local function script_concatenate (title, script, script_param) if utilities.is_set (script) then script = format_script_value (script, script_param); -- <bdi> tags, lang attribute, categorization, etc.; returns empty string on error if utilities.is_set (script) then title = title .. ' ' .. script; -- concatenate title and script title end end return title; end --[[--------------------------< W R A P _ M S G >-------------------------------------------------------------- Applies additional message text to various parameter values. Supplied string is wrapped using a message_list configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken from citation_config.messages - the reason this function is similar to but separate from wrap_style(). ]] local function wrap_msg (key, str, lower) if not utilities.is_set ( str ) then return ""; end if true == lower then local msg; msg = cfg.messages[key]:lower(); -- set the message to lower case before return utilities.substitute ( msg, str ); -- including template text else return utilities.substitute ( cfg.messages[key], str ); end end --[[----------------< W I K I S O U R C E _ U R L _ M A K E >------------------- Makes a Wikisource URL from Wikisource interwiki-link. Returns the URL and appropriate label; nil else. str is the value assigned to |chapter= (or aliases) or |title= or |title-link= ]] local function wikisource_url_make (str) local wl_type, D, L; local ws_url, ws_label; local wikisource_prefix = table.concat ({'https://', cfg.this_wiki_code, '.wikisource.org/wiki/'}); wl_type, D, L = utilities.is_wikilink (str); -- wl_type is 0 (not a wikilink), 1 (simple wikilink), 2 (complex wikilink) if 0 == wl_type then -- not a wikilink; might be from |title-link= str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 1 == wl_type then -- simple wikilink: [[Wikisource:ws article]] str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 2 == wl_type then -- non-so-simple wikilink: [[Wikisource:ws article|displayed text]] ([[L|D]]) str = L:match ('^[Ww]ikisource:(.+)') or L:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_label = D; -- get ws article name from display portion of interwiki link ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title without namespace from link portion of wikilink }); end end if ws_url then ws_url = mw.uri.encode (ws_url, 'WIKI'); -- make a usable URL ws_url = ws_url:gsub ('%%23', '#'); -- undo percent-encoding of fragment marker end return ws_url, ws_label, L or D; -- return proper URL or nil and a label or nil end --[[----------------< F O R M A T _ P E R I O D I C A L >----------------------- Format the three periodical parameters: |script-<periodical>=, |<periodical>=, and |trans-<periodical>= into a single Periodical meta-parameter. ]] local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical) if not utilities.is_set (periodical) then periodical = ''; -- to be safe for concatenation else periodical = utilities.wrap_style ('italic-title', periodical); -- style end periodical = script_concatenate (periodical, script_periodical, script_periodical_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (trans_periodical) then trans_periodical = utilities.wrap_style ('trans-italic-title', trans_periodical); if utilities.is_set (periodical) then periodical = periodical .. ' ' .. trans_periodical; else -- here when trans-periodical without periodical or script-periodical periodical = trans_periodical; utilities.set_message ('err_trans_missing_title', {'periodical'}); end end return periodical; end --[[------------------< F O R M A T _ C H A P T E R _ T I T L E >--------------- Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single chapter meta- parameter (chapter_url_source used for error messages). ]] local function format_chapter_title (script_chapter, script_chapter_source, chapter, chapter_source, trans_chapter, trans_chapter_source, chapter_url, chapter_url_source, no_quotes, access) local ws_url, ws_label, L = wikisource_url_make (chapter); -- make a wikisource URL and label from a wikisource interwiki link if ws_url then ws_label = ws_label:gsub ('_', ' '); -- replace underscore separators with space characters chapter = ws_label; end if not utilities.is_set (chapter) then chapter = ''; -- to be safe for concatenation else if false == no_quotes then chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from module provided quote marks chapter = utilities.wrap_style ('quoted-title', chapter); end end chapter = script_concatenate (chapter, script_chapter, script_chapter_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (chapter_url) then chapter = external_link (chapter_url, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate elseif ws_url then chapter = external_link (ws_url, chapter .. '&nbsp;', 'ws link in chapter'); -- adds bare_url_missing_title error if appropriate; space char to move icon away from chap text; TODO: better way to do this? chapter = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, chapter}); end if utilities.is_set (trans_chapter) then trans_chapter = utilities.wrap_style ('trans-quoted-title', trans_chapter); if utilities.is_set (chapter) then chapter = chapter .. ' ' .. trans_chapter; else -- here when trans_chapter without chapter or script-chapter chapter = trans_chapter; chapter_source = trans_chapter_source:match ('trans%-?(.+)'); -- when no chapter, get matching name from trans-<param> utilities.set_message ('err_trans_missing_title', {chapter_source}); end end return chapter; end --[[----------------< H A S _ I N V I S I B L E _ C H A R S >------------------- This function searches a parameter's value for non-printable or invisible characters. The search stops at the first match. This function will detect the visible replacement character when it is part of the Wikisource. Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref) and identifies them with a slightly different error message. See also coins_cleanup(). Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the parameter value. ]] local function has_invisible_chars (param, v) local position = ''; -- position of invisible char or starting position of stripmarker local capture; -- used by stripmarker detection to hold name of the stripmarker local stripmarker; -- boolean set true when a stripmarker is found capture = string.match (v, '[%w%p ]*'); -- test for values that are simple ASCII text and bypass other tests if true if capture == v then -- if same there are no Unicode characters return; end for _, invisible_char in ipairs (cfg.invisible_chars) do local char_name = invisible_char[1]; -- the character or group name local pattern = invisible_char[2]; -- the pattern used to find it position, _, capture = mw.ustring.find (v, pattern); -- see if the parameter value contains characters that match the pattern if position and (cfg.invisible_defs.zwj == capture) then -- if we found a zero-width joiner character if mw.ustring.find (v, cfg.indic_script) then -- it's ok if one of the Indic scripts position = nil; -- unset position elseif cfg.emoji_t[mw.ustring.codepoint (v, position+1)] then -- is zwj followed by a character listed in emoji{}? position = nil; -- unset position end end if position then if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition) ('templatestyles' == capture and utilities.in_array (param, {'id', 'quote'})) then -- templatestyles stripmarker allowed in these parameters stripmarker = true; -- set a flag elseif true == stripmarker and cfg.invisible_defs.del == capture then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker position = nil; -- unset else local err_msg; if capture and not (cfg.invisible_defs.del == capture or cfg.invisible_defs.zwj == capture) then err_msg = utilities.substitute (cfg.messages.invisible_1, {capture, char_name}); -- <capture> here is stripmarker name else err_msg = utilities.substitute (cfg.messages.invisible_2, char_name); end utilities.set_message ('err_invisible_char', {err_msg, utilities.wrap_style ('parameter', param), position}); -- add error message return; -- and done with this parameter end end end end --[[-------------------< A R G U M E N T _ W R A P P E R >---------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper ( args ) local origin = {}; return setmetatable({ ORIGIN = function ( self, k ) local dummy = self[k]; -- force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) if origin[k] ~= nil then return nil; end local args, list, v = args, cfg.aliases[k]; if type( list ) == 'table' then v, origin[k] = utilities.select_one ( args, list, 'err_redundant_parameters' ); if origin[k] == nil then origin[k] = ''; -- Empty string, not nil end elseif list ~= nil then v, origin[k] = args[list], list; else -- maybe let through instead of raising an error? -- v, origin[k] = args[k], k; error( cfg.messages['unknown_argument_map'] .. ': ' .. k); end -- Empty strings, not nil; if v == nil then v = ''; origin[k] = ''; end tbl = rawset( tbl, k, v ); return v; end, }); end --[[--------------------------< N O W R A P _ D A T E >------------------------- When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>. When date is DD MMMM YYYY or is MMMM DD, YYYY then wrap in nowrap span: <span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> YYYY DOES NOT yet support MMMM YYYY or any of the date ranges. ]] local function nowrap_date (date) local cap = ''; local cap2 = ''; if date:match("^%d%d%d%d%-%d%d%-%d%d$") then date = utilities.substitute (cfg.presentation['nowrap1'], date); elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$"); date = utilities.substitute (cfg.presentation['nowrap2'], {cap, cap2}); end return date; end --[[--------------------------< S E T _ T I T L E T Y P E >--------------------- This function sets default title types (equivalent to the citation including |type=<default value>) for those templates that have defaults. Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none). ]] local function set_titletype (cite_class, title_type) if utilities.is_set (title_type) then if 'none' == cfg.keywords_xlate[title_type] then title_type = ''; -- if |type=none then type parameter not displayed end return title_type; -- if |type= has been set to any other value use that value end return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation end --[[--------------------------< S A F E _ J O I N >----------------------------- Joins a sequence of strings together while checking for duplicate separation characters. ]] local function safe_join( tbl, duplicate_char ) local f = {}; -- create a function table appropriate to type of 'duplicate character' if 1 == #duplicate_char then -- for single byte ASCII characters use the string library functions f.gsub = string.gsub f.match = string.match f.sub = string.sub else -- for multi-byte characters use the ustring library functions f.gsub = mw.ustring.gsub f.match = mw.ustring.match f.sub = mw.ustring.sub end local str = ''; -- the output string local comp = ''; -- what does 'comp' mean? local end_chr = ''; local trim; for _, value in ipairs( tbl ) do if value == nil then value = ''; end if str == '' then -- if output string is empty str = value; -- assign value to it (first time through the loop) elseif value ~= '' then if value:sub(1, 1) == '<' then -- special case of values enclosed in spans and other markup. comp = value:gsub( "%b<>", "" ); -- remove HTML markup (<span>string</span> -> string) else comp = value; end -- typically duplicate_char is sepc if f.sub(comp, 1, 1) == duplicate_char then -- is first character same as duplicate_char? why test first character? -- Because individual string segments often (always?) begin with terminal punct for the -- preceding segment: 'First element' .. 'sepc next element' .. etc.? trim = false; end_chr = f.sub(str, -1, -1); -- get the last character of the output string -- str = str .. "<HERE(enchr=" .. end_chr .. ")" -- debug stuff? if end_chr == duplicate_char then -- if same as separator str = f.sub(str, 1, -2); -- remove it elseif end_chr == "'" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "''" then -- if last three chars of str are sepc'' str = f.sub(str, 1, -4) .. "''"; -- remove them and add back '' elseif f.sub(str, -5, -1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]'' trim = true; -- why? why do this and next differently from previous? elseif f.sub(str, -4, -1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]'' trim = true; -- same question end elseif end_chr == "]" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink trim = true; elseif f.sub(str, -3, -1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link trim = true; elseif f.sub(str, -2, -1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link trim = true; elseif f.sub(str, -4, -1) == duplicate_char .. "'']" then -- normal case when |url=something & |title=Title. trim = true; end elseif end_chr == " " then -- if last char of output string is a space if f.sub(str, -2, -1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space> str = f.sub(str, 1, -3); -- remove them both end end if trim then if value ~= comp then -- value does not equal comp when value contains HTML markup local dup2 = duplicate_char; if f.match(dup2, "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it value = f.gsub(value, "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows HTML markup else value = f.sub(value, 2, -1 ); -- remove duplicate_char when it is first character end end end str = str .. value; -- add it to the output string end end return str; end --[[--------------------------< I S _ S U F F I X >----------------------------- returns true if suffix is properly formed Jr, Sr, or ordinal in the range 1–9. Puncutation not allowed. ]] local function is_suffix (suffix) if utilities.in_array (suffix, {'Jr', 'Sr', 'Jnr', 'Snr', '1st', '2nd', '3rd'}) or suffix:match ('^%dth$') then return true; end return false; end --[[--------------------< I S _ G O O D _ V A N C _ N A M E >------------------- For Vancouver style, author/editor names are supposed to be rendered in Latin (read ASCII) characters. When a name uses characters that contain diacritical marks, those characters are to be converted to the corresponding Latin character. When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters. The module doesn't do this so editors may/must. This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets [http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A [http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF [http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F [http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F |lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) |firstn= also allowed to contain hyphens, spaces, apostrophes, and periods This original test: if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then was written outside of the code editor and pasted here because the code editor gets confused between character insertion point and cursor position. The test has been rewritten to use decimal character escape sequence for the individual bytes of the Unicode characters so that it is not necessary to use an external editor to maintain this code. \195\128-\195\150 – À-Ö (U+00C0–U+00D6 – C0 controls) \195\152-\195\182 – Ø-ö (U+00D8-U+00F6 – C0 controls) \195\184-\198\191 – ø-ƿ (U+00F8-U+01BF – C0 controls, Latin extended A & B) \199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B) ]] local function is_good_vanc_name (last, first, suffix, position) if not suffix then if first:find ('[,%s]') then -- when there is a space or comma, might be first name/initials + generational suffix first = first:match ('(.-)[,%s]+'); -- get name/initials suffix = first:match ('[,%s]+(.+)$'); -- get generational suffix end end if utilities.is_set (suffix) then if not is_suffix (suffix) then add_vanc_error (cfg.err_msg_supl.suffix, position); return false; -- not a name with an appropriate suffix end end if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191%-%s%'%.]*$") then add_vanc_error (cfg.err_msg_supl['non-Latin char'], position); return false; -- not a string of Latin characters; Vancouver requires Romanization end; return true; end --[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------ Attempts to convert names to initials in support of |name-list-style=vanc. Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/. Vancouver style requires family rank designations (Jr, II, III, etc.) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/. This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials. This function uses ustring functions because firstname initials may be any of the Unicode Latin characters accepted by is_good_vanc_name (). ]] local function reduce_to_initials (first, position) if first:find (',', 1, true) then return first; -- commas not allowed; abandon end local name, suffix = mw.ustring.match (first, "^(%u+) ([%dJS][%drndth]+)$"); if not name then -- if not initials and a suffix name = mw.ustring.match (first, "^(%u+)$"); -- is it just initials? end if name then -- if first is initials with or without suffix if 3 > mw.ustring.len (name) then -- if one or two initials if suffix then -- if there is a suffix if is_suffix (suffix) then -- is it legitimate? return first; -- one or two initials and a valid suffix so nothing to do else add_vanc_error (cfg.err_msg_supl.suffix, position); -- one or two initials with invalid suffix so error message return first; -- and return first unmolested end else return first; -- one or two initials without suffix; nothing to do end end end -- if here then name has 3 or more uppercase letters so treat them as a word local initials_t, names_t = {}, {}; -- tables to hold name parts and initials local i = 1; -- counter for number of initials names_t = mw.text.split (first, '[%s%-]+'); -- split into a sequence of names and possible suffix while names_t[i] do -- loop through the sequence if 1 < i and names_t[i]:match ('[%dJS][%drndth]+%.?$') then -- if not the first name, and looks like a suffix (may have trailing dot) names_t[i] = names_t[i]:gsub ('%.', ''); -- remove terminal dot if present if is_suffix (names_t[i]) then -- if a legitimate suffix table.insert (initials_t, ' ' .. names_t[i]); -- add a separator space, insert at end of initials sequence break; -- and done because suffix must fall at the end of a name end -- no error message if not a suffix; possibly because of Romanization end if 3 > i then table.insert (initials_t, mw.ustring.sub (names_t[i], 1, 1)); -- insert the initial at end of initials sequence end i = i + 1; -- bump the counter end return table.concat (initials_t); -- Vancouver format does not include spaces. end --[[--------------------------< I N T E R W I K I _ P R E F I X E N _ G E T >---------------------------------- extract interwiki prefixen from <value>. Returns two one or two values: false – no prefixen nil – prefix exists but not recognized project prefix, language prefix – when value has either of: :<project>:<language>:<article> :<language>:<project>:<article> project prefix, nil – when <value> has only a known single-letter prefix nil, language prefix – when <value> has only a known language prefix accepts single-letter project prefixen: 'd' (wikidata), 's' (wikisource), and 'w' (wikipedia) prefixes; at this writing, the other single-letter prefixen (b (wikibook), c (commons), m (meta), n (wikinews), q (wikiquote), and v (wikiversity)) are not supported. ]] local function interwiki_prefixen_get (value, is_link) if not value:find (':%l+:') then -- if no prefix return false; -- abandon; boolean here to distinguish from nil fail returns later end local prefix_patterns_linked_t = { -- sequence of valid interwiki and inter project prefixen '^%[%[:([dsw]):(%l%l+):', -- wikilinked; project and language prefixes '^%[%[:(%l%l+):([dsw]):', -- wikilinked; language and project prefixes '^%[%[:([dsw]):', -- wikilinked; project prefix '^%[%[:(%l%l+):', -- wikilinked; language prefix } local prefix_patterns_unlinked_t = { -- sequence of valid interwiki and inter project prefixen '^:([dsw]):(%l%l+):', -- project and language prefixes '^:(%l%l+):([dsw]):', -- language and project prefixes '^:([dsw]):', -- project prefix '^:(%l%l+):', -- language prefix } local cap1, cap2; for _, pattern in ipairs ((is_link and prefix_patterns_linked_t) or prefix_patterns_unlinked_t) do cap1, cap2 = value:match (pattern); if cap1 then break; -- found a match so stop looking end end if cap1 and cap2 then -- when both then :project:language: or :language:project: (both forms allowed) if 1 == #cap1 then -- length == 1 then :project:language: if cfg.inter_wiki_map[cap2] then -- is language prefix in the interwiki map? return cap1, cap2; -- return interwiki project and interwiki language end else -- here when :language:project: if cfg.inter_wiki_map[cap1] then -- is language prefix in the interwiki map? return cap2, cap1; -- return interwiki project and interwiki language end end return nil; -- unknown interwiki language elseif not (cap1 or cap2) then -- both are nil? return nil; -- we got something that looks like a project prefix but isn't; return fail elseif 1 == #cap1 then -- here when one capture return cap1, nil; -- length is 1 so return project, nil language else -- here when one capture and its length it more than 1 if cfg.inter_wiki_map[cap1] then -- is language prefix in the interwiki map? return nil, cap1; -- return nil project, language end end end --[[--------------------------< L I S T _ P E O P L E >-------------------------- Formats a list of people (authors, contributors, editors, interviewers, translators) names in the list will be linked when |<name>-link= has a value |<name>-mask- does NOT have a value; masked names are presumed to have been rendered previously so should have been linked there when |<name>-mask=0, the associated name is not rendered ]] local function list_people (control, people, etal) local sep; local namesep; local format = control.format; local maximum = control.maximum; local name_list = {}; if 'vanc' == format then -- Vancouver-like name styling? sep = cfg.presentation['sep_nl_vanc']; -- name-list separator between names is a comma namesep = cfg.presentation['sep_name_vanc']; -- last/first separator is a space else sep = cfg.presentation['sep_nl']; -- name-list separator between names is a semicolon namesep = cfg.presentation['sep_name']; -- last/first separator is <comma><space> end if sep:sub (-1, -1) ~= " " then sep = sep .. " " end if utilities.is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for other names for i, person in ipairs (people) do if utilities.is_set (person.last) then local mask = person.mask; local one; local sep_one = sep; if utilities.is_set (maximum) and i > maximum then etal = true; break; end if mask then local n = tonumber (mask); -- convert to a number if it can be converted; nil else if n then one = 0 ~= n and string.rep("&mdash;", n) or nil; -- make a string of (n > 0) mdashes, nil else, to replace name person.link = nil; -- don't create link to name if name is replaces with mdash string or has been set nil else one = mask; -- replace name with mask text (must include name-list separator) sep_one = " "; -- modify name-list separator end else one = person.last; -- get surname local first = person.first -- get given name if utilities.is_set (first) then if ("vanc" == format) then -- if Vancouver format one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) if not person.corporate and is_good_vanc_name (one, first, nil, i) then -- and name is all Latin characters; corporate authors not tested first = reduce_to_initials (first, i); -- attempt to convert first name(s) to initials end end one = one .. namesep .. first; end end if utilities.is_set (person.link) then one = utilities.make_wikilink (person.link, one); -- link author/editor end if one then -- if <one> has a value (name, mdash replacement, or mask text replacement) local proj, tag = interwiki_prefixen_get (one, true); -- get the interwiki prefixen if present if 'w' == proj and ('Wikipedia' == mw.site.namespaces.Project['name']) then proj = nil; -- for stuff like :w:de:<article>, :w is unnecessary TODO: maint cat? end if proj then local proj_name = ({['d'] = cfg.messages.wikidata, ['s'] = cfg.messages.wikisource, ['w'] = cfg.messages.wikipedia})[proj]; -- :w (wikipedia) for linking from a non-wikipedia project if proj_name then one = one .. utilities.wrap_style ('interproj', proj_name); -- add resized leading space, brackets, static text, language name utilities.add_prop_cat ('interproj-linked-name', proj); -- categorize it; <proj> is sort key tag = nil; -- unset; don't do both project and language end end if tag == cfg.this_wiki_code then tag = nil; -- stuff like :en:<article> at en.wiki is pointless TODO: maint cat? end if tag then local lang = cfg.lang_tag_remap[tag] or cfg.mw_languages_by_tag_t[tag]; if lang then -- error messaging done in extract_names() where we know parameter names one = one .. utilities.wrap_style ('interwiki', lang); -- add resized leading space, brackets, static text, language name utilities.add_prop_cat ('interwiki-linked-name', tag); -- categorize it; <tag> is sort key end end table.insert (name_list, one); -- add it to the list of names table.insert (name_list, sep_one); -- add the proper name-list separator end end end local count = #name_list / 2; -- (number of names + number of separators) divided by 2 if 0 < count then if 1 < count and not etal then if 'amp' == format then name_list[#name_list-2] = " & "; -- replace last separator with ampersand text elseif 'and' == format then if 2 == count then name_list[#name_list-2] = cfg.presentation.sep_nl_and; -- replace last separator with 'and' text else name_list[#name_list-2] = cfg.presentation.sep_nl_end; -- replace last separator with '(sep) and' text end end end name_list[#name_list] = nil; -- erase the last separator end local result = table.concat (name_list); -- construct list if etal and utilities.is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list result = result .. sep .. cfg.messages['et al']; -- we've got a last-first list and etal so add et al. end return result, count; -- return name-list string and count of number of names (count used for editor names only) end --[[--------------------< M A K E _ C I T E R E F _ I D >----------------------- Generates a CITEREF anchor ID if we have at least one name or a date. Otherwise returns an empty string. namelist is one of the contributor-, author-, or editor-name lists chosen in that order. year is Year or anchor_year. ]] local function make_citeref_id (namelist, year) local names={}; -- a table for the one to four names and year for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names names[i] = v.last if i == 4 then break end -- if four then done end table.insert (names, year); -- add the year at the end local id = table.concat(names); -- concatenate names and year for CITEREF id if utilities.is_set (id) then -- if concatenation is not an empty string return "CITEREF" .. id; -- add the CITEREF portion else return ''; -- return an empty string; no reason to include CITEREF id in this citation end end --[[--------------------------< C I T E _ C L A S S _A T T R I B U T E _M A K E >------------------------------ construct <cite> tag class attribute for this citation. <cite_class> – config.CitationClass from calling template <mode> – value from |mode= parameter ]] local function cite_class_attribute_make (cite_class, mode) local class_t = {}; table.insert (class_t, 'citation'); -- required for blue highlight if 'citation' ~= cite_class then table.insert (class_t, cite_class); -- identify this template for user css table.insert (class_t, utilities.is_set (mode) and mode or 'cs1'); -- identify the citation style for user css or javascript else table.insert (class_t, utilities.is_set (mode) and mode or 'cs2'); -- identify the citation style for user css or javascript end for _, prop_key in ipairs (z.prop_keys_t) do table.insert (class_t, prop_key); -- identify various properties for user css or javascript end return table.concat (class_t, ' '); -- make a big string and done end --[[---------------------< N A M E _ H A S _ E T A L >-------------------------- Evaluates the content of name parameters (author, editor, etc.) for variations on the theme of et al. If found, the et al. is removed, a flag is set to true and the function returns the modified name and the flag. This function never sets the flag to false but returns its previous state because it may have been set by previous passes through this function or by the associated |display-<names>=etal parameter ]] local function name_has_etal (name, etal, nocat, param) if utilities.is_set (name) then -- name can be nil in which case just return local patterns = cfg.et_al_patterns; -- get patterns from configuration for _, pattern in ipairs (patterns) do -- loop through all of the patterns if name:match (pattern) then -- if this 'et al' pattern is found in name name = name:gsub (pattern, ''); -- remove the offending text etal = true; -- set flag (may have been set previously here or by |display-<names>=etal) if not nocat then -- no categorization for |vauthors= utilities.set_message ('err_etal', {param}); -- and set an error if not added end end end end return name, etal; end --[[---------------------< N A M E _ I S _ N U M E R I C >---------------------- Add an error message and category when <name> parameter value does not contain letters. Add a maintenance category when <name> parameter value has numeric characters mixed with characters that are not numeric characters; could be letters and/or punctuation characters. This function will only emit one error and one maint message for the current template. Does not emit both error and maint messages/categories for the same parameter value. returns nothing ]] local function name_is_numeric (name, name_alias, list_name) local patterns = { '^%D+%d', -- <name> must have digits preceded by other characters '^%D*%d+%D+', -- <name> must have digits followed by other characters } if not added_numeric_name_errs and mw.ustring.match (name, '^[%A]+$') then -- if we have not already set an error message and <name> does not have any alpha characters utilities.set_message ('err_numeric_names', name_alias); -- add an error message added_numeric_name_errs = true; -- set the flag so we emit only one error message return; -- when here no point in further testing; abandon end if not added_numeric_name_maint then -- if we have already set a maint message for _, pattern in ipairs (patterns) do -- spin through list of patterns if mw.ustring.match (name, pattern) then -- digits preceded or followed by anything but digits; %D+ includes punctuation utilities.set_message ('maint_numeric_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template added_numeric_name_maint = true; -- set the flag so we emit only one maint message return; -- when here no point in further testing; abandon end end end end --[[-----------------< N A M E _ H A S _ M U L T _ N A M E S >------------------ Evaluates the content of last/surname (authors etc.) parameters for multiple names. Multiple names are indicated if there is more than one comma or any "unescaped" semicolons. Escaped semicolons are ones used as part of selected HTML entities. If the condition is met, the function adds the multiple name maintenance category. Same test for first except that commas should not appear in given names (MOS:JR says that the generational suffix does not take a separator character). Titles, degrees, postnominals, affiliations, all normally comma separated don't belong in a citation. <name> – name parameter value <list_name> – AuthorList, EditorList, etc <limit> – number of allowed commas; 1 (default) for surnames; 0 for given names returns nothing ]] local function name_has_mult_names (name, list_name, limit) local _, commas, semicolons, nbsps; limit = limit and limit or 1; if utilities.is_set (name) then _, commas = name:gsub (',', ''); -- count the number of commas _, semicolons = name:gsub (';', ''); -- count the number of semicolons -- nbsps probably should be its own separate count rather than merged in -- some way with semicolons because Lua patterns do not support the -- grouping operator that regex does, which means there is no way to add -- more entities to escape except by adding more counts with the new -- entities _, nbsps = name:gsub ('&nbsp;',''); -- count nbsps -- There is exactly 1 semicolon per &nbsp; entity, so subtract nbsps -- from semicolons to 'escape' them. If additional entities are added, -- they also can be subtracted. if limit < commas or 0 < (semicolons - nbsps) then utilities.set_message ('maint_mult_names', cfg.special_case_translation [list_name]); -- add a maint message end end end --[=[-------------------------< I S _ G E N E R I C >---------------------------------------------------------- Compares values assigned to various parameters according to the string provided as <item> in the function call. <item> can have on of two values: 'generic_names' – for name-holding parameters: |last=, |first=, |editor-last=, etc 'generic_titles' – for |title= There are two types of generic tests. The 'accept' tests look for a pattern that should not be rejected by the 'reject' test. For example, |author=[[John Smith (author)|Smith, John]] would be rejected by the 'author' reject test. But piped wikilinks with 'author' disambiguation should not be rejected so the 'accept' test prevents that from happening. Accept tests are always performed before reject tests. Each of the 'accept' and 'reject' sequence tables hold tables for en.wiki (['en']) and local.wiki (['local']) that each can hold a test sequence table The sequence table holds, at index [1], a test pattern, and, at index [2], a boolean control value. The control value tells string.find() or mw.ustring.find() to do plain-text search (true) or a pattern search (false). The intent of all this complexity is to make these searches as fast as possible so that we don't run out of processing time on very large articles. Returns true when a reject test finds the pattern or string false when an accept test finds the pattern or string nil else ]=] local function is_generic (item, value, wiki) local test_val; local str_lower = { -- use string.lower() for en.wiki (['en']) and use mw.ustring.lower() or local.wiki (['local']) ['en'] = string.lower, ['local'] = mw.ustring.lower, } local str_find = { -- use string.find() for en.wiki (['en']) and use mw.ustring.find() or local.wiki (['local']) ['en'] = string.find, ['local'] = mw.ustring.find, } local function test (val, test_t, wiki) -- local function to do the testing; <wiki> selects lower() and find() functions val = test_t[2] and str_lower[wiki](value) or val; -- when <test_t[2]> set to 'true', plaintext search using lowercase value return str_find[wiki] (val, test_t[1], 1, test_t[2]); -- return nil when not found or matched end local test_types_t = {'accept', 'reject'}; -- test accept patterns first, then reject patterns local wikis_t = {'en', 'local'}; -- do tests for each of these keys; en.wiki first, local.wiki second for _, test_type in ipairs (test_types_t) do -- for each test type for _, generic_value in pairs (cfg.special_case_translation[item][test_type]) do -- spin through the list of generic value fragments to accept or reject for _, wiki in ipairs (wikis_t) do if generic_value[wiki] then if test (value, generic_value[wiki], wiki) then -- go do the test return ('reject' == test_type); -- param value rejected, return true; false else end end end end end end --[[--------------------------< N A M E _ I S _ G E N E R I C >------------------------------------------------ calls is_generic() to determine if <name> is a 'generic name' listed in cfg.generic_names; <name_alias> is the parameter name used in error messaging ]] local function name_is_generic (name, name_alias) if not added_generic_name_errs and is_generic ('generic_names', name) then utilities.set_message ('err_generic_name', name_alias); -- set an error message added_generic_name_errs = true; end end --[[--------------------------< N A M E _ C H E C K S >-------------------------------------------------------- This function calls various name checking functions used to validate the content of the various name-holding parameters. ]] local function name_checks (last, first, list_name, last_alias, first_alias) local accept_name; if utilities.is_set (last) then last, accept_name = utilities.has_accept_as_written (last); -- remove accept-this-as-written markup when it wraps all of <last> if not accept_name then -- <last> not wrapped in accept-as-written markup name_has_mult_names (last, list_name); -- check for multiple names in the parameter name_is_numeric (last, last_alias, list_name); -- check for names that have no letters or are a mix of digits and other characters name_is_generic (last, last_alias); -- check for names found in the generic names list end end if utilities.is_set (first) then first, accept_name = utilities.has_accept_as_written (first); -- remove accept-this-as-written markup when it wraps all of <first> if not accept_name then -- <first> not wrapped in accept-as-written markup name_has_mult_names (first, list_name, 0); -- check for multiple names in the parameter; 0 is number of allowed commas in a given name name_is_numeric (first, first_alias, list_name); -- check for names that have no letters or are a mix of digits and other characters name_is_generic (first, first_alias); -- check for names found in the generic names list end local wl_type, D = utilities.is_wikilink (first); if 0 ~= wl_type then first = D; utilities.set_message ('err_bad_paramlink', first_alias); end end return last, first; -- done end --[[----------------------< E X T R A C T _ N A M E S >------------------------- Gets name list from the input arguments Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters. Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't find |last4= and |last5= then the search is done. This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3= are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=. When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the template's metadata. When this occurs, an error is emitted. ]] local function extract_names(args, list_name) local names = {}; -- table of names local last; -- individual name components local first; local link; local mask; local i = 1; -- loop counter/indexer local n = 1; -- output table indexer local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors) local etal = false; -- return value set to true when we find some form of et al. in an author parameter local last_alias, first_alias, link_alias; -- selected parameter aliases used in error messaging while true do last, last_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'err_redundant_parameters', i ); -- search through args for name components beginning at 1 first, first_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'err_redundant_parameters', i ); link, link_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ); mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); if last then -- error check |lastn= alias for unknown interwiki link prefix; done here because this is where we have the parameter name local project, language = interwiki_prefixen_get (last, true); -- true because we expect interwiki links in |lastn= to be wikilinked if nil == project and nil == language then -- when both are nil utilities.set_message ('err_bad_paramlink', last_alias); -- not known, emit an error message -- TODO: err_bad_interwiki? last = utilities.remove_wiki_link (last); -- remove wikilink markup; show display value only end end if link then -- error check |linkn= alias for unknown interwiki link prefix local project, language = interwiki_prefixen_get (link, false); -- false because wiki links in |author-linkn= is an error if nil == project and nil == language then -- when both are nil utilities.set_message ('err_bad_paramlink', link_alias); -- not known, emit an error message -- TODO: err_bad_interwiki? link = nil; -- unset so we don't link link_alias = nil; end end last, etal = name_has_etal (last, etal, false, last_alias); -- find and remove variations on et al. first, etal = name_has_etal (first, etal, false, first_alias); -- find and remove variations on et al. last, first = name_checks (last, first, list_name, last_alias, first_alias); -- multiple names, extraneous annotation, etc. checks if first and not last then -- if there is a firstn without a matching lastn local alias = first_alias:find ('given', 1, true) and 'given' or 'first'; -- get first or given form of the alias utilities.set_message ('err_first_missing_last', { first_alias, -- param name of alias missing its mate first_alias:gsub (alias, {['first'] = 'last', ['given'] = 'surname'}), -- make param name appropriate to the alias form }); -- add this error message elseif not first and not last then -- if both firstn and lastn aren't found, are we done? count = count + 1; -- number of times we haven't found last and first if 2 <= count then -- two missing names and we give up break; -- normal exit or there is a two-name hole in the list; can't tell which end else -- we have last with or without a first local result; link = link_title_ok (link, link_alias, last, last_alias); -- check for improper wiki-markup if first then link = link_title_ok (link, link_alias, first, first_alias); -- check for improper wiki-markup end names[n] = {last = last, first = first, link = link, mask = mask, corporate = false}; -- add this name to our names list (corporate for |vauthors= only) n = n + 1; -- point to next location in the names table if 1 == count then -- if the previous name was missing utilities.set_message ('err_missing_name', {list_name:match ("(%w+)List"):lower(), i - 1}); -- add this error message end count = 0; -- reset the counter, we're looking for two consecutive missing names end i = i + 1; -- point to next args location end return names, etal; -- all done, return our list of names and the etal flag end --[[--------------------------< N A M E _ T A G _ G E T >------------------------------------------------------ attempt to decode |language=<lang_param> and return language name and matching tag; nil else. This function looks for: <lang_param> as a tag in cfg.lang_tag_remap{} <lang_param> as a name in cfg.lang_name_remap{} <lang_param> as a name in cfg.mw_languages_by_name_t <lang_param> as a tag in cfg.mw_languages_by_tag_t when those fail, presume that <lang_param> is an IETF-like tag that MediaWiki does not recognize. Strip all script, region, variant, whatever subtags from <lang_param> to leave just a two or three character language tag and look for the new <lang_param> in cfg.mw_languages_by_tag_t{} on success, returns name (in properly capitalized form) and matching tag (in lowercase); on failure returns nil ]] local function name_tag_get (lang_param) local lang_param_lc = mw.ustring.lower (lang_param); -- use lowercase as an index into the various tables local name; local tag; name = cfg.lang_tag_remap[lang_param_lc]; -- assume <lang_param_lc> is a tag; attempt to get remapped language name if name then -- when <name>, <lang_param> is a tag for a remapped language name if cfg.lang_name_remap[name:lower()][2] ~= lang_param_lc then utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added return name, cfg.lang_name_remap[name:lower()][2]; -- so return name and tag from lang_name_remap[name]; special case to xlate sr-ec and sr-el to sr-cyrl and sr-latn end return name, lang_param_lc; -- so return <name> from remap and <lang_param_lc> end tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- still assuming that <lang_param_lc> is a tag; strip script, region, variant subtags name = cfg.lang_tag_remap[tag]; -- attempt to get remapped language name with language subtag only if name then -- when <name>, <tag> is a tag for a remapped language name return name, tag; -- so return <name> from remap and <tag> end if cfg.lang_name_remap[lang_param_lc] then -- not a remapped tag, assume <lang_param_lc> is a name; attempt to get remapped language tag return cfg.lang_name_remap[lang_param_lc][1], cfg.lang_name_remap[lang_param_lc][2]; -- for this <lang_param_lc>, return a (possibly) new name and appropriate tag end name = cfg.mw_languages_by_tag_t[lang_param_lc]; -- assume that <lang_param_lc> is a tag; attempt to get its matching language name if name then return name, lang_param_lc; -- <lang_param_lc> is a tag so return it and <name> end tag = cfg.mw_languages_by_name_t[lang_param_lc]; -- assume that <lang_param_lc> is a language name; attempt to get its matching tag if tag then return cfg.mw_languages_by_tag_t[tag], tag; -- <lang_param_lc> is a name so return the name from the table and <tag> end tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- is <lang_param_lc> an IETF-like tag that MediaWiki doesn't recognize? <tag> gets the language subtag; nil else if tag then name = cfg.mw_languages_by_tag_t[tag]; -- attempt to get a language name using the shortened <tag> if name then return name, tag; -- <lang_param_lc> is an unrecognized IETF-like tag so return <name> and language subtag end end end --[[-------------------< L A N G U A G E _ P A R A M E T E R >------------------ Gets language name from a provided two- or three-character ISO 639 code. If a code is recognized by MediaWiki, use the returned name; if not, then use the value that was provided with the language parameter. When |language= contains a recognized language (either code or name), the page is assigned to the category for that code: Category:Norwegian-language sources (no). For valid three-character code languages, the page is assigned to the single category for '639-2' codes: Category:CS1 ISO 639-2 language sources. Languages that are the same as the local wiki are not categorized. MediaWiki does not recognize three-character equivalents of two-character codes: code 'ar' is recognized but code 'ara' is not. This function supports multiple languages in the form |language=nb, French, th where the language names or codes are separated from each other by commas with optional space characters. ]] local function language_parameter (lang) local tag; -- some form of IETF-like language tag; language subtag with optional region, sript, vatiant, etc subtags local lang_subtag; -- ve populates |language= with mostly unecessary region subtags the MediaWiki does not recognize; this is the base language subtag local name; -- the language name local language_list = {}; -- table of language names to be rendered local names_t = {}; -- table made from the value assigned to |language= local this_wiki_name = mw.language.fetchLanguageName (cfg.this_wiki_code, cfg.this_wiki_code); -- get this wiki's language name names_t = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list for _, lang in ipairs (names_t) do -- reuse lang here because we don't yet know if lang is a language name or a language tag name, tag = name_tag_get (lang); -- attempt to get name/tag pair for <lang>; <name> has proper capitalization; <tag> is lowercase if utilities.is_set (tag) then lang_subtag = tag:gsub ('^(%a%a%a?)%-.*', '%1'); -- for categorization, strip any IETF-like tags from language tag if cfg.this_wiki_code ~= lang_subtag then -- when the language is not the same as this wiki's language if 2 == lang_subtag:len() then -- and is a two-character tag utilities.add_prop_cat ('foreign-lang-source', {name, tag}, lang_subtag); -- categorize it; tag appended to allow for multiple language categorization else -- or is a recognized language (but has a three-character tag) utilities.add_prop_cat ('foreign-lang-source-2', {lang_subtag}, lang_subtag); -- categorize it differently TODO: support multiple three-character tag categories per cs1|2 template? end elseif cfg.local_lang_cat_enable then -- when the language and this wiki's language are the same and categorization is enabled utilities.add_prop_cat ('local-lang-source', {name, lang_subtag}); -- categorize it end else name = lang; -- return whatever <lang> has so that we show something utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added end table.insert (language_list, name); name = ''; -- so we can reuse it end name = utilities.make_sep_list (#language_list, language_list); if (1 == #language_list) and (lang_subtag == cfg.this_wiki_code) then -- when only one language, find lang name in this wiki lang name; for |language=en-us, 'English' in 'American English' return ''; -- if one language and that language is this wiki's return an empty string (no annotation) end return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)' --[[ TODO: should only return blank or name rather than full list so we can clean up the bunched parenthetical elements Language, Type, Format ]] end --[[-----------------------< S E T _ C S _ S T Y L E >-------------------------- Gets the default CS style configuration for the given mode. Returns default separator and either postscript as passed in or the default. In CS1, the default postscript and separator are '.'. In CS2, the default postscript is the empty string and the default separator is ','. ]] local function set_cs_style (postscript, mode) if utilities.is_set(postscript) then -- emit a maintenance message if user postscript is the default cs1 postscript -- we catch the opposite case for cs2 in set_style if mode == 'cs1' and postscript == cfg.presentation['ps_' .. mode] then utilities.set_message ('maint_postscript'); end else postscript = cfg.presentation['ps_' .. mode]; end return cfg.presentation['sep_' .. mode], postscript; end --[[--------------------------< S E T _ S T Y L E >----------------------------- Sets the separator and postscript styles. Checks the |mode= first and the #invoke CitationClass second. Removes the postscript if postscript == none. ]] local function set_style (mode, postscript, cite_class) local sep; if 'cs2' == mode then sep, postscript = set_cs_style (postscript, 'cs2'); elseif 'cs1' == mode then sep, postscript = set_cs_style (postscript, 'cs1'); elseif 'citation' == cite_class then sep, postscript = set_cs_style (postscript, 'cs2'); else sep, postscript = set_cs_style (postscript, 'cs1'); end if cfg.keywords_xlate[postscript:lower()] == 'none' then -- emit a maintenance message if user postscript is the default cs2 postscript -- we catch the opposite case for cs1 in set_cs_style if 'cs2' == mode or ('cs1' ~= mode and 'citation' == cite_class) then -- {{citation |title=Title |mode=cs1 |postscript=none}} should not emit maint message utilities.set_message ('maint_postscript'); end postscript = ''; end return sep, postscript end --[=[-------------------------< I S _ P D F >----------------------------------- Determines if a URL has the file extension that is one of the PDF file extensions used by [[MediaWiki:Common.css]] when applying the PDF icon to external links. returns true if file extension is one of the recognized extensions, else false ]=] local function is_pdf (url) return url:match ('%.pdf$') or url:match ('%.PDF$') or url:match ('%.pdf[%?#]') or url:match ('%.PDF[%?#]') or url:match ('%.PDF&#035') or url:match ('%.pdf&#035'); end --[[--------------------------< S T Y L E _ F O R M A T >----------------------- Applies CSS style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does not have a matching URL parameter. If the format parameter is not set and the URL contains a file extension that is recognized as a PDF document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with the appropriate styling. ]] local function style_format (format, url, fmt_param, url_param) if utilities.is_set (format) then format = utilities.wrap_style ('format', format); -- add leading space, parentheses, resize if not utilities.is_set (url) then utilities.set_message ('err_format_missing_url', {fmt_param, url_param}); -- add an error message end elseif is_pdf (url) then -- format is not set so if URL is a PDF file then format = utilities.wrap_style ('format', 'PDF'); -- set format to PDF else format = ''; -- empty string for concatenation end return format; end --[[---------------------< G E T _ D I S P L A Y _ N A M E S >------------------ Returns a number that defines the number of names displayed for author and editor name lists and a Boolean flag to indicate when et al. should be appended to the name list. When the value assigned to |display-xxxxors= is a number greater than or equal to zero, return the number and the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains some variant of the text 'et al.'). When the value assigned to |display-xxxxors= is the keyword 'etal', return a number that is one greater than the number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of the names in the name list followed by 'et al.' In all other cases, returns nil and the previous state of the 'etal' flag. inputs: max: A['DisplayAuthors'] or A['DisplayEditors'], etc; a number or some flavor of etal count: #a or #e list_name: 'authors' or 'editors' etal: author_etal or editor_etal This function sets an error message when |display-xxxxors= value greater than or equal to number of names but not when <max> comes from {{cs1 config}} global settings. When using global settings, <param> is set to the keyword 'cs1 config' which is used to supress the normal error. Error is suppressed because it is to be expected that some citations in an article will have the same or fewer names that the limit specified in {{cs1 config}}. ]] local function get_display_names (max, count, list_name, etal, param) if utilities.is_set (max) then if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings max = count + 1; -- number of authors + 1 so display all author name plus et al. etal = true; -- overrides value set by extract_names() elseif max:match ('^%d+$') then -- if is a string of numbers max = tonumber (max); -- make it a number if (max >= count) and ('cs1 config' ~= param) then -- error when local |display-xxxxors= value greater than or equal to number of names; not an error when using global setting utilities.set_message ('err_disp_name', {param, max}); -- add error message max = nil; end else -- not a valid keyword or number utilities.set_message ('err_disp_name', {param, max}); -- add error message max = nil; -- unset; as if |display-xxxxors= had not been set end end return max, etal; end --[[----------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >--------------- Adds error if |page=, |pages=, |quote-page=, |quote-pages= has what appears to be some form of p. or pp. abbreviation in the first characters of the parameter content. check page for extraneous p, p., pp, pp., pg, pg. at start of parameter value: good pattern: '^P[^%.P%l]' matches when page begins PX or P# but not Px where x and X are letters and # is a digit bad pattern: '^[Pp][PpGg]' matches when page begins pp, pP, Pp, PP, pg, pG, Pg, PG ]] local function extra_text_in_page_check (val, name) if not val:match (cfg.vol_iss_pg_patterns.good_ppattern) then for _, pattern in ipairs (cfg.vol_iss_pg_patterns.bad_ppatterns) do -- spin through the selected sequence table of patterns if val:match (pattern) then -- when a match, error so utilities.set_message ('err_extra_text_pages', name); -- add error message return; -- and done end end end end --[[--------------------------< E X T R A _ T E X T _ I N _ V O L _ I S S _ C H E C K >------------------------ Adds error if |volume= or |issue= has what appears to be some form of redundant 'type' indicator. Applies to both; this function looks for issue text in both |issue= and |volume= and looks for volume-like text in |voluem= and |issue=. For |volume=: 'V.', or 'Vol.' (with or without the dot) abbreviations or 'Volume' in the first characters of the parameter content (all case insensitive). 'V' and 'v' (without the dot) are presumed to be roman numerals so are allowed. For |issue=: 'No.', 'I.', 'Iss.' (with or without the dot) abbreviations, or 'Issue' in the first characters of the parameter content (all case insensitive); numero styling: 'n°' with degree sign U+00B0, and № precomposed numero sign U+2116. Single character values ('v', 'i', 'n') allowed when not followed by separator character ('.', ':', '=', or whitespace character) – param values are trimmed of whitespace by MediaWiki before delivered to the module. <val> is |volume= or |issue= parameter value <name> is |volume= or |issue= parameter name for error message <selector> is 'v' for |volume=, 'i' for |issue= sets error message on failure; returns nothing ]] local function extra_text_in_vol_iss_check (val, name, selector) if not utilities.is_set (val) then return; end local handler = 'v' == selector and 'err_extra_text_volume' or 'err_extra_text_issue'; local accept_val; val, accept_val = utilities.has_accept_as_written (val); --if accept_val then -- if uncomment this, |volume=((vol. 1)) suppresses error -- return; --end --val = mw.text.unstripNoWiki (val); -- if uncomment this, |volume=<nowiki>vol. 1</nowiki> shows error val = val:lower(); -- force parameter value to lower case for _, pattern in ipairs (cfg.vol_iss_pg_patterns.vi_patterns_t) do -- spin through the sequence table of patterns if val:match (pattern) then -- when a match, error so utilities.set_message (handler, name); -- add error message return; -- and done end end end --[=[-------------------------< G E T _ V _ N A M E _ T A B L E >---------------------------------------------- split apart a |vauthors= or |veditors= parameter. This function allows for corporate names, wrapped in doubled parentheses to also have commas; in the old version of the code, the doubled parentheses were included in the rendered citation and in the metadata. Individual author names may be wikilinked |vauthors=Jones AB, [[E. B. White|White EB]], ((Black, Brown, and Co.)) ]=] local function get_v_name_table (vparam, output_table, output_link_table) local _, accept = utilities.has_accept_as_written (vparam); if accept then utilities.add_prop_cat ('vanc-accept'); -- add properties category end local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas local wl_type, label, link; -- wl_type not used here; just a placeholder local i = 1; while name_table[i] do if name_table[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of corporate with one or more commas; this segment has the opening doubled parentheses local name = name_table[i]; i = i + 1; -- bump indexer to next segment while name_table[i] do name = name .. ', ' .. name_table[i]; -- concatenate with previous segments if name_table[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parentheses break; -- and done reassembling so end i = i + 1; -- bump indexer end table.insert (output_table, name); -- and add corporate name to the output table table.insert (output_link_table, ''); -- no wikilink else wl_type, label, link = utilities.is_wikilink (name_table[i]); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] table.insert (output_table, label); -- add this name if 1 == wl_type then table.insert (output_link_table, label); -- simple wikilink [[D]] else table.insert (output_link_table, link); -- no wikilink or [[L|D]]; add this link if there is one, else empty string end end i = i + 1; end return output_table; end --[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >-------------------------------- This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and |xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does. Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance tests, are wrapped in doubled parentheses ((corporate name)) to suppress the format tests. Supports generational suffixes Jr, 2nd, 3rd, 4th–6th. This function sets the Vancouver error when a required comma is missing and when there is a space between an author's initials. ]] local function parse_vauthors_veditors (args, vparam, list_name) local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn= local v_name_table = {}; local v_link_table = {}; -- when name is wikilinked, targets go in this table local etal = false; -- return value set to true when we find some form of et al. vauthors parameter local last, first, link, mask, suffix; local corporate = false; vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period) v_name_table = get_v_name_table (vparam, v_name_table, v_link_table); -- names are separated by commas for i, v_name in ipairs(v_name_table) do first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor local accept_name; v_name, accept_name = utilities.has_accept_as_written (v_name); -- remove accept-this-as-written markup when it wraps all of <v_name> if accept_name then last = v_name; corporate = true; -- flag used in list_people() elseif string.find(v_name, "%s") then if v_name:find('[;%.]') then -- look for commonly occurring punctuation characters; add_vanc_error (cfg.err_msg_supl.punctuation, i); end local lastfirstTable = {} lastfirstTable = mw.text.split(v_name, "%s+") first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be initials or generational suffix if not mw.ustring.match (first, '^%u+$') then -- mw.ustring here so that later we will catch non-Latin characters suffix = first; -- not initials so assume that whatever we got is a generational suffix first = table.remove(lastfirstTable); -- get what should be the initials from the table end last = table.concat(lastfirstTable, ' ') -- returns a string that is the concatenation of all other names that are not initials and generational suffix if not utilities.is_set (last) then first = ''; -- unset last = v_name; -- last empty because something wrong with first add_vanc_error (cfg.err_msg_supl.name, i); end if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then add_vanc_error (cfg.err_msg_supl['missing comma'], i); -- matches last II last; the case when a comma is missing end if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test add_vanc_error (cfg.err_msg_supl.initials, i); -- matches a space between two initials end else last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this? end if utilities.is_set (first) then if not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else add_vanc_error (cfg.err_msg_supl.initials, i); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials end is_good_vanc_name (last, first, suffix, i); -- check first and last before restoring the suffix which may have a non-Latin digit if utilities.is_set (suffix) then first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials suffix = ''; -- unset so we don't add this suffix to all subsequent names end else if not corporate then is_good_vanc_name (last, '', nil, i); end end link = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ) or v_link_table[i]; mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); names[i] = {last = last, first = first, link = link, mask = mask, corporate = corporate}; -- add this assembled name to our names list end return names, etal; -- all done, return our list of names end --[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------ Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or select one of |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list. Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest; |editorn= (and aliases) highest and |veditors= lowest (support for |editors= withdrawn) When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better way to do this, I just haven't discovered what that way is. Emits an error message when more than one xxxxor name source is provided. In this function, vxxxxors = vauthors or veditors; xxxxors = authors as appropriate. ]] local function select_author_editor_source (vxxxxors, xxxxors, args, list_name) local lastfirst = false; if utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice in case we have a |first1= without a |last1=; this ... utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors= utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then lastfirst = true; end if (utilities.is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions (utilities.is_set (vxxxxors) and utilities.is_set (xxxxors)) or (true == lastfirst and utilities.is_set (xxxxors)) then utilities.set_message ('err_redundant_parameters', utilities.substitute (cfg.special_case_translation.name_list_params, ('AuthorList' == list_name) and cfg.special_case_translation.author or cfg.special_case_translation.editor)); -- add error message end if true == lastfirst then return 1 end; -- return a number indicating which author name source to use if utilities.is_set (vxxxxors) then return 2 end; if utilities.is_set (xxxxors) then return 3 end; return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last end --[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------ This function is used to validate a parameter's assigned value for those parameters that have only a limited number of allowable values (yes, y, true, live, dead, etc.). When the parameter value has not been assigned a value (missing or empty in the source template) the function returns the value specified by ret_val. If the parameter value is one of the list of allowed values returns the translated value; else, emits an error message and returns the value specified by ret_val. TODO: explain <invert> ]] local function is_valid_parameter_value (value, name, possible, ret_val, invert) if not utilities.is_set (value) then return ret_val; -- an empty parameter is ok end if (not invert and utilities.in_array (value, possible)) then -- normal; <value> is in <possible> table return cfg.keywords_xlate[value]; -- return translation of parameter keyword elseif invert and not utilities.in_array (value, possible) then -- invert; <value> is not in <possible> table return value; -- return <value> as it is else utilities.set_message ('err_invalid_param_val', {name, value}); -- not an allowed value so add error message return ret_val; end end --[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >---------------------------------------- This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space when the last character is not a sepc character or when the last three characters are not sepc followed by two closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a single space character. ]] local function terminate_name_list (name_list, sepc) if (string.sub (name_list, -3, -1) == sepc .. '. ') then -- if already properly terminated return name_list; -- just return the name list elseif (string.sub (name_list, -1, -1) == sepc) or (string.sub (name_list, -3, -1) == sepc .. ']]') then -- if last name in list ends with sepc char return name_list .. " "; -- don't add another else return name_list .. sepc .. ' '; -- otherwise terminate the name list end end --[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >----------------------------------------- returns the concatenation of the formatted volume and issue (or journal article number) parameters as a single string; or formatted volume or formatted issue, or an empty string if neither are set. ]] local function format_volume_issue (volume, issue, article, cite_class, origin, sepc, lower) if not utilities.is_set (volume) and not utilities.is_set (issue) and not utilities.is_set (article) then return ''; end -- same condition as in format_pages_sheets() local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin); local is_numeric_vol = volume and (volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$')); -- is only uppercase roman numerals or only digits? local is_long_vol = volume and (4 < mw.ustring.len(volume)); -- is |volume= value longer than 4 characters? if volume and (not is_numeric_vol and is_long_vol) then -- when not all digits or Roman numerals, is |volume= longer than 4 characters? utilities.add_prop_cat ('long-vol'); -- yes, add properties cat end if is_journal then -- journal-style formatting local vol = ''; if utilities.is_set (volume) then if is_numeric_vol then -- |volume= value all digits or all uppercase Roman numerals? vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, volume}); -- render in bold face elseif is_long_vol then -- not all digits or Roman numerals; longer than 4 characters? vol = utilities.substitute (cfg.messages['j-vol'], {sepc, utilities.hyphen_to_dash (volume)}); -- not bold else -- four or fewer characters vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, utilities.hyphen_to_dash (volume)}); -- bold end end vol = vol .. (utilities.is_set (issue) and utilities.substitute (cfg.messages['j-issue'], issue) or '') vol = vol .. (utilities.is_set (article) and utilities.substitute (cfg.messages['j-article-num'], article) or '') return vol; end if 'podcast' == cite_class and utilities.is_set (issue) then return wrap_msg ('issue', {sepc, issue}, lower); end if 'conference' == cite_class and utilities.is_set (article) then -- |article-number= supported only in journal and conference cites if utilities.is_set (volume) and utilities.is_set (article) then -- both volume and article number return wrap_msg ('vol-art', {sepc, utilities.hyphen_to_dash (volume), article}, lower); elseif utilities.is_set (article) then -- article number alone; when volume alone, handled below return wrap_msg ('art', {sepc, article}, lower); end end -- all other types of citation if utilities.is_set (volume) and utilities.is_set (issue) then return wrap_msg ('vol-no', {sepc, utilities.hyphen_to_dash (volume), issue}, lower); elseif utilities.is_set (volume) then return wrap_msg ('vol', {sepc, utilities.hyphen_to_dash (volume)}, lower); else return wrap_msg ('issue', {sepc, issue}, lower); end end --[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >----------------------------------------- adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings. The return order is: page, pages, sheet, sheets Singular has priority over plural when both are provided. ]] local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower) if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators if utilities.is_set (sheet) then if 'journal' == origin then return '', '', wrap_msg ('j-sheet', sheet, lower), ''; else return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), ''; end elseif utilities.is_set (sheets) then if 'journal' == origin then return '', '', '', wrap_msg ('j-sheets', sheets, lower); else return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower); end end end local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin); if utilities.is_set (page) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], page), '', '', ''; elseif not nopp then return utilities.substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', ''; else return utilities.substitute (cfg.messages['nopp'], {sepc, page}), '', '', ''; end elseif utilities.is_set (pages) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], pages), '', '', ''; elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number return '', utilities.substitute (cfg.messages['p-prefix'], {sepc, pages}), '', ''; elseif not nopp then return '', utilities.substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', ''; else return '', utilities.substitute (cfg.messages['nopp'], {sepc, pages}), '', ''; end end return '', '', '', ''; -- return empty strings end --[[--------------------------< I N S O U R C E _ L O C _ G E T >---------------------------------------------- returns one of the in-source locators: page, pages, or at. If any of these are interwiki links to Wikisource, returns the label portion of the interwiki-link as plain text for use in COinS. This COinS thing is done because here we convert an interwiki-link to an external link and add an icon span around that; get_coins_pages() doesn't know about the span. TODO: should it? TODO: add support for sheet and sheets?; streamline; TODO: make it so that this function returns only one of the three as the single in-source (the return value assigned to a new name)? ]] local function insource_loc_get (page, page_orig, pages, pages_orig, at) local ws_url, ws_label, coins_pages, L; -- for Wikisource interwiki-links; TODO: this corrupts page metadata (span remains in place after cleanup; fix there?) if utilities.is_set (page) then if utilities.is_set (pages) or utilities.is_set (at) then pages = ''; -- unset the others at = ''; end extra_text_in_page_check (page, page_orig); -- emit error message when |page= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (page); -- make ws URL from |page= interwiki link; link portion L becomes tooltip label if ws_url then page = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in page'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? page = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, page}); coins_pages = ws_label; end elseif utilities.is_set (pages) then if utilities.is_set (at) then at = ''; -- unset end extra_text_in_page_check (pages, pages_orig); -- emit error message when |page= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (pages); -- make ws URL from |pages= interwiki link; link portion L becomes tooltip label if ws_url then pages = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in pages'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? pages = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, pages}); coins_pages = ws_label; end elseif utilities.is_set (at) then ws_url, ws_label, L = wikisource_url_make (at); -- make ws URL from |at= interwiki link; link portion L becomes tooltip label if ws_url then at = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in at'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? at = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, at}); coins_pages = ws_label; end end return page, pages, at, coins_pages; end --[[--------------------------< I S _ U N I Q U E _ A R C H I V E _ U R L >------------------------------------ add error message when |archive-url= value is same as |url= or chapter-url= (or alias...) value ]] local function is_unique_archive_url (archive, url, c_url, source, date) if utilities.is_set (archive) then if archive == url or archive == c_url then utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)}); -- add error message return '', ''; -- unset |archive-url= and |archive-date= because same as |url= or |chapter-url= end end return archive, date; end --[=[-------------------------< A R C H I V E _ U R L _ C H E C K >-------------------------------------------- Check archive.org URLs to make sure they at least look like they are pointing at valid archives and not to the save snapshot URL or to calendar pages. When the archive URL is 'https://web.archive.org/save/' (or http://...) archive.org saves a snapshot of the target page in the URL. That is something that Wikipedia should not allow unwitting readers to do. When the archive.org URL does not have a complete timestamp, archive.org chooses a snapshot according to its own algorithm or provides a calendar 'search' result. [[WP:ELNO]] discourages links to search results. This function looks at the value assigned to |archive-url= and returns empty strings for |archive-url= and |archive-date= and an error message when: |archive-url= holds an archive.org save command URL |archive-url= is an archive.org URL that does not have a complete timestamp (YYYYMMDDhhmmss 14 digits) in the correct place otherwise returns |archive-url= and |archive-date= There are two mostly compatible archive.org URLs: //web.archive.org/<timestamp>... -- the old form //web.archive.org/web/<timestamp>... -- the new form The old form does not support or map to the new form when it contains a display flag. There are four identified flags ('id_', 'js_', 'cs_', 'im_') but since archive.org ignores others following the same form (two letters and an underscore) we don't check for these specific flags but we do check the form. This function supports a preview mode. When the article is rendered in preview mode, this function may return a modified archive URL: for save command errors, return undated wildcard (/*/) for timestamp errors when the timestamp has a wildcard, return the URL unmodified for timestamp errors when the timestamp does not have a wildcard, return with timestamp limited to six digits plus wildcard (/yyyymm*/) A secondary function is to return an archive-url timestamp from those archive urls that have them. The timestamp is used by validation.archive_date_check() to see if the value in |archive-date= matches the timestamp in the archive url. ]=] local function archive_url_check (url, date) local err_msg = ''; -- start with the error message empty local path, timestamp, flag; -- portions of the archive.org URL local function is_ts_date_valid (timestamp, origin_date) -- local function to validate archive url taimestamp date; time ignored local y, m, d = timestamp:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- split into parts if y and validation.is_valid_date (y, m, d) and (tonumber (y) >= 1996) then return true, tonumber (y) >= origin_date; -- <origin_date> is 1996 for archive.org end end if (not url:match('//web%.archive%.org/')) and (not url:match('//liveweb%.archive%.org/')) then -- also deprecated liveweb Wayback machine URL return url, date; -- not an archive.org archive, return ArchiveURL and ArchiveDate end if url:match('//web%.archive%.org/save/') then -- if a save command URL, we don't want to allow saving of the target page err_msg = cfg.err_msg_supl.save; url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL elseif url:match('//liveweb%.archive%.org/') then err_msg = cfg.err_msg_supl.liveweb; else path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the URL parts for evaluation if not path then -- malformed in some way; pattern did not match err_msg = cfg.err_msg_supl.timestamp; elseif 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here err_msg = cfg.err_msg_supl.timestamp; if '*' ~= flag then local replacement = timestamp:match ('^%d%d%d%d%d%d') or timestamp:match ('^%d%d%d%d'); -- get the first 6 (YYYYMM) or first 4 digits (YYYY) if replacement then -- nil if there aren't at least 4 digits (year) replacement = replacement .. string.rep ('0', 14 - replacement:len()); -- year or yearmo (4 or 6 digits) zero-fill to make 14-digit timestamp url=url:gsub ('(//web%.archive%.org/[^%d]*)%d[^/]*', '%1' .. replacement .. '*', 1) -- for preview, modify ts to 14 digits plus splat for calendar display end end elseif not is_ts_date_valid (timestamp, 1996) then -- is ymd portion of timestamp a valid date? err_msg = cfg.err_msg_supl.timestamp; timestamp = nil; -- unset because invalid elseif utilities.is_set (path) and 'web/' ~= path then -- older archive URLs do not have the extra 'web/' path element err_msg = cfg.err_msg_supl.path; elseif utilities.is_set (flag) and not utilities.is_set (path) then -- flag not allowed with the old form URL (without the 'web/' path element) err_msg = cfg.err_msg_supl.flag; elseif utilities.is_set (flag) and not flag:match ('%a%a_') then -- flag if present must be two alpha characters and underscore (requires 'web/' path element) err_msg = cfg.err_msg_supl.flag; else return url, date, timestamp; -- return ArchiveURL, ArchiveDate, and timestamp from |archive-url= end end -- if here, something not right so utilities.set_message ('err_archive_url', {err_msg}); -- add error message and if is_preview_mode then return url, date, timestamp; -- preview mode so return ArchiveURL, ArchiveDate, and timestamp from |archive-url= else return '', ''; -- return empty strings for ArchiveURL and ArchiveDate end end --[[--------------------------< P L A C E _ C H E C K >-------------------------------------------------------- check |place=, |publication-place=, |location= to see if these params include digits. This function added because many editors misuse location to specify the in-source location (|page(s)= and |at= are supposed to do that) returns the original parameter value without modification; added maint cat when parameter value contains digits ]] local function place_check (param_val) if not utilities.is_set (param_val) then -- parameter empty or omitted return param_val; -- return that empty state end if mw.ustring.find (param_val, '%d') then -- not empty, are there digits in the parameter value utilities.set_message ('maint_location'); -- yep, add maint cat end return param_val; -- and done end --[[--------------------------< I S _ A R C H I V E D _ C O P Y >---------------------------------------------- compares |title= to 'Archived copy' (placeholder added by bots that can't find proper title); if matches, return true; nil else ]] local function is_archived_copy (title) title = mw.ustring.lower(title); -- switch title to lower case if title:find (cfg.special_case_translation.archived_copy.en) then -- if title is 'Archived copy' return true; elseif cfg.special_case_translation.archived_copy['local'] then if mw.ustring.find (title, cfg.special_case_translation.archived_copy['local']) then -- mw.ustring() because might not be Latin script return true; end end end --[[--------------------------< D I S P L A Y _ N A M E S _ S E L E C T >-------------------------------------- for any of the |display-authors=, |display-editors=, etc parameters, select either the local or global setting. When both are present, look at <local_display_names> value. When the value is some sort of 'et al.'string, special handling is required. When {{cs1 config}} has |display-<namelist>= AND this template has |display-<namelist>=etal AND: the number of names specified by <number_of_names> is: greater than the number specified in the global |display-<namelist>= parameter (<global_display_names>) use global |display-<namelist>= parameter value set overridden maint category less than or equal to the number specified in the global |display-<namelist>= parameter use local |display-<namelist>= parameter value The purpose of this function is to prevent categorizing a template that has fewer names than the global setting to keep the etal annotation specified by <local_display_names>. ]] local function display_names_select (global_display_names, local_display_names, param_name, number_of_names, test) if global_display_names and utilities.is_set (local_display_names) then -- when both if 'etal' == local_display_names:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings number_of_names = tonumber (number_of_names); -- convert these to numbers for comparison local global_display_names_num = tonumber (global_display_names); -- <global_display_names> not set when parameter value is not digits if number_of_names > global_display_names_num then -- template has more names than global config allows to be displayed? utilities.set_message ('maint_overridden_setting'); -- set a maint message because global is overriding local |display-<namelist>=etal return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) else return local_display_names, param_name; -- return local because fewer names so let <local_display_names> control end end -- here when <global_display_names> and <local_display_names> both numbers; <global_display_names> controls utilities.set_message ('maint_overridden_setting'); -- set a maint message return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) end -- here when only one of <global_display_names> or <local_display_names> set if global_display_names then return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) else return local_display_names, param_name; -- return local end end --[[--------------------------< M O D E _ S E T >-------------------------------------------------------------- fetch global mode setting from {{cs1 config}} (if present) or from |mode= (if present); global setting overrides local |mode= parameter value. When both are present, emit maintenance message ]] local function mode_set (Mode, Mode_origin) local mode; if cfg.global_cs1_config_t['Mode'] then -- global setting in {{cs1 config}}; nil when empty or assigned value invalid mode = is_valid_parameter_value (cfg.global_cs1_config_t['Mode'], 'cs1 config: mode', cfg.keywords_lists['mode'], ''); -- error messaging 'param' here is a hoax else mode = is_valid_parameter_value (Mode, Mode_origin, cfg.keywords_lists['mode'], ''); end if cfg.global_cs1_config_t['Mode'] and utilities.is_set (Mode) then -- when template has |mode=<something> which global setting has overridden utilities.set_message ('maint_overridden_setting'); -- set a maint message end return mode; end --[[--------------------------< Q U O T E _ M A K E >---------------------------------------------------------- create quotation from |quote=, |trans-quote=, and/or script-quote= with or without |quote-page= or |quote-pages= when any of those three quote parameters are set, this function unsets <PostScript>. When none of those parameters are set, |quote-page= and |quote-pages= are unset to nil so that they are not included in the template's metadata ]] local function quote_make (quote, trans_quote, script_quote, quote_page, quote_pages, nopp, sepc, postscript) if utilities.is_set (quote) or utilities.is_set (trans_quote) or utilities.is_set (script_quote) then if utilities.is_set (quote) then if quote:sub(1, 1) == '"' and quote:sub(-1, -1) == '"' then -- if first and last characters of quote are quote marks quote = quote:sub(2, -2); -- strip them off end end quote = kern_quotes (quote); -- kern if needed quote = utilities.wrap_style ('quoted-text', quote ); -- wrap in <q>...</q> tags if utilities.is_set (script_quote) then quote = script_concatenate (quote, script_quote, 'script-quote'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after quote is wrapped end if utilities.is_set (trans_quote) then if trans_quote:sub(1, 1) == '"' and trans_quote:sub(-1, -1) == '"' then -- if first and last characters of |trans-quote are quote marks trans_quote = trans_quote:sub(2, -2); -- strip them off end quote = quote .. " " .. utilities.wrap_style ('trans-quoted-title', trans_quote ); end if utilities.is_set (quote_page) or utilities.is_set (quote_pages) then -- add page prefix local quote_prefix = ''; if utilities.is_set (quote_page) then extra_text_in_page_check (quote_page, 'quote-page'); -- add to maint cat if |quote-page= value begins with what looks like p., pp., etc. if not nopp then quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, quote_page}), '', '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, quote_page}), '', '', ''; end elseif utilities.is_set (quote_pages) then extra_text_in_page_check (quote_pages, 'quote-pages'); -- add to maint cat if |quote-pages= value begins with what looks like p., pp., etc. if tonumber(quote_pages) ~= nil and not nopp then -- if only digits, assume single page quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, quote_pages}), '', ''; elseif not nopp then quote_prefix = utilities.substitute (cfg.messages['pp-prefix'], {sepc, quote_pages}), '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, quote_pages}), '', ''; end end quote = quote_prefix .. ": " .. quote; else quote = sepc .. " " .. quote; end postscript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set elseif utilities.is_set (quote_page) or utilities.is_set (quote_pages) then quote_page = nil; -- unset; these require |quote=; TODO: error message? quote_pages = nil; end return quote, quote_page, quote_pages, postscript; end --[[--------------------------< C H E C K _ P U B L I S H E R _ N A M E >-------------------------------------- look for variations of '<text>: <text>' that might be '<location>: <publisher>' in |publisher= parameter value. when found, emit a maintenance message; return nil else <publisher> is the value assigned to |publisher= or |institution= ]] local function check_publisher_name (publisher) local patterns_t = { '^[%w%s]+%s*:%s*[%w%s]+$', -- plain text <location>: <publisher> '^%[+[%w%s:|]+%]+%s*:%s*[%w%s]+$', -- partially wikilinked [[<location>]]: <publisher> '^[%w%s]+%s*:%s*%[+[%w%s:|]+%]+$', -- partially wikilinked <location>: [[<publisher>]] '^%[+[%w%s:|]+%]+%s*:%s*%[+[%w%s:|]+%]+$', -- wikilinked [[<location>]]: [[<publisher>]] } for _, pattern in ipairs (patterns_t) do -- spin through the patterns_t sequence if mw.ustring.match (publisher, pattern) then -- does this pattern match? utilities.set_message ('maint_publisher_location'); -- set a maint message return; -- and done end end end --[[--------------------------< I S _ P A G E _ A R T _ N U M >------------------------------------------------ compare the trailing (rightmost) characters of the |doi= value against the whole value assigned to |page(s)=. return boolean true when: |page(s)= has exactly 8 digits and a dot between the fourth and fifth digits matches the trailing 9 characters of the |doi= value: |page=12345678 → |page=1234.5678 matches |doi=10.xxxx/yyyy1234.5678 |page(s)= is 5 or more characters and matches |doi= values's trailing characters |page(s)= begins with a lowercase 'e' and |page(s)= without the 'e' matches |doi= values's trailing characters: |page=e12345 → |page=12345 matches |doi=10.xxxx/yyyy12345 |page(s)= begins with a uppercase 'CD' followed by (typically) six digits matches |doi= values that ends with 'CDxxxxxx.pubx' (where 'x' is any single digit) return nil when |page(s)= values: are ranges separated by underscore, hyphen, emdash, endash, figure dash, or minus character are comma- or semicolon-separated lists of pages have external urls (has text 'http') are digit-only values less than 10000 do not match |doi= values's trailing characters ]] local function is_page_art_num (page, doi) if not (utilities.is_set (page) and utilities.is_set (doi)) then -- both required return; -- abandon; nothing to do end if page:match ('[,;_−–—‒%-]') then -- when |page(s)= might be a page range or a separated list of pages return; -- abandon end page = page:lower(); -- because doi names are case insensitive doi = doi:lower(); -- force these to lowercase for testing if page:match ('http') then -- when |page(s)= appears to hold a url return; -- abandon end if tonumber (page) then -- is |page(s)= digits only if 10000 > tonumber (page) then -- when |page(s)= less than 10000 return; -- abandon end if doi:match (page .. '$') then -- digits only page number match the last digits in |doi=? return true; end if 8 == page:len() then -- special case when |page(s)= is exactly 8 digits local dot_page = page:gsub ('(%d%d%d%d)(%d%d%d%d)', '%1.%2'); -- make a |page=xxxx.yyyy version commonly used in |doi= if doi:match (dot_page .. '$') then -- 8-digit dotted page number match the last characters in |doi=? return true; end end else -- here when |page(s)= is alpha-numeric if 4 < page:len() then -- when |page(s)= is five or more characters if doi:match (page .. '$') then -- alpha-numeric page match the last characters in |doi=? return true; end local epage = page:match ('^e([%w]+)$'); -- if first character of |page= is 'e', remove it if epage and doi:match (epage .. '$') then -- page number match the last characters in |doi=? return true; end local cdpage = page:match ('^cd%d+$'); -- if first characters of |page= are 'CD' and last characters are digits (typically 6 digits) if cdpage and doi:match (cdpage .. '%.pub%d$') then -- page number matches doi 'CDxxxxxx.pubx' where 'x' is a digit return true; end end end end --[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------ This is the main function doing the majority of the citation formatting. ]] local function citation0( config, args ) --[[ Load Input Parameters The argument_wrapper facilitates the mapping of multiple aliases to single internal variable. ]] local A = argument_wrapper ( args ); local i -- Pick out the relevant fields from the arguments. Different citation templates -- define different field names for the same underlying things. local author_etal; local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors= local Authors; local NameListStyle; if cfg.global_cs1_config_t['NameListStyle'] then -- global setting in {{cs1 config}} overrides local |name-list-style= parameter value; nil when empty or assigned value invalid NameListStyle = is_valid_parameter_value (cfg.global_cs1_config_t['NameListStyle'], 'cs1 config: name-list-style', cfg.keywords_lists['name-list-style'], ''); -- error messaging 'param' here is a hoax else NameListStyle = is_valid_parameter_value (A['NameListStyle'], A:ORIGIN('NameListStyle'), cfg.keywords_lists['name-list-style'], ''); end if cfg.global_cs1_config_t['NameListStyle'] and utilities.is_set (A['NameListStyle']) then -- when template has |name-list-style=<something> which global setting has overridden utilities.set_message ('maint_overridden_setting'); -- set a maint message end local Collaboration = A['Collaboration']; do -- to limit scope of selected local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList'); if 1 == selected then a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be a, author_etal = parse_vauthors_veditors (args, A['Vauthors'], 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn= elseif 3 == selected then Authors = A['Authors']; -- use content of |people= or |credits=; |authors= is deprecated; TODO: constrain |people= and |credits= to cite av media, episode, serial? end if utilities.is_set (Collaboration) then author_etal = true; -- so that |display-authors=etal not required end end local editor_etal; local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors= do -- to limit scope of selected local selected = select_author_editor_source (A['Veditors'], nil, args, 'EditorList'); -- support for |editors= withdrawn if 1 == selected then e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn= end end local Chapter = A['Chapter']; -- done here so that we have access to |contribution= from |chapter= and |script-chapter= aliases local Chapter_origin = A:ORIGIN ('Chapter'); local ScriptChapter = A['ScriptChapter']; local ScriptChapter_origin = A:ORIGIN ('ScriptChapter'); local Contribution; -- because contribution is required for contributor(s) if 'contribution' == Chapter_origin then -- is there a |contribution= parameter? Contribution = Chapter; -- get the name of the contribution elseif 'script-contribution' == ScriptChapter_origin then -- no, so is there a |script-contribution= parameter? Contribution = ScriptChapter; -- get the name of the contribution end local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (A['Periodical']) then -- |contributor= and |contribution= only supported in book cites c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn= if 0 < #c then if not utilities.is_set (Contribution) then -- |contributor= requires |contribution= utilities.set_message ('err_contributor_missing_required_param', 'contribution'); -- add missing contribution error message c = {}; -- blank the contributors' table; it is used as a flag later end if 0 == #a then -- |contributor= requires |author= utilities.set_message ('err_contributor_missing_required_param', 'author'); -- add missing author error message c = {}; -- blank the contributors' table; it is used as a flag later end end else -- if not a book cite if utilities.select_one (args, cfg.aliases['ContributorList-Last'], 'err_redundant_parameters', 1 ) then -- are there contributor name list parameters? utilities.set_message ('err_contributor_ignored'); -- add contributor ignored error message end Contribution = nil; -- unset end local Title = A['Title']; local TitleLink = A['TitleLink']; local auto_select = ''; -- default is auto local accept_link; TitleLink, accept_link = utilities.has_accept_as_written (TitleLink, true); -- test for accept-this-as-written markup if (not accept_link) and utilities.in_array (TitleLink, {'none', 'pmc', 'doi'}) then -- check for special keywords auto_select = TitleLink; -- remember selection for later TitleLink = ''; -- treat as if |title-link= would have been empty end TitleLink = link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wiki-markup in |title-link= or wiki-markup in |title= when |title-link= is set local Section = ''; -- {{cite map}} only; preset to empty string for concatenation if not used if 'map' == config.CitationClass and 'section' == Chapter_origin then Section = A['Chapter']; -- get |section= from |chapter= alias list; |chapter= and the other aliases not supported in {{cite map}} Chapter = ''; -- unset for now; will be reset later from |map= if present end local Periodical = A['Periodical']; local Periodical_origin = A:ORIGIN('Periodical'); local ScriptPeriodical = A['ScriptPeriodical']; local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical'); local TransPeriodical = A['TransPeriodical']; local TransPeriodical_origin = A:ORIGIN ('TransPeriodical'); if (utilities.in_array (config.CitationClass, {'book', 'encyclopaedia'}) and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical))) then local param; if utilities.is_set (Periodical) then -- get a parameter name from one of these periodical related meta-parameters Periodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = Periodical_origin -- get parameter name for error messaging elseif utilities.is_set (TransPeriodical) then TransPeriodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = TransPeriodical_origin; -- get parameter name for error messaging elseif utilities.is_set (ScriptPeriodical) then ScriptPeriodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = ScriptPeriodical_origin; -- get parameter name for error messaging end if utilities.is_set (param) then -- if we found one utilities.set_message ('err_periodical_ignored', {param}); -- emit an error message end end if utilities.is_set (Periodical) then local i; Periodical, i = utilities.strip_apostrophe_markup (Periodical); -- strip apostrophe markup so that metadata isn't contaminated if i then -- non-zero when markup was stripped so emit an error message utilities.set_message ('err_apostrophe_markup', {Periodical_origin}); end end if 'mailinglist' == config.CitationClass then -- special case for {{cite mailing list}} if utilities.is_set (Periodical) and utilities.is_set (A ['MailingList']) then -- both set emit an error TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', Periodical_origin) .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'mailinglist')}); end Periodical = A ['MailingList']; -- error or no, set Periodical to |mailinglist= value because this template is {{cite mailing list}} Periodical_origin = A:ORIGIN('MailingList'); end -- web and news not tested for now because of -- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors? if not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter -- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message if p[config.CitationClass] then utilities.set_message ('err_missing_periodical', {config.CitationClass, p[config.CitationClass]}); end end local Volume; if 'citation' == config.CitationClass then if utilities.is_set (Periodical) then if not utilities.in_array (Periodical_origin, cfg.citation_no_volume_t) then -- {{citation}} does not render |volume= when these parameters are used Volume = A['Volume']; -- but does for all other 'periodicals' end elseif utilities.is_set (ScriptPeriodical) then if 'script-website' ~= ScriptPeriodical_origin then -- {{citation}} does not render volume for |script-website= Volume = A['Volume']; -- but does for all other 'periodicals' end else Volume = A['Volume']; -- and does for non-'periodical' cites end elseif utilities.in_array (config.CitationClass, cfg.templates_using_volume) then -- render |volume= for cs1 according to the configuration settings Volume = A['Volume']; end extra_text_in_vol_iss_check (Volume, A:ORIGIN ('Volume'), 'v'); local Issue; if 'citation' == config.CitationClass then if utilities.is_set (Periodical) and utilities.in_array (Periodical_origin, cfg.citation_issue_t) then -- {{citation}} may render |issue= when these parameters are used Issue = A['Issue']; end elseif utilities.in_array (config.CitationClass, cfg.templates_using_issue) then -- conference & map books do not support issue; {{citation}} listed here because included in settings table if not (utilities.in_array (config.CitationClass, {'conference', 'map', 'citation'}) and not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical))) then Issue = A['Issue']; end end local ArticleNumber; if utilities.in_array (config.CitationClass, {'journal', 'conference'}) or ('citation' == config.CitationClass and utilities.is_set (Periodical) and 'journal' == Periodical_origin) then ArticleNumber = A['ArticleNumber']; end extra_text_in_vol_iss_check (Issue, A:ORIGIN ('Issue'), 'i'); Issue = utilities.hyphen_to_dash (Issue); local Page; local Pages; local At; local QuotePage; local QuotePages; if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) then -- TODO: rewrite to emit ignored parameter error message? Page = A['Page']; Pages = utilities.hyphen_to_dash (A['Pages']); At = A['At']; QuotePage = A['QuotePage']; QuotePages = utilities.hyphen_to_dash (A['QuotePages']); end local NoPP = is_valid_parameter_value (A['NoPP'], A:ORIGIN('NoPP'), cfg.keywords_lists['yes_true_y'], nil); local Mode = mode_set (A['Mode'], A:ORIGIN('Mode')); -- separator character and postscript local sepc, PostScript = set_style (Mode:lower(), A['PostScript'], config.CitationClass); local Quote; Quote, QuotePage, QuotePages, PostScript = quote_make (A['Quote'], A['TransQuote'], A['ScriptQuote'], QuotePage, QuotePages, NoPP, sepc, PostScript); local Edition = A['Edition']; local PublicationPlace = place_check (A['PublicationPlace'], A:ORIGIN('PublicationPlace')); local Place = place_check (A['Place'], A:ORIGIN('Place')); local PublisherName = A['PublisherName']; local PublisherName_origin = A:ORIGIN('PublisherName'); if utilities.is_set (PublisherName) and (cfg.keywords_xlate['none'] ~= PublisherName) then local i = 0; PublisherName, i = utilities.strip_apostrophe_markup (PublisherName); -- strip apostrophe markup so that metadata isn't contaminated; publisher is never italicized if i and (0 < i) then -- non-zero when markup was stripped so emit an error message utilities.set_message ('err_apostrophe_markup', {PublisherName_origin}); end end if ('document' == config.CitationClass) and not utilities.is_set (PublisherName) then utilities.set_message ('err_missing_publisher', {config.CitationClass, 'publisher'}); end local Newsgroup = A['Newsgroup']; -- TODO: strip apostrophe markup? local Newsgroup_origin = A:ORIGIN('Newsgroup'); if 'newsgroup' == config.CitationClass then if utilities.is_set (PublisherName) and (cfg.keywords_xlate['none'] ~= PublisherName) then -- general use parameter |publisher= not allowed in cite newsgroup utilities.set_message ('err_parameter_ignored', {PublisherName_origin}); end PublisherName = nil; -- ensure that this parameter is unset for the time being; will be used again after COinS end if 'book' == config.CitationClass or 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and not utilities.is_set (Periodical)) then local accept; PublisherName, accept = utilities.has_accept_as_written (PublisherName); -- check for and remove accept-as-written markup from |publisher= wrapped if not accept then -- when no accept-as-written markup check_publisher_name (PublisherName); -- emit maint message when |publisher= might be prefixed with publisher's location end end local URL = A['URL']; -- TODO: better way to do this for URL, ChapterURL, and MapURL? local UrlAccess = is_valid_parameter_value (A['UrlAccess'], A:ORIGIN('UrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (URL) and utilities.is_set (UrlAccess) then UrlAccess = nil; utilities.set_message ('err_param_access_requires_param', 'url'); end local ChapterURL = A['ChapterURL']; local ChapterUrlAccess = is_valid_parameter_value (A['ChapterUrlAccess'], A:ORIGIN('ChapterUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (ChapterURL) and utilities.is_set (ChapterUrlAccess) then ChapterUrlAccess = nil; utilities.set_message ('err_param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')}); end local MapUrlAccess = is_valid_parameter_value (A['MapUrlAccess'], A:ORIGIN('MapUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (A['MapURL']) and utilities.is_set (MapUrlAccess) then MapUrlAccess = nil; utilities.set_message ('err_param_access_requires_param', {'map-url'}); end local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil); -- check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories if not utilities.is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page if cfg.uncategorized_namespaces[this_page.namespace] then -- is this page's namespace id one of the uncategorized namespace ids? no_tracking_cats = "true"; -- set no_tracking_cats end for _, v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns if this_page.text:match (v) then -- test page name against each pattern no_tracking_cats = "true"; -- set no_tracking_cats break; -- bail out if one is found end end end -- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it) utilities.select_one (args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'err_redundant_parameters'); -- this is a dummy call simply to get the error message and category local coins_pages; Page, Pages, At, coins_pages = insource_loc_get (Page, A:ORIGIN('Page'), Pages, A:ORIGIN('Pages'), At); if utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- both |publication-place= and |place= (|location=) allowed if different utilities.add_prop_cat ('location-test'); -- add property cat to evaluate how often PublicationPlace and Place are used together if PublicationPlace == Place then Place = ''; -- unset; don't need both if they are the same end elseif not utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- when only |place= (|location=) is set ... PublicationPlace = Place; -- promote |place= (|location=) to |publication-place end if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same local URL_origin = A:ORIGIN('URL'); -- get name of parameter that holds URL local ChapterURL_origin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL -- local ScriptChapter = A['ScriptChapter']; -- local ScriptChapter_origin = A:ORIGIN ('ScriptChapter'); local Format = A['Format']; local ChapterFormat = A['ChapterFormat']; local TransChapter = A['TransChapter']; local TransChapter_origin = A:ORIGIN ('TransChapter'); local TransTitle = A['TransTitle']; local ScriptTitle = A['ScriptTitle']; --[[ Parameter remapping for cite encyclopedia: When the citation has these parameters: |encyclopedia= and |title= then map |title= to |article= and |encyclopedia= to |title= for rendering |encyclopedia= and |article= then map |encyclopedia= to |title= for rendering |trans-title= maps to |trans-chapter= when |title= is re-mapped |url= maps to |chapter-url= when |title= is remapped All other combinations of |encyclopedia=, |title=, and |article= are not modified ]] local Encyclopedia = A['Encyclopedia']; -- used as a flag by this module and by ~/COinS local ScriptEncyclopedia = A['ScriptEncyclopedia']; local TransEncyclopedia = A['TransEncyclopedia']; if utilities.is_set (Encyclopedia) or utilities.is_set (ScriptEncyclopedia) then -- emit error message when Encyclopedia set but template is other than {{cite encyclopedia}} or {{citation}} if 'encyclopaedia' ~= config.CitationClass and 'citation' ~= config.CitationClass then if utilities.is_set (Encyclopedia) then utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('Encyclopedia')}); else utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('ScriptEncyclopedia')}); end Encyclopedia = nil; -- unset these because not supported by this template ScriptEncyclopedia = nil; TransEncyclopedia = nil; end elseif utilities.is_set (TransEncyclopedia) then utilities.set_message ('err_trans_missing_title', {'encyclopedia'}); end if ('encyclopaedia' == config.CitationClass) or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Periodical) and utilities.is_set (Encyclopedia) then -- when both parameters set emit an error message; {{citation}} only; Periodical not allowed in {{cite encyclopedia}} utilities.set_message ('err_periodical_ignored', {Periodical_origin}); end if utilities.is_set (Encyclopedia) or utilities.is_set (ScriptEncyclopedia) then Periodical = Encyclopedia; -- error or no, set Periodical to Encyclopedia for rendering; {{citation}} could (not legitimately) have both; use Encyclopedia Periodical_origin = A:ORIGIN ('Encyclopedia'); ScriptPeriodical = ScriptEncyclopedia; ScriptPeriodical_origin = A:ORIGIN ('ScriptEncyclopedia'); if utilities.is_set (Title) or utilities.is_set (ScriptTitle) then if not utilities.is_set (Chapter) then Chapter = Title; -- |encyclopedia= and |title= are set so map |title= params to |article= params for rendering ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle') TransChapter = TransTitle; ChapterURL = URL; ChapterURL_origin = URL_origin; ChapterUrlAccess = UrlAccess; ChapterFormat = Format; if not utilities.is_set (ChapterURL) and utilities.is_set (TitleLink) then Chapter = utilities.make_wikilink (TitleLink, Chapter); end Title = Periodical; -- now map |encyclopedia= params to |title= params for rendering ScriptTitle = ScriptPeriodical or ''; TransTitle = TransEncyclopedia or ''; Periodical = ''; -- redundant so unset ScriptPeriodical = ''; URL = ''; Format = ''; TitleLink = ''; end elseif utilities.is_set (Chapter) or utilities.is_set (ScriptChapter) then -- |title= not set Title = Periodical; -- |encyclopedia= set and |article= set so map |encyclopedia= to |title= for rendering ScriptTitle = ScriptPeriodical or ''; TransTitle = TransEncyclopedia or ''; Periodical = ''; -- redundant so unset ScriptPeriodical = ''; end end end -- special case for cite techreport. local ID = A['ID']; if (config.CitationClass == "techreport") then -- special case for cite techreport if utilities.is_set (A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue' if not utilities.is_set (ID) then -- can we use ID for the "number"? ID = A['Number']; -- yes, use it else -- ID has a value so emit error message utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'id') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'number')}); end end end -- Account for the oddity that is {{cite conference}}, before generation of COinS data. local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode local Conference = A['Conference']; local BookTitle = A['BookTitle']; local TransTitle_origin = A:ORIGIN ('TransTitle'); if 'conference' == config.CitationClass then if utilities.is_set (BookTitle) then Chapter = Title; Chapter_origin = 'title'; -- ChapterLink = TitleLink; -- |chapter-link= is deprecated ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = URL_origin; URL_origin = ''; ChapterFormat = Format; TransChapter = TransTitle; TransChapter_origin = TransTitle_origin; Title = BookTitle; Format = ''; -- TitleLink = ''; TransTitle = ''; URL = ''; end elseif 'speech' ~= config.CitationClass then Conference = ''; -- not cite conference or cite speech so make sure this is empty string end local cs2_lower = function (text) -- if mode is cs2, use lower case if (sepc ~= '.') then return text:lower(); end return text; end local use_lowercase = ( sepc == ',' ); -- controls capitalization of certain static text -- cite map oddities local Cartography = ""; local Scale = ""; local Sheet = A['Sheet'] or ''; local Sheets = A['Sheets'] or ''; if config.CitationClass == "map" then if utilities.is_set (Chapter) then --TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'map') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', Chapter_origin)}); -- add error message end Chapter = A['Map']; Chapter_origin = A:ORIGIN('Map'); ChapterURL = A['MapURL']; ChapterURL_origin = A:ORIGIN('MapURL'); TransChapter = A['TransMap']; ScriptChapter = A['ScriptMap'] ScriptChapter_origin = A:ORIGIN('ScriptMap') ChapterUrlAccess = MapUrlAccess; ChapterFormat = A['MapFormat']; Cartography = A['Cartography']; if utilities.is_set ( Cartography ) then Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase); end Scale = A['Scale']; if utilities.is_set ( Scale ) then Scale = sepc .. " " .. Scale; end end -- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data. local Series = A['Series']; if 'episode' == config.CitationClass or 'serial' == config.CitationClass then local SeriesLink = A['SeriesLink']; SeriesLink = link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wiki-markup in |series-link= or wiki-markup in |series= when |series-link= is set local Network = A['Network']; local Station = A['Station']; local s, n = {}, {}; -- do common parameters first if utilities.is_set (Network) then table.insert(n, Network); end if utilities.is_set (Station) then table.insert(n, Station); end ID = table.concat(n, sepc .. ' '); if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}} local Season = A['Season']; local SeriesNumber = A['SeriesNumber']; if utilities.is_set (Season) and utilities.is_set (SeriesNumber) then -- these are mutually exclusive so if both are set TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'season') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'seriesno')}); -- add error message SeriesNumber = ''; -- unset; prefer |season= over |seriesno= end -- assemble a table of parts concatenated later into Series if utilities.is_set (Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end if utilities.is_set (SeriesNumber) then table.insert(s, wrap_msg ('seriesnum', SeriesNumber, use_lowercase)); end if utilities.is_set (Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end Issue = ''; -- unset because this is not a unique parameter Chapter = Title; -- promote title parameters to chapter ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle'); ChapterLink = TitleLink; -- alias |episode-link= TransChapter = TransTitle; ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = URL_origin; ChapterFormat = Format; Title = Series; -- promote series to title TitleLink = SeriesLink; Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number if utilities.is_set (ChapterLink) and not utilities.is_set (ChapterURL) then -- link but not URL Chapter = utilities.make_wikilink (ChapterLink, Chapter); elseif utilities.is_set (ChapterLink) and utilities.is_set (ChapterURL) then -- if both are set, URL links episode; Series = utilities.make_wikilink (ChapterLink, Series); end URL = ''; -- unset TransTitle = ''; ScriptTitle = ''; Format = ''; else -- now oddities that are cite serial Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday? if utilities.is_set (Series) and utilities.is_set (SeriesLink) then Series = utilities.make_wikilink (SeriesLink, Series); end Series = utilities.wrap_style ('italic-title', Series); -- series is italicized end end -- end of {{cite episode}} stuff -- handle type parameter for those CS1 citations that have default values local TitleType = A['TitleType']; local Degree = A['Degree']; if utilities.in_array (config.CitationClass, {'AV-media-notes', 'document', 'interview', 'mailinglist', 'map', 'podcast', 'pressrelease', 'report', 'speech', 'techreport', 'thesis'}) then TitleType = set_titletype (config.CitationClass, TitleType); if utilities.is_set (Degree) and "Thesis" == TitleType then -- special case for cite thesis TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower(); end end if utilities.is_set (TitleType) then -- if type parameter is specified TitleType = utilities.substitute ( cfg.messages['type'], TitleType); -- display it in parentheses -- TODO: Hack on TitleType to fix bunched parentheses problem end -- legacy: promote PublicationDate to Date if neither Date nor Year are set. local Date = A['Date']; local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging local PublicationDate = A['PublicationDate']; local Year = A['Year']; if utilities.is_set (Year) then validation.year_check (Year); -- returns nothing; emits maint message when |year= doesn't hold a 'year' value end if not utilities.is_set (Date) then Date = Year; -- promote Year to Date Year = nil; -- make nil so Year as empty string isn't used for CITEREF if not utilities.is_set (Date) and utilities.is_set (PublicationDate) then -- use PublicationDate when |date= and |year= are not set Date = PublicationDate; -- promote PublicationDate to Date PublicationDate = ''; -- unset, no longer needed Date_origin = A:ORIGIN('PublicationDate'); -- save the name of the promoted parameter else Date_origin = A:ORIGIN('Year'); -- save the name of the promoted parameter end else Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging end if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation --[[ Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where we get the date used in the metadata. Date validation supporting code is in Module:Citation/CS1/Date_validation ]] local DF = is_valid_parameter_value (A['DF'], A:ORIGIN('DF'), cfg.keywords_lists['df'], ''); if not utilities.is_set (DF) then DF = cfg.global_df; -- local |df= if present overrides global df set by {{use xxx date}} template end local ArchiveURL; local ArchiveDate; local ArchiveFormat = A['ArchiveFormat']; local archive_url_timestamp; -- timestamp from wayback machine url ArchiveURL, ArchiveDate, archive_url_timestamp = archive_url_check (A['ArchiveURL'], A['ArchiveDate']) ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url'); ArchiveURL, ArchiveDate = is_unique_archive_url (ArchiveURL, URL, ChapterURL, A:ORIGIN('ArchiveURL'), ArchiveDate); -- add error message when URL or ChapterURL == ArchiveURL local AccessDate = A['AccessDate']; local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification local DoiBroken = A['DoiBroken']; local Embargo = A['Embargo']; local anchor_year; -- used in the CITEREF identifier do -- create defined block to contain local variables error_message, date_parameters_list, mismatch local error_message = ''; -- AirDate has been promoted to Date so not necessary to check it local date_parameters_list = { ['access-date'] = {val = AccessDate, name = A:ORIGIN ('AccessDate')}, ['archive-date'] = {val = ArchiveDate, name = A:ORIGIN ('ArchiveDate')}, ['date'] = {val = Date, name = Date_origin}, ['doi-broken-date'] = {val = DoiBroken, name = A:ORIGIN ('DoiBroken')}, ['pmc-embargo-date'] = {val = Embargo, name = A:ORIGIN ('Embargo')}, ['publication-date'] = {val = PublicationDate, name = A:ORIGIN ('PublicationDate')}, ['year'] = {val = Year, name = A:ORIGIN ('Year')}, }; local error_list = {}; anchor_year, Embargo = validation.dates(date_parameters_list, COinS_date, error_list); if utilities.is_set (Year) and utilities.is_set (Date) then -- both |date= and |year= not normally needed; validation.year_date_check (Year, A:ORIGIN ('Year'), Date, A:ORIGIN ('Date'), error_list); end if 0 == #error_list then -- error free dates only; 0 when error_list is empty local modified = false; -- flag if utilities.is_set (DF) then -- if we need to reformat dates modified = validation.reformat_dates (date_parameters_list, DF); -- reformat to DF format, use long month names if appropriate end if true == validation.date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate modified = true; utilities.set_message ('maint_date_format'); -- hyphens were converted so add maint category end -- for those wikis that can and want to have English date names translated to the local language; not supported at en.wiki if cfg.date_name_auto_xlate_enable and validation.date_name_xlate (date_parameters_list, cfg.date_digit_auto_xlate_enable ) then utilities.set_message ('maint_date_auto_xlated'); -- add maint cat modified = true; end if modified then -- if the date_parameters_list values were modified AccessDate = date_parameters_list['access-date'].val; -- overwrite date holding parameters with modified values ArchiveDate = date_parameters_list['archive-date'].val; Date = date_parameters_list['date'].val; DoiBroken = date_parameters_list['doi-broken-date'].val; PublicationDate = date_parameters_list['publication-date'].val; end if archive_url_timestamp and utilities.is_set (ArchiveDate) then validation.archive_date_check (ArchiveDate, archive_url_timestamp, DF); -- does YYYYMMDD in archive_url_timestamp match date in ArchiveDate end else utilities.set_message ('err_bad_date', {utilities.make_sep_list (#error_list, error_list)}); -- add this error message end end -- end of do if utilities.in_array (config.CitationClass, {'book', 'encyclopaedia'}) or -- {{cite book}}, {{cite encyclopedia}}; TODO: {{cite conference}} and others? ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) or -- {{citation}} as an encylopedia citation ('citation' == config.CitationClass and not utilities.is_set (Periodical)) then -- {{citation}} as a book citation if utilities.is_set (PublicationPlace) then if not utilities.is_set (PublisherName) then local date = COinS_date.rftdate and tonumber (COinS_date.rftdate:match ('%d%d%d%d')); -- get year portion of COinS date (because in Arabic numerals); convert string to number if date and (1850 <= date) then -- location has no publisher; if date is 1850 or later utilities.set_message ('maint_location_no_publisher'); -- add maint cat end else -- PublisherName has a value if cfg.keywords_xlate['none'] == PublisherName then -- if that value is 'none' (only for book and encyclopedia citations) PublisherName = ''; -- unset end end end end local ID_list = {}; -- sequence table of rendered identifiers local ID_list_coins = {}; -- table of identifiers and their values from args; key is same as cfg.id_handlers's key local Class = A['Class']; -- arxiv class identifier local ID_support = { {A['ASINTLD'], 'ASIN', 'err_asintld_missing_asin', A:ORIGIN ('ASINTLD')}, {DoiBroken, 'DOI', 'err_doibroken_missing_doi', A:ORIGIN ('DoiBroken')}, {Embargo, 'PMC', 'err_embargo_missing_pmc', A:ORIGIN ('Embargo')}, } ID_list, ID_list_coins = identifiers.identifier_lists_get (args, { DoiBroken = DoiBroken, -- for |doi= ASINTLD = A['ASINTLD'], -- for |asin= Embargo = Embargo, -- for |pmc= Class = Class, -- for |arxiv= CitationClass = config.CitationClass, -- for |arxiv= Year=anchor_year, -- for |isbn= }, ID_support); if 'citation' == config.CitationClass then -- catch ve/citoid malformed book cites in {{citation}} templates for _, id in ipairs (ID_list) do -- search through the ID_list sequence looking for an ISBN identifier string if id:find ('ISBN', 3, true) then -- plain find, start at index 3 ([[ISBN) if utilities.is_set (Periodical) then -- when a |work= alias is set utilities.set_message ('maint_work_isbn'); -- add maint cat end end end end -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite medrxiv}}, {{cite ssrn}}, before generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list_t) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv=, |citeseerx=, |medrxiv=, |ssrn= required for their templates if not (args[cfg.id_handlers[config.CitationClass:upper()].parameters[1]] or -- can't use ID_list_coins k/v table here because invalid parameters omitted args[cfg.id_handlers[config.CitationClass:upper()].parameters[2]]) then -- which causes unexpected parameter missing error message utilities.set_message ('err_' .. config.CitationClass .. '_missing'); -- add error message end Periodical = ({['arxiv'] = 'arXiv', ['biorxiv'] = 'bioRxiv', ['citeseerx'] = 'CiteSeerX', ['medrxiv'] = 'medRxiv', ['ssrn'] = 'Social Science Research Network'})[config.CitationClass]; end -- Link the title of the work if no |url= was provided, but we have a |pmc= or a |doi= with |doi-access=free if config.CitationClass == "journal" and not utilities.is_set (URL) and not utilities.is_set (TitleLink) and not utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) then -- TODO: remove 'none' once existing citations have been switched to 'off', so 'none' can be used as token for "no title" instead if 'none' ~= cfg.keywords_xlate[auto_select] then -- if auto-linking not disabled if identifiers.auto_link_urls[auto_select] then -- manual selection URL = identifiers.auto_link_urls[auto_select]; -- set URL to be the same as identifier's external link URL_origin = cfg.id_handlers[auto_select:upper()].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['pmc'] then -- auto-select PMC URL = identifiers.auto_link_urls['pmc']; -- set URL to be the same as the PMC external link if not embargoed URL_origin = cfg.id_handlers['PMC'].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['doi'] then -- auto-select DOI URL = identifiers.auto_link_urls['doi']; URL_origin = cfg.id_handlers['DOI'].parameters[1]; end end if utilities.is_set (URL) then -- set when using an identifier-created URL if utilities.is_set (AccessDate) then -- |access-date= requires |url=; identifier-created URL is not |url= utilities.set_message ('err_accessdate_missing_url'); -- add an error message AccessDate = ''; -- unset end if utilities.is_set (ArchiveURL) then -- |archive-url= requires |url=; identifier-created URL is not |url= utilities.set_message ('err_archive_missing_url'); -- add an error message ArchiveURL = ''; -- unset end end end -- At this point fields may be nil if they weren't specified in the template use. We can use that fact. -- Test if citation has no title if not utilities.is_set (Title) and not utilities.is_set (TransTitle) and not utilities.is_set (ScriptTitle) then -- has special case for cite episode utilities.set_message ('err_citation_missing_title', {'episode' == config.CitationClass and 'series' or 'title'}); end if utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) and utilities.in_array (config.CitationClass, {'journal', 'citation'}) and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and ('journal' == Periodical_origin or 'script-journal' == ScriptPeriodical_origin) then -- special case for journal cites Title = ''; -- set title to empty string utilities.set_message ('maint_untitled'); -- add maint cat end if 'journal' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Periodical) and 'journal' == Periodical_origin) then if is_page_art_num (((utilities.is_set (Page) and Page) or (utilities.is_set (Pages) and Pages)) or nil, ID_list_coins['DOI']) then -- does |page(s)= look like it holds an article number utilities.set_message ('maint_page_art_num'); -- add maint cat end end -- COinS metadata (see <http://ocoins.info/>) for automated parsing of citation information. -- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that -- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title -- is the article title, and Chapter is a section within the article. So, we remap local coins_chapter = Chapter; -- default assuming that remapping not required local coins_title = Title; -- et tu if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Chapter) and utilities.is_set (Title) and utilities.is_set (Periodical) then -- if all are used then coins_chapter = Title; -- remap coins_title = Periodical; end end local coins_author = a; -- default for coins rft.au if 0 < #c then -- but if contributor list coins_author = c; -- use that instead end -- this is the function call to COinS() local OCinSoutput = metadata.COinS({ ['Periodical'] = utilities.strip_apostrophe_markup (Periodical), -- no markup in the metadata ['Encyclopedia'] = Encyclopedia, -- just a flag; content ignored by ~/COinS ['Chapter'] = metadata.make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic / accept-as-written markup ['Degree'] = Degree; -- cite thesis only ['Title'] = metadata.make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic / accept-as-written markup ['PublicationPlace'] = PublicationPlace, ['Date'] = COinS_date.rftdate, -- COinS_date.* has correctly formatted date values if Date is valid; ['Season'] = COinS_date.rftssn, ['Quarter'] = COinS_date.rftquarter, ['Chron'] = COinS_date.rftchron, ['Series'] = Series, ['Volume'] = Volume, ['Issue'] = Issue, ['ArticleNumber'] = ArticleNumber, ['Pages'] = coins_pages or metadata.get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At, QuotePage, QuotePages}, 7)), -- pages stripped of external links ['Edition'] = Edition, ['PublisherName'] = PublisherName or Newsgroup, -- any apostrophe markup already removed from PublisherName ['URL'] = first_set ({ChapterURL, URL}, 2), ['Authors'] = coins_author, ['ID_list'] = ID_list_coins, ['RawPage'] = this_page.prefixedText, }, config.CitationClass); -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite medrxiv}}, and {{cite ssrn}} AFTER generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list_t) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, CiteSeerX, medRxiv, or ssrn now unset so it isn't displayed Periodical = ''; -- periodical not allowed in these templates; if article has been published, use cite journal end -- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text if 'newsgroup' == config.CitationClass and utilities.is_set (Newsgroup) then PublisherName = utilities.substitute (cfg.messages['newsgroup'], external_link( 'news:' .. Newsgroup, Newsgroup, Newsgroup_origin, nil )); end local Editors; local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list local Contributors; -- assembled contributors name list local contributor_etal; local Translators; -- assembled translators name list local translator_etal; local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn= local Interviewers; local interviewers_list = {}; interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters local interviewer_etal; -- Now perform various field substitutions. -- We also add leading spaces and surrounding markup and punctuation to the -- various parts of the citation, but only when they are non-nil. do local last_first_list; local control = { format = NameListStyle, -- empty string, '&', 'amp', 'and', or 'vanc' maximum = nil, -- as if display-authors or display-editors not set mode = Mode }; do -- do editor name list first because the now unsupported coauthors used to modify control table local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayEditors'], A['DisplayEditors'], A:ORIGIN ('DisplayEditors'), #e); control.maximum, editor_etal = get_display_names (display_names, #e, 'editors', editor_etal, param); Editors, EditorCount = list_people (control, e, editor_etal); if 1 == EditorCount and (true == editor_etal or 1 < #e) then -- only one editor displayed but includes etal then EditorCount = 2; -- spoof to display (eds.) annotation end end do -- now do interviewers local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayInterviewers'], A['DisplayInterviewers'], A:ORIGIN ('DisplayInterviewers'), #interviewers_list); control.maximum, interviewer_etal = get_display_names (display_names, #interviewers_list, 'interviewers', interviewer_etal, param); Interviewers = list_people (control, interviewers_list, interviewer_etal); end do -- now do translators local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayTranslators'], A['DisplayTranslators'], A:ORIGIN ('DisplayTranslators'), #t); control.maximum, translator_etal = get_display_names (display_names, #t, 'translators', translator_etal, param); Translators = list_people (control, t, translator_etal); end do -- now do contributors local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayContributors'], A['DisplayContributors'], A:ORIGIN ('DisplayContributors'), #c); control.maximum, contributor_etal = get_display_names (display_names, #c, 'contributors', contributor_etal, param); Contributors = list_people (control, c, contributor_etal); end do -- now do authors local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayAuthors'], A['DisplayAuthors'], A:ORIGIN ('DisplayAuthors'), #a, author_etal); control.maximum, author_etal = get_display_names (display_names, #a, 'authors', author_etal, param); last_first_list = list_people (control, a, author_etal); if utilities.is_set (Authors) then Authors, author_etal = name_has_etal (Authors, author_etal, false, 'authors'); -- find and remove variations on et al. if author_etal then Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter end else Authors = last_first_list; -- either an author name list or an empty string end end -- end of do if utilities.is_set (Authors) and utilities.is_set (Collaboration) then Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al. end end local ConferenceFormat = A['ConferenceFormat']; local ConferenceURL = A['ConferenceURL']; ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url'); Format = style_format (Format, URL, 'format', 'url'); -- special case for chapter format so no error message or cat when chapter not supported if not (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia))) then ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url'); end if not utilities.is_set (URL) then if utilities.in_array (config.CitationClass, {"web", "podcast", "mailinglist"}) or -- |url= required for {{cite web}}, {{cite podcast}}, and {{cite mailing list}} ('citation' == config.CitationClass and ('website' == Periodical_origin or 'script-website' == ScriptPeriodical_origin)) then -- and required for {{citation}} with |website= or |script-website= if not url_was_archive_today then -- is <URL> empty/missing because it was a deprecated archive.today url utilities.set_message ('err_cite_web_url'); -- no; emit an error message for an empty/ missing |url= end end -- do we have |accessdate= without either |url= or |chapter-url=? if utilities.is_set (AccessDate) and not utilities.is_set (ChapterURL) then -- ChapterURL may be set when URL is not set; utilities.set_message ('err_accessdate_missing_url'); AccessDate = ''; end end local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], ''); local OriginalURL local OriginalURL_origin local OriginalFormat local OriginalAccess; UrlStatus = UrlStatus:lower(); -- used later when assembling archived text if utilities.is_set ( ArchiveURL ) then if utilities.is_set (ChapterURL) then -- if chapter-url= is set apply archive url to it OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text OriginalURL_origin = ChapterURL_origin; -- name of |chapter-url= parameter for error messages OriginalFormat = ChapterFormat; -- and original |chapter-format= if 'live' ~= UrlStatus then ChapterURL = ArchiveURL -- swap-in the archive's URL ChapterURL_origin = A:ORIGIN('ArchiveURL') -- name of |archive-url= parameter for error messages ChapterFormat = ArchiveFormat or ''; -- swap in archive's format ChapterUrlAccess = nil; -- restricted access levels do not make sense for archived URLs end elseif utilities.is_set (URL) then OriginalURL = URL; -- save copy of original source URL OriginalURL_origin = URL_origin; -- name of URL parameter for error messages OriginalFormat = Format; -- and original |format= OriginalAccess = UrlAccess; if 'live' ~= UrlStatus then -- if URL set then |archive-url= applies to it URL = ArchiveURL -- swap-in the archive's URL URL_origin = A:ORIGIN('ArchiveURL') -- name of archive URL parameter for error messages Format = ArchiveFormat or ''; -- swap in archive's format UrlAccess = nil; -- restricted access levels do not make sense for archived URLs end end elseif utilities.is_set (UrlStatus) then -- if |url-status= is set when |archive-url= is not set utilities.set_message ('maint_url_status'); -- add maint cat end if utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or -- if any of the 'periodical' cites except encyclopedia ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) then local chap_param; if utilities.is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters chap_param = A:ORIGIN ('Chapter') elseif utilities.is_set (TransChapter) then chap_param = A:ORIGIN ('TransChapter') elseif utilities.is_set (ChapterURL) then chap_param = A:ORIGIN ('ChapterURL') elseif utilities.is_set (ScriptChapter) then chap_param = ScriptChapter_origin; else utilities.is_set (ChapterFormat) chap_param = A:ORIGIN ('ChapterFormat') end if utilities.is_set (chap_param) then -- if we found one utilities.set_message ('err_chapter_ignored', {chap_param}); -- add error message Chapter = ''; -- and set them to empty string to be safe with concatenation TransChapter = ''; ChapterURL = ''; ScriptChapter = ''; ChapterFormat = ''; end else -- otherwise, format chapter / article title local no_quotes = false; -- default assume that we will be quoting the chapter parameter value if utilities.is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s) if utilities.in_array (Contribution:lower(), cfg.keywords_lists.contribution) then -- and a generic contribution title no_quotes = true; -- then render it unquoted end end Chapter = format_chapter_title (ScriptChapter, ScriptChapter_origin, Chapter, Chapter_origin, TransChapter, TransChapter_origin, ChapterURL, ChapterURL_origin, no_quotes, ChapterUrlAccess); -- Contribution is also in Chapter if utilities.is_set (Chapter) then Chapter = Chapter .. ChapterFormat ; if 'map' == config.CitationClass and utilities.is_set (TitleType) then Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title end Chapter = Chapter .. sepc .. ' '; elseif utilities.is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ... Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it end end -- Format main title local plain_title = false; local accept_title; Title, accept_title = utilities.has_accept_as_written (Title, true); -- remove accept-this-as-written markup when it wraps all of <Title> if accept_title and ('' == Title) then -- only support forced empty for now "(())" Title = cfg.messages['notitle']; -- replace by predefined "No title" message -- TODO: utilities.set_message ( 'err_redundant_parameters', ...); -- issue proper error message instead of muting ScriptTitle = ''; -- just mute for now TransTitle = ''; -- just mute for now plain_title = true; -- suppress text decoration for descriptive title utilities.set_message ('maint_untitled'); -- add maint cat end if not accept_title then -- <Title> not wrapped in accept-as-written markup if '...' == Title:sub (-3) then -- if ellipsis is the last three characters of |title= Title = Title:gsub ('(%.%.%.)%.+$', '%1'); -- limit the number of dots to three elseif not mw.ustring.find (Title, '%.%s*%a%.$') and -- end of title is not a 'dot-(optional space-)letter-dot' initialism ... not mw.ustring.find (Title, '%s+%a%.$') then -- ...and not a 'space-letter-dot' initial (''Allium canadense'' L.) Title = mw.ustring.gsub(Title, '%' .. sepc .. '$', ''); -- remove any trailing separator character; sepc and ms.ustring() here for languages that use multibyte separator characters end if utilities.is_set (ArchiveURL) and is_archived_copy (Title) then utilities.set_message ('maint_archived_copy'); -- add maintenance category before we modify the content of Title end if is_generic ('generic_titles', Title) then utilities.set_message ('err_generic_title'); -- set an error message end end if (not plain_title) and (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'document', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) or ('map' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)))) then -- special case for cite map when the map is in a periodical treat as an article Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from module provided quote marks Title = utilities.wrap_style ('quoted-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); elseif plain_title or ('report' == config.CitationClass) then -- no styling for cite report and descriptive titles (otherwise same as above) Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title else Title = utilities.wrap_style ('italic-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-italic-title', TransTitle); end if utilities.is_set (TransTitle) then if utilities.is_set (Title) then TransTitle = " " .. TransTitle; else utilities.set_message ('err_trans_missing_title', {'title'}); end end if utilities.is_set (Title) then -- TODO: is this the right place to be making Wikisource URLs? if utilities.is_set (TitleLink) and utilities.is_set (URL) then utilities.set_message ('err_wikilink_in_url'); -- set an error message because we can't have both TitleLink = ''; -- unset end if not utilities.is_set (TitleLink) and utilities.is_set (URL) then Title = external_link (URL, Title, URL_origin, UrlAccess) .. TransTitle .. Format; URL = ''; -- unset these because no longer needed Format = ""; elseif utilities.is_set (TitleLink) and not utilities.is_set (URL) then local ws_url; ws_url = wikisource_url_make (TitleLink); -- ignore ws_label return; not used here if ws_url then Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title-link'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], TitleLink, Title}); Title = Title .. TransTitle; else Title = utilities.make_wikilink (TitleLink, Title) .. TransTitle; end else local ws_url, ws_label, L; -- Title has italic or quote markup by the time we get here which causes is_wikilink() to return 0 (not a wikilink) ws_url, ws_label, L = wikisource_url_make (Title:gsub('^[\'"]*(.-)[\'"]*$', '%1')); -- make ws URL from |title= interwiki link (strip italic or quote markup); link portion L becomes tooltip label if ws_url then Title = Title:gsub ('%b[]', ws_label); -- replace interwiki link with ws_label to retain markup Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, Title}); Title = Title .. TransTitle; else Title = Title .. TransTitle; end end else Title = TransTitle; end if utilities.is_set (Place) then Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " "; end local ConferenceURL_origin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL if utilities.is_set (Conference) then if utilities.is_set (ConferenceURL) then Conference = external_link( ConferenceURL, Conference, ConferenceURL_origin, nil ); end Conference = sepc .. " " .. Conference .. ConferenceFormat; elseif utilities.is_set (ConferenceURL) then Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURL_origin, nil ); end local Position = ''; if not utilities.is_set (Position) then local Minutes = A['Minutes']; local Time = A['Time']; if utilities.is_set (Minutes) then if utilities.is_set (Time) then --TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'minutes') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'time')}); end Position = utilities.substitute (cfg.messages.minutes, Minutes); else if utilities.is_set (Time) then local TimeCaption = A['TimeCaption'] if not utilities.is_set (TimeCaption) then TimeCaption = cs2_lower(cfg.messages['event']); end Position = " " .. TimeCaption .. " " .. Time; end end else Position = " " .. Position; At = ''; end Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase); At = utilities.is_set (At) and (sepc .. " " .. At) or ""; Position = utilities.is_set (Position) and (sepc .. " " .. Position) or ""; if config.CitationClass == 'map' then local Sections = A['Sections']; -- Section (singular) is an alias of Chapter so set earlier local Inset = A['Inset']; if utilities.is_set ( Inset ) then Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase); end if utilities.is_set ( Sections ) then Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase); elseif utilities.is_set ( Section ) then Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase); end At = At .. Inset .. Section; end local Others = A['Others']; if utilities.is_set (Others) and 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor= if config.CitationClass == "AV-media-notes" or config.CitationClass == "audio-visual" then -- special maint for AV/M which has a lot of 'false' positives right now utilities.set_message ('maint_others_avm') else utilities.set_message ('maint_others'); end end Others = utilities.is_set (Others) and (sepc .. " " .. Others) or ""; if utilities.is_set (Translators) then Others = safe_join ({sepc .. ' ', wrap_msg ('translated', Translators, use_lowercase), Others}, sepc); end if utilities.is_set (Interviewers) then Others = safe_join ({sepc .. ' ', wrap_msg ('interview', Interviewers, use_lowercase), Others}, sepc); end local TitleNote = A['TitleNote']; TitleNote = utilities.is_set (TitleNote) and (sepc .. " " .. TitleNote) or ""; if utilities.is_set (Edition) then if Edition:match ('%f[%a][Ee]d%n?%.?$') or Edition:match ('%f[%a][Ee]dition$') then -- Ed, ed, Ed., ed., Edn, edn, Edn., edn. utilities.set_message ('err_extra_text_edition'); -- add error message end Edition = " " .. wrap_msg ('edition', Edition); else Edition = ''; end Series = utilities.is_set (Series) and wrap_msg ('series', {sepc, Series}) or ""; -- not the same as SeriesNum local Agency = A['Agency'] or ''; -- |agency= is supported by {{cite magazine}}, {{cite news}}, {{cite press release}}, {{cite web}}, and certain {{citation}} templates if utilities.is_set (Agency) then -- this testing done here because {{citation}} supports 'news' citations if utilities.in_array (config.CitationClass, {'magazine', 'news', 'pressrelease', 'web'}) or ('citation' == config.CitationClass and utilities.in_array (Periodical_origin, {"magazine", "newspaper", "work"})) then Agency = wrap_msg ('agency', {sepc, Agency}); -- format for rendering else Agency = ''; -- unset; not supported utilities.set_message ('err_parameter_ignored', {'agency'}); -- add error message end end Volume = format_volume_issue (Volume, Issue, ArticleNumber, config.CitationClass, Periodical_origin, sepc, use_lowercase); if utilities.is_set (AccessDate) then local retrv_text = " " .. cfg.messages['retrieved']; AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format retrv_text = cs2_lower(retrv_text); -- if mode is cs2, lower case AccessDate = utilities.substitute (retrv_text, AccessDate); -- add retrieved text AccessDate = utilities.substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates end if utilities.is_set (ID) then ID = sepc .. " " .. ID; end local Docket = A['Docket']; if "thesis" == config.CitationClass and utilities.is_set (Docket) then ID = sepc .. " Docket " .. Docket .. ID; end if "report" == config.CitationClass and utilities.is_set (Docket) then -- for cite report when |docket= is set ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set end if utilities.is_set (URL) then URL = " " .. external_link( URL, nil, URL_origin, UrlAccess ); end -- We check length of PostScript here because it will have been nuked by -- the quote parameters. We'd otherwise emit a message even if there wasn't -- a displayed postscript. -- TODO: Should the max size (1) be configurable? -- TODO: Should we check a specific pattern? if utilities.is_set(PostScript) and mw.ustring.len(PostScript) > 1 then utilities.set_message ('maint_postscript') end local Archived; if utilities.is_set (ArchiveURL) then if not utilities.is_set (ArchiveDate) then -- ArchiveURL set but ArchiveDate not set utilities.set_message ('err_archive_missing_date'); -- emit an error message ArchiveURL = ''; -- empty string for concatenation ArchiveDate = ''; -- empty string for concatenation end else if utilities.is_set (ArchiveDate) then -- ArchiveURL not set but ArchiveDate is set utilities.set_message ('err_archive_date_missing_url'); -- emit an error message ArchiveURL = ''; -- empty string for concatenation ArchiveDate = ''; -- empty string for concatenation end end if utilities.is_set (ArchiveURL) then local arch_text; if "live" == UrlStatus then if utilities.is_set (ArchiveDate) then Archived = sepc .. ' ' .. utilities.substitute ( cfg.messages['archived-live'], { external_link( ArchiveURL, cs2_lower(cfg.messages['archived']), A:ORIGIN('ArchiveURL'), nil) .. ArchiveFormat, ArchiveDate } ); else Archived = ''; end if not utilities.is_set (OriginalURL) then utilities.set_message ('err_archive_missing_url'); Archived = ''; -- empty string for concatenation end elseif utilities.is_set (OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown' if utilities.in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then Archived = sepc .. ' ' .. utilities.substitute ( cs2_lower(cfg.messages['archived-unfit']), ArchiveDate); if 'bot: unknown' == UrlStatus then utilities.set_message ('maint_bot_unknown'); -- and add a category if not already added else utilities.add_prop_cat ('unfit'); -- and add a category if not already added end else -- UrlStatus is empty, 'dead' if utilities.is_set (ArchiveDate) then Archived = sepc .. ' ' .. utilities.substitute ( cs2_lower(cfg.messages['archived-dead']), { external_link( OriginalURL, cfg.messages['original'], OriginalURL_origin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); else Archived = ''; -- unset for concatenation end end else -- OriginalUrl not set utilities.set_message ('err_archive_missing_url'); Archived = ''; -- empty string for concatenation end elseif utilities.is_set (ArchiveFormat) then Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message else Archived = ''; end local TranscriptURL = A['TranscriptURL'] local TranscriptFormat = A['TranscriptFormat']; TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl'); local Transcript = A['Transcript']; local TranscriptURL_origin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL if utilities.is_set (Transcript) then if utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, Transcript, TranscriptURL_origin, nil ); end Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat; elseif utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, nil, TranscriptURL_origin, nil ); end local Publisher; if utilities.is_set (PublicationDate) then PublicationDate = wrap_msg ('published', PublicationDate); end if utilities.is_set (PublisherName) then if utilities.is_set (PublicationPlace) then Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate; else Publisher = sepc .. " " .. PublisherName .. PublicationDate; end elseif utilities.is_set (PublicationPlace) then Publisher= sepc .. " " .. PublicationPlace .. PublicationDate; else Publisher = PublicationDate; end -- Several of the above rely upon detecting this as nil, so do it last. if (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical)) then if utilities.is_set (Title) or utilities.is_set (TitleNote) then Periodical = sepc .. " " .. format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); else Periodical = format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); end end local Language = A['Language']; if utilities.is_set (Language) then Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc. else Language=''; -- language not specified so make sure this is an empty string; --[[ TODO: need to extract the wrap_msg from language_parameter so that we can solve parentheses bunching problem with Format/Language/TitleType ]] end --[[ Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided). ]] if "speech" == config.CitationClass then -- cite speech only TitleNote = TitleType; -- move TitleType to TitleNote so that it renders ahead of |event= TitleType = ''; -- and unset if utilities.is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter if utilities.is_set (Conference) then -- and if |event= is set Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering end end end -- Piece all bits together at last. Here, all should be non-nil. -- We build things this way because it is more efficient in LUA -- not to keep reassigning to the same string variable over and over. local tcommon; local tcommon2; -- used for book cite when |contributor= is set local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; -- Volume = safe_join ({Volume, pgtext}, sepc); if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (Periodical) then -- special cases for book cites if utilities.is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc. tcommon = safe_join ({Title, TitleNote}, sepc); -- author and other stuff will come after this and before tcommon2 tcommon2 = safe_join ({TitleType, Series, Language, Volume, Others, Edition, Publisher}, sepc); else tcommon = safe_join ({Title, TitleNote, TitleType, Series, Language, Volume, Others, Edition, Publisher}, sepc); end elseif 'map' == config.CitationClass then -- special cases for cite map if utilities.is_set (Chapter) then -- map in a book; TitleType is part of Chapter tcommon = safe_join ({Title, Edition, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc); elseif utilities.is_set (Periodical) then -- map in a periodical tcommon = safe_join ({Title, TitleType, Periodical, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc); else -- a sheet or stand-alone map tcommon = safe_join ({Title, TitleType, Edition, Scale, Series, Language, Cartography, Others, Publisher}, sepc); end elseif 'episode' == config.CitationClass then -- special case for cite episode tcommon = safe_join ({Title, TitleNote, TitleType, Series, Language, Edition, Publisher}, sepc); else -- all other CS1 templates tcommon = safe_join ({Title, TitleNote, Conference, Periodical, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc); end if #ID_list > 0 then ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc ); else ID_list = ID; end local Via = A['Via']; Via = utilities.is_set (Via) and wrap_msg ('via', Via) or ''; local idcommon; if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media & cite episode position transcript idcommon = safe_join( { ID_list, URL, Archived, Transcript, AccessDate, Via, Quote }, sepc ); else idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, Quote }, sepc ); end local text; -- local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; local OrigDate = A['OrigDate']; OrigDate = utilities.is_set (OrigDate) and wrap_msg ('origdate', OrigDate) or ''; if utilities.is_set (Date) then if utilities.is_set (Authors) or utilities.is_set (Editors) then -- date follows authors or editors when authors not set Date = " (" .. Date .. ")" .. OrigDate .. sepc .. " "; -- in parentheses else -- neither of authors and editors set if (string.sub(tcommon, -1, -1) == sepc) then -- if the last character of tcommon is sepc Date = " " .. Date .. OrigDate; -- Date does not begin with sepc else Date = sepc .. " " .. Date .. OrigDate; -- Date begins with sepc end end end if utilities.is_set (Authors) then if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Authors termination Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space end if utilities.is_set (Editors) then local in_text = ''; local post_text = ''; if utilities.is_set (Chapter) and 0 == #c then in_text = cfg.messages['in'] .. ' '; in_text = cs2_lower(in_text); -- lowercase for cs2 end if EditorCount <= 1 then post_text = ' (' .. cfg.messages['editor'] .. ')'; -- be consistent with no-author, no-date case else post_text = ' (' .. cfg.messages['editors'] .. ')'; end Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space end if utilities.is_set (Contributors) then -- book cite and we're citing the intro, preface, etc. local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' '; by_text = cs2_lower(by_text); -- lowercase for cs2 Authors = by_text .. Authors; -- author follows title so tweak it here if utilities.is_set (Editors) and utilities.is_set (Date) then -- when Editors make sure that Authors gets terminated Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space end if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Contributors termination Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space end text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc ); -- text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, idcommon }, sepc ); else text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc ); -- text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, idcommon }, sepc ); end elseif utilities.is_set (Editors) then if utilities.is_set (Date) then if EditorCount <= 1 then Editors = Editors .. cfg.presentation['sep_name'] .. cfg.messages['editor']; else Editors = Editors .. cfg.presentation['sep_name'] .. cfg.messages['editors']; end else if EditorCount <= 1 then Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " " else Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " " end end text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc ); -- text = safe_join( {Editors, Date, Chapter, Place, tcommon, idcommon}, sepc ); else if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then text = safe_join( {Chapter, Place, tcommon, pgtext, Date, idcommon}, sepc ); -- text = safe_join( {Chapter, Place, tcommon, Date, idcommon}, sepc ); else text = safe_join( {Chapter, Place, tcommon, Date, pgtext, idcommon}, sepc ); -- text = safe_join( {Chapter, Place, tcommon, Date, idcommon}, sepc ); end end if utilities.is_set (PostScript) and PostScript ~= sepc then text = safe_join( {text, sepc}, sepc ); -- Deals with italics, spaces, etc. if '.' == sepc then -- remove final seperator if present text = text:gsub ('%' .. sepc .. '$', ''); -- dot must be escaped here else text = mw.ustring.gsub (text, sepc .. '$', ''); -- using ustring for non-dot sepc (likely a non-Latin character) end end text = safe_join( {text, PostScript}, sepc ); -- Now enclose the whole thing in a <cite> element local options_t = {}; options_t.class = cite_class_attribute_make (config.CitationClass, Mode); local Ref = is_valid_parameter_value (A['Ref'], A:ORIGIN('Ref'), cfg.keywords_lists['ref'], nil, true); -- nil when |ref=harv; A['Ref'] else if 'none' ~= cfg.keywords_xlate[(Ref and Ref:lower()) or ''] then local namelist_t = {}; -- holds selected contributor, author, editor name list local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation if #c > 0 then -- if there is a contributor list namelist_t = c; -- select it elseif #a > 0 then -- or an author list namelist_t = a; elseif #e > 0 then -- or an editor list namelist_t = e; end local citeref_id; if #namelist_t > 0 then -- if there are names in namelist_t citeref_id = make_citeref_id (namelist_t, year); -- go make the CITEREF anchor if mw.uri.anchorEncode (citeref_id) == ((Ref and mw.uri.anchorEncode (Ref)) or '') then -- Ref may already be encoded (by {{sfnref}}) so citeref_id must be encoded before comparison utilities.set_message ('maint_ref_duplicates_default'); end else citeref_id = ''; -- unset end options_t.id = Ref or citeref_id; end if string.len (text:gsub('%b<>', '')) <= 2 then -- remove html and html-like tags; then get length of what remains; z.error_cats_t = {}; -- blank the categories list z.error_msgs_t = {}; -- blank the error messages list OCinSoutput = nil; -- blank the metadata string text = ''; -- blank the the citation utilities.set_message ('err_empty_citation'); -- set empty citation message and category end local render_t = {}; -- here we collect the final bits for concatenation into the rendered citation if is_preview_mode and (0 ~= #z.error_msgs_t or 0 ~= #z.maint_cats_t) then -- when in preview mode if not utilities.is_set (options_t.id) then -- and when this template has not created an anchor ID math.randomseed (tonumber (mw.getLanguage ('en'):formatDate ('U')) * 10000 + os.clock() * 10000); options_t.id = 'CITEREF_temp_preview_id_' .. math.random (100000, 999999); -- create temporary anchor ID for preview mode end end if utilities.is_set (options_t.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags options_t.id = mw.uri.anchorEncode(options_t.id); -- do this here; also used when adding preview warning messages table.insert (render_t, utilities.substitute (cfg.presentation['cite-id'], {options_t.id, mw.text.nowiki(options_t.class), text})); -- when |ref= is set or when there is a namelist else table.insert (render_t, utilities.substitute (cfg.presentation['cite'], {mw.text.nowiki(options_t.class), text})); -- when |ref=none or when namelist_t empty and |ref= is missing or is empty end if OCinSoutput then -- blanked when citation is 'empty' so don't bother to add boilerplate metadata span table.insert (render_t, utilities.substitute (cfg.presentation['ocins'], OCinSoutput)); -- format and append metadata to the citation end local template_name = cfg.citation_class_map_t[config.CitationClass]; local template_link = '[[Template:' .. template_name .. '|' .. template_name .. ']]'; local msg_prefix = '<code class="cs1-code">{{' .. template_link .. '}}</code>: '; if 0 ~= #z.error_msgs_t then mw.addWarning (utilities.substitute (cfg.messages.warning_msg_e, {template_link, options_t.id})); table.insert (render_t, ' '); -- insert a space between citation and its error messages table.sort (z.error_msgs_t); -- sort the error messages list; sorting includes wrapping <span> and <code> tags; hidden-error sorts ahead of visible-error local hidden = true; -- presume that the only error messages emited by this template are hidden for _, v in ipairs (z.error_msgs_t) do -- spin through the list of error messages if v:find ('cs1-visible-error', 1, true) then -- look for the visible error class name hidden = false; -- found one; so don't hide the error message prefix break; -- and done because no need to look further end end z.error_msgs_t[1] = table.concat ({utilities.error_comment (msg_prefix, hidden), z.error_msgs_t[1]}); -- add error message prefix to first error message to prevent extraneous punctuation table.insert (render_t, table.concat (z.error_msgs_t, '; ')); -- make a big string of error messages and add it to the rendering end if 0 ~= #z.maint_cats_t then mw.addWarning (utilities.substitute (cfg.messages.warning_msg_m, {template_link, options_t.id})); table.sort (z.maint_cats_t); -- sort the maintenance messages list local maint_msgs_t = {}; -- here we collect all of the maint messages if 0 == #z.error_msgs_t then -- if no error messages table.insert (maint_msgs_t, msg_prefix); -- insert message prefix in maint message livery end for _, v in ipairs( z.maint_cats_t ) do -- append maintenance categories table.insert (maint_msgs_t, -- assemble new maint message and add it to the maint_msgs_t table table.concat ({v, ' (', utilities.substitute (cfg.messages[':cat wikilink'], v), ')'}) ); end table.insert (render_t, utilities.substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs_t, ' '))); -- wrap the group of maint messages with proper presentation and save end if not no_tracking_cats then local sort_key; local cat_wikilink = 'cat wikilink'; if cfg.enable_sort_keys then -- when namespace sort keys enabled local namespace_number = mw.title.getCurrentTitle().namespace; -- get namespace number for this wikitext sort_key = (0 ~= namespace_number and (cfg.name_space_sort_keys[namespace_number] or cfg.name_space_sort_keys.other)) or nil; -- get sort key character; nil for mainspace cat_wikilink = (not sort_key and 'cat wikilink') or 'cat wikilink sk'; -- make <cfg.messages> key end for _, v in ipairs (z.error_cats_t) do -- append error categories table.insert (render_t, utilities.substitute (cfg.messages[cat_wikilink], {v, sort_key})); end if cfg.id_limits_data_load_fail then -- boolean true when load failed utilities.set_message ('maint_id_limit_load_fail'); -- done here because this maint cat emits no message end for _, v in ipairs (z.maint_cats_t) do -- append maintenance categories table.insert (render_t, utilities.substitute (cfg.messages[cat_wikilink], {v, sort_key})); end for _, v in ipairs (z.prop_cats_t) do -- append properties categories table.insert (render_t, utilities.substitute (cfg.messages['cat wikilink'], v)); -- no sort keys end end return table.concat (render_t); -- make a big string and done end --[[--------------------------< V A L I D A T E >-------------------------------------------------------------- Looks for a parameter's name in one of several whitelists. Parameters in the whitelist can have three values: true - active, supported parameters false - deprecated, supported parameters nil - unsupported parameters ]] local function validate (name, cite_class, empty) local name = tostring (name); local enum_name; -- parameter name with enumerator (if any) replaced with '#' local state; local function state_test (state, name) -- local function to do testing of state values if true == state then return true; end -- valid actively supported parameter if false == state then if empty then return nil; end -- empty deprecated parameters are treated as unknowns deprecated_parameter (name); -- parameter is deprecated but still supported return true; end if 'tracked' == state then local base_name = name:gsub ('%d', ''); -- strip enumerators from parameter names that have them to get the base name utilities.add_prop_cat ('tracked-param', {base_name}, base_name); -- add a properties category; <base_name> modifies <key> return true; end return nil; end if name:find ('#') then -- # is a cs1|2 reserved character so parameters with # not permitted return nil; end -- replace enumerator digit(s) with # (|last25= becomes |last#=) (mw.ustring because non-Western 'local' digits) enum_name = mw.ustring.gsub (name, '%d+$', '#'); -- where enumerator is last charaters in parameter name (these to protect |s2cid=) enum_name = mw.ustring.gsub (enum_name, '%d+([%-l])', '#%1'); -- where enumerator is in the middle of the parameter name; |author#link= is the oddity if 'document' == cite_class then -- special case for {{cite document}} state = whitelist.document_parameters_t[enum_name]; -- this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end return false; end if utilities.in_array (cite_class, whitelist.preprint_template_list_t) then -- limited parameter sets allowed for these templates state = whitelist.limited_parameters_t[enum_name]; -- this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end state = whitelist.preprint_arguments_t[cite_class][name]; -- look in the parameter-list for the template identified by cite_class if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end -- end limited parameter-set templates if utilities.in_array (cite_class, whitelist.unique_param_template_list_t) then -- template-specific parameters for templates that accept parameters from the basic argument list state = whitelist.unique_arguments_t[cite_class][name]; -- look in the template-specific parameter-lists for the template identified by cite_class if true == state_test (state, name) then return true; end end -- if here, fall into general validation state = whitelist.common_parameters_t[enum_name]; -- all other templates; all normal parameters allowed; this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end --[=[-------------------------< I N T E R _ W I K I _ C H E C K >---------------------------------------------- check <value> for inter-language interwiki-link markup. <prefix> must be a MediaWiki-recognized language code. when these values have the form (without leading colon): [[<prefix>:link|label]] return label as plain-text [[<prefix>:link]] return <prefix>:link as plain-text return value as is else ]=] local function inter_wiki_check (parameter, value) local prefix = value:match ('%[%[(%a+):'); -- get an interwiki prefix if one exists local _; if prefix and cfg.inter_wiki_map[prefix:lower()] then -- if prefix is in the map, needs preceding colon so utilities.set_message ('err_bad_paramlink', parameter); -- emit an error message _, value, _ = utilities.is_wikilink (value); -- extract label portion from wikilink end return value; end --[[--------------------------< M I S S I N G _ P I P E _ C H E C K >------------------------------------------ Look at the contents of a parameter. If the content has a string of characters and digits followed by an equal sign, compare the alphanumeric string to the list of cs1|2 parameters. If found, then the string is possibly a parameter that is missing its pipe. There are two tests made: {{cite ... |title=Title access-date=2016-03-17}} -- the first parameter has a value and whitespace separates that value from the missing pipe parameter name {{cite ... |title=access-date=2016-03-17}} -- the first parameter has no value (whitespace after the first = is trimmed by MediaWiki) cs1|2 shares some parameter names with XML/HTML attributes: class=, title=, etc. To prevent false positives XML/HTML tags are removed before the search. If a missing pipe is detected, this function adds the missing pipe maintenance category. ]] local function missing_pipe_check (parameter, value) local capture; value = value:gsub ('%b<>', ''); -- remove XML/HTML tags because attributes: class=, title=, etc. capture = value:match ('%s+(%a[%w%-]+)%s*=') or value:match ('^(%a[%w%-]+)%s*='); -- find and categorize parameters with possible missing pipes if capture and validate (capture) then -- if the capture is a valid parameter name utilities.set_message ('err_missing_pipe', parameter); end end --[[--------------------------< H A S _ E X T R A N E O U S _ P U N C T >-------------------------------------- look for extraneous terminal punctuation in most parameter values; parameters listed in skip table are not checked ]] local function has_extraneous_punc (param, value) if 'number' == type (param) then return; end param = param:gsub ('%d+', '#'); -- enumerated name-list mask params allow terminal punct; normalize if cfg.punct_skip[param] then return; -- parameter name found in the skip table so done end if value:match ('[,;:]$') then utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat end if value:match ('^=') then -- sometimes an extraneous '=' character appears ... utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat end end --[[--------------------------< H A S _ T W L _ U R L >-------------------------------------------------------- look for The Wikipedia Library urls in url-holding parameters. TWL urls are accessible only for readers who are active extended confirmed Wikipedia editors. This function sets an error message when such urls are discovered and when appropriate, sets the |<param>-url-access=subscription. returns nothing. looks for: '.wikipedialibrary.idm.oclc.org' ]] local function has_twl_url (url_params_t, cite_args_t) local url_error_t = {}; -- sequence of url-holding parameters that have a TWL url for param, value in pairs (url_params_t) do if value:find ('%.wikipedialibrary%.idm%.oclc%.org') then -- has the TWL base url? table.insert (url_error_t, param); -- add parameter name to the error list end end if 0 ~= #url_error_t then -- non-zero when there are errors table.sort (url_error_t); -- sor for error messaging for i, param in ipairs (url_error_t) do if cfg.url_access_map_t[param] then -- if <param> has a matching -access parameter cite_args_t[cfg.url_access_map_t[param]] = cfg.keywords_xlate.subscription; -- set |<param>-url-access=subscription end url_error_t[i] = utilities.wrap_style ('parameter', param); -- make the parameter pretty for error message end utilities.set_message ('err_param_has_twl_url', {utilities.make_sep_list (#url_error_t, url_error_t)}); -- add this error message end end --[[--------------------------< H A S _ E X T R A N E O U S _ U R L >------------------------------------------ look for extraneous url parameter values; parameters listed in skip table are not checked ]] local function has_extraneous_url (non_url_param_t) local url_error_t = {}; check_for_url (non_url_param_t, url_error_t); -- extraneous url check if 0 ~= #url_error_t then -- non-zero when there are errors table.sort (url_error_t); utilities.set_message ('err_param_has_ext_link', {utilities.make_sep_list (#url_error_t, url_error_t)}); -- add this error message end end --[[--------------------------< _ C I T A T I O N >------------------------------------------------------------ Module entry point frame – from template call (citation()); may be nil when called from another module args_t – table of all cs1|2 parameters in the template (the parent frame) config_t – table of template-supplied parameter (the #invoke frame) ]] local function _citation (frame, args_t, config_t) -- save a copy in case we need to display an error message in preview mode if not frame then frame = mw.getCurrentFrame(); -- if called from another module, get a frame for frame-provided functions end -- i18n: set the name that your wiki uses to identify sandbox subpages from sandbox template invoke (or can be set here) local sandbox = ((config_t.SandboxPath and '' ~= config_t.SandboxPath) and config_t.SandboxPath) or '/sandbox'; -- sandbox path from {{#invoke:Citation/CS1/sandbox|citation|SandboxPath=/...}} is_sandbox = nil ~= string.find (frame:getTitle(), sandbox, 1, true); -- is this invoke the sandbox module? sandbox = is_sandbox and sandbox or ''; -- use i18n sandbox to load sandbox modules when this module is the sandox; live modules else cfg = mw.loadData ('Module:Citation/CS1/Configuration' .. sandbox); -- load sandbox versions of support modules when {{#invoke:Citation/CS1/sandbox|...}}; live modules else whitelist = mw.loadData ('Module:Citation/CS1/Whitelist' .. sandbox); utilities = require ('Module:Citation/CS1/Utilities' .. sandbox); validation = require ('Module:Citation/CS1/Date_validation' .. sandbox); identifiers = require ('Module:Citation/CS1/Identifiers' .. sandbox); metadata = require ('Module:Citation/CS1/COinS' .. sandbox); utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the selected cfg tables identifiers.set_selected_modules (cfg, utilities); -- so that functions in Identifiers can see the selected cfg tables and selected Utilities module validation.set_selected_modules (cfg, utilities); -- so that functions in Date validataion can see selected cfg tables and the selected Utilities module metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities local cite_args_t = {}; -- because args_t is the parent (template) frame args (which cannot be modified); params and their values will be placed here is_preview_mode = not utilities.is_set (frame:preprocess ('{{REVISIONID}}')); local suggestions = {}; -- table where we store suggestions if we need to loadData them local error_text; -- used as a flag local capture; -- the single supported capture when matching unknown parameters using patterns local empty_unknowns = {}; -- sequence table to hold empty unknown params for error message listing for k, v in pairs (args_t) do -- get parameters from the parent (template) frame v = mw.ustring.gsub (v, '^%s*(.-)%s*$', '%1'); -- trim leading/trailing whitespace; when v is only whitespace, becomes empty string if v ~= '' then if cfg.enum_needs_xlation and 'string' == type (k) then -- for wikis that set date_names['local_digits'] to non-western digits k = mw.ustring.gsub (k, '%d', cfg.date_names.local_digits); -- translate 'local' digits enumerators to Western 0-9 end if not validate( k, config_t.CitationClass ) then if type (k) ~= 'string' then -- exclude empty numbered parameters if v:match("%S+") ~= nil then error_text = utilities.set_message ('err_text_ignored', {v}); end elseif validate (k:lower(), config_t.CitationClass) then error_text = utilities.set_message ('err_parameter_ignored_suggest', {k, k:lower()}); -- suggest the lowercase version of the parameter else if nil == suggestions.suggestions then -- if this table is nil then we need to load it suggestions = mw.loadData ('Module:Citation/CS1/Suggestions' .. sandbox); --load sandbox version of suggestion module when {{#invoke:Citation/CS1/sandbox|...}}; live module else end for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter capture = k:match (pattern); -- the whole match if no capture in pattern else the capture if a match if capture then -- if the pattern matches param = utilities.substitute (param, capture); -- add the capture to the suggested parameter (typically the enumerator) if validate (param, config_t.CitationClass) then -- validate the suggestion to make sure that the suggestion is supported by this template (necessary for limited parameter lists) error_text = utilities.set_message ('err_parameter_ignored_suggest', {k, param}); -- set the suggestion error message else error_text = utilities.set_message ('err_parameter_ignored', {k}); -- suggested param not supported by this template v = ''; -- unset end end end if not utilities.is_set (error_text) then -- couldn't match with a pattern, is there an explicit suggestion? if (suggestions.suggestions[ k:lower() ] ~= nil) and validate (suggestions.suggestions[ k:lower() ], config_t.CitationClass) then utilities.set_message ('err_parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}); else utilities.set_message ('err_parameter_ignored', {k}); v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists) end end end end cite_args_t[k] = v; -- save this parameter and its value elseif not utilities.is_set (v) then -- for empty parameters if not validate (k, config_t.CitationClass, true) then -- is this empty parameter a valid parameter k = ('' == k) and cfg.err_msg_supl.empty_str or k; -- when k is empty string (or was space(s) trimmed to empty string), replace with descriptive text table.insert (empty_unknowns, utilities.wrap_style ('parameter', k)); -- format for error message and add to the list end end end if 0 ~= #empty_unknowns then -- create empty unknown error message utilities.set_message ('err_param_unknown_empty', { 1 == #empty_unknowns and '' or 's', utilities.make_sep_list (#empty_unknowns, empty_unknowns) }); end local non_url_param_t = {}; -- table of parameters and values that are not url-holding parameters local url_param_t = {}; -- table of url-holding paramters and their values for k, v in pairs (cite_args_t) do if 'string' == type (k) then -- don't evaluate positional parameters has_invisible_chars (k, v); -- look for invisible characters end has_extraneous_punc (k, v); -- look for extraneous terminal punctuation in parameter values missing_pipe_check (k, v); -- do we think that there is a parameter that is missing a pipe? cite_args_t[k] = inter_wiki_check (k, v); -- when language interwiki-linked parameter missing leading colon replace with wiki-link label if 'string' == type (k) then -- when parameter k is not positional if not cfg.url_skip[k] then -- and not in url skip table non_url_param_t[k] = v; -- make a parameter/value list for extraneous url check else -- and is in url skip table (a url-holding parameter) url_param_t[k] = v; -- make a parameter/value list to check for values that are The Wikipedia Library url end end end if cfg.suppress_archive_today_urls then has_archive_today_url (cite_args_t); -- look for and suppress archive.today urls and dependent parameters for all templates end has_extraneous_url (non_url_param_t); -- look for url in parameter values where a url does not belong has_twl_url (url_param_t, cite_args_t); -- look for url-holding parameters that hold a The Wikipedia Library url return table.concat ({ frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1' .. sandbox .. '/styles.css'}), citation0 (config_t, cite_args_t) }); end --[[--------------------------< C I T A T I O N >-------------------------------------------------------------- Template entry point ]] local function citation (frame) local config_t = {}; -- table to store parameters from the module {{#invoke:}} local args_t = frame:getParent().args; -- get template's preset parameters for k, v in pairs (frame.args) do -- get parameters from the {{#invoke}} frame config_t[k] = v; -- args_t[k] = v; -- crude debug support that allows us to render a citation from module {{#invoke:}}; skips parameter validation; TODO: keep? end return _citation (frame, args_t, config_t) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { citation = citation, -- template entry point _citation = _citation, -- module entry point } o0mp7ygqu5bibs2dabkkkkneiickrfx 116877 116876 2026-07-16T10:58:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1]] 116876 Scribunto text/plain require ('strict'); --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- each of these counts against the Lua upvalue limit ]] local validation; -- functions in Module:Citation/CS1/Date_validation local utilities; -- functions in Module:Citation/CS1/Utilities local z = {}; -- table of tables in Module:Citation/CS1/Utilities local identifiers; -- functions and tables in Module:Citation/CS1/Identifiers local metadata; -- functions in Module:Citation/CS1/COinS local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist --[[------------------< P A G E S C O P E V A R I A B L E S >--------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local added_deprecated_cat; -- boolean flag so that the category is added only once local added_vanc_errs; -- boolean flag so we only emit one Vancouver error / category local added_generic_name_errs; -- boolean flag so we only emit one generic name error / category and stop testing names once an error is encountered local added_numeric_name_errs; -- boolean flag so we only emit one numeric name error / category and stop testing names once an error is encountered local added_numeric_name_maint; -- boolean flag so we only emit one numeric name maint category and stop testing names once a category has been emitted local is_preview_mode; -- true when article is in preview mode; false when using 'Preview page with this template' (previewing the module) local is_sandbox; -- true when using sandbox modules to render citation local url_was_archive_today; -- boolean flag set to true when has_archive_today_url() has unset |url= because it held a deprecated archive.today url --[[--------------------------< F I R S T _ S E T >------------------------------------------------------------ Locates and returns the first set value in a table of values where the order established in the table, left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set. This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate the for-loop before it reached the actual end of the list. ]] local function first_set (list, count) local i = 1; while i <= count do -- loop through all items in list if utilities.is_set( list[i] ) then return list[i]; -- return the first set list member end i = i + 1; -- point to next end end --[[--------------------------< A D D _ V A N C _ E R R O R >---------------------------------------------------- Adds a single Vancouver system error message to the template's output regardless of how many error actually exist. To prevent duplication, added_vanc_errs is nil until an error message is emitted. added_vanc_errs is a Boolean declared in page scope variables above ]] local function add_vanc_error (source, position) if added_vanc_errs then return end added_vanc_errs = true; -- note that we've added this category utilities.set_message ('err_vancouver', {source, position}); end --[[--------------------------< I S _ S C H E M E >------------------------------------------------------------ does this thing that purports to be a URI scheme seem to be a valid scheme? The scheme is checked to see if it is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says: Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). returns true if it does, else false ]] local function is_scheme (scheme) return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern end --[=[-------------------------< I S _ D O M A I N _ N A M E >-------------------------------------------------- Does this thing that purports to be a domain name seem to be a valid domain name? Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5 BNF defined here: https://tools.ietf.org/html/rfc4234 Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15; see also [[Single-letter second-level domain]] list of TLDs: https://www.iana.org/domains/root/db RFC 952 (modified by RFC 1123) requires the first and last character of a hostname to be a letter or a digit. Between the first and last characters the name may use letters, digits, and the hyphen. Also allowed are IPv4 addresses. IPv6 not supported domain is expected to be stripped of any path so that the last character in the last character of the TLD. tld is two or more alpha characters. Any preceding '//' (from splitting a URL with a scheme) will be stripped here. Perhaps not necessary but retained in case it is necessary for IPv4 dot decimal. There are several tests: the first character of the whole domain name including subdomains must be a letter or a digit internationalized domain name (ASCII characters with .xn-- ASCII Compatible Encoding (ACE) prefix xn-- in the TLD) see https://tools.ietf.org/html/rfc3490 single-letter/digit second-level domains in the .org, .cash, and .today TLDs q, x, and z SL domains in the .com TLD i and q SL domains in the .net TLD single-letter SL domains in the ccTLDs (where the ccTLD is two letters) two-character SL domains in gTLDs (where the gTLD is two or more letters) three-plus-character SL domains in gTLDs (where the gTLD is two or more letters) IPv4 dot-decimal address format; TLD not allowed returns true if domain appears to be a proper name and TLD or IPv4 address, else false ]=] local function is_domain_name (domain) if not domain then return false; -- if not set, abandon end domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once if not domain:match ('^[%w]') then -- first character must be letter or digit return false; end if domain:match ('^%a+:') then -- hack to detect things that look like s:Page:Title where Page: is namespace at Wikisource return false; end local patterns = { -- patterns that look like URLs '%f[%w][%w][%w%-]+[%w]%.%a%a+$', -- three or more character hostname.hostname or hostname.tld '%f[%w][%w][%w%-]+[%w]%.xn%-%-[%w]+$', -- internationalized domain name with ACE prefix '%f[%a][qxz]%.com$', -- assigned one character .com hostname (x.com times out 2015-12-10) '%f[%a][iq]%.net$', -- assigned one character .net hostname (q.net registered but not active 2015-12-10) '%f[%w][%w]%.%a%a$', -- one character hostname and ccTLD (2 chars) '%f[%w][%w][%w]%.%a%a+$', -- two character hostname and TLD '^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?', -- IPv4 address '[%a%d]+%:?' -- IPv6 address } for _, pattern in ipairs (patterns) do -- loop through the patterns list if domain:match (pattern) then return true; -- if a match then we think that this thing that purports to be a URL is a URL end end for _, d in ipairs (cfg.single_letter_2nd_lvl_domains_t) do -- look for single letter second level domain names for these top level domains if domain:match ('%f[%w][%w]%.' .. d) then return true end end return false; -- no matches, we don't know what this thing is end --[[--------------------------< I S _ U R L >------------------------------------------------------------------ returns true if the scheme and domain parts of a URL appear to be a valid URL; else false. This function is the last step in the validation process. This function is separate because there are cases that are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external wikilinks. ]] local function is_url (scheme, domain) if utilities.is_set (scheme) then -- if scheme is set check it and domain return is_scheme (scheme) and is_domain_name (domain); else return is_domain_name (domain); -- scheme not set when URL is protocol-relative end end --[[--------------------------< S P L I T _ U R L >------------------------------------------------------------ Split a URL into a scheme, authority indicator, and domain. First remove Fully Qualified Domain Name terminator (a dot following TLD) (if any) and any path(/), query(?) or fragment(#). If protocol-relative URL, return nil scheme and domain else return nil for both scheme and domain. When not protocol-relative, get scheme, authority indicator, and domain. If there is an authority indicator (one or more '/' characters immediately following the scheme's colon), make sure that there are only 2. Any URL that does not have news: scheme must have authority indicator (//). TODO: are there other common schemes like news: that don't use authority indicator? Strip off any port and path; ]] local function split_url (url_str) local scheme, authority, domain; url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//') if url_str:match ('^//%S*') then -- if there is what appears to be a protocol-relative URL domain = url_str:match ('^//(%S*)') elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions if utilities.is_set (authority) then authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing; if utilities.is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then return scheme; -- return scheme only making domain nil which will cause an error message end else if not scheme:match ('^news:') then -- except for news:..., MediaWiki won't link URLs that do not have authority indicator; TODO: a better way to do this test? return scheme; -- return scheme only making domain nil which will cause an error message end end domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present end return scheme, domain; end --[[--------------------------< L I N K _ P A R A M _ O K >--------------------------------------------------- checks the content of |title-link=, |series-link=, |author-link=, etc. for properly formatted content: no wikilinks, no URLs Link parameters are to hold the title of a Wikipedia article, so none of the WP:TITLESPECIALCHARACTERS are allowed: # < > [ ] | { } _ except the underscore which is used as a space in wiki URLs and # which is used for section links returns false when the value contains any of these characters. When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid URL (the |<param>-link= parameter is ok); else false when value appears to be a valid URL (the |<param>-link= parameter is NOT ok). ]] local function link_param_ok (value) local scheme, domain; if value:find ('[<>%[%]|{}]') then -- if any prohibited characters return false; end scheme, domain = split_url (value); -- get scheme or nil and domain or nil from URL; return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid URL end --[[--------------------------< L I N K _ T I T L E _ O K >--------------------------------------------------- Use link_param_ok() to validate |<param>-link= value and its matching |<title>= value. |<title>= may be wiki-linked but not when |<param>-link= has a value. This function emits an error message when that condition exists check <link> for inter-language interwiki-link prefix. prefix must be a MediaWiki-recognized language code and must begin with a colon. ]] local function link_title_ok (link, lorig, title, torig) local orig; if utilities.is_set (link) then -- don't bother if <param>-link doesn't have a value if not link_param_ok (link) then -- check |<param>-link= markup orig = lorig; -- identify the failing link parameter elseif title:find ('%[%[') then -- check |title= for wikilink markup orig = torig; -- identify the failing |title= parameter elseif link:match ('^%a+:') then -- if the link is what looks like an interwiki local prefix = link:match ('^(%a+):'):lower(); -- get the interwiki prefix if cfg.inter_wiki_map[prefix] then -- if prefix is in the map, must have preceding colon orig = lorig; -- flag as error end end end if utilities.is_set (orig) then link = ''; -- unset utilities.set_message ('err_bad_paramlink', orig); -- URL or wikilink in |title= with |title-link=; end return link; -- link if ok, empty string else end --[[--------------------------< C H E C K _ U R L >------------------------------------------------------------ Determines whether a URL string appears to be valid. First we test for space characters. If any are found, return false. Then split the URL into scheme and domain portions, or for protocol-relative (//example.com) URLs, just the domain. Use is_url() to validate the two portions of the URL. If both are valid, or for protocol-relative if domain is valid, return true, else false. Because it is different from a standard URL, and because this module used external_link() to make external links that work for standard and news: links, we validate newsgroup names here. The specification for a newsgroup name is at https://tools.ietf.org/html/rfc5536#section-3.1.4 ]] local function check_url( url_str ) if nil == url_str:match ("^%S+$") then -- if there are any spaces in |url=value it can't be a proper URL return false; end local scheme, domain; scheme, domain = split_url (url_str); -- get scheme or nil and domain or nil from URL; if 'news:' == scheme then -- special case for newsgroups return domain:match('^[%a%d%+%-_]+%.[%a%d%+%-_%.]*[%a%d%+%-_]$'); end return is_url (scheme, domain); -- return true if value appears to be a valid URL end --[=[-------------------------< I S _ P A R A M E T E R _ E X T _ W I K I L I N K >---------------------------- Return true if a parameter value has a string that begins and ends with square brackets [ and ] and the first non-space characters following the opening bracket appear to be a URL. The test will also find external wikilinks that use protocol-relative URLs. Also finds bare URLs. The frontier pattern prevents a match on interwiki-links which are similar to scheme:path URLs. The tests that find bracketed URLs are required because the parameters that call this test (currently |title=, |chapter=, |work=, and |publisher=) may have wikilinks and there are articles or redirects like '//Hus' so, while uncommon, |title=[[//Hus]] is possible as might be [[en://Hus]]. ]=] local function is_parameter_ext_wikilink (value) local scheme, domain; if value:match ('%f[%[]%[%a%S*:%S+.*%]') then -- if ext. wikilink with scheme and domain: [xxxx://yyyyy.zzz] scheme, domain = split_url (value:match ('%f[%[]%[(%a%S*:%S+).*%]')); elseif value:match ('%f[%[]%[//%S+.*%]') then -- if protocol-relative ext. wikilink: [//yyyyy.zzz] scheme, domain = split_url (value:match ('%f[%[]%[(//%S+).*%]')); elseif value:match ('%a%S*:%S+') then -- if bare URL with scheme; may have leading or trailing plain text scheme, domain = split_url (value:match ('(%a%S*:%S+)')); elseif value:match ('^//%S+') or value:match ('%s//%S+') then -- if protocol-relative bare URL: //yyyyy.zzz; authority indicator (//) must be be preceded nothing or by whitespace scheme, domain = split_url (value:match ('(//%S+)')); -- what is left should be the domain else return false; -- didn't find anything that is obviously a URL end return is_url (scheme, domain); -- return true if value appears to be a valid URL end --[[--------------------------< I S _ A R C H I V E _ T O D A Y _ U R L >-------------------------------------- archive.today (and .ph, .is, .md, .li, .fo, .vn) are deprecated. See Wikipedia:Requests_for_comment/Archive.is_RFC_5 (Special:Permalink/1339352976) <val> is a string that may or may not be a url ]] local function is_archive_today_url (val) if is_parameter_ext_wikilink (val) then -- is <val> a url? local tld = val:match ('archive%.(%l+)'); -- get the tld return tld and cfg.archive_today_tlds_t[tld]; -- return true if <tld> is one of the archive.today tlds; nil else end end --[[--------------------------< H A S _ A R C H I V E _ T O D A Y _ U R L >------------------------------------ blank any parameter that holds one of the archive.today tlds (.today, .ph, .is, .md, .li, .fo, .vn) and also blank parameters that are dependent on the offending parameter. input <cite_args_t> is a table of all of this template's parameters This function modifies <cite_args_t> when |url= or its alias |URL= hold an archive.today url, this function sets the flag <url_was_archive_today> which is used later to suppress the missing url error message from {{citation}} when it has |website=<summat> or from the templates {{cite web}}, {{cite podcast}}, {{cite mailing list}} which all require a url. returns nothing ]] local function has_archive_today_url (cite_args_t) local unset_params_t = {}; -- to hold a sequence of parameters to unset from cite_args_t for p, v in pairs (cite_args_t) do -- look at each parameter in the template if is_archive_today_url (v:lower()) then -- if it has a parameter with an archive.today url table.insert (unset_params_t, p); -- add the url-holding parameter name to our list of parameters to unset (may or may not be a legitimate url parameter) if 'url' == p:lower() then -- if this parameter is |url= or |URL= url_was_archive_today = true; -- set a flag so that cite web / podcast / mailinglist don't emit a missing url error message end if cfg.dependencies_t[p] then -- if this url-holding parameter (<p>) has dependencies for _, dependent in ipairs (cfg.dependencies_t[p]) do -- loop through the url-holding parameter's dependency sequence table.insert (unset_params_t, dependent); -- add dependent parameter to the list to be unset end end end end if 0 < #unset_params_t then -- when there are parameters to unset if not is_preview_mode then -- when in preview mode do not suppress any parameters for _, unset_param in ipairs (unset_params_t) do -- loop through the sequence cite_args_t[unset_param] = nil; -- and unset the url-holding parameter and its dependent parameters to avoid parameter-requires-other-parameter errors end end utilities.set_message ('maint_deprecated_archive'); -- add a maintenance message end end --[[-------------------------< C H E C K _ F O R _ U R L >----------------------------------------------------- loop through a list of parameters and their values. Look at the value and if it has an external link, emit an error message. ]] local function check_for_url (parameter_list, error_list) for k, v in pairs (parameter_list) do -- for each parameter in the list if is_parameter_ext_wikilink (v) then -- look at the value; if there is a URL add an error message table.insert (error_list, utilities.wrap_style ('parameter', k)); end end end --[[--------------------------< S A F E _ F O R _ U R L >------------------------------------------------------ Escape sequences for content that will be used for URL descriptions ]] local function safe_for_url( str ) if str:match( "%[%[.-%]%]" ) ~= nil then utilities.set_message ('err_wikilink_in_url', {}); end return str:gsub( '[%[%]\n]', { ['['] = '&#91;', [']'] = '&#93;', ['\n'] = ' ' } ); end --[[--------------------------< E X T E R N A L _ L I N K >---------------------------------------------------- Format an external link with error checking ]] local function external_link (URL, label, source, access) local err_msg = ''; local domain; local path; local base_url; if not utilities.is_set (label) then label = URL; if utilities.is_set (source) then utilities.set_message ('err_bare_url_missing_title', {utilities.wrap_style ('parameter', source)}); else error (cfg.messages["bare_url_no_origin"]); -- programmer error; valid parameter name does not have matching meta-parameter end end if not check_url (URL) then utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)}); end domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the URL into scheme plus domain and path if path then -- if there is a path portion path = path:gsub ('[%[%]]', {['['] = '%5b', [']'] = '%5d'}); -- replace '[' and ']' with their percent-encoded values URL = table.concat ({domain, path}); -- and reassemble end base_url = table.concat ({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wiki-markup URL if utilities.is_set (access) then -- access level (subscription, registration, limited) base_url = utilities.substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon end return base_url; end --[[--------------------------< D E P R E C A T E D _ P A R A M E T E R >-------------------------------------- Categorize and emit an error message when the citation contains one or more deprecated parameters. The function includes the offending parameter name to the error message. Only one error message is emitted regardless of the number of deprecated parameters in the citation. added_deprecated_cat is a Boolean declared in page scope variables above ]] local function deprecated_parameter(name) if not added_deprecated_cat then added_deprecated_cat = true; -- note that we've added this category utilities.set_message ('err_deprecated_params', {name}); -- add error message end end --[=[-------------------------< K E R N _ Q U O T E S >-------------------------------------------------------- Apply kerning to open the space between the quote mark provided by the module and a leading or trailing quote mark contained in a |title= or |chapter= parameter's value. This function will positive kern either single or double quotes: "'Unkerned title with leading and trailing single quote marks'" " 'Kerned title with leading and trailing single quote marks' " (in real life the kerning isn't as wide as this example) Double single quotes (italic or bold wiki-markup) are not kerned. Replaces Unicode quote marks in plain text or in the label portion of a [[L|D]] style wikilink with typewriter quote marks regardless of the need for kerning. Unicode quote marks are not replaced in simple [[D]] wikilinks. Call this function for chapter titles, for website titles, etc.; not for book titles. ]=] local function kern_quotes (str) local cap = ''; local wl_type, label, link; wl_type, label, link = utilities.is_wikilink (str); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] if 1 == wl_type then -- [[D]] simple wikilink with or without quote marks if mw.ustring.match (str, '%[%[[\"“”\'‘’].+[\"“”\'‘’]%]%]') then -- leading and trailing quote marks str = utilities.substitute (cfg.presentation['kern-left'], str); str = utilities.substitute (cfg.presentation['kern-right'], str); elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks str = utilities.substitute (cfg.presentation['kern-left'], str); elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks str = utilities.substitute (cfg.presentation['kern-right'], str); end else -- plain text or [[L|D]]; text in label variable label = mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark) label = mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark) cap = mw.ustring.match (label, "^([\"\'][^\'].+)"); -- match leading double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-left'], cap); end cap = mw.ustring.match (label, "^(.+[^\'][\"\'])$") -- match trailing double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-right'], cap); end if 2 == wl_type then str = utilities.make_wikilink (link, label); -- reassemble the wikilink else str = label; end end return str; end --[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >---------------------------------------- |script-title= holds title parameters that are not written in Latin-based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped in italic markup. Regardless of language, all values provided by |script-title= are wrapped in <bdi>...</bdi> tags to isolate RTL languages from the English left to right. |script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO 639-1 language code and a colon: |script-title=ja:*** *** (where * represents a Japanese character) Spaces between the two-character code and the colon and the colon and the first script character are allowed: |script-title=ja : *** *** |script-title=ja: *** *** |script-title=ja :*** *** Spaces preceding the prefix are allowed: |script-title = ja:*** *** The prefix is checked for validity. If it is a valid ISO 639-1 language code, the lang attribute (lang="ja") is added to the <bdi> tag so that browsers can know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute is not added. At this time there is no error message for this condition. Supports |script-title=, |script-chapter=, |script-<periodical>= ]] local function format_script_value (script_value, script_param) local lang=''; -- initialize to empty string local name; if script_value:match('^%l%l%l?%s*:') then -- if first 3 or 4 non-space characters are script language prefix lang = script_value:match('^(%l%l%l?)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script if not utilities.is_set (lang) then utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing title part']}); -- prefix without 'title'; add error message return ''; -- script_value was just the prefix so return empty string end -- if we get this far we have prefix and script name = cfg.lang_tag_remap[lang] or mw.language.fetchLanguageName( lang, cfg.this_wiki_code ); -- get language name so that we can use it to categorize if utilities.is_set (name) then -- is prefix a proper ISO 639-1 language code? script_value = script_value:gsub ('^%l+%s*:%s*', ''); -- strip prefix from script -- is prefix one of these language codes? if utilities.in_array (lang, cfg.script_lang_codes) then utilities.add_prop_cat ('script', {name, lang}) else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['unknown language code']}); -- unknown script-language; add error message end lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['invalid language code']}); -- invalid language code; add error message lang = ''; -- invalid so set lang to empty string end else utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing prefix']}); -- no language code prefix; add error message end script_value = utilities.substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is RTL return script_value; end --[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------ Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been wrapped in <bdi> tags. ]] local function script_concatenate (title, script, script_param) if utilities.is_set (script) then script = format_script_value (script, script_param); -- <bdi> tags, lang attribute, categorization, etc.; returns empty string on error if utilities.is_set (script) then title = title .. ' ' .. script; -- concatenate title and script title end end return title; end --[[--------------------------< W R A P _ M S G >-------------------------------------------------------------- Applies additional message text to various parameter values. Supplied string is wrapped using a message_list configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken from citation_config.messages - the reason this function is similar to but separate from wrap_style(). ]] local function wrap_msg (key, str, lower) if not utilities.is_set ( str ) then return ""; end if true == lower then local msg; msg = cfg.messages[key]:lower(); -- set the message to lower case before return utilities.substitute ( msg, str ); -- including template text else return utilities.substitute ( cfg.messages[key], str ); end end --[[----------------< W I K I S O U R C E _ U R L _ M A K E >------------------- Makes a Wikisource URL from Wikisource interwiki-link. Returns the URL and appropriate label; nil else. str is the value assigned to |chapter= (or aliases) or |title= or |title-link= ]] local function wikisource_url_make (str) local wl_type, D, L; local ws_url, ws_label; local wikisource_prefix = table.concat ({'https://', cfg.this_wiki_code, '.wikisource.org/wiki/'}); wl_type, D, L = utilities.is_wikilink (str); -- wl_type is 0 (not a wikilink), 1 (simple wikilink), 2 (complex wikilink) if 0 == wl_type then -- not a wikilink; might be from |title-link= str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 1 == wl_type then -- simple wikilink: [[Wikisource:ws article]] str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 2 == wl_type then -- non-so-simple wikilink: [[Wikisource:ws article|displayed text]] ([[L|D]]) str = L:match ('^[Ww]ikisource:(.+)') or L:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_label = D; -- get ws article name from display portion of interwiki link ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title without namespace from link portion of wikilink }); end end if ws_url then ws_url = mw.uri.encode (ws_url, 'WIKI'); -- make a usable URL ws_url = ws_url:gsub ('%%23', '#'); -- undo percent-encoding of fragment marker end return ws_url, ws_label, L or D; -- return proper URL or nil and a label or nil end --[[----------------< F O R M A T _ P E R I O D I C A L >----------------------- Format the three periodical parameters: |script-<periodical>=, |<periodical>=, and |trans-<periodical>= into a single Periodical meta-parameter. ]] local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical) if not utilities.is_set (periodical) then periodical = ''; -- to be safe for concatenation else periodical = utilities.wrap_style ('italic-title', periodical); -- style end periodical = script_concatenate (periodical, script_periodical, script_periodical_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (trans_periodical) then trans_periodical = utilities.wrap_style ('trans-italic-title', trans_periodical); if utilities.is_set (periodical) then periodical = periodical .. ' ' .. trans_periodical; else -- here when trans-periodical without periodical or script-periodical periodical = trans_periodical; utilities.set_message ('err_trans_missing_title', {'periodical'}); end end return periodical; end --[[------------------< F O R M A T _ C H A P T E R _ T I T L E >--------------- Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single chapter meta- parameter (chapter_url_source used for error messages). ]] local function format_chapter_title (script_chapter, script_chapter_source, chapter, chapter_source, trans_chapter, trans_chapter_source, chapter_url, chapter_url_source, no_quotes, access) local ws_url, ws_label, L = wikisource_url_make (chapter); -- make a wikisource URL and label from a wikisource interwiki link if ws_url then ws_label = ws_label:gsub ('_', ' '); -- replace underscore separators with space characters chapter = ws_label; end if not utilities.is_set (chapter) then chapter = ''; -- to be safe for concatenation else if false == no_quotes then chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from module provided quote marks chapter = utilities.wrap_style ('quoted-title', chapter); end end chapter = script_concatenate (chapter, script_chapter, script_chapter_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (chapter_url) then chapter = external_link (chapter_url, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate elseif ws_url then chapter = external_link (ws_url, chapter .. '&nbsp;', 'ws link in chapter'); -- adds bare_url_missing_title error if appropriate; space char to move icon away from chap text; TODO: better way to do this? chapter = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, chapter}); end if utilities.is_set (trans_chapter) then trans_chapter = utilities.wrap_style ('trans-quoted-title', trans_chapter); if utilities.is_set (chapter) then chapter = chapter .. ' ' .. trans_chapter; else -- here when trans_chapter without chapter or script-chapter chapter = trans_chapter; chapter_source = trans_chapter_source:match ('trans%-?(.+)'); -- when no chapter, get matching name from trans-<param> utilities.set_message ('err_trans_missing_title', {chapter_source}); end end return chapter; end --[[----------------< H A S _ I N V I S I B L E _ C H A R S >------------------- This function searches a parameter's value for non-printable or invisible characters. The search stops at the first match. This function will detect the visible replacement character when it is part of the Wikisource. Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref) and identifies them with a slightly different error message. See also coins_cleanup(). Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the parameter value. ]] local function has_invisible_chars (param, v) local position = ''; -- position of invisible char or starting position of stripmarker local capture; -- used by stripmarker detection to hold name of the stripmarker local stripmarker; -- boolean set true when a stripmarker is found capture = string.match (v, '[%w%p ]*'); -- test for values that are simple ASCII text and bypass other tests if true if capture == v then -- if same there are no Unicode characters return; end for _, invisible_char in ipairs (cfg.invisible_chars) do local char_name = invisible_char[1]; -- the character or group name local pattern = invisible_char[2]; -- the pattern used to find it position, _, capture = mw.ustring.find (v, pattern); -- see if the parameter value contains characters that match the pattern if position and (cfg.invisible_defs.zwj == capture) then -- if we found a zero-width joiner character if mw.ustring.find (v, cfg.indic_script) then -- it's ok if one of the Indic scripts position = nil; -- unset position elseif cfg.emoji_t[mw.ustring.codepoint (v, position+1)] then -- is zwj followed by a character listed in emoji{}? position = nil; -- unset position end end if position then if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition) ('templatestyles' == capture and utilities.in_array (param, {'id', 'quote'})) then -- templatestyles stripmarker allowed in these parameters stripmarker = true; -- set a flag elseif true == stripmarker and cfg.invisible_defs.del == capture then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker position = nil; -- unset else local err_msg; if capture and not (cfg.invisible_defs.del == capture or cfg.invisible_defs.zwj == capture) then err_msg = utilities.substitute (cfg.messages.invisible_1, {capture, char_name}); -- <capture> here is stripmarker name else err_msg = utilities.substitute (cfg.messages.invisible_2, char_name); end utilities.set_message ('err_invisible_char', {err_msg, utilities.wrap_style ('parameter', param), position}); -- add error message return; -- and done with this parameter end end end end --[[-------------------< A R G U M E N T _ W R A P P E R >---------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper ( args ) local origin = {}; return setmetatable({ ORIGIN = function ( self, k ) local dummy = self[k]; -- force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) if origin[k] ~= nil then return nil; end local args, list, v = args, cfg.aliases[k]; if type( list ) == 'table' then v, origin[k] = utilities.select_one ( args, list, 'err_redundant_parameters' ); if origin[k] == nil then origin[k] = ''; -- Empty string, not nil end elseif list ~= nil then v, origin[k] = args[list], list; else -- maybe let through instead of raising an error? -- v, origin[k] = args[k], k; error( cfg.messages['unknown_argument_map'] .. ': ' .. k); end -- Empty strings, not nil; if v == nil then v = ''; origin[k] = ''; end tbl = rawset( tbl, k, v ); return v; end, }); end --[[--------------------------< N O W R A P _ D A T E >------------------------- When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>. When date is DD MMMM YYYY or is MMMM DD, YYYY then wrap in nowrap span: <span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> YYYY DOES NOT yet support MMMM YYYY or any of the date ranges. ]] local function nowrap_date (date) local cap = ''; local cap2 = ''; if date:match("^%d%d%d%d%-%d%d%-%d%d$") then date = utilities.substitute (cfg.presentation['nowrap1'], date); elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$"); date = utilities.substitute (cfg.presentation['nowrap2'], {cap, cap2}); end return date; end --[[--------------------------< S E T _ T I T L E T Y P E >--------------------- This function sets default title types (equivalent to the citation including |type=<default value>) for those templates that have defaults. Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none). ]] local function set_titletype (cite_class, title_type) if utilities.is_set (title_type) then if 'none' == cfg.keywords_xlate[title_type] then title_type = ''; -- if |type=none then type parameter not displayed end return title_type; -- if |type= has been set to any other value use that value end return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation end --[[--------------------------< S A F E _ J O I N >----------------------------- Joins a sequence of strings together while checking for duplicate separation characters. ]] local function safe_join( tbl, duplicate_char ) local f = {}; -- create a function table appropriate to type of 'duplicate character' if 1 == #duplicate_char then -- for single byte ASCII characters use the string library functions f.gsub = string.gsub f.match = string.match f.sub = string.sub else -- for multi-byte characters use the ustring library functions f.gsub = mw.ustring.gsub f.match = mw.ustring.match f.sub = mw.ustring.sub end local str = ''; -- the output string local comp = ''; -- what does 'comp' mean? local end_chr = ''; local trim; for _, value in ipairs( tbl ) do if value == nil then value = ''; end if str == '' then -- if output string is empty str = value; -- assign value to it (first time through the loop) elseif value ~= '' then if value:sub(1, 1) == '<' then -- special case of values enclosed in spans and other markup. comp = value:gsub( "%b<>", "" ); -- remove HTML markup (<span>string</span> -> string) else comp = value; end -- typically duplicate_char is sepc if f.sub(comp, 1, 1) == duplicate_char then -- is first character same as duplicate_char? why test first character? -- Because individual string segments often (always?) begin with terminal punct for the -- preceding segment: 'First element' .. 'sepc next element' .. etc.? trim = false; end_chr = f.sub(str, -1, -1); -- get the last character of the output string -- str = str .. "<HERE(enchr=" .. end_chr .. ")" -- debug stuff? if end_chr == duplicate_char then -- if same as separator str = f.sub(str, 1, -2); -- remove it elseif end_chr == "'" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "''" then -- if last three chars of str are sepc'' str = f.sub(str, 1, -4) .. "''"; -- remove them and add back '' elseif f.sub(str, -5, -1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]'' trim = true; -- why? why do this and next differently from previous? elseif f.sub(str, -4, -1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]'' trim = true; -- same question end elseif end_chr == "]" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink trim = true; elseif f.sub(str, -3, -1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link trim = true; elseif f.sub(str, -2, -1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link trim = true; elseif f.sub(str, -4, -1) == duplicate_char .. "'']" then -- normal case when |url=something & |title=Title. trim = true; end elseif end_chr == " " then -- if last char of output string is a space if f.sub(str, -2, -1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space> str = f.sub(str, 1, -3); -- remove them both end end if trim then if value ~= comp then -- value does not equal comp when value contains HTML markup local dup2 = duplicate_char; if f.match(dup2, "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it value = f.gsub(value, "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows HTML markup else value = f.sub(value, 2, -1 ); -- remove duplicate_char when it is first character end end end str = str .. value; -- add it to the output string end end return str; end --[[--------------------------< I S _ S U F F I X >----------------------------- returns true if suffix is properly formed Jr, Sr, or ordinal in the range 1–9. Puncutation not allowed. ]] local function is_suffix (suffix) if utilities.in_array (suffix, {'Jr', 'Sr', 'Jnr', 'Snr', '1st', '2nd', '3rd'}) or suffix:match ('^%dth$') then return true; end return false; end --[[--------------------< I S _ G O O D _ V A N C _ N A M E >------------------- For Vancouver style, author/editor names are supposed to be rendered in Latin (read ASCII) characters. When a name uses characters that contain diacritical marks, those characters are to be converted to the corresponding Latin character. When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters. The module doesn't do this so editors may/must. This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets [http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A [http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF [http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F [http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F |lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) |firstn= also allowed to contain hyphens, spaces, apostrophes, and periods This original test: if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then was written outside of the code editor and pasted here because the code editor gets confused between character insertion point and cursor position. The test has been rewritten to use decimal character escape sequence for the individual bytes of the Unicode characters so that it is not necessary to use an external editor to maintain this code. \195\128-\195\150 – À-Ö (U+00C0–U+00D6 – C0 controls) \195\152-\195\182 – Ø-ö (U+00D8-U+00F6 – C0 controls) \195\184-\198\191 – ø-ƿ (U+00F8-U+01BF – C0 controls, Latin extended A & B) \199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B) ]] local function is_good_vanc_name (last, first, suffix, position) if not suffix then if first:find ('[,%s]') then -- when there is a space or comma, might be first name/initials + generational suffix first = first:match ('(.-)[,%s]+'); -- get name/initials suffix = first:match ('[,%s]+(.+)$'); -- get generational suffix end end if utilities.is_set (suffix) then if not is_suffix (suffix) then add_vanc_error (cfg.err_msg_supl.suffix, position); return false; -- not a name with an appropriate suffix end end if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191%-%s%'%.]*$") then add_vanc_error (cfg.err_msg_supl['non-Latin char'], position); return false; -- not a string of Latin characters; Vancouver requires Romanization end; return true; end --[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------ Attempts to convert names to initials in support of |name-list-style=vanc. Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/. Vancouver style requires family rank designations (Jr, II, III, etc.) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/. This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials. This function uses ustring functions because firstname initials may be any of the Unicode Latin characters accepted by is_good_vanc_name (). ]] local function reduce_to_initials (first, position) if first:find (',', 1, true) then return first; -- commas not allowed; abandon end local name, suffix = mw.ustring.match (first, "^(%u+) ([%dJS][%drndth]+)$"); if not name then -- if not initials and a suffix name = mw.ustring.match (first, "^(%u+)$"); -- is it just initials? end if name then -- if first is initials with or without suffix if 3 > mw.ustring.len (name) then -- if one or two initials if suffix then -- if there is a suffix if is_suffix (suffix) then -- is it legitimate? return first; -- one or two initials and a valid suffix so nothing to do else add_vanc_error (cfg.err_msg_supl.suffix, position); -- one or two initials with invalid suffix so error message return first; -- and return first unmolested end else return first; -- one or two initials without suffix; nothing to do end end end -- if here then name has 3 or more uppercase letters so treat them as a word local initials_t, names_t = {}, {}; -- tables to hold name parts and initials local i = 1; -- counter for number of initials names_t = mw.text.split (first, '[%s%-]+'); -- split into a sequence of names and possible suffix while names_t[i] do -- loop through the sequence if 1 < i and names_t[i]:match ('[%dJS][%drndth]+%.?$') then -- if not the first name, and looks like a suffix (may have trailing dot) names_t[i] = names_t[i]:gsub ('%.', ''); -- remove terminal dot if present if is_suffix (names_t[i]) then -- if a legitimate suffix table.insert (initials_t, ' ' .. names_t[i]); -- add a separator space, insert at end of initials sequence break; -- and done because suffix must fall at the end of a name end -- no error message if not a suffix; possibly because of Romanization end if 3 > i then table.insert (initials_t, mw.ustring.sub (names_t[i], 1, 1)); -- insert the initial at end of initials sequence end i = i + 1; -- bump the counter end return table.concat (initials_t); -- Vancouver format does not include spaces. end --[[--------------------------< I N T E R W I K I _ P R E F I X E N _ G E T >---------------------------------- extract interwiki prefixen from <value>. Returns two one or two values: false – no prefixen nil – prefix exists but not recognized project prefix, language prefix – when value has either of: :<project>:<language>:<article> :<language>:<project>:<article> project prefix, nil – when <value> has only a known single-letter prefix nil, language prefix – when <value> has only a known language prefix accepts single-letter project prefixen: 'd' (wikidata), 's' (wikisource), and 'w' (wikipedia) prefixes; at this writing, the other single-letter prefixen (b (wikibook), c (commons), m (meta), n (wikinews), q (wikiquote), and v (wikiversity)) are not supported. ]] local function interwiki_prefixen_get (value, is_link) if not value:find (':%l+:') then -- if no prefix return false; -- abandon; boolean here to distinguish from nil fail returns later end local prefix_patterns_linked_t = { -- sequence of valid interwiki and inter project prefixen '^%[%[:([dsw]):(%l%l+):', -- wikilinked; project and language prefixes '^%[%[:(%l%l+):([dsw]):', -- wikilinked; language and project prefixes '^%[%[:([dsw]):', -- wikilinked; project prefix '^%[%[:(%l%l+):', -- wikilinked; language prefix } local prefix_patterns_unlinked_t = { -- sequence of valid interwiki and inter project prefixen '^:([dsw]):(%l%l+):', -- project and language prefixes '^:(%l%l+):([dsw]):', -- language and project prefixes '^:([dsw]):', -- project prefix '^:(%l%l+):', -- language prefix } local cap1, cap2; for _, pattern in ipairs ((is_link and prefix_patterns_linked_t) or prefix_patterns_unlinked_t) do cap1, cap2 = value:match (pattern); if cap1 then break; -- found a match so stop looking end end if cap1 and cap2 then -- when both then :project:language: or :language:project: (both forms allowed) if 1 == #cap1 then -- length == 1 then :project:language: if cfg.inter_wiki_map[cap2] then -- is language prefix in the interwiki map? return cap1, cap2; -- return interwiki project and interwiki language end else -- here when :language:project: if cfg.inter_wiki_map[cap1] then -- is language prefix in the interwiki map? return cap2, cap1; -- return interwiki project and interwiki language end end return nil; -- unknown interwiki language elseif not (cap1 or cap2) then -- both are nil? return nil; -- we got something that looks like a project prefix but isn't; return fail elseif 1 == #cap1 then -- here when one capture return cap1, nil; -- length is 1 so return project, nil language else -- here when one capture and its length it more than 1 if cfg.inter_wiki_map[cap1] then -- is language prefix in the interwiki map? return nil, cap1; -- return nil project, language end end end --[[--------------------------< L I S T _ P E O P L E >-------------------------- Formats a list of people (authors, contributors, editors, interviewers, translators) names in the list will be linked when |<name>-link= has a value |<name>-mask- does NOT have a value; masked names are presumed to have been rendered previously so should have been linked there when |<name>-mask=0, the associated name is not rendered ]] local function list_people (control, people, etal) local sep; local namesep; local format = control.format; local maximum = control.maximum; local name_list = {}; if 'vanc' == format then -- Vancouver-like name styling? sep = cfg.presentation['sep_nl_vanc']; -- name-list separator between names is a comma namesep = cfg.presentation['sep_name_vanc']; -- last/first separator is a space else sep = cfg.presentation['sep_nl']; -- name-list separator between names is a semicolon namesep = cfg.presentation['sep_name']; -- last/first separator is <comma><space> end if sep:sub (-1, -1) ~= " " then sep = sep .. " " end if utilities.is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for other names for i, person in ipairs (people) do if utilities.is_set (person.last) then local mask = person.mask; local one; local sep_one = sep; if utilities.is_set (maximum) and i > maximum then etal = true; break; end if mask then local n = tonumber (mask); -- convert to a number if it can be converted; nil else if n then one = 0 ~= n and string.rep("&mdash;", n) or nil; -- make a string of (n > 0) mdashes, nil else, to replace name person.link = nil; -- don't create link to name if name is replaces with mdash string or has been set nil else one = mask; -- replace name with mask text (must include name-list separator) sep_one = " "; -- modify name-list separator end else one = person.last; -- get surname local first = person.first -- get given name if utilities.is_set (first) then if ("vanc" == format) then -- if Vancouver format one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) if not person.corporate and is_good_vanc_name (one, first, nil, i) then -- and name is all Latin characters; corporate authors not tested first = reduce_to_initials (first, i); -- attempt to convert first name(s) to initials end end one = one .. namesep .. first; end end if utilities.is_set (person.link) then one = utilities.make_wikilink (person.link, one); -- link author/editor end if one then -- if <one> has a value (name, mdash replacement, or mask text replacement) local proj, tag = interwiki_prefixen_get (one, true); -- get the interwiki prefixen if present if 'w' == proj and ('Wikipedia' == mw.site.namespaces.Project['name']) then proj = nil; -- for stuff like :w:de:<article>, :w is unnecessary TODO: maint cat? end if proj then local proj_name = ({['d'] = cfg.messages.wikidata, ['s'] = cfg.messages.wikisource, ['w'] = cfg.messages.wikipedia})[proj]; -- :w (wikipedia) for linking from a non-wikipedia project if proj_name then one = one .. utilities.wrap_style ('interproj', proj_name); -- add resized leading space, brackets, static text, language name utilities.add_prop_cat ('interproj-linked-name', proj); -- categorize it; <proj> is sort key tag = nil; -- unset; don't do both project and language end end if tag == cfg.this_wiki_code then tag = nil; -- stuff like :en:<article> at en.wiki is pointless TODO: maint cat? end if tag then local lang = cfg.lang_tag_remap[tag] or cfg.mw_languages_by_tag_t[tag]; if lang then -- error messaging done in extract_names() where we know parameter names one = one .. utilities.wrap_style ('interwiki', lang); -- add resized leading space, brackets, static text, language name utilities.add_prop_cat ('interwiki-linked-name', tag); -- categorize it; <tag> is sort key end end table.insert (name_list, one); -- add it to the list of names table.insert (name_list, sep_one); -- add the proper name-list separator end end end local count = #name_list / 2; -- (number of names + number of separators) divided by 2 if 0 < count then if 1 < count and not etal then if 'amp' == format then name_list[#name_list-2] = " & "; -- replace last separator with ampersand text elseif 'and' == format then if 2 == count then name_list[#name_list-2] = cfg.presentation.sep_nl_and; -- replace last separator with 'and' text else name_list[#name_list-2] = cfg.presentation.sep_nl_end; -- replace last separator with '(sep) and' text end end end name_list[#name_list] = nil; -- erase the last separator end local result = table.concat (name_list); -- construct list if etal and utilities.is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list result = result .. sep .. cfg.messages['et al']; -- we've got a last-first list and etal so add et al. end return result, count; -- return name-list string and count of number of names (count used for editor names only) end --[[--------------------< M A K E _ C I T E R E F _ I D >----------------------- Generates a CITEREF anchor ID if we have at least one name or a date. Otherwise returns an empty string. namelist is one of the contributor-, author-, or editor-name lists chosen in that order. year is Year or anchor_year. ]] local function make_citeref_id (namelist, year) local names={}; -- a table for the one to four names and year for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names names[i] = v.last if i == 4 then break end -- if four then done end table.insert (names, year); -- add the year at the end local id = table.concat(names); -- concatenate names and year for CITEREF id if utilities.is_set (id) then -- if concatenation is not an empty string return "CITEREF" .. id; -- add the CITEREF portion else return ''; -- return an empty string; no reason to include CITEREF id in this citation end end --[[--------------------------< C I T E _ C L A S S _A T T R I B U T E _M A K E >------------------------------ construct <cite> tag class attribute for this citation. <cite_class> – config.CitationClass from calling template <mode> – value from |mode= parameter ]] local function cite_class_attribute_make (cite_class, mode) local class_t = {}; table.insert (class_t, 'citation'); -- required for blue highlight if 'citation' ~= cite_class then table.insert (class_t, cite_class); -- identify this template for user css table.insert (class_t, utilities.is_set (mode) and mode or 'cs1'); -- identify the citation style for user css or javascript else table.insert (class_t, utilities.is_set (mode) and mode or 'cs2'); -- identify the citation style for user css or javascript end for _, prop_key in ipairs (z.prop_keys_t) do table.insert (class_t, prop_key); -- identify various properties for user css or javascript end return table.concat (class_t, ' '); -- make a big string and done end --[[---------------------< N A M E _ H A S _ E T A L >-------------------------- Evaluates the content of name parameters (author, editor, etc.) for variations on the theme of et al. If found, the et al. is removed, a flag is set to true and the function returns the modified name and the flag. This function never sets the flag to false but returns its previous state because it may have been set by previous passes through this function or by the associated |display-<names>=etal parameter ]] local function name_has_etal (name, etal, nocat, param) if utilities.is_set (name) then -- name can be nil in which case just return local patterns = cfg.et_al_patterns; -- get patterns from configuration for _, pattern in ipairs (patterns) do -- loop through all of the patterns if name:match (pattern) then -- if this 'et al' pattern is found in name name = name:gsub (pattern, ''); -- remove the offending text etal = true; -- set flag (may have been set previously here or by |display-<names>=etal) if not nocat then -- no categorization for |vauthors= utilities.set_message ('err_etal', {param}); -- and set an error if not added end end end end return name, etal; end --[[---------------------< N A M E _ I S _ N U M E R I C >---------------------- Add an error message and category when <name> parameter value does not contain letters. Add a maintenance category when <name> parameter value has numeric characters mixed with characters that are not numeric characters; could be letters and/or punctuation characters. This function will only emit one error and one maint message for the current template. Does not emit both error and maint messages/categories for the same parameter value. returns nothing ]] local function name_is_numeric (name, name_alias, list_name) local patterns = { '^%D+%d', -- <name> must have digits preceded by other characters '^%D*%d+%D+', -- <name> must have digits followed by other characters } if not added_numeric_name_errs and mw.ustring.match (name, '^[%A]+$') then -- if we have not already set an error message and <name> does not have any alpha characters utilities.set_message ('err_numeric_names', name_alias); -- add an error message added_numeric_name_errs = true; -- set the flag so we emit only one error message return; -- when here no point in further testing; abandon end if not added_numeric_name_maint then -- if we have already set a maint message for _, pattern in ipairs (patterns) do -- spin through list of patterns if mw.ustring.match (name, pattern) then -- digits preceded or followed by anything but digits; %D+ includes punctuation utilities.set_message ('maint_numeric_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template added_numeric_name_maint = true; -- set the flag so we emit only one maint message return; -- when here no point in further testing; abandon end end end end --[[-----------------< N A M E _ H A S _ M U L T _ N A M E S >------------------ Evaluates the content of last/surname (authors etc.) parameters for multiple names. Multiple names are indicated if there is more than one comma or any "unescaped" semicolons. Escaped semicolons are ones used as part of selected HTML entities. If the condition is met, the function adds the multiple name maintenance category. Same test for first except that commas should not appear in given names (MOS:JR says that the generational suffix does not take a separator character). Titles, degrees, postnominals, affiliations, all normally comma separated don't belong in a citation. <name> – name parameter value <list_name> – AuthorList, EditorList, etc <limit> – number of allowed commas; 1 (default) for surnames; 0 for given names returns nothing ]] local function name_has_mult_names (name, list_name, limit) local _, commas, semicolons, nbsps; limit = limit and limit or 1; if utilities.is_set (name) then _, commas = name:gsub (',', ''); -- count the number of commas _, semicolons = name:gsub (';', ''); -- count the number of semicolons -- nbsps probably should be its own separate count rather than merged in -- some way with semicolons because Lua patterns do not support the -- grouping operator that regex does, which means there is no way to add -- more entities to escape except by adding more counts with the new -- entities _, nbsps = name:gsub ('&nbsp;',''); -- count nbsps -- There is exactly 1 semicolon per &nbsp; entity, so subtract nbsps -- from semicolons to 'escape' them. If additional entities are added, -- they also can be subtracted. if limit < commas or 0 < (semicolons - nbsps) then utilities.set_message ('maint_mult_names', cfg.special_case_translation [list_name]); -- add a maint message end end end --[=[-------------------------< I S _ G E N E R I C >---------------------------------------------------------- Compares values assigned to various parameters according to the string provided as <item> in the function call. <item> can have on of two values: 'generic_names' – for name-holding parameters: |last=, |first=, |editor-last=, etc 'generic_titles' – for |title= There are two types of generic tests. The 'accept' tests look for a pattern that should not be rejected by the 'reject' test. For example, |author=[[John Smith (author)|Smith, John]] would be rejected by the 'author' reject test. But piped wikilinks with 'author' disambiguation should not be rejected so the 'accept' test prevents that from happening. Accept tests are always performed before reject tests. Each of the 'accept' and 'reject' sequence tables hold tables for en.wiki (['en']) and local.wiki (['local']) that each can hold a test sequence table The sequence table holds, at index [1], a test pattern, and, at index [2], a boolean control value. The control value tells string.find() or mw.ustring.find() to do plain-text search (true) or a pattern search (false). The intent of all this complexity is to make these searches as fast as possible so that we don't run out of processing time on very large articles. Returns true when a reject test finds the pattern or string false when an accept test finds the pattern or string nil else ]=] local function is_generic (item, value, wiki) local test_val; local str_lower = { -- use string.lower() for en.wiki (['en']) and use mw.ustring.lower() or local.wiki (['local']) ['en'] = string.lower, ['local'] = mw.ustring.lower, } local str_find = { -- use string.find() for en.wiki (['en']) and use mw.ustring.find() or local.wiki (['local']) ['en'] = string.find, ['local'] = mw.ustring.find, } local function test (val, test_t, wiki) -- local function to do the testing; <wiki> selects lower() and find() functions val = test_t[2] and str_lower[wiki](value) or val; -- when <test_t[2]> set to 'true', plaintext search using lowercase value return str_find[wiki] (val, test_t[1], 1, test_t[2]); -- return nil when not found or matched end local test_types_t = {'accept', 'reject'}; -- test accept patterns first, then reject patterns local wikis_t = {'en', 'local'}; -- do tests for each of these keys; en.wiki first, local.wiki second for _, test_type in ipairs (test_types_t) do -- for each test type for _, generic_value in pairs (cfg.special_case_translation[item][test_type]) do -- spin through the list of generic value fragments to accept or reject for _, wiki in ipairs (wikis_t) do if generic_value[wiki] then if test (value, generic_value[wiki], wiki) then -- go do the test return ('reject' == test_type); -- param value rejected, return true; false else end end end end end end --[[--------------------------< N A M E _ I S _ G E N E R I C >------------------------------------------------ calls is_generic() to determine if <name> is a 'generic name' listed in cfg.generic_names; <name_alias> is the parameter name used in error messaging ]] local function name_is_generic (name, name_alias) if not added_generic_name_errs and is_generic ('generic_names', name) then utilities.set_message ('err_generic_name', name_alias); -- set an error message added_generic_name_errs = true; end end --[[--------------------------< N A M E _ C H E C K S >-------------------------------------------------------- This function calls various name checking functions used to validate the content of the various name-holding parameters. ]] local function name_checks (last, first, list_name, last_alias, first_alias) local accept_name; if utilities.is_set (last) then last, accept_name = utilities.has_accept_as_written (last); -- remove accept-this-as-written markup when it wraps all of <last> if not accept_name then -- <last> not wrapped in accept-as-written markup name_has_mult_names (last, list_name); -- check for multiple names in the parameter name_is_numeric (last, last_alias, list_name); -- check for names that have no letters or are a mix of digits and other characters name_is_generic (last, last_alias); -- check for names found in the generic names list end end if utilities.is_set (first) then first, accept_name = utilities.has_accept_as_written (first); -- remove accept-this-as-written markup when it wraps all of <first> if not accept_name then -- <first> not wrapped in accept-as-written markup name_has_mult_names (first, list_name, 0); -- check for multiple names in the parameter; 0 is number of allowed commas in a given name name_is_numeric (first, first_alias, list_name); -- check for names that have no letters or are a mix of digits and other characters name_is_generic (first, first_alias); -- check for names found in the generic names list end local wl_type, D = utilities.is_wikilink (first); if 0 ~= wl_type then first = D; utilities.set_message ('err_bad_paramlink', first_alias); end end return last, first; -- done end --[[----------------------< E X T R A C T _ N A M E S >------------------------- Gets name list from the input arguments Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters. Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't find |last4= and |last5= then the search is done. This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3= are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=. When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the template's metadata. When this occurs, an error is emitted. ]] local function extract_names(args, list_name) local names = {}; -- table of names local last; -- individual name components local first; local link; local mask; local i = 1; -- loop counter/indexer local n = 1; -- output table indexer local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors) local etal = false; -- return value set to true when we find some form of et al. in an author parameter local last_alias, first_alias, link_alias; -- selected parameter aliases used in error messaging while true do last, last_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'err_redundant_parameters', i ); -- search through args for name components beginning at 1 first, first_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'err_redundant_parameters', i ); link, link_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ); mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); if last then -- error check |lastn= alias for unknown interwiki link prefix; done here because this is where we have the parameter name local project, language = interwiki_prefixen_get (last, true); -- true because we expect interwiki links in |lastn= to be wikilinked if nil == project and nil == language then -- when both are nil utilities.set_message ('err_bad_paramlink', last_alias); -- not known, emit an error message -- TODO: err_bad_interwiki? last = utilities.remove_wiki_link (last); -- remove wikilink markup; show display value only end end if link then -- error check |linkn= alias for unknown interwiki link prefix local project, language = interwiki_prefixen_get (link, false); -- false because wiki links in |author-linkn= is an error if nil == project and nil == language then -- when both are nil utilities.set_message ('err_bad_paramlink', link_alias); -- not known, emit an error message -- TODO: err_bad_interwiki? link = nil; -- unset so we don't link link_alias = nil; end end last, etal = name_has_etal (last, etal, false, last_alias); -- find and remove variations on et al. first, etal = name_has_etal (first, etal, false, first_alias); -- find and remove variations on et al. last, first = name_checks (last, first, list_name, last_alias, first_alias); -- multiple names, extraneous annotation, etc. checks if first and not last then -- if there is a firstn without a matching lastn local alias = first_alias:find ('given', 1, true) and 'given' or 'first'; -- get first or given form of the alias utilities.set_message ('err_first_missing_last', { first_alias, -- param name of alias missing its mate first_alias:gsub (alias, {['first'] = 'last', ['given'] = 'surname'}), -- make param name appropriate to the alias form }); -- add this error message elseif not first and not last then -- if both firstn and lastn aren't found, are we done? count = count + 1; -- number of times we haven't found last and first if 2 <= count then -- two missing names and we give up break; -- normal exit or there is a two-name hole in the list; can't tell which end else -- we have last with or without a first local result; link = link_title_ok (link, link_alias, last, last_alias); -- check for improper wiki-markup if first then link = link_title_ok (link, link_alias, first, first_alias); -- check for improper wiki-markup end names[n] = {last = last, first = first, link = link, mask = mask, corporate = false}; -- add this name to our names list (corporate for |vauthors= only) n = n + 1; -- point to next location in the names table if 1 == count then -- if the previous name was missing utilities.set_message ('err_missing_name', {list_name:match ("(%w+)List"):lower(), i - 1}); -- add this error message end count = 0; -- reset the counter, we're looking for two consecutive missing names end i = i + 1; -- point to next args location end return names, etal; -- all done, return our list of names and the etal flag end --[[--------------------------< N A M E _ T A G _ G E T >------------------------------------------------------ attempt to decode |language=<lang_param> and return language name and matching tag; nil else. This function looks for: <lang_param> as a tag in cfg.lang_tag_remap{} <lang_param> as a name in cfg.lang_name_remap{} <lang_param> as a name in cfg.mw_languages_by_name_t <lang_param> as a tag in cfg.mw_languages_by_tag_t when those fail, presume that <lang_param> is an IETF-like tag that MediaWiki does not recognize. Strip all script, region, variant, whatever subtags from <lang_param> to leave just a two or three character language tag and look for the new <lang_param> in cfg.mw_languages_by_tag_t{} on success, returns name (in properly capitalized form) and matching tag (in lowercase); on failure returns nil ]] local function name_tag_get (lang_param) local lang_param_lc = mw.ustring.lower (lang_param); -- use lowercase as an index into the various tables local name; local tag; name = cfg.lang_tag_remap[lang_param_lc]; -- assume <lang_param_lc> is a tag; attempt to get remapped language name if name then -- when <name>, <lang_param> is a tag for a remapped language name if cfg.lang_name_remap[name:lower()][2] ~= lang_param_lc then utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added return name, cfg.lang_name_remap[name:lower()][2]; -- so return name and tag from lang_name_remap[name]; special case to xlate sr-ec and sr-el to sr-cyrl and sr-latn end return name, lang_param_lc; -- so return <name> from remap and <lang_param_lc> end tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- still assuming that <lang_param_lc> is a tag; strip script, region, variant subtags name = cfg.lang_tag_remap[tag]; -- attempt to get remapped language name with language subtag only if name then -- when <name>, <tag> is a tag for a remapped language name return name, tag; -- so return <name> from remap and <tag> end if cfg.lang_name_remap[lang_param_lc] then -- not a remapped tag, assume <lang_param_lc> is a name; attempt to get remapped language tag return cfg.lang_name_remap[lang_param_lc][1], cfg.lang_name_remap[lang_param_lc][2]; -- for this <lang_param_lc>, return a (possibly) new name and appropriate tag end name = cfg.mw_languages_by_tag_t[lang_param_lc]; -- assume that <lang_param_lc> is a tag; attempt to get its matching language name if name then return name, lang_param_lc; -- <lang_param_lc> is a tag so return it and <name> end tag = cfg.mw_languages_by_name_t[lang_param_lc]; -- assume that <lang_param_lc> is a language name; attempt to get its matching tag if tag then return cfg.mw_languages_by_tag_t[tag], tag; -- <lang_param_lc> is a name so return the name from the table and <tag> end tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- is <lang_param_lc> an IETF-like tag that MediaWiki doesn't recognize? <tag> gets the language subtag; nil else if tag then name = cfg.mw_languages_by_tag_t[tag]; -- attempt to get a language name using the shortened <tag> if name then return name, tag; -- <lang_param_lc> is an unrecognized IETF-like tag so return <name> and language subtag end end end --[[-------------------< L A N G U A G E _ P A R A M E T E R >------------------ Gets language name from a provided two- or three-character ISO 639 code. If a code is recognized by MediaWiki, use the returned name; if not, then use the value that was provided with the language parameter. When |language= contains a recognized language (either code or name), the page is assigned to the category for that code: Category:Norwegian-language sources (no). For valid three-character code languages, the page is assigned to the single category for '639-2' codes: Category:CS1 ISO 639-2 language sources. Languages that are the same as the local wiki are not categorized. MediaWiki does not recognize three-character equivalents of two-character codes: code 'ar' is recognized but code 'ara' is not. This function supports multiple languages in the form |language=nb, French, th where the language names or codes are separated from each other by commas with optional space characters. ]] local function language_parameter (lang) local tag; -- some form of IETF-like language tag; language subtag with optional region, sript, vatiant, etc subtags local lang_subtag; -- ve populates |language= with mostly unecessary region subtags the MediaWiki does not recognize; this is the base language subtag local name; -- the language name local language_list = {}; -- table of language names to be rendered local names_t = {}; -- table made from the value assigned to |language= local this_wiki_name = mw.language.fetchLanguageName (cfg.this_wiki_code, cfg.this_wiki_code); -- get this wiki's language name names_t = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list for _, lang in ipairs (names_t) do -- reuse lang here because we don't yet know if lang is a language name or a language tag name, tag = name_tag_get (lang); -- attempt to get name/tag pair for <lang>; <name> has proper capitalization; <tag> is lowercase if utilities.is_set (tag) then lang_subtag = tag:gsub ('^(%a%a%a?)%-.*', '%1'); -- for categorization, strip any IETF-like tags from language tag if cfg.this_wiki_code ~= lang_subtag then -- when the language is not the same as this wiki's language if 2 == lang_subtag:len() then -- and is a two-character tag utilities.add_prop_cat ('foreign-lang-source', {name, tag}, lang_subtag); -- categorize it; tag appended to allow for multiple language categorization else -- or is a recognized language (but has a three-character tag) utilities.add_prop_cat ('foreign-lang-source-2', {lang_subtag}, lang_subtag); -- categorize it differently TODO: support multiple three-character tag categories per cs1|2 template? end elseif cfg.local_lang_cat_enable then -- when the language and this wiki's language are the same and categorization is enabled utilities.add_prop_cat ('local-lang-source', {name, lang_subtag}); -- categorize it end else name = lang; -- return whatever <lang> has so that we show something utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added end table.insert (language_list, name); name = ''; -- so we can reuse it end name = utilities.make_sep_list (#language_list, language_list); if (1 == #language_list) and (lang_subtag == cfg.this_wiki_code) then -- when only one language, find lang name in this wiki lang name; for |language=en-us, 'English' in 'American English' return ''; -- if one language and that language is this wiki's return an empty string (no annotation) end return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)' --[[ TODO: should only return blank or name rather than full list so we can clean up the bunched parenthetical elements Language, Type, Format ]] end --[[-----------------------< S E T _ C S _ S T Y L E >-------------------------- Gets the default CS style configuration for the given mode. Returns default separator and either postscript as passed in or the default. In CS1, the default postscript and separator are '.'. In CS2, the default postscript is the empty string and the default separator is ','. ]] local function set_cs_style (postscript, mode) if utilities.is_set(postscript) then -- emit a maintenance message if user postscript is the default cs1 postscript -- we catch the opposite case for cs2 in set_style if mode == 'cs1' and postscript == cfg.presentation['ps_' .. mode] then utilities.set_message ('maint_postscript'); end else postscript = cfg.presentation['ps_' .. mode]; end return cfg.presentation['sep_' .. mode], postscript; end --[[--------------------------< S E T _ S T Y L E >----------------------------- Sets the separator and postscript styles. Checks the |mode= first and the #invoke CitationClass second. Removes the postscript if postscript == none. ]] local function set_style (mode, postscript, cite_class) local sep; if 'cs2' == mode then sep, postscript = set_cs_style (postscript, 'cs2'); elseif 'cs1' == mode then sep, postscript = set_cs_style (postscript, 'cs1'); elseif 'citation' == cite_class then sep, postscript = set_cs_style (postscript, 'cs2'); else sep, postscript = set_cs_style (postscript, 'cs1'); end if cfg.keywords_xlate[postscript:lower()] == 'none' then -- emit a maintenance message if user postscript is the default cs2 postscript -- we catch the opposite case for cs1 in set_cs_style if 'cs2' == mode or ('cs1' ~= mode and 'citation' == cite_class) then -- {{citation |title=Title |mode=cs1 |postscript=none}} should not emit maint message utilities.set_message ('maint_postscript'); end postscript = ''; end return sep, postscript end --[=[-------------------------< I S _ P D F >----------------------------------- Determines if a URL has the file extension that is one of the PDF file extensions used by [[MediaWiki:Common.css]] when applying the PDF icon to external links. returns true if file extension is one of the recognized extensions, else false ]=] local function is_pdf (url) return url:match ('%.pdf$') or url:match ('%.PDF$') or url:match ('%.pdf[%?#]') or url:match ('%.PDF[%?#]') or url:match ('%.PDF&#035') or url:match ('%.pdf&#035'); end --[[--------------------------< S T Y L E _ F O R M A T >----------------------- Applies CSS style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does not have a matching URL parameter. If the format parameter is not set and the URL contains a file extension that is recognized as a PDF document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with the appropriate styling. ]] local function style_format (format, url, fmt_param, url_param) if utilities.is_set (format) then format = utilities.wrap_style ('format', format); -- add leading space, parentheses, resize if not utilities.is_set (url) then utilities.set_message ('err_format_missing_url', {fmt_param, url_param}); -- add an error message end elseif is_pdf (url) then -- format is not set so if URL is a PDF file then format = utilities.wrap_style ('format', 'PDF'); -- set format to PDF else format = ''; -- empty string for concatenation end return format; end --[[---------------------< G E T _ D I S P L A Y _ N A M E S >------------------ Returns a number that defines the number of names displayed for author and editor name lists and a Boolean flag to indicate when et al. should be appended to the name list. When the value assigned to |display-xxxxors= is a number greater than or equal to zero, return the number and the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains some variant of the text 'et al.'). When the value assigned to |display-xxxxors= is the keyword 'etal', return a number that is one greater than the number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of the names in the name list followed by 'et al.' In all other cases, returns nil and the previous state of the 'etal' flag. inputs: max: A['DisplayAuthors'] or A['DisplayEditors'], etc; a number or some flavor of etal count: #a or #e list_name: 'authors' or 'editors' etal: author_etal or editor_etal This function sets an error message when |display-xxxxors= value greater than or equal to number of names but not when <max> comes from {{cs1 config}} global settings. When using global settings, <param> is set to the keyword 'cs1 config' which is used to supress the normal error. Error is suppressed because it is to be expected that some citations in an article will have the same or fewer names that the limit specified in {{cs1 config}}. ]] local function get_display_names (max, count, list_name, etal, param) if utilities.is_set (max) then if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings max = count + 1; -- number of authors + 1 so display all author name plus et al. etal = true; -- overrides value set by extract_names() elseif max:match ('^%d+$') then -- if is a string of numbers max = tonumber (max); -- make it a number if (max >= count) and ('cs1 config' ~= param) then -- error when local |display-xxxxors= value greater than or equal to number of names; not an error when using global setting utilities.set_message ('err_disp_name', {param, max}); -- add error message max = nil; end else -- not a valid keyword or number utilities.set_message ('err_disp_name', {param, max}); -- add error message max = nil; -- unset; as if |display-xxxxors= had not been set end end return max, etal; end --[[----------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >--------------- Adds error if |page=, |pages=, |quote-page=, |quote-pages= has what appears to be some form of p. or pp. abbreviation in the first characters of the parameter content. check page for extraneous p, p., pp, pp., pg, pg. at start of parameter value: good pattern: '^P[^%.P%l]' matches when page begins PX or P# but not Px where x and X are letters and # is a digit bad pattern: '^[Pp][PpGg]' matches when page begins pp, pP, Pp, PP, pg, pG, Pg, PG ]] local function extra_text_in_page_check (val, name) if not val:match (cfg.vol_iss_pg_patterns.good_ppattern) then for _, pattern in ipairs (cfg.vol_iss_pg_patterns.bad_ppatterns) do -- spin through the selected sequence table of patterns if val:match (pattern) then -- when a match, error so utilities.set_message ('err_extra_text_pages', name); -- add error message return; -- and done end end end end --[[--------------------------< E X T R A _ T E X T _ I N _ V O L _ I S S _ C H E C K >------------------------ Adds error if |volume= or |issue= has what appears to be some form of redundant 'type' indicator. Applies to both; this function looks for issue text in both |issue= and |volume= and looks for volume-like text in |voluem= and |issue=. For |volume=: 'V.', or 'Vol.' (with or without the dot) abbreviations or 'Volume' in the first characters of the parameter content (all case insensitive). 'V' and 'v' (without the dot) are presumed to be roman numerals so are allowed. For |issue=: 'No.', 'I.', 'Iss.' (with or without the dot) abbreviations, or 'Issue' in the first characters of the parameter content (all case insensitive); numero styling: 'n°' with degree sign U+00B0, and № precomposed numero sign U+2116. Single character values ('v', 'i', 'n') allowed when not followed by separator character ('.', ':', '=', or whitespace character) – param values are trimmed of whitespace by MediaWiki before delivered to the module. <val> is |volume= or |issue= parameter value <name> is |volume= or |issue= parameter name for error message <selector> is 'v' for |volume=, 'i' for |issue= sets error message on failure; returns nothing ]] local function extra_text_in_vol_iss_check (val, name, selector) if not utilities.is_set (val) then return; end local handler = 'v' == selector and 'err_extra_text_volume' or 'err_extra_text_issue'; local accept_val; val, accept_val = utilities.has_accept_as_written (val); --if accept_val then -- if uncomment this, |volume=((vol. 1)) suppresses error -- return; --end --val = mw.text.unstripNoWiki (val); -- if uncomment this, |volume=<nowiki>vol. 1</nowiki> shows error val = val:lower(); -- force parameter value to lower case for _, pattern in ipairs (cfg.vol_iss_pg_patterns.vi_patterns_t) do -- spin through the sequence table of patterns if val:match (pattern) then -- when a match, error so utilities.set_message (handler, name); -- add error message return; -- and done end end end --[=[-------------------------< G E T _ V _ N A M E _ T A B L E >---------------------------------------------- split apart a |vauthors= or |veditors= parameter. This function allows for corporate names, wrapped in doubled parentheses to also have commas; in the old version of the code, the doubled parentheses were included in the rendered citation and in the metadata. Individual author names may be wikilinked |vauthors=Jones AB, [[E. B. White|White EB]], ((Black, Brown, and Co.)) ]=] local function get_v_name_table (vparam, output_table, output_link_table) local _, accept = utilities.has_accept_as_written (vparam); if accept then utilities.add_prop_cat ('vanc-accept'); -- add properties category end local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas local wl_type, label, link; -- wl_type not used here; just a placeholder local i = 1; while name_table[i] do if name_table[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of corporate with one or more commas; this segment has the opening doubled parentheses local name = name_table[i]; i = i + 1; -- bump indexer to next segment while name_table[i] do name = name .. ', ' .. name_table[i]; -- concatenate with previous segments if name_table[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parentheses break; -- and done reassembling so end i = i + 1; -- bump indexer end table.insert (output_table, name); -- and add corporate name to the output table table.insert (output_link_table, ''); -- no wikilink else wl_type, label, link = utilities.is_wikilink (name_table[i]); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] table.insert (output_table, label); -- add this name if 1 == wl_type then table.insert (output_link_table, label); -- simple wikilink [[D]] else table.insert (output_link_table, link); -- no wikilink or [[L|D]]; add this link if there is one, else empty string end end i = i + 1; end return output_table; end --[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >-------------------------------- This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and |xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does. Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance tests, are wrapped in doubled parentheses ((corporate name)) to suppress the format tests. Supports generational suffixes Jr, 2nd, 3rd, 4th–6th. This function sets the Vancouver error when a required comma is missing and when there is a space between an author's initials. ]] local function parse_vauthors_veditors (args, vparam, list_name) local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn= local v_name_table = {}; local v_link_table = {}; -- when name is wikilinked, targets go in this table local etal = false; -- return value set to true when we find some form of et al. vauthors parameter local last, first, link, mask, suffix; local corporate = false; vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period) v_name_table = get_v_name_table (vparam, v_name_table, v_link_table); -- names are separated by commas for i, v_name in ipairs(v_name_table) do first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor local accept_name; v_name, accept_name = utilities.has_accept_as_written (v_name); -- remove accept-this-as-written markup when it wraps all of <v_name> if accept_name then last = v_name; corporate = true; -- flag used in list_people() elseif string.find(v_name, "%s") then if v_name:find('[;%.]') then -- look for commonly occurring punctuation characters; add_vanc_error (cfg.err_msg_supl.punctuation, i); end local lastfirstTable = {} lastfirstTable = mw.text.split(v_name, "%s+") first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be initials or generational suffix if not mw.ustring.match (first, '^%u+$') then -- mw.ustring here so that later we will catch non-Latin characters suffix = first; -- not initials so assume that whatever we got is a generational suffix first = table.remove(lastfirstTable); -- get what should be the initials from the table end last = table.concat(lastfirstTable, ' ') -- returns a string that is the concatenation of all other names that are not initials and generational suffix if not utilities.is_set (last) then first = ''; -- unset last = v_name; -- last empty because something wrong with first add_vanc_error (cfg.err_msg_supl.name, i); end if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then add_vanc_error (cfg.err_msg_supl['missing comma'], i); -- matches last II last; the case when a comma is missing end if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test add_vanc_error (cfg.err_msg_supl.initials, i); -- matches a space between two initials end else last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this? end if utilities.is_set (first) then if not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else add_vanc_error (cfg.err_msg_supl.initials, i); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials end is_good_vanc_name (last, first, suffix, i); -- check first and last before restoring the suffix which may have a non-Latin digit if utilities.is_set (suffix) then first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials suffix = ''; -- unset so we don't add this suffix to all subsequent names end else if not corporate then is_good_vanc_name (last, '', nil, i); end end link = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ) or v_link_table[i]; mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); names[i] = {last = last, first = first, link = link, mask = mask, corporate = corporate}; -- add this assembled name to our names list end return names, etal; -- all done, return our list of names end --[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------ Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or select one of |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list. Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest; |editorn= (and aliases) highest and |veditors= lowest (support for |editors= withdrawn) When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better way to do this, I just haven't discovered what that way is. Emits an error message when more than one xxxxor name source is provided. In this function, vxxxxors = vauthors or veditors; xxxxors = authors as appropriate. ]] local function select_author_editor_source (vxxxxors, xxxxors, args, list_name) local lastfirst = false; if utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice in case we have a |first1= without a |last1=; this ... utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors= utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then lastfirst = true; end if (utilities.is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions (utilities.is_set (vxxxxors) and utilities.is_set (xxxxors)) or (true == lastfirst and utilities.is_set (xxxxors)) then utilities.set_message ('err_redundant_parameters', utilities.substitute (cfg.special_case_translation.name_list_params, ('AuthorList' == list_name) and cfg.special_case_translation.author or cfg.special_case_translation.editor)); -- add error message end if true == lastfirst then return 1 end; -- return a number indicating which author name source to use if utilities.is_set (vxxxxors) then return 2 end; if utilities.is_set (xxxxors) then return 3 end; return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last end --[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------ This function is used to validate a parameter's assigned value for those parameters that have only a limited number of allowable values (yes, y, true, live, dead, etc.). When the parameter value has not been assigned a value (missing or empty in the source template) the function returns the value specified by ret_val. If the parameter value is one of the list of allowed values returns the translated value; else, emits an error message and returns the value specified by ret_val. TODO: explain <invert> ]] local function is_valid_parameter_value (value, name, possible, ret_val, invert) if not utilities.is_set (value) then return ret_val; -- an empty parameter is ok end if (not invert and utilities.in_array (value, possible)) then -- normal; <value> is in <possible> table return cfg.keywords_xlate[value]; -- return translation of parameter keyword elseif invert and not utilities.in_array (value, possible) then -- invert; <value> is not in <possible> table return value; -- return <value> as it is else utilities.set_message ('err_invalid_param_val', {name, value}); -- not an allowed value so add error message return ret_val; end end --[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >---------------------------------------- This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space when the last character is not a sepc character or when the last three characters are not sepc followed by two closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a single space character. ]] local function terminate_name_list (name_list, sepc) if (string.sub (name_list, -3, -1) == sepc .. '. ') then -- if already properly terminated return name_list; -- just return the name list elseif (string.sub (name_list, -1, -1) == sepc) or (string.sub (name_list, -3, -1) == sepc .. ']]') then -- if last name in list ends with sepc char return name_list .. " "; -- don't add another else return name_list .. sepc .. ' '; -- otherwise terminate the name list end end --[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >----------------------------------------- returns the concatenation of the formatted volume and issue (or journal article number) parameters as a single string; or formatted volume or formatted issue, or an empty string if neither are set. ]] local function format_volume_issue (volume, issue, article, cite_class, origin, sepc, lower) if not utilities.is_set (volume) and not utilities.is_set (issue) and not utilities.is_set (article) then return ''; end -- same condition as in format_pages_sheets() local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin); local is_numeric_vol = volume and (volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$')); -- is only uppercase roman numerals or only digits? local is_long_vol = volume and (4 < mw.ustring.len(volume)); -- is |volume= value longer than 4 characters? if volume and (not is_numeric_vol and is_long_vol) then -- when not all digits or Roman numerals, is |volume= longer than 4 characters? utilities.add_prop_cat ('long-vol'); -- yes, add properties cat end if is_journal then -- journal-style formatting local vol = ''; if utilities.is_set (volume) then if is_numeric_vol then -- |volume= value all digits or all uppercase Roman numerals? vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, volume}); -- render in bold face elseif is_long_vol then -- not all digits or Roman numerals; longer than 4 characters? vol = utilities.substitute (cfg.messages['j-vol'], {sepc, utilities.hyphen_to_dash (volume)}); -- not bold else -- four or fewer characters vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, utilities.hyphen_to_dash (volume)}); -- bold end end vol = vol .. (utilities.is_set (issue) and utilities.substitute (cfg.messages['j-issue'], issue) or '') vol = vol .. (utilities.is_set (article) and utilities.substitute (cfg.messages['j-article-num'], article) or '') return vol; end if 'podcast' == cite_class and utilities.is_set (issue) then return wrap_msg ('issue', {sepc, issue}, lower); end if 'conference' == cite_class and utilities.is_set (article) then -- |article-number= supported only in journal and conference cites if utilities.is_set (volume) and utilities.is_set (article) then -- both volume and article number return wrap_msg ('vol-art', {sepc, utilities.hyphen_to_dash (volume), article}, lower); elseif utilities.is_set (article) then -- article number alone; when volume alone, handled below return wrap_msg ('art', {sepc, article}, lower); end end -- all other types of citation if utilities.is_set (volume) and utilities.is_set (issue) then return wrap_msg ('vol-no', {sepc, utilities.hyphen_to_dash (volume), issue}, lower); elseif utilities.is_set (volume) then return wrap_msg ('vol', {sepc, utilities.hyphen_to_dash (volume)}, lower); else return wrap_msg ('issue', {sepc, issue}, lower); end end --[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >----------------------------------------- adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings. The return order is: page, pages, sheet, sheets Singular has priority over plural when both are provided. ]] local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower) if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators if utilities.is_set (sheet) then if 'journal' == origin then return '', '', wrap_msg ('j-sheet', sheet, lower), ''; else return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), ''; end elseif utilities.is_set (sheets) then if 'journal' == origin then return '', '', '', wrap_msg ('j-sheets', sheets, lower); else return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower); end end end local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin); if utilities.is_set (page) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], page), '', '', ''; elseif not nopp then return utilities.substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', ''; else return utilities.substitute (cfg.messages['nopp'], {sepc, page}), '', '', ''; end elseif utilities.is_set (pages) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], pages), '', '', ''; elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number return '', utilities.substitute (cfg.messages['p-prefix'], {sepc, pages}), '', ''; elseif not nopp then return '', utilities.substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', ''; else return '', utilities.substitute (cfg.messages['nopp'], {sepc, pages}), '', ''; end end return '', '', '', ''; -- return empty strings end --[[--------------------------< I N S O U R C E _ L O C _ G E T >---------------------------------------------- returns one of the in-source locators: page, pages, or at. If any of these are interwiki links to Wikisource, returns the label portion of the interwiki-link as plain text for use in COinS. This COinS thing is done because here we convert an interwiki-link to an external link and add an icon span around that; get_coins_pages() doesn't know about the span. TODO: should it? TODO: add support for sheet and sheets?; streamline; TODO: make it so that this function returns only one of the three as the single in-source (the return value assigned to a new name)? ]] local function insource_loc_get (page, page_orig, pages, pages_orig, at) local ws_url, ws_label, coins_pages, L; -- for Wikisource interwiki-links; TODO: this corrupts page metadata (span remains in place after cleanup; fix there?) if utilities.is_set (page) then if utilities.is_set (pages) or utilities.is_set (at) then pages = ''; -- unset the others at = ''; end extra_text_in_page_check (page, page_orig); -- emit error message when |page= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (page); -- make ws URL from |page= interwiki link; link portion L becomes tooltip label if ws_url then page = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in page'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? page = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, page}); coins_pages = ws_label; end elseif utilities.is_set (pages) then if utilities.is_set (at) then at = ''; -- unset end extra_text_in_page_check (pages, pages_orig); -- emit error message when |page= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (pages); -- make ws URL from |pages= interwiki link; link portion L becomes tooltip label if ws_url then pages = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in pages'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? pages = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, pages}); coins_pages = ws_label; end elseif utilities.is_set (at) then ws_url, ws_label, L = wikisource_url_make (at); -- make ws URL from |at= interwiki link; link portion L becomes tooltip label if ws_url then at = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in at'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? at = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, at}); coins_pages = ws_label; end end return page, pages, at, coins_pages; end --[[--------------------------< I S _ U N I Q U E _ A R C H I V E _ U R L >------------------------------------ add error message when |archive-url= value is same as |url= or chapter-url= (or alias...) value ]] local function is_unique_archive_url (archive, url, c_url, source, date) if utilities.is_set (archive) then if archive == url or archive == c_url then utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)}); -- add error message return '', ''; -- unset |archive-url= and |archive-date= because same as |url= or |chapter-url= end end return archive, date; end --[=[-------------------------< A R C H I V E _ U R L _ C H E C K >-------------------------------------------- Check archive.org URLs to make sure they at least look like they are pointing at valid archives and not to the save snapshot URL or to calendar pages. When the archive URL is 'https://web.archive.org/save/' (or http://...) archive.org saves a snapshot of the target page in the URL. That is something that Wikipedia should not allow unwitting readers to do. When the archive.org URL does not have a complete timestamp, archive.org chooses a snapshot according to its own algorithm or provides a calendar 'search' result. [[WP:ELNO]] discourages links to search results. This function looks at the value assigned to |archive-url= and returns empty strings for |archive-url= and |archive-date= and an error message when: |archive-url= holds an archive.org save command URL |archive-url= is an archive.org URL that does not have a complete timestamp (YYYYMMDDhhmmss 14 digits) in the correct place otherwise returns |archive-url= and |archive-date= There are two mostly compatible archive.org URLs: //web.archive.org/<timestamp>... -- the old form //web.archive.org/web/<timestamp>... -- the new form The old form does not support or map to the new form when it contains a display flag. There are four identified flags ('id_', 'js_', 'cs_', 'im_') but since archive.org ignores others following the same form (two letters and an underscore) we don't check for these specific flags but we do check the form. This function supports a preview mode. When the article is rendered in preview mode, this function may return a modified archive URL: for save command errors, return undated wildcard (/*/) for timestamp errors when the timestamp has a wildcard, return the URL unmodified for timestamp errors when the timestamp does not have a wildcard, return with timestamp limited to six digits plus wildcard (/yyyymm*/) A secondary function is to return an archive-url timestamp from those archive urls that have them. The timestamp is used by validation.archive_date_check() to see if the value in |archive-date= matches the timestamp in the archive url. ]=] local function archive_url_check (url, date) local err_msg = ''; -- start with the error message empty local path, timestamp, flag; -- portions of the archive.org URL local function is_ts_date_valid (timestamp, origin_date) -- local function to validate archive url taimestamp date; time ignored local y, m, d = timestamp:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- split into parts if y and validation.is_valid_date (y, m, d) and (tonumber (y) >= 1996) then return true, tonumber (y) >= origin_date; -- <origin_date> is 1996 for archive.org end end if (not url:match('//web%.archive%.org/')) and (not url:match('//liveweb%.archive%.org/')) then -- also deprecated liveweb Wayback machine URL return url, date; -- not an archive.org archive, return ArchiveURL and ArchiveDate end if url:match('//web%.archive%.org/save/') then -- if a save command URL, we don't want to allow saving of the target page err_msg = cfg.err_msg_supl.save; url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL elseif url:match('//liveweb%.archive%.org/') then err_msg = cfg.err_msg_supl.liveweb; else path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the URL parts for evaluation if not path then -- malformed in some way; pattern did not match err_msg = cfg.err_msg_supl.timestamp; elseif 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here err_msg = cfg.err_msg_supl.timestamp; if '*' ~= flag then local replacement = timestamp:match ('^%d%d%d%d%d%d') or timestamp:match ('^%d%d%d%d'); -- get the first 6 (YYYYMM) or first 4 digits (YYYY) if replacement then -- nil if there aren't at least 4 digits (year) replacement = replacement .. string.rep ('0', 14 - replacement:len()); -- year or yearmo (4 or 6 digits) zero-fill to make 14-digit timestamp url=url:gsub ('(//web%.archive%.org/[^%d]*)%d[^/]*', '%1' .. replacement .. '*', 1) -- for preview, modify ts to 14 digits plus splat for calendar display end end elseif not is_ts_date_valid (timestamp, 1996) then -- is ymd portion of timestamp a valid date? err_msg = cfg.err_msg_supl.timestamp; timestamp = nil; -- unset because invalid elseif utilities.is_set (path) and 'web/' ~= path then -- older archive URLs do not have the extra 'web/' path element err_msg = cfg.err_msg_supl.path; elseif utilities.is_set (flag) and not utilities.is_set (path) then -- flag not allowed with the old form URL (without the 'web/' path element) err_msg = cfg.err_msg_supl.flag; elseif utilities.is_set (flag) and not flag:match ('%a%a_') then -- flag if present must be two alpha characters and underscore (requires 'web/' path element) err_msg = cfg.err_msg_supl.flag; else return url, date, timestamp; -- return ArchiveURL, ArchiveDate, and timestamp from |archive-url= end end -- if here, something not right so utilities.set_message ('err_archive_url', {err_msg}); -- add error message and if is_preview_mode then return url, date, timestamp; -- preview mode so return ArchiveURL, ArchiveDate, and timestamp from |archive-url= else return '', ''; -- return empty strings for ArchiveURL and ArchiveDate end end --[[--------------------------< P L A C E _ C H E C K >-------------------------------------------------------- check |place=, |publication-place=, |location= to see if these params include digits. This function added because many editors misuse location to specify the in-source location (|page(s)= and |at= are supposed to do that) returns the original parameter value without modification; added maint cat when parameter value contains digits ]] local function place_check (param_val) if not utilities.is_set (param_val) then -- parameter empty or omitted return param_val; -- return that empty state end if mw.ustring.find (param_val, '%d') then -- not empty, are there digits in the parameter value utilities.set_message ('maint_location'); -- yep, add maint cat end return param_val; -- and done end --[[--------------------------< I S _ A R C H I V E D _ C O P Y >---------------------------------------------- compares |title= to 'Archived copy' (placeholder added by bots that can't find proper title); if matches, return true; nil else ]] local function is_archived_copy (title) title = mw.ustring.lower(title); -- switch title to lower case if title:find (cfg.special_case_translation.archived_copy.en) then -- if title is 'Archived copy' return true; elseif cfg.special_case_translation.archived_copy['local'] then if mw.ustring.find (title, cfg.special_case_translation.archived_copy['local']) then -- mw.ustring() because might not be Latin script return true; end end end --[[--------------------------< D I S P L A Y _ N A M E S _ S E L E C T >-------------------------------------- for any of the |display-authors=, |display-editors=, etc parameters, select either the local or global setting. When both are present, look at <local_display_names> value. When the value is some sort of 'et al.'string, special handling is required. When {{cs1 config}} has |display-<namelist>= AND this template has |display-<namelist>=etal AND: the number of names specified by <number_of_names> is: greater than the number specified in the global |display-<namelist>= parameter (<global_display_names>) use global |display-<namelist>= parameter value set overridden maint category less than or equal to the number specified in the global |display-<namelist>= parameter use local |display-<namelist>= parameter value The purpose of this function is to prevent categorizing a template that has fewer names than the global setting to keep the etal annotation specified by <local_display_names>. ]] local function display_names_select (global_display_names, local_display_names, param_name, number_of_names, test) if global_display_names and utilities.is_set (local_display_names) then -- when both if 'etal' == local_display_names:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings number_of_names = tonumber (number_of_names); -- convert these to numbers for comparison local global_display_names_num = tonumber (global_display_names); -- <global_display_names> not set when parameter value is not digits if number_of_names > global_display_names_num then -- template has more names than global config allows to be displayed? utilities.set_message ('maint_overridden_setting'); -- set a maint message because global is overriding local |display-<namelist>=etal return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) else return local_display_names, param_name; -- return local because fewer names so let <local_display_names> control end end -- here when <global_display_names> and <local_display_names> both numbers; <global_display_names> controls utilities.set_message ('maint_overridden_setting'); -- set a maint message return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) end -- here when only one of <global_display_names> or <local_display_names> set if global_display_names then return global_display_names, 'cs1 config'; -- return global with spoof parameter name (for get_display_names()) else return local_display_names, param_name; -- return local end end --[[--------------------------< M O D E _ S E T >-------------------------------------------------------------- fetch global mode setting from {{cs1 config}} (if present) or from |mode= (if present); global setting overrides local |mode= parameter value. When both are present, emit maintenance message ]] local function mode_set (Mode, Mode_origin) local mode; if cfg.global_cs1_config_t['Mode'] then -- global setting in {{cs1 config}}; nil when empty or assigned value invalid mode = is_valid_parameter_value (cfg.global_cs1_config_t['Mode'], 'cs1 config: mode', cfg.keywords_lists['mode'], ''); -- error messaging 'param' here is a hoax else mode = is_valid_parameter_value (Mode, Mode_origin, cfg.keywords_lists['mode'], ''); end if cfg.global_cs1_config_t['Mode'] and utilities.is_set (Mode) then -- when template has |mode=<something> which global setting has overridden utilities.set_message ('maint_overridden_setting'); -- set a maint message end return mode; end --[[--------------------------< Q U O T E _ M A K E >---------------------------------------------------------- create quotation from |quote=, |trans-quote=, and/or script-quote= with or without |quote-page= or |quote-pages= when any of those three quote parameters are set, this function unsets <PostScript>. When none of those parameters are set, |quote-page= and |quote-pages= are unset to nil so that they are not included in the template's metadata ]] local function quote_make (quote, trans_quote, script_quote, quote_page, quote_pages, nopp, sepc, postscript) if utilities.is_set (quote) or utilities.is_set (trans_quote) or utilities.is_set (script_quote) then if utilities.is_set (quote) then if quote:sub(1, 1) == '"' and quote:sub(-1, -1) == '"' then -- if first and last characters of quote are quote marks quote = quote:sub(2, -2); -- strip them off end end quote = kern_quotes (quote); -- kern if needed quote = utilities.wrap_style ('quoted-text', quote ); -- wrap in <q>...</q> tags if utilities.is_set (script_quote) then quote = script_concatenate (quote, script_quote, 'script-quote'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after quote is wrapped end if utilities.is_set (trans_quote) then if trans_quote:sub(1, 1) == '"' and trans_quote:sub(-1, -1) == '"' then -- if first and last characters of |trans-quote are quote marks trans_quote = trans_quote:sub(2, -2); -- strip them off end quote = quote .. " " .. utilities.wrap_style ('trans-quoted-title', trans_quote ); end if utilities.is_set (quote_page) or utilities.is_set (quote_pages) then -- add page prefix local quote_prefix = ''; if utilities.is_set (quote_page) then extra_text_in_page_check (quote_page, 'quote-page'); -- add to maint cat if |quote-page= value begins with what looks like p., pp., etc. if not nopp then quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, quote_page}), '', '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, quote_page}), '', '', ''; end elseif utilities.is_set (quote_pages) then extra_text_in_page_check (quote_pages, 'quote-pages'); -- add to maint cat if |quote-pages= value begins with what looks like p., pp., etc. if tonumber(quote_pages) ~= nil and not nopp then -- if only digits, assume single page quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, quote_pages}), '', ''; elseif not nopp then quote_prefix = utilities.substitute (cfg.messages['pp-prefix'], {sepc, quote_pages}), '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, quote_pages}), '', ''; end end quote = quote_prefix .. ": " .. quote; else quote = sepc .. " " .. quote; end postscript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set elseif utilities.is_set (quote_page) or utilities.is_set (quote_pages) then quote_page = nil; -- unset; these require |quote=; TODO: error message? quote_pages = nil; end return quote, quote_page, quote_pages, postscript; end --[[--------------------------< C H E C K _ P U B L I S H E R _ N A M E >-------------------------------------- look for variations of '<text>: <text>' that might be '<location>: <publisher>' in |publisher= parameter value. when found, emit a maintenance message; return nil else <publisher> is the value assigned to |publisher= or |institution= ]] local function check_publisher_name (publisher) local patterns_t = { '^[%w%s]+%s*:%s*[%w%s]+$', -- plain text <location>: <publisher> '^%[+[%w%s:|]+%]+%s*:%s*[%w%s]+$', -- partially wikilinked [[<location>]]: <publisher> '^[%w%s]+%s*:%s*%[+[%w%s:|]+%]+$', -- partially wikilinked <location>: [[<publisher>]] '^%[+[%w%s:|]+%]+%s*:%s*%[+[%w%s:|]+%]+$', -- wikilinked [[<location>]]: [[<publisher>]] } for _, pattern in ipairs (patterns_t) do -- spin through the patterns_t sequence if mw.ustring.match (publisher, pattern) then -- does this pattern match? utilities.set_message ('maint_publisher_location'); -- set a maint message return; -- and done end end end --[[--------------------------< I S _ P A G E _ A R T _ N U M >------------------------------------------------ compare the trailing (rightmost) characters of the |doi= value against the whole value assigned to |page(s)=. return boolean true when: |page(s)= has exactly 8 digits and a dot between the fourth and fifth digits matches the trailing 9 characters of the |doi= value: |page=12345678 → |page=1234.5678 matches |doi=10.xxxx/yyyy1234.5678 |page(s)= is 5 or more characters and matches |doi= values's trailing characters |page(s)= begins with a lowercase 'e' and |page(s)= without the 'e' matches |doi= values's trailing characters: |page=e12345 → |page=12345 matches |doi=10.xxxx/yyyy12345 |page(s)= begins with a uppercase 'CD' followed by (typically) six digits matches |doi= values that ends with 'CDxxxxxx.pubx' (where 'x' is any single digit) return nil when |page(s)= values: are ranges separated by underscore, hyphen, emdash, endash, figure dash, or minus character are comma- or semicolon-separated lists of pages have external urls (has text 'http') are digit-only values less than 10000 do not match |doi= values's trailing characters ]] local function is_page_art_num (page, doi) if not (utilities.is_set (page) and utilities.is_set (doi)) then -- both required return; -- abandon; nothing to do end if page:match ('[,;_−–—‒%-]') then -- when |page(s)= might be a page range or a separated list of pages return; -- abandon end page = page:lower(); -- because doi names are case insensitive doi = doi:lower(); -- force these to lowercase for testing if page:match ('http') then -- when |page(s)= appears to hold a url return; -- abandon end if tonumber (page) then -- is |page(s)= digits only if 10000 > tonumber (page) then -- when |page(s)= less than 10000 return; -- abandon end if doi:match (page .. '$') then -- digits only page number match the last digits in |doi=? return true; end if 8 == page:len() then -- special case when |page(s)= is exactly 8 digits local dot_page = page:gsub ('(%d%d%d%d)(%d%d%d%d)', '%1.%2'); -- make a |page=xxxx.yyyy version commonly used in |doi= if doi:match (dot_page .. '$') then -- 8-digit dotted page number match the last characters in |doi=? return true; end end else -- here when |page(s)= is alpha-numeric if 4 < page:len() then -- when |page(s)= is five or more characters if doi:match (page .. '$') then -- alpha-numeric page match the last characters in |doi=? return true; end local epage = page:match ('^e([%w]+)$'); -- if first character of |page= is 'e', remove it if epage and doi:match (epage .. '$') then -- page number match the last characters in |doi=? return true; end local cdpage = page:match ('^cd%d+$'); -- if first characters of |page= are 'CD' and last characters are digits (typically 6 digits) if cdpage and doi:match (cdpage .. '%.pub%d$') then -- page number matches doi 'CDxxxxxx.pubx' where 'x' is a digit return true; end end end end --[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------ This is the main function doing the majority of the citation formatting. ]] local function citation0( config, args ) --[[ Load Input Parameters The argument_wrapper facilitates the mapping of multiple aliases to single internal variable. ]] local A = argument_wrapper ( args ); local i -- Pick out the relevant fields from the arguments. Different citation templates -- define different field names for the same underlying things. local author_etal; local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors= local Authors; local NameListStyle; if cfg.global_cs1_config_t['NameListStyle'] then -- global setting in {{cs1 config}} overrides local |name-list-style= parameter value; nil when empty or assigned value invalid NameListStyle = is_valid_parameter_value (cfg.global_cs1_config_t['NameListStyle'], 'cs1 config: name-list-style', cfg.keywords_lists['name-list-style'], ''); -- error messaging 'param' here is a hoax else NameListStyle = is_valid_parameter_value (A['NameListStyle'], A:ORIGIN('NameListStyle'), cfg.keywords_lists['name-list-style'], ''); end if cfg.global_cs1_config_t['NameListStyle'] and utilities.is_set (A['NameListStyle']) then -- when template has |name-list-style=<something> which global setting has overridden utilities.set_message ('maint_overridden_setting'); -- set a maint message end local Collaboration = A['Collaboration']; do -- to limit scope of selected local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList'); if 1 == selected then a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be a, author_etal = parse_vauthors_veditors (args, A['Vauthors'], 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn= elseif 3 == selected then Authors = A['Authors']; -- use content of |people= or |credits=; |authors= is deprecated; TODO: constrain |people= and |credits= to cite av media, episode, serial? end if utilities.is_set (Collaboration) then author_etal = true; -- so that |display-authors=etal not required end end local editor_etal; local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors= do -- to limit scope of selected local selected = select_author_editor_source (A['Veditors'], nil, args, 'EditorList'); -- support for |editors= withdrawn if 1 == selected then e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn= end end local Chapter = A['Chapter']; -- done here so that we have access to |contribution= from |chapter= and |script-chapter= aliases local Chapter_origin = A:ORIGIN ('Chapter'); local ScriptChapter = A['ScriptChapter']; local ScriptChapter_origin = A:ORIGIN ('ScriptChapter'); local Contribution; -- because contribution is required for contributor(s) if 'contribution' == Chapter_origin then -- is there a |contribution= parameter? Contribution = Chapter; -- get the name of the contribution elseif 'script-contribution' == ScriptChapter_origin then -- no, so is there a |script-contribution= parameter? Contribution = ScriptChapter; -- get the name of the contribution end local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (A['Periodical']) then -- |contributor= and |contribution= only supported in book cites c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn= if 0 < #c then if not utilities.is_set (Contribution) then -- |contributor= requires |contribution= utilities.set_message ('err_contributor_missing_required_param', 'contribution'); -- add missing contribution error message c = {}; -- blank the contributors' table; it is used as a flag later end if 0 == #a then -- |contributor= requires |author= utilities.set_message ('err_contributor_missing_required_param', 'author'); -- add missing author error message c = {}; -- blank the contributors' table; it is used as a flag later end end else -- if not a book cite if utilities.select_one (args, cfg.aliases['ContributorList-Last'], 'err_redundant_parameters', 1 ) then -- are there contributor name list parameters? utilities.set_message ('err_contributor_ignored'); -- add contributor ignored error message end Contribution = nil; -- unset end local Title = A['Title']; local TitleLink = A['TitleLink']; local auto_select = ''; -- default is auto local accept_link; TitleLink, accept_link = utilities.has_accept_as_written (TitleLink, true); -- test for accept-this-as-written markup if (not accept_link) and utilities.in_array (TitleLink, {'none', 'pmc', 'doi'}) then -- check for special keywords auto_select = TitleLink; -- remember selection for later TitleLink = ''; -- treat as if |title-link= would have been empty end TitleLink = link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wiki-markup in |title-link= or wiki-markup in |title= when |title-link= is set local Section = ''; -- {{cite map}} only; preset to empty string for concatenation if not used if 'map' == config.CitationClass and 'section' == Chapter_origin then Section = A['Chapter']; -- get |section= from |chapter= alias list; |chapter= and the other aliases not supported in {{cite map}} Chapter = ''; -- unset for now; will be reset later from |map= if present end local Periodical = A['Periodical']; local Periodical_origin = A:ORIGIN('Periodical'); local ScriptPeriodical = A['ScriptPeriodical']; local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical'); local TransPeriodical = A['TransPeriodical']; local TransPeriodical_origin = A:ORIGIN ('TransPeriodical'); if (utilities.in_array (config.CitationClass, {'book', 'encyclopaedia'}) and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical))) then local param; if utilities.is_set (Periodical) then -- get a parameter name from one of these periodical related meta-parameters Periodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = Periodical_origin -- get parameter name for error messaging elseif utilities.is_set (TransPeriodical) then TransPeriodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = TransPeriodical_origin; -- get parameter name for error messaging elseif utilities.is_set (ScriptPeriodical) then ScriptPeriodical = ''; -- unset because not valid {{cite book}} or {{cite encyclopedia}} parameters param = ScriptPeriodical_origin; -- get parameter name for error messaging end if utilities.is_set (param) then -- if we found one utilities.set_message ('err_periodical_ignored', {param}); -- emit an error message end end if utilities.is_set (Periodical) then local i; Periodical, i = utilities.strip_apostrophe_markup (Periodical); -- strip apostrophe markup so that metadata isn't contaminated if i then -- non-zero when markup was stripped so emit an error message utilities.set_message ('err_apostrophe_markup', {Periodical_origin}); end end if 'mailinglist' == config.CitationClass then -- special case for {{cite mailing list}} if utilities.is_set (Periodical) and utilities.is_set (A ['MailingList']) then -- both set emit an error TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', Periodical_origin) .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'mailinglist')}); end Periodical = A ['MailingList']; -- error or no, set Periodical to |mailinglist= value because this template is {{cite mailing list}} Periodical_origin = A:ORIGIN('MailingList'); end -- web and news not tested for now because of -- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors? if not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter -- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message if p[config.CitationClass] then utilities.set_message ('err_missing_periodical', {config.CitationClass, p[config.CitationClass]}); end end local Volume; if 'citation' == config.CitationClass then if utilities.is_set (Periodical) then if not utilities.in_array (Periodical_origin, cfg.citation_no_volume_t) then -- {{citation}} does not render |volume= when these parameters are used Volume = A['Volume']; -- but does for all other 'periodicals' end elseif utilities.is_set (ScriptPeriodical) then if 'script-website' ~= ScriptPeriodical_origin then -- {{citation}} does not render volume for |script-website= Volume = A['Volume']; -- but does for all other 'periodicals' end else Volume = A['Volume']; -- and does for non-'periodical' cites end elseif utilities.in_array (config.CitationClass, cfg.templates_using_volume) then -- render |volume= for cs1 according to the configuration settings Volume = A['Volume']; end extra_text_in_vol_iss_check (Volume, A:ORIGIN ('Volume'), 'v'); local Issue; if 'citation' == config.CitationClass then if utilities.is_set (Periodical) and utilities.in_array (Periodical_origin, cfg.citation_issue_t) then -- {{citation}} may render |issue= when these parameters are used Issue = A['Issue']; end elseif utilities.in_array (config.CitationClass, cfg.templates_using_issue) then -- conference & map books do not support issue; {{citation}} listed here because included in settings table if not (utilities.in_array (config.CitationClass, {'conference', 'map', 'citation'}) and not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical))) then Issue = A['Issue']; end end local ArticleNumber; if utilities.in_array (config.CitationClass, {'journal', 'conference'}) or ('citation' == config.CitationClass and utilities.is_set (Periodical) and 'journal' == Periodical_origin) then ArticleNumber = A['ArticleNumber']; end extra_text_in_vol_iss_check (Issue, A:ORIGIN ('Issue'), 'i'); Issue = utilities.hyphen_to_dash (Issue); local Page; local Pages; local At; local QuotePage; local QuotePages; if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) then -- TODO: rewrite to emit ignored parameter error message? Page = A['Page']; Pages = utilities.hyphen_to_dash (A['Pages']); At = A['At']; QuotePage = A['QuotePage']; QuotePages = utilities.hyphen_to_dash (A['QuotePages']); end local NoPP = is_valid_parameter_value (A['NoPP'], A:ORIGIN('NoPP'), cfg.keywords_lists['yes_true_y'], nil); local Mode = mode_set (A['Mode'], A:ORIGIN('Mode')); -- separator character and postscript local sepc, PostScript = set_style (Mode:lower(), A['PostScript'], config.CitationClass); local Quote; Quote, QuotePage, QuotePages, PostScript = quote_make (A['Quote'], A['TransQuote'], A['ScriptQuote'], QuotePage, QuotePages, NoPP, sepc, PostScript); local Edition = A['Edition']; local PublicationPlace = place_check (A['PublicationPlace'], A:ORIGIN('PublicationPlace')); local Place = place_check (A['Place'], A:ORIGIN('Place')); local PublisherName = A['PublisherName']; local PublisherName_origin = A:ORIGIN('PublisherName'); if utilities.is_set (PublisherName) and (cfg.keywords_xlate['none'] ~= PublisherName) then local i = 0; PublisherName, i = utilities.strip_apostrophe_markup (PublisherName); -- strip apostrophe markup so that metadata isn't contaminated; publisher is never italicized if i and (0 < i) then -- non-zero when markup was stripped so emit an error message utilities.set_message ('err_apostrophe_markup', {PublisherName_origin}); end end if ('document' == config.CitationClass) and not utilities.is_set (PublisherName) then utilities.set_message ('err_missing_publisher', {config.CitationClass, 'publisher'}); end local Newsgroup = A['Newsgroup']; -- TODO: strip apostrophe markup? local Newsgroup_origin = A:ORIGIN('Newsgroup'); if 'newsgroup' == config.CitationClass then if utilities.is_set (PublisherName) and (cfg.keywords_xlate['none'] ~= PublisherName) then -- general use parameter |publisher= not allowed in cite newsgroup utilities.set_message ('err_parameter_ignored', {PublisherName_origin}); end PublisherName = nil; -- ensure that this parameter is unset for the time being; will be used again after COinS end if 'book' == config.CitationClass or 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and not utilities.is_set (Periodical)) then local accept; PublisherName, accept = utilities.has_accept_as_written (PublisherName); -- check for and remove accept-as-written markup from |publisher= wrapped if not accept then -- when no accept-as-written markup check_publisher_name (PublisherName); -- emit maint message when |publisher= might be prefixed with publisher's location end end local URL = A['URL']; -- TODO: better way to do this for URL, ChapterURL, and MapURL? local UrlAccess = is_valid_parameter_value (A['UrlAccess'], A:ORIGIN('UrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (URL) and utilities.is_set (UrlAccess) then UrlAccess = nil; utilities.set_message ('err_param_access_requires_param', 'url'); end local ChapterURL = A['ChapterURL']; local ChapterUrlAccess = is_valid_parameter_value (A['ChapterUrlAccess'], A:ORIGIN('ChapterUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (ChapterURL) and utilities.is_set (ChapterUrlAccess) then ChapterUrlAccess = nil; utilities.set_message ('err_param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')}); end local MapUrlAccess = is_valid_parameter_value (A['MapUrlAccess'], A:ORIGIN('MapUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (A['MapURL']) and utilities.is_set (MapUrlAccess) then MapUrlAccess = nil; utilities.set_message ('err_param_access_requires_param', {'map-url'}); end local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil); -- check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories if not utilities.is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page if cfg.uncategorized_namespaces[this_page.namespace] then -- is this page's namespace id one of the uncategorized namespace ids? no_tracking_cats = "true"; -- set no_tracking_cats end for _, v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns if this_page.text:match (v) then -- test page name against each pattern no_tracking_cats = "true"; -- set no_tracking_cats break; -- bail out if one is found end end end -- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it) utilities.select_one (args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'err_redundant_parameters'); -- this is a dummy call simply to get the error message and category local coins_pages; Page, Pages, At, coins_pages = insource_loc_get (Page, A:ORIGIN('Page'), Pages, A:ORIGIN('Pages'), At); if utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- both |publication-place= and |place= (|location=) allowed if different utilities.add_prop_cat ('location-test'); -- add property cat to evaluate how often PublicationPlace and Place are used together if PublicationPlace == Place then Place = ''; -- unset; don't need both if they are the same end elseif not utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- when only |place= (|location=) is set ... PublicationPlace = Place; -- promote |place= (|location=) to |publication-place end if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same local URL_origin = A:ORIGIN('URL'); -- get name of parameter that holds URL local ChapterURL_origin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL -- local ScriptChapter = A['ScriptChapter']; -- local ScriptChapter_origin = A:ORIGIN ('ScriptChapter'); local Format = A['Format']; local ChapterFormat = A['ChapterFormat']; local TransChapter = A['TransChapter']; local TransChapter_origin = A:ORIGIN ('TransChapter'); local TransTitle = A['TransTitle']; local ScriptTitle = A['ScriptTitle']; --[[ Parameter remapping for cite encyclopedia: When the citation has these parameters: |encyclopedia= and |title= then map |title= to |article= and |encyclopedia= to |title= for rendering |encyclopedia= and |article= then map |encyclopedia= to |title= for rendering |trans-title= maps to |trans-chapter= when |title= is re-mapped |url= maps to |chapter-url= when |title= is remapped All other combinations of |encyclopedia=, |title=, and |article= are not modified ]] local Encyclopedia = A['Encyclopedia']; -- used as a flag by this module and by ~/COinS local ScriptEncyclopedia = A['ScriptEncyclopedia']; local TransEncyclopedia = A['TransEncyclopedia']; if utilities.is_set (Encyclopedia) or utilities.is_set (ScriptEncyclopedia) then -- emit error message when Encyclopedia set but template is other than {{cite encyclopedia}} or {{citation}} if 'encyclopaedia' ~= config.CitationClass and 'citation' ~= config.CitationClass then if utilities.is_set (Encyclopedia) then utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('Encyclopedia')}); else utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('ScriptEncyclopedia')}); end Encyclopedia = nil; -- unset these because not supported by this template ScriptEncyclopedia = nil; TransEncyclopedia = nil; end elseif utilities.is_set (TransEncyclopedia) then utilities.set_message ('err_trans_missing_title', {'encyclopedia'}); end if ('encyclopaedia' == config.CitationClass) or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Periodical) and utilities.is_set (Encyclopedia) then -- when both parameters set emit an error message; {{citation}} only; Periodical not allowed in {{cite encyclopedia}} utilities.set_message ('err_periodical_ignored', {Periodical_origin}); end if utilities.is_set (Encyclopedia) or utilities.is_set (ScriptEncyclopedia) then Periodical = Encyclopedia; -- error or no, set Periodical to Encyclopedia for rendering; {{citation}} could (not legitimately) have both; use Encyclopedia Periodical_origin = A:ORIGIN ('Encyclopedia'); ScriptPeriodical = ScriptEncyclopedia; ScriptPeriodical_origin = A:ORIGIN ('ScriptEncyclopedia'); if utilities.is_set (Title) or utilities.is_set (ScriptTitle) then if not utilities.is_set (Chapter) then Chapter = Title; -- |encyclopedia= and |title= are set so map |title= params to |article= params for rendering ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle') TransChapter = TransTitle; ChapterURL = URL; ChapterURL_origin = URL_origin; ChapterUrlAccess = UrlAccess; ChapterFormat = Format; if not utilities.is_set (ChapterURL) and utilities.is_set (TitleLink) then Chapter = utilities.make_wikilink (TitleLink, Chapter); end Title = Periodical; -- now map |encyclopedia= params to |title= params for rendering ScriptTitle = ScriptPeriodical or ''; TransTitle = TransEncyclopedia or ''; Periodical = ''; -- redundant so unset ScriptPeriodical = ''; URL = ''; Format = ''; TitleLink = ''; end elseif utilities.is_set (Chapter) or utilities.is_set (ScriptChapter) then -- |title= not set Title = Periodical; -- |encyclopedia= set and |article= set so map |encyclopedia= to |title= for rendering ScriptTitle = ScriptPeriodical or ''; TransTitle = TransEncyclopedia or ''; Periodical = ''; -- redundant so unset ScriptPeriodical = ''; end end end -- special case for cite techreport. local ID = A['ID']; if (config.CitationClass == "techreport") then -- special case for cite techreport if utilities.is_set (A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue' if not utilities.is_set (ID) then -- can we use ID for the "number"? ID = A['Number']; -- yes, use it else -- ID has a value so emit error message utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'id') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'number')}); end end end -- Account for the oddity that is {{cite conference}}, before generation of COinS data. local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode local Conference = A['Conference']; local BookTitle = A['BookTitle']; local TransTitle_origin = A:ORIGIN ('TransTitle'); if 'conference' == config.CitationClass then if utilities.is_set (BookTitle) then Chapter = Title; Chapter_origin = 'title'; -- ChapterLink = TitleLink; -- |chapter-link= is deprecated ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = URL_origin; URL_origin = ''; ChapterFormat = Format; TransChapter = TransTitle; TransChapter_origin = TransTitle_origin; Title = BookTitle; Format = ''; -- TitleLink = ''; TransTitle = ''; URL = ''; end elseif 'speech' ~= config.CitationClass then Conference = ''; -- not cite conference or cite speech so make sure this is empty string end local cs2_lower = function (text) -- if mode is cs2, use lower case if (sepc ~= '.') then return text:lower(); end return text; end local use_lowercase = ( sepc == ',' ); -- controls capitalization of certain static text -- cite map oddities local Cartography = ""; local Scale = ""; local Sheet = A['Sheet'] or ''; local Sheets = A['Sheets'] or ''; if config.CitationClass == "map" then if utilities.is_set (Chapter) then --TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'map') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', Chapter_origin)}); -- add error message end Chapter = A['Map']; Chapter_origin = A:ORIGIN('Map'); ChapterURL = A['MapURL']; ChapterURL_origin = A:ORIGIN('MapURL'); TransChapter = A['TransMap']; ScriptChapter = A['ScriptMap'] ScriptChapter_origin = A:ORIGIN('ScriptMap') ChapterUrlAccess = MapUrlAccess; ChapterFormat = A['MapFormat']; Cartography = A['Cartography']; if utilities.is_set ( Cartography ) then Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase); end Scale = A['Scale']; if utilities.is_set ( Scale ) then Scale = sepc .. " " .. Scale; end end -- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data. local Series = A['Series']; if 'episode' == config.CitationClass or 'serial' == config.CitationClass then local SeriesLink = A['SeriesLink']; SeriesLink = link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wiki-markup in |series-link= or wiki-markup in |series= when |series-link= is set local Network = A['Network']; local Station = A['Station']; local s, n = {}, {}; -- do common parameters first if utilities.is_set (Network) then table.insert(n, Network); end if utilities.is_set (Station) then table.insert(n, Station); end ID = table.concat(n, sepc .. ' '); if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}} local Season = A['Season']; local SeriesNumber = A['SeriesNumber']; if utilities.is_set (Season) and utilities.is_set (SeriesNumber) then -- these are mutually exclusive so if both are set TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'season') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'seriesno')}); -- add error message SeriesNumber = ''; -- unset; prefer |season= over |seriesno= end -- assemble a table of parts concatenated later into Series if utilities.is_set (Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end if utilities.is_set (SeriesNumber) then table.insert(s, wrap_msg ('seriesnum', SeriesNumber, use_lowercase)); end if utilities.is_set (Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end Issue = ''; -- unset because this is not a unique parameter Chapter = Title; -- promote title parameters to chapter ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle'); ChapterLink = TitleLink; -- alias |episode-link= TransChapter = TransTitle; ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = URL_origin; ChapterFormat = Format; Title = Series; -- promote series to title TitleLink = SeriesLink; Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number if utilities.is_set (ChapterLink) and not utilities.is_set (ChapterURL) then -- link but not URL Chapter = utilities.make_wikilink (ChapterLink, Chapter); elseif utilities.is_set (ChapterLink) and utilities.is_set (ChapterURL) then -- if both are set, URL links episode; Series = utilities.make_wikilink (ChapterLink, Series); end URL = ''; -- unset TransTitle = ''; ScriptTitle = ''; Format = ''; else -- now oddities that are cite serial Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday? if utilities.is_set (Series) and utilities.is_set (SeriesLink) then Series = utilities.make_wikilink (SeriesLink, Series); end Series = utilities.wrap_style ('italic-title', Series); -- series is italicized end end -- end of {{cite episode}} stuff -- handle type parameter for those CS1 citations that have default values local TitleType = A['TitleType']; local Degree = A['Degree']; if utilities.in_array (config.CitationClass, {'AV-media-notes', 'document', 'interview', 'mailinglist', 'map', 'podcast', 'pressrelease', 'report', 'speech', 'techreport', 'thesis'}) then TitleType = set_titletype (config.CitationClass, TitleType); if utilities.is_set (Degree) and "Thesis" == TitleType then -- special case for cite thesis TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower(); end end if utilities.is_set (TitleType) then -- if type parameter is specified TitleType = utilities.substitute ( cfg.messages['type'], TitleType); -- display it in parentheses -- TODO: Hack on TitleType to fix bunched parentheses problem end -- legacy: promote PublicationDate to Date if neither Date nor Year are set. local Date = A['Date']; local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging local PublicationDate = A['PublicationDate']; local Year = A['Year']; if utilities.is_set (Year) then validation.year_check (Year); -- returns nothing; emits maint message when |year= doesn't hold a 'year' value end if not utilities.is_set (Date) then Date = Year; -- promote Year to Date Year = nil; -- make nil so Year as empty string isn't used for CITEREF if not utilities.is_set (Date) and utilities.is_set (PublicationDate) then -- use PublicationDate when |date= and |year= are not set Date = PublicationDate; -- promote PublicationDate to Date PublicationDate = ''; -- unset, no longer needed Date_origin = A:ORIGIN('PublicationDate'); -- save the name of the promoted parameter else Date_origin = A:ORIGIN('Year'); -- save the name of the promoted parameter end else Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging end if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation --[[ Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where we get the date used in the metadata. Date validation supporting code is in Module:Citation/CS1/Date_validation ]] local DF = is_valid_parameter_value (A['DF'], A:ORIGIN('DF'), cfg.keywords_lists['df'], ''); if not utilities.is_set (DF) then DF = cfg.global_df; -- local |df= if present overrides global df set by {{use xxx date}} template end local ArchiveURL; local ArchiveDate; local ArchiveFormat = A['ArchiveFormat']; local archive_url_timestamp; -- timestamp from wayback machine url ArchiveURL, ArchiveDate, archive_url_timestamp = archive_url_check (A['ArchiveURL'], A['ArchiveDate']) ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url'); ArchiveURL, ArchiveDate = is_unique_archive_url (ArchiveURL, URL, ChapterURL, A:ORIGIN('ArchiveURL'), ArchiveDate); -- add error message when URL or ChapterURL == ArchiveURL local AccessDate = A['AccessDate']; local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification local DoiBroken = A['DoiBroken']; local Embargo = A['Embargo']; local anchor_year; -- used in the CITEREF identifier do -- create defined block to contain local variables error_message, date_parameters_list, mismatch local error_message = ''; -- AirDate has been promoted to Date so not necessary to check it local date_parameters_list = { ['access-date'] = {val = AccessDate, name = A:ORIGIN ('AccessDate')}, ['archive-date'] = {val = ArchiveDate, name = A:ORIGIN ('ArchiveDate')}, ['date'] = {val = Date, name = Date_origin}, ['doi-broken-date'] = {val = DoiBroken, name = A:ORIGIN ('DoiBroken')}, ['pmc-embargo-date'] = {val = Embargo, name = A:ORIGIN ('Embargo')}, ['publication-date'] = {val = PublicationDate, name = A:ORIGIN ('PublicationDate')}, ['year'] = {val = Year, name = A:ORIGIN ('Year')}, }; local error_list = {}; anchor_year, Embargo = validation.dates(date_parameters_list, COinS_date, error_list); if utilities.is_set (Year) and utilities.is_set (Date) then -- both |date= and |year= not normally needed; validation.year_date_check (Year, A:ORIGIN ('Year'), Date, A:ORIGIN ('Date'), error_list); end if 0 == #error_list then -- error free dates only; 0 when error_list is empty local modified = false; -- flag if utilities.is_set (DF) then -- if we need to reformat dates modified = validation.reformat_dates (date_parameters_list, DF); -- reformat to DF format, use long month names if appropriate end if true == validation.date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate modified = true; utilities.set_message ('maint_date_format'); -- hyphens were converted so add maint category end -- for those wikis that can and want to have English date names translated to the local language; not supported at en.wiki if cfg.date_name_auto_xlate_enable and validation.date_name_xlate (date_parameters_list, cfg.date_digit_auto_xlate_enable ) then utilities.set_message ('maint_date_auto_xlated'); -- add maint cat modified = true; end if modified then -- if the date_parameters_list values were modified AccessDate = date_parameters_list['access-date'].val; -- overwrite date holding parameters with modified values ArchiveDate = date_parameters_list['archive-date'].val; Date = date_parameters_list['date'].val; DoiBroken = date_parameters_list['doi-broken-date'].val; PublicationDate = date_parameters_list['publication-date'].val; end if archive_url_timestamp and utilities.is_set (ArchiveDate) then validation.archive_date_check (ArchiveDate, archive_url_timestamp, DF); -- does YYYYMMDD in archive_url_timestamp match date in ArchiveDate end else utilities.set_message ('err_bad_date', {utilities.make_sep_list (#error_list, error_list)}); -- add this error message end end -- end of do if utilities.in_array (config.CitationClass, {'book', 'encyclopaedia'}) or -- {{cite book}}, {{cite encyclopedia}}; TODO: {{cite conference}} and others? ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) or -- {{citation}} as an encylopedia citation ('citation' == config.CitationClass and not utilities.is_set (Periodical)) then -- {{citation}} as a book citation if utilities.is_set (PublicationPlace) then if not utilities.is_set (PublisherName) then local date = COinS_date.rftdate and tonumber (COinS_date.rftdate:match ('%d%d%d%d')); -- get year portion of COinS date (because in Arabic numerals); convert string to number if date and (1850 <= date) then -- location has no publisher; if date is 1850 or later utilities.set_message ('maint_location_no_publisher'); -- add maint cat end else -- PublisherName has a value if cfg.keywords_xlate['none'] == PublisherName then -- if that value is 'none' (only for book and encyclopedia citations) PublisherName = ''; -- unset end end end end local ID_list = {}; -- sequence table of rendered identifiers local ID_list_coins = {}; -- table of identifiers and their values from args; key is same as cfg.id_handlers's key local Class = A['Class']; -- arxiv class identifier local ID_support = { {A['ASINTLD'], 'ASIN', 'err_asintld_missing_asin', A:ORIGIN ('ASINTLD')}, {DoiBroken, 'DOI', 'err_doibroken_missing_doi', A:ORIGIN ('DoiBroken')}, {Embargo, 'PMC', 'err_embargo_missing_pmc', A:ORIGIN ('Embargo')}, } ID_list, ID_list_coins = identifiers.identifier_lists_get (args, { DoiBroken = DoiBroken, -- for |doi= ASINTLD = A['ASINTLD'], -- for |asin= Embargo = Embargo, -- for |pmc= Class = Class, -- for |arxiv= CitationClass = config.CitationClass, -- for |arxiv= Year=anchor_year, -- for |isbn= }, ID_support); if 'citation' == config.CitationClass then -- catch ve/citoid malformed book cites in {{citation}} templates for _, id in ipairs (ID_list) do -- search through the ID_list sequence looking for an ISBN identifier string if id:find ('ISBN', 3, true) then -- plain find, start at index 3 ([[ISBN) if utilities.is_set (Periodical) then -- when a |work= alias is set utilities.set_message ('maint_work_isbn'); -- add maint cat end end end end -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite medrxiv}}, {{cite ssrn}}, before generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list_t) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv=, |citeseerx=, |medrxiv=, |ssrn= required for their templates if not (args[cfg.id_handlers[config.CitationClass:upper()].parameters[1]] or -- can't use ID_list_coins k/v table here because invalid parameters omitted args[cfg.id_handlers[config.CitationClass:upper()].parameters[2]]) then -- which causes unexpected parameter missing error message utilities.set_message ('err_' .. config.CitationClass .. '_missing'); -- add error message end Periodical = ({['arxiv'] = 'arXiv', ['biorxiv'] = 'bioRxiv', ['citeseerx'] = 'CiteSeerX', ['medrxiv'] = 'medRxiv', ['ssrn'] = 'Social Science Research Network'})[config.CitationClass]; end -- Link the title of the work if no |url= was provided, but we have a |pmc= or a |doi= with |doi-access=free if config.CitationClass == "journal" and not utilities.is_set (URL) and not utilities.is_set (TitleLink) and not utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) then -- TODO: remove 'none' once existing citations have been switched to 'off', so 'none' can be used as token for "no title" instead if 'none' ~= cfg.keywords_xlate[auto_select] then -- if auto-linking not disabled if identifiers.auto_link_urls[auto_select] then -- manual selection URL = identifiers.auto_link_urls[auto_select]; -- set URL to be the same as identifier's external link URL_origin = cfg.id_handlers[auto_select:upper()].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['pmc'] then -- auto-select PMC URL = identifiers.auto_link_urls['pmc']; -- set URL to be the same as the PMC external link if not embargoed URL_origin = cfg.id_handlers['PMC'].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['doi'] then -- auto-select DOI URL = identifiers.auto_link_urls['doi']; URL_origin = cfg.id_handlers['DOI'].parameters[1]; end end if utilities.is_set (URL) then -- set when using an identifier-created URL if utilities.is_set (AccessDate) then -- |access-date= requires |url=; identifier-created URL is not |url= utilities.set_message ('err_accessdate_missing_url'); -- add an error message AccessDate = ''; -- unset end if utilities.is_set (ArchiveURL) then -- |archive-url= requires |url=; identifier-created URL is not |url= utilities.set_message ('err_archive_missing_url'); -- add an error message ArchiveURL = ''; -- unset end end end -- At this point fields may be nil if they weren't specified in the template use. We can use that fact. -- Test if citation has no title if not utilities.is_set (Title) and not utilities.is_set (TransTitle) and not utilities.is_set (ScriptTitle) then -- has special case for cite episode utilities.set_message ('err_citation_missing_title', {'episode' == config.CitationClass and 'series' or 'title'}); end if utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) and utilities.in_array (config.CitationClass, {'journal', 'citation'}) and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and ('journal' == Periodical_origin or 'script-journal' == ScriptPeriodical_origin) then -- special case for journal cites Title = ''; -- set title to empty string utilities.set_message ('maint_untitled'); -- add maint cat end if 'journal' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Periodical) and 'journal' == Periodical_origin) then if is_page_art_num (((utilities.is_set (Page) and Page) or (utilities.is_set (Pages) and Pages)) or nil, ID_list_coins['DOI']) then -- does |page(s)= look like it holds an article number utilities.set_message ('maint_page_art_num'); -- add maint cat end end -- COinS metadata (see <http://ocoins.info/>) for automated parsing of citation information. -- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that -- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title -- is the article title, and Chapter is a section within the article. So, we remap local coins_chapter = Chapter; -- default assuming that remapping not required local coins_title = Title; -- et tu if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Chapter) and utilities.is_set (Title) and utilities.is_set (Periodical) then -- if all are used then coins_chapter = Title; -- remap coins_title = Periodical; end end local coins_author = a; -- default for coins rft.au if 0 < #c then -- but if contributor list coins_author = c; -- use that instead end -- this is the function call to COinS() local OCinSoutput = metadata.COinS({ ['Periodical'] = utilities.strip_apostrophe_markup (Periodical), -- no markup in the metadata ['Encyclopedia'] = Encyclopedia, -- just a flag; content ignored by ~/COinS ['Chapter'] = metadata.make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic / accept-as-written markup ['Degree'] = Degree; -- cite thesis only ['Title'] = metadata.make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic / accept-as-written markup ['PublicationPlace'] = PublicationPlace, ['Date'] = COinS_date.rftdate, -- COinS_date.* has correctly formatted date values if Date is valid; ['Season'] = COinS_date.rftssn, ['Quarter'] = COinS_date.rftquarter, ['Chron'] = COinS_date.rftchron, ['Series'] = Series, ['Volume'] = Volume, ['Issue'] = Issue, ['ArticleNumber'] = ArticleNumber, ['Pages'] = coins_pages or metadata.get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At, QuotePage, QuotePages}, 7)), -- pages stripped of external links ['Edition'] = Edition, ['PublisherName'] = PublisherName or Newsgroup, -- any apostrophe markup already removed from PublisherName ['URL'] = first_set ({ChapterURL, URL}, 2), ['Authors'] = coins_author, ['ID_list'] = ID_list_coins, ['RawPage'] = this_page.prefixedText, }, config.CitationClass); -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite medrxiv}}, and {{cite ssrn}} AFTER generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list_t) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, CiteSeerX, medRxiv, or ssrn now unset so it isn't displayed Periodical = ''; -- periodical not allowed in these templates; if article has been published, use cite journal end -- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text if 'newsgroup' == config.CitationClass and utilities.is_set (Newsgroup) then PublisherName = utilities.substitute (cfg.messages['newsgroup'], external_link( 'news:' .. Newsgroup, Newsgroup, Newsgroup_origin, nil )); end local Editors; local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list local Contributors; -- assembled contributors name list local contributor_etal; local Translators; -- assembled translators name list local translator_etal; local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn= local Interviewers; local interviewers_list = {}; interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters local interviewer_etal; -- Now perform various field substitutions. -- We also add leading spaces and surrounding markup and punctuation to the -- various parts of the citation, but only when they are non-nil. do local last_first_list; local control = { format = NameListStyle, -- empty string, '&', 'amp', 'and', or 'vanc' maximum = nil, -- as if display-authors or display-editors not set mode = Mode }; do -- do editor name list first because the now unsupported coauthors used to modify control table local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayEditors'], A['DisplayEditors'], A:ORIGIN ('DisplayEditors'), #e); control.maximum, editor_etal = get_display_names (display_names, #e, 'editors', editor_etal, param); Editors, EditorCount = list_people (control, e, editor_etal); if 1 == EditorCount and (true == editor_etal or 1 < #e) then -- only one editor displayed but includes etal then EditorCount = 2; -- spoof to display (eds.) annotation end end do -- now do interviewers local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayInterviewers'], A['DisplayInterviewers'], A:ORIGIN ('DisplayInterviewers'), #interviewers_list); control.maximum, interviewer_etal = get_display_names (display_names, #interviewers_list, 'interviewers', interviewer_etal, param); Interviewers = list_people (control, interviewers_list, interviewer_etal); end do -- now do translators local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayTranslators'], A['DisplayTranslators'], A:ORIGIN ('DisplayTranslators'), #t); control.maximum, translator_etal = get_display_names (display_names, #t, 'translators', translator_etal, param); Translators = list_people (control, t, translator_etal); end do -- now do contributors local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayContributors'], A['DisplayContributors'], A:ORIGIN ('DisplayContributors'), #c); control.maximum, contributor_etal = get_display_names (display_names, #c, 'contributors', contributor_etal, param); Contributors = list_people (control, c, contributor_etal); end do -- now do authors local display_names, param = display_names_select (cfg.global_cs1_config_t['DisplayAuthors'], A['DisplayAuthors'], A:ORIGIN ('DisplayAuthors'), #a, author_etal); control.maximum, author_etal = get_display_names (display_names, #a, 'authors', author_etal, param); last_first_list = list_people (control, a, author_etal); if utilities.is_set (Authors) then Authors, author_etal = name_has_etal (Authors, author_etal, false, 'authors'); -- find and remove variations on et al. if author_etal then Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter end else Authors = last_first_list; -- either an author name list or an empty string end end -- end of do if utilities.is_set (Authors) and utilities.is_set (Collaboration) then Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al. end end local ConferenceFormat = A['ConferenceFormat']; local ConferenceURL = A['ConferenceURL']; ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url'); Format = style_format (Format, URL, 'format', 'url'); -- special case for chapter format so no error message or cat when chapter not supported if not (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia))) then ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url'); end if not utilities.is_set (URL) then if utilities.in_array (config.CitationClass, {"web", "podcast", "mailinglist"}) or -- |url= required for {{cite web}}, {{cite podcast}}, and {{cite mailing list}} ('citation' == config.CitationClass and ('website' == Periodical_origin or 'script-website' == ScriptPeriodical_origin)) then -- and required for {{citation}} with |website= or |script-website= if not url_was_archive_today then -- is <URL> empty/missing because it was a deprecated archive.today url utilities.set_message ('err_cite_web_url'); -- no; emit an error message for an empty/ missing |url= end end -- do we have |accessdate= without either |url= or |chapter-url=? if utilities.is_set (AccessDate) and not utilities.is_set (ChapterURL) then -- ChapterURL may be set when URL is not set; utilities.set_message ('err_accessdate_missing_url'); AccessDate = ''; end end local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], ''); local OriginalURL local OriginalURL_origin local OriginalFormat local OriginalAccess; UrlStatus = UrlStatus:lower(); -- used later when assembling archived text if utilities.is_set ( ArchiveURL ) then if utilities.is_set (ChapterURL) then -- if chapter-url= is set apply archive url to it OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text OriginalURL_origin = ChapterURL_origin; -- name of |chapter-url= parameter for error messages OriginalFormat = ChapterFormat; -- and original |chapter-format= if 'live' ~= UrlStatus then ChapterURL = ArchiveURL -- swap-in the archive's URL ChapterURL_origin = A:ORIGIN('ArchiveURL') -- name of |archive-url= parameter for error messages ChapterFormat = ArchiveFormat or ''; -- swap in archive's format ChapterUrlAccess = nil; -- restricted access levels do not make sense for archived URLs end elseif utilities.is_set (URL) then OriginalURL = URL; -- save copy of original source URL OriginalURL_origin = URL_origin; -- name of URL parameter for error messages OriginalFormat = Format; -- and original |format= OriginalAccess = UrlAccess; if 'live' ~= UrlStatus then -- if URL set then |archive-url= applies to it URL = ArchiveURL -- swap-in the archive's URL URL_origin = A:ORIGIN('ArchiveURL') -- name of archive URL parameter for error messages Format = ArchiveFormat or ''; -- swap in archive's format UrlAccess = nil; -- restricted access levels do not make sense for archived URLs end end elseif utilities.is_set (UrlStatus) then -- if |url-status= is set when |archive-url= is not set utilities.set_message ('maint_url_status'); -- add maint cat end if utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or -- if any of the 'periodical' cites except encyclopedia ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) then local chap_param; if utilities.is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters chap_param = A:ORIGIN ('Chapter') elseif utilities.is_set (TransChapter) then chap_param = A:ORIGIN ('TransChapter') elseif utilities.is_set (ChapterURL) then chap_param = A:ORIGIN ('ChapterURL') elseif utilities.is_set (ScriptChapter) then chap_param = ScriptChapter_origin; else utilities.is_set (ChapterFormat) chap_param = A:ORIGIN ('ChapterFormat') end if utilities.is_set (chap_param) then -- if we found one utilities.set_message ('err_chapter_ignored', {chap_param}); -- add error message Chapter = ''; -- and set them to empty string to be safe with concatenation TransChapter = ''; ChapterURL = ''; ScriptChapter = ''; ChapterFormat = ''; end else -- otherwise, format chapter / article title local no_quotes = false; -- default assume that we will be quoting the chapter parameter value if utilities.is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s) if utilities.in_array (Contribution:lower(), cfg.keywords_lists.contribution) then -- and a generic contribution title no_quotes = true; -- then render it unquoted end end Chapter = format_chapter_title (ScriptChapter, ScriptChapter_origin, Chapter, Chapter_origin, TransChapter, TransChapter_origin, ChapterURL, ChapterURL_origin, no_quotes, ChapterUrlAccess); -- Contribution is also in Chapter if utilities.is_set (Chapter) then Chapter = Chapter .. ChapterFormat ; if 'map' == config.CitationClass and utilities.is_set (TitleType) then Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title end Chapter = Chapter .. sepc .. ' '; elseif utilities.is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ... Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it end end -- Format main title local plain_title = false; local accept_title; Title, accept_title = utilities.has_accept_as_written (Title, true); -- remove accept-this-as-written markup when it wraps all of <Title> if accept_title and ('' == Title) then -- only support forced empty for now "(())" Title = cfg.messages['notitle']; -- replace by predefined "No title" message -- TODO: utilities.set_message ( 'err_redundant_parameters', ...); -- issue proper error message instead of muting ScriptTitle = ''; -- just mute for now TransTitle = ''; -- just mute for now plain_title = true; -- suppress text decoration for descriptive title utilities.set_message ('maint_untitled'); -- add maint cat end if not accept_title then -- <Title> not wrapped in accept-as-written markup if '...' == Title:sub (-3) then -- if ellipsis is the last three characters of |title= Title = Title:gsub ('(%.%.%.)%.+$', '%1'); -- limit the number of dots to three elseif not mw.ustring.find (Title, '%.%s*%a%.$') and -- end of title is not a 'dot-(optional space-)letter-dot' initialism ... not mw.ustring.find (Title, '%s+%a%.$') then -- ...and not a 'space-letter-dot' initial (''Allium canadense'' L.) Title = mw.ustring.gsub(Title, '%' .. sepc .. '$', ''); -- remove any trailing separator character; sepc and ms.ustring() here for languages that use multibyte separator characters end if utilities.is_set (ArchiveURL) and is_archived_copy (Title) then utilities.set_message ('maint_archived_copy'); -- add maintenance category before we modify the content of Title end if is_generic ('generic_titles', Title) then utilities.set_message ('err_generic_title'); -- set an error message end end if (not plain_title) and (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'document', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx', 'medrxiv', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) or ('map' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)))) then -- special case for cite map when the map is in a periodical treat as an article Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from module provided quote marks Title = utilities.wrap_style ('quoted-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); elseif plain_title or ('report' == config.CitationClass) then -- no styling for cite report and descriptive titles (otherwise same as above) Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title else Title = utilities.wrap_style ('italic-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-italic-title', TransTitle); end if utilities.is_set (TransTitle) then if utilities.is_set (Title) then TransTitle = " " .. TransTitle; else utilities.set_message ('err_trans_missing_title', {'title'}); end end if utilities.is_set (Title) then -- TODO: is this the right place to be making Wikisource URLs? if utilities.is_set (TitleLink) and utilities.is_set (URL) then utilities.set_message ('err_wikilink_in_url'); -- set an error message because we can't have both TitleLink = ''; -- unset end if not utilities.is_set (TitleLink) and utilities.is_set (URL) then Title = external_link (URL, Title, URL_origin, UrlAccess) .. TransTitle .. Format; URL = ''; -- unset these because no longer needed Format = ""; elseif utilities.is_set (TitleLink) and not utilities.is_set (URL) then local ws_url; ws_url = wikisource_url_make (TitleLink); -- ignore ws_label return; not used here if ws_url then Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title-link'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], TitleLink, Title}); Title = Title .. TransTitle; else Title = utilities.make_wikilink (TitleLink, Title) .. TransTitle; end else local ws_url, ws_label, L; -- Title has italic or quote markup by the time we get here which causes is_wikilink() to return 0 (not a wikilink) ws_url, ws_label, L = wikisource_url_make (Title:gsub('^[\'"]*(.-)[\'"]*$', '%1')); -- make ws URL from |title= interwiki link (strip italic or quote markup); link portion L becomes tooltip label if ws_url then Title = Title:gsub ('%b[]', ws_label); -- replace interwiki link with ws_label to retain markup Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, Title}); Title = Title .. TransTitle; else Title = Title .. TransTitle; end end else Title = TransTitle; end if utilities.is_set (Place) then Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " "; end local ConferenceURL_origin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL if utilities.is_set (Conference) then if utilities.is_set (ConferenceURL) then Conference = external_link( ConferenceURL, Conference, ConferenceURL_origin, nil ); end Conference = sepc .. " " .. Conference .. ConferenceFormat; elseif utilities.is_set (ConferenceURL) then Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURL_origin, nil ); end local Position = ''; if not utilities.is_set (Position) then local Minutes = A['Minutes']; local Time = A['Time']; if utilities.is_set (Minutes) then if utilities.is_set (Time) then --TODO: make a function for this and similar? utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'minutes') .. cfg.presentation['sep_list_pair'] .. utilities.wrap_style ('parameter', 'time')}); end Position = utilities.substitute (cfg.messages.minutes, Minutes); else if utilities.is_set (Time) then local TimeCaption = A['TimeCaption'] if not utilities.is_set (TimeCaption) then TimeCaption = cs2_lower(cfg.messages['event']); end Position = " " .. TimeCaption .. " " .. Time; end end else Position = " " .. Position; At = ''; end Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase); At = utilities.is_set (At) and (sepc .. " " .. At) or ""; Position = utilities.is_set (Position) and (sepc .. " " .. Position) or ""; if config.CitationClass == 'map' then local Sections = A['Sections']; -- Section (singular) is an alias of Chapter so set earlier local Inset = A['Inset']; if utilities.is_set ( Inset ) then Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase); end if utilities.is_set ( Sections ) then Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase); elseif utilities.is_set ( Section ) then Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase); end At = At .. Inset .. Section; end local Others = A['Others']; if utilities.is_set (Others) and 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor= if config.CitationClass == "AV-media-notes" or config.CitationClass == "audio-visual" then -- special maint for AV/M which has a lot of 'false' positives right now utilities.set_message ('maint_others_avm') else utilities.set_message ('maint_others'); end end Others = utilities.is_set (Others) and (sepc .. " " .. Others) or ""; if utilities.is_set (Translators) then Others = safe_join ({sepc .. ' ', wrap_msg ('translated', Translators, use_lowercase), Others}, sepc); end if utilities.is_set (Interviewers) then Others = safe_join ({sepc .. ' ', wrap_msg ('interview', Interviewers, use_lowercase), Others}, sepc); end local TitleNote = A['TitleNote']; TitleNote = utilities.is_set (TitleNote) and (sepc .. " " .. TitleNote) or ""; if utilities.is_set (Edition) then if Edition:match ('%f[%a][Ee]d%n?%.?$') or Edition:match ('%f[%a][Ee]dition$') then -- Ed, ed, Ed., ed., Edn, edn, Edn., edn. utilities.set_message ('err_extra_text_edition'); -- add error message end Edition = " " .. wrap_msg ('edition', Edition); else Edition = ''; end Series = utilities.is_set (Series) and wrap_msg ('series', {sepc, Series}) or ""; -- not the same as SeriesNum local Agency = A['Agency'] or ''; -- |agency= is supported by {{cite magazine}}, {{cite news}}, {{cite press release}}, {{cite web}}, and certain {{citation}} templates if utilities.is_set (Agency) then -- this testing done here because {{citation}} supports 'news' citations if utilities.in_array (config.CitationClass, {'magazine', 'news', 'pressrelease', 'web'}) or ('citation' == config.CitationClass and utilities.in_array (Periodical_origin, {"magazine", "newspaper", "work"})) then Agency = wrap_msg ('agency', {sepc, Agency}); -- format for rendering else Agency = ''; -- unset; not supported utilities.set_message ('err_parameter_ignored', {'agency'}); -- add error message end end Volume = format_volume_issue (Volume, Issue, ArticleNumber, config.CitationClass, Periodical_origin, sepc, use_lowercase); if utilities.is_set (AccessDate) then local retrv_text = " " .. cfg.messages['retrieved']; AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format retrv_text = cs2_lower(retrv_text); -- if mode is cs2, lower case AccessDate = utilities.substitute (retrv_text, AccessDate); -- add retrieved text AccessDate = utilities.substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates end if utilities.is_set (ID) then ID = sepc .. " " .. ID; end local Docket = A['Docket']; if "thesis" == config.CitationClass and utilities.is_set (Docket) then ID = sepc .. " Docket " .. Docket .. ID; end if "report" == config.CitationClass and utilities.is_set (Docket) then -- for cite report when |docket= is set ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set end if utilities.is_set (URL) then URL = " " .. external_link( URL, nil, URL_origin, UrlAccess ); end -- We check length of PostScript here because it will have been nuked by -- the quote parameters. We'd otherwise emit a message even if there wasn't -- a displayed postscript. -- TODO: Should the max size (1) be configurable? -- TODO: Should we check a specific pattern? if utilities.is_set(PostScript) and mw.ustring.len(PostScript) > 1 then utilities.set_message ('maint_postscript') end local Archived; if utilities.is_set (ArchiveURL) then if not utilities.is_set (ArchiveDate) then -- ArchiveURL set but ArchiveDate not set utilities.set_message ('err_archive_missing_date'); -- emit an error message ArchiveURL = ''; -- empty string for concatenation ArchiveDate = ''; -- empty string for concatenation end else if utilities.is_set (ArchiveDate) then -- ArchiveURL not set but ArchiveDate is set utilities.set_message ('err_archive_date_missing_url'); -- emit an error message ArchiveURL = ''; -- empty string for concatenation ArchiveDate = ''; -- empty string for concatenation end end if utilities.is_set (ArchiveURL) then local arch_text; if "live" == UrlStatus then if utilities.is_set (ArchiveDate) then Archived = sepc .. ' ' .. utilities.substitute ( cfg.messages['archived-live'], { external_link( ArchiveURL, cs2_lower(cfg.messages['archived']), A:ORIGIN('ArchiveURL'), nil) .. ArchiveFormat, ArchiveDate } ); else Archived = ''; end if not utilities.is_set (OriginalURL) then utilities.set_message ('err_archive_missing_url'); Archived = ''; -- empty string for concatenation end elseif utilities.is_set (OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown' if utilities.in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then Archived = sepc .. ' ' .. utilities.substitute ( cs2_lower(cfg.messages['archived-unfit']), ArchiveDate); if 'bot: unknown' == UrlStatus then utilities.set_message ('maint_bot_unknown'); -- and add a category if not already added else utilities.add_prop_cat ('unfit'); -- and add a category if not already added end else -- UrlStatus is empty, 'dead' if utilities.is_set (ArchiveDate) then Archived = sepc .. ' ' .. utilities.substitute ( cs2_lower(cfg.messages['archived-dead']), { external_link( OriginalURL, cfg.messages['original'], OriginalURL_origin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); else Archived = ''; -- unset for concatenation end end else -- OriginalUrl not set utilities.set_message ('err_archive_missing_url'); Archived = ''; -- empty string for concatenation end elseif utilities.is_set (ArchiveFormat) then Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message else Archived = ''; end local TranscriptURL = A['TranscriptURL'] local TranscriptFormat = A['TranscriptFormat']; TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl'); local Transcript = A['Transcript']; local TranscriptURL_origin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL if utilities.is_set (Transcript) then if utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, Transcript, TranscriptURL_origin, nil ); end Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat; elseif utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, nil, TranscriptURL_origin, nil ); end local Publisher; if utilities.is_set (PublicationDate) then PublicationDate = wrap_msg ('published', PublicationDate); end if utilities.is_set (PublisherName) then if utilities.is_set (PublicationPlace) then Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate; else Publisher = sepc .. " " .. PublisherName .. PublicationDate; end elseif utilities.is_set (PublicationPlace) then Publisher= sepc .. " " .. PublicationPlace .. PublicationDate; else Publisher = PublicationDate; end -- Several of the above rely upon detecting this as nil, so do it last. if (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical)) then if utilities.is_set (Title) or utilities.is_set (TitleNote) then Periodical = sepc .. " " .. format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); else Periodical = format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); end end local Language = A['Language']; if utilities.is_set (Language) then Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc. else Language=''; -- language not specified so make sure this is an empty string; --[[ TODO: need to extract the wrap_msg from language_parameter so that we can solve parentheses bunching problem with Format/Language/TitleType ]] end --[[ Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided). ]] if "speech" == config.CitationClass then -- cite speech only TitleNote = TitleType; -- move TitleType to TitleNote so that it renders ahead of |event= TitleType = ''; -- and unset if utilities.is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter if utilities.is_set (Conference) then -- and if |event= is set Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering end end end -- Piece all bits together at last. Here, all should be non-nil. -- We build things this way because it is more efficient in LUA -- not to keep reassigning to the same string variable over and over. local tcommon; local tcommon2; -- used for book cite when |contributor= is set local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; -- Volume = safe_join ({Volume, pgtext}, sepc); if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (Periodical) then -- special cases for book cites if utilities.is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc. tcommon = safe_join ({Title, TitleNote}, sepc); -- author and other stuff will come after this and before tcommon2 tcommon2 = safe_join ({TitleType, Series, Language, Volume, Others, Edition, Publisher}, sepc); else tcommon = safe_join ({Title, TitleNote, TitleType, Series, Language, Volume, Others, Edition, Publisher}, sepc); end elseif 'map' == config.CitationClass then -- special cases for cite map if utilities.is_set (Chapter) then -- map in a book; TitleType is part of Chapter tcommon = safe_join ({Title, Edition, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc); elseif utilities.is_set (Periodical) then -- map in a periodical tcommon = safe_join ({Title, TitleType, Periodical, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc); else -- a sheet or stand-alone map tcommon = safe_join ({Title, TitleType, Edition, Scale, Series, Language, Cartography, Others, Publisher}, sepc); end elseif 'episode' == config.CitationClass then -- special case for cite episode tcommon = safe_join ({Title, TitleNote, TitleType, Series, Language, Edition, Publisher}, sepc); else -- all other CS1 templates tcommon = safe_join ({Title, TitleNote, Conference, Periodical, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc); end if #ID_list > 0 then ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc ); else ID_list = ID; end local Via = A['Via']; Via = utilities.is_set (Via) and wrap_msg ('via', Via) or ''; local idcommon; if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media & cite episode position transcript idcommon = safe_join( { ID_list, URL, Archived, Transcript, AccessDate, Via, Quote }, sepc ); else idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, Quote }, sepc ); end local text; -- local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; local OrigDate = A['OrigDate']; OrigDate = utilities.is_set (OrigDate) and wrap_msg ('origdate', OrigDate) or ''; if utilities.is_set (Date) then if utilities.is_set (Authors) or utilities.is_set (Editors) then -- date follows authors or editors when authors not set Date = " (" .. Date .. ")" .. OrigDate .. sepc .. " "; -- in parentheses else -- neither of authors and editors set if (string.sub(tcommon, -1, -1) == sepc) then -- if the last character of tcommon is sepc Date = " " .. Date .. OrigDate; -- Date does not begin with sepc else Date = sepc .. " " .. Date .. OrigDate; -- Date begins with sepc end end end if utilities.is_set (Authors) then if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Authors termination Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space end if utilities.is_set (Editors) then local in_text = ''; local post_text = ''; if utilities.is_set (Chapter) and 0 == #c then in_text = cfg.messages['in'] .. ' '; in_text = cs2_lower(in_text); -- lowercase for cs2 end if EditorCount <= 1 then post_text = ' (' .. cfg.messages['editor'] .. ')'; -- be consistent with no-author, no-date case else post_text = ' (' .. cfg.messages['editors'] .. ')'; end Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space end if utilities.is_set (Contributors) then -- book cite and we're citing the intro, preface, etc. local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' '; by_text = cs2_lower(by_text); -- lowercase for cs2 Authors = by_text .. Authors; -- author follows title so tweak it here if utilities.is_set (Editors) and utilities.is_set (Date) then -- when Editors make sure that Authors gets terminated Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space end if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Contributors termination Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space end text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc ); -- text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, idcommon }, sepc ); else text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc ); -- text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, idcommon }, sepc ); end elseif utilities.is_set (Editors) then if utilities.is_set (Date) then if EditorCount <= 1 then Editors = Editors .. cfg.presentation['sep_name'] .. cfg.messages['editor']; else Editors = Editors .. cfg.presentation['sep_name'] .. cfg.messages['editors']; end else if EditorCount <= 1 then Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " " else Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " " end end text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc ); -- text = safe_join( {Editors, Date, Chapter, Place, tcommon, idcommon}, sepc ); else if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then text = safe_join( {Chapter, Place, tcommon, pgtext, Date, idcommon}, sepc ); -- text = safe_join( {Chapter, Place, tcommon, Date, idcommon}, sepc ); else text = safe_join( {Chapter, Place, tcommon, Date, pgtext, idcommon}, sepc ); -- text = safe_join( {Chapter, Place, tcommon, Date, idcommon}, sepc ); end end if utilities.is_set (PostScript) and PostScript ~= sepc then text = safe_join( {text, sepc}, sepc ); -- Deals with italics, spaces, etc. if '.' == sepc then -- remove final seperator if present text = text:gsub ('%' .. sepc .. '$', ''); -- dot must be escaped here else text = mw.ustring.gsub (text, sepc .. '$', ''); -- using ustring for non-dot sepc (likely a non-Latin character) end end text = safe_join( {text, PostScript}, sepc ); -- Now enclose the whole thing in a <cite> element local options_t = {}; options_t.class = cite_class_attribute_make (config.CitationClass, Mode); local Ref = is_valid_parameter_value (A['Ref'], A:ORIGIN('Ref'), cfg.keywords_lists['ref'], nil, true); -- nil when |ref=harv; A['Ref'] else if 'none' ~= cfg.keywords_xlate[(Ref and Ref:lower()) or ''] then local namelist_t = {}; -- holds selected contributor, author, editor name list local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation if #c > 0 then -- if there is a contributor list namelist_t = c; -- select it elseif #a > 0 then -- or an author list namelist_t = a; elseif #e > 0 then -- or an editor list namelist_t = e; end local citeref_id; if #namelist_t > 0 then -- if there are names in namelist_t citeref_id = make_citeref_id (namelist_t, year); -- go make the CITEREF anchor if mw.uri.anchorEncode (citeref_id) == ((Ref and mw.uri.anchorEncode (Ref)) or '') then -- Ref may already be encoded (by {{sfnref}}) so citeref_id must be encoded before comparison utilities.set_message ('maint_ref_duplicates_default'); end else citeref_id = ''; -- unset end options_t.id = Ref or citeref_id; end if string.len (text:gsub('%b<>', '')) <= 2 then -- remove html and html-like tags; then get length of what remains; z.error_cats_t = {}; -- blank the categories list z.error_msgs_t = {}; -- blank the error messages list OCinSoutput = nil; -- blank the metadata string text = ''; -- blank the the citation utilities.set_message ('err_empty_citation'); -- set empty citation message and category end local render_t = {}; -- here we collect the final bits for concatenation into the rendered citation if is_preview_mode and (0 ~= #z.error_msgs_t or 0 ~= #z.maint_cats_t) then -- when in preview mode if not utilities.is_set (options_t.id) then -- and when this template has not created an anchor ID math.randomseed (tonumber (mw.getLanguage ('en'):formatDate ('U')) * 10000 + os.clock() * 10000); options_t.id = 'CITEREF_temp_preview_id_' .. math.random (100000, 999999); -- create temporary anchor ID for preview mode end end if utilities.is_set (options_t.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags options_t.id = mw.uri.anchorEncode(options_t.id); -- do this here; also used when adding preview warning messages table.insert (render_t, utilities.substitute (cfg.presentation['cite-id'], {options_t.id, mw.text.nowiki(options_t.class), text})); -- when |ref= is set or when there is a namelist else table.insert (render_t, utilities.substitute (cfg.presentation['cite'], {mw.text.nowiki(options_t.class), text})); -- when |ref=none or when namelist_t empty and |ref= is missing or is empty end if OCinSoutput then -- blanked when citation is 'empty' so don't bother to add boilerplate metadata span table.insert (render_t, utilities.substitute (cfg.presentation['ocins'], OCinSoutput)); -- format and append metadata to the citation end local template_name = cfg.citation_class_map_t[config.CitationClass]; local template_link = '[[Template:' .. template_name .. '|' .. template_name .. ']]'; local msg_prefix = '<code class="cs1-code">{{' .. template_link .. '}}</code>: '; if 0 ~= #z.error_msgs_t then mw.addWarning (utilities.substitute (cfg.messages.warning_msg_e, {template_link, options_t.id})); table.insert (render_t, ' '); -- insert a space between citation and its error messages table.sort (z.error_msgs_t); -- sort the error messages list; sorting includes wrapping <span> and <code> tags; hidden-error sorts ahead of visible-error local hidden = true; -- presume that the only error messages emited by this template are hidden for _, v in ipairs (z.error_msgs_t) do -- spin through the list of error messages if v:find ('cs1-visible-error', 1, true) then -- look for the visible error class name hidden = false; -- found one; so don't hide the error message prefix break; -- and done because no need to look further end end z.error_msgs_t[1] = table.concat ({utilities.error_comment (msg_prefix, hidden), z.error_msgs_t[1]}); -- add error message prefix to first error message to prevent extraneous punctuation table.insert (render_t, table.concat (z.error_msgs_t, '; ')); -- make a big string of error messages and add it to the rendering end if 0 ~= #z.maint_cats_t then mw.addWarning (utilities.substitute (cfg.messages.warning_msg_m, {template_link, options_t.id})); table.sort (z.maint_cats_t); -- sort the maintenance messages list local maint_msgs_t = {}; -- here we collect all of the maint messages if 0 == #z.error_msgs_t then -- if no error messages table.insert (maint_msgs_t, msg_prefix); -- insert message prefix in maint message livery end for _, v in ipairs( z.maint_cats_t ) do -- append maintenance categories table.insert (maint_msgs_t, -- assemble new maint message and add it to the maint_msgs_t table table.concat ({v, ' (', utilities.substitute (cfg.messages[':cat wikilink'], v), ')'}) ); end table.insert (render_t, utilities.substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs_t, ' '))); -- wrap the group of maint messages with proper presentation and save end if not no_tracking_cats then local sort_key; local cat_wikilink = 'cat wikilink'; if cfg.enable_sort_keys then -- when namespace sort keys enabled local namespace_number = mw.title.getCurrentTitle().namespace; -- get namespace number for this wikitext sort_key = (0 ~= namespace_number and (cfg.name_space_sort_keys[namespace_number] or cfg.name_space_sort_keys.other)) or nil; -- get sort key character; nil for mainspace cat_wikilink = (not sort_key and 'cat wikilink') or 'cat wikilink sk'; -- make <cfg.messages> key end for _, v in ipairs (z.error_cats_t) do -- append error categories table.insert (render_t, utilities.substitute (cfg.messages[cat_wikilink], {v, sort_key})); end if cfg.id_limits_data_load_fail then -- boolean true when load failed utilities.set_message ('maint_id_limit_load_fail'); -- done here because this maint cat emits no message end for _, v in ipairs (z.maint_cats_t) do -- append maintenance categories table.insert (render_t, utilities.substitute (cfg.messages[cat_wikilink], {v, sort_key})); end for _, v in ipairs (z.prop_cats_t) do -- append properties categories table.insert (render_t, utilities.substitute (cfg.messages['cat wikilink'], v)); -- no sort keys end end return table.concat (render_t); -- make a big string and done end --[[--------------------------< V A L I D A T E >-------------------------------------------------------------- Looks for a parameter's name in one of several whitelists. Parameters in the whitelist can have three values: true - active, supported parameters false - deprecated, supported parameters nil - unsupported parameters ]] local function validate (name, cite_class, empty) local name = tostring (name); local enum_name; -- parameter name with enumerator (if any) replaced with '#' local state; local function state_test (state, name) -- local function to do testing of state values if true == state then return true; end -- valid actively supported parameter if false == state then if empty then return nil; end -- empty deprecated parameters are treated as unknowns deprecated_parameter (name); -- parameter is deprecated but still supported return true; end if 'tracked' == state then local base_name = name:gsub ('%d', ''); -- strip enumerators from parameter names that have them to get the base name utilities.add_prop_cat ('tracked-param', {base_name}, base_name); -- add a properties category; <base_name> modifies <key> return true; end return nil; end if name:find ('#') then -- # is a cs1|2 reserved character so parameters with # not permitted return nil; end -- replace enumerator digit(s) with # (|last25= becomes |last#=) (mw.ustring because non-Western 'local' digits) enum_name = mw.ustring.gsub (name, '%d+$', '#'); -- where enumerator is last charaters in parameter name (these to protect |s2cid=) enum_name = mw.ustring.gsub (enum_name, '%d+([%-l])', '#%1'); -- where enumerator is in the middle of the parameter name; |author#link= is the oddity if 'document' == cite_class then -- special case for {{cite document}} state = whitelist.document_parameters_t[enum_name]; -- this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end return false; end if utilities.in_array (cite_class, whitelist.preprint_template_list_t) then -- limited parameter sets allowed for these templates state = whitelist.limited_parameters_t[enum_name]; -- this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end state = whitelist.preprint_arguments_t[cite_class][name]; -- look in the parameter-list for the template identified by cite_class if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end -- end limited parameter-set templates if utilities.in_array (cite_class, whitelist.unique_param_template_list_t) then -- template-specific parameters for templates that accept parameters from the basic argument list state = whitelist.unique_arguments_t[cite_class][name]; -- look in the template-specific parameter-lists for the template identified by cite_class if true == state_test (state, name) then return true; end end -- if here, fall into general validation state = whitelist.common_parameters_t[enum_name]; -- all other templates; all normal parameters allowed; this list holds enumerated and nonenumerated parameters if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end --[=[-------------------------< I N T E R _ W I K I _ C H E C K >---------------------------------------------- check <value> for inter-language interwiki-link markup. <prefix> must be a MediaWiki-recognized language code. when these values have the form (without leading colon): [[<prefix>:link|label]] return label as plain-text [[<prefix>:link]] return <prefix>:link as plain-text return value as is else ]=] local function inter_wiki_check (parameter, value) local prefix = value:match ('%[%[(%a+):'); -- get an interwiki prefix if one exists local _; if prefix and cfg.inter_wiki_map[prefix:lower()] then -- if prefix is in the map, needs preceding colon so utilities.set_message ('err_bad_paramlink', parameter); -- emit an error message _, value, _ = utilities.is_wikilink (value); -- extract label portion from wikilink end return value; end --[[--------------------------< M I S S I N G _ P I P E _ C H E C K >------------------------------------------ Look at the contents of a parameter. If the content has a string of characters and digits followed by an equal sign, compare the alphanumeric string to the list of cs1|2 parameters. If found, then the string is possibly a parameter that is missing its pipe. There are two tests made: {{cite ... |title=Title access-date=2016-03-17}} -- the first parameter has a value and whitespace separates that value from the missing pipe parameter name {{cite ... |title=access-date=2016-03-17}} -- the first parameter has no value (whitespace after the first = is trimmed by MediaWiki) cs1|2 shares some parameter names with XML/HTML attributes: class=, title=, etc. To prevent false positives XML/HTML tags are removed before the search. If a missing pipe is detected, this function adds the missing pipe maintenance category. ]] local function missing_pipe_check (parameter, value) local capture; value = value:gsub ('%b<>', ''); -- remove XML/HTML tags because attributes: class=, title=, etc. capture = value:match ('%s+(%a[%w%-]+)%s*=') or value:match ('^(%a[%w%-]+)%s*='); -- find and categorize parameters with possible missing pipes if capture and validate (capture) then -- if the capture is a valid parameter name utilities.set_message ('err_missing_pipe', parameter); end end --[[--------------------------< H A S _ E X T R A N E O U S _ P U N C T >-------------------------------------- look for extraneous terminal punctuation in most parameter values; parameters listed in skip table are not checked ]] local function has_extraneous_punc (param, value) if 'number' == type (param) then return; end param = param:gsub ('%d+', '#'); -- enumerated name-list mask params allow terminal punct; normalize if cfg.punct_skip[param] then return; -- parameter name found in the skip table so done end if value:match ('[,;:]$') then utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat end if value:match ('^=') then -- sometimes an extraneous '=' character appears ... utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat end end --[[--------------------------< H A S _ T W L _ U R L >-------------------------------------------------------- look for The Wikipedia Library urls in url-holding parameters. TWL urls are accessible only for readers who are active extended confirmed Wikipedia editors. This function sets an error message when such urls are discovered and when appropriate, sets the |<param>-url-access=subscription. returns nothing. looks for: '.wikipedialibrary.idm.oclc.org' ]] local function has_twl_url (url_params_t, cite_args_t) local url_error_t = {}; -- sequence of url-holding parameters that have a TWL url for param, value in pairs (url_params_t) do if value:find ('%.wikipedialibrary%.idm%.oclc%.org') then -- has the TWL base url? table.insert (url_error_t, param); -- add parameter name to the error list end end if 0 ~= #url_error_t then -- non-zero when there are errors table.sort (url_error_t); -- sor for error messaging for i, param in ipairs (url_error_t) do if cfg.url_access_map_t[param] then -- if <param> has a matching -access parameter cite_args_t[cfg.url_access_map_t[param]] = cfg.keywords_xlate.subscription; -- set |<param>-url-access=subscription end url_error_t[i] = utilities.wrap_style ('parameter', param); -- make the parameter pretty for error message end utilities.set_message ('err_param_has_twl_url', {utilities.make_sep_list (#url_error_t, url_error_t)}); -- add this error message end end --[[--------------------------< H A S _ E X T R A N E O U S _ U R L >------------------------------------------ look for extraneous url parameter values; parameters listed in skip table are not checked ]] local function has_extraneous_url (non_url_param_t) local url_error_t = {}; check_for_url (non_url_param_t, url_error_t); -- extraneous url check if 0 ~= #url_error_t then -- non-zero when there are errors table.sort (url_error_t); utilities.set_message ('err_param_has_ext_link', {utilities.make_sep_list (#url_error_t, url_error_t)}); -- add this error message end end --[[--------------------------< _ C I T A T I O N >------------------------------------------------------------ Module entry point frame – from template call (citation()); may be nil when called from another module args_t – table of all cs1|2 parameters in the template (the parent frame) config_t – table of template-supplied parameter (the #invoke frame) ]] local function _citation (frame, args_t, config_t) -- save a copy in case we need to display an error message in preview mode if not frame then frame = mw.getCurrentFrame(); -- if called from another module, get a frame for frame-provided functions end -- i18n: set the name that your wiki uses to identify sandbox subpages from sandbox template invoke (or can be set here) local sandbox = ((config_t.SandboxPath and '' ~= config_t.SandboxPath) and config_t.SandboxPath) or '/sandbox'; -- sandbox path from {{#invoke:Citation/CS1/sandbox|citation|SandboxPath=/...}} is_sandbox = nil ~= string.find (frame:getTitle(), sandbox, 1, true); -- is this invoke the sandbox module? sandbox = is_sandbox and sandbox or ''; -- use i18n sandbox to load sandbox modules when this module is the sandox; live modules else cfg = mw.loadData ('Module:Citation/CS1/Configuration' .. sandbox); -- load sandbox versions of support modules when {{#invoke:Citation/CS1/sandbox|...}}; live modules else whitelist = mw.loadData ('Module:Citation/CS1/Whitelist' .. sandbox); utilities = require ('Module:Citation/CS1/Utilities' .. sandbox); validation = require ('Module:Citation/CS1/Date_validation' .. sandbox); identifiers = require ('Module:Citation/CS1/Identifiers' .. sandbox); metadata = require ('Module:Citation/CS1/COinS' .. sandbox); utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the selected cfg tables identifiers.set_selected_modules (cfg, utilities); -- so that functions in Identifiers can see the selected cfg tables and selected Utilities module validation.set_selected_modules (cfg, utilities); -- so that functions in Date validataion can see selected cfg tables and the selected Utilities module metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities local cite_args_t = {}; -- because args_t is the parent (template) frame args (which cannot be modified); params and their values will be placed here is_preview_mode = not utilities.is_set (frame:preprocess ('{{REVISIONID}}')); local suggestions = {}; -- table where we store suggestions if we need to loadData them local error_text; -- used as a flag local capture; -- the single supported capture when matching unknown parameters using patterns local empty_unknowns = {}; -- sequence table to hold empty unknown params for error message listing for k, v in pairs (args_t) do -- get parameters from the parent (template) frame v = mw.ustring.gsub (v, '^%s*(.-)%s*$', '%1'); -- trim leading/trailing whitespace; when v is only whitespace, becomes empty string if v ~= '' then if cfg.enum_needs_xlation and 'string' == type (k) then -- for wikis that set date_names['local_digits'] to non-western digits k = mw.ustring.gsub (k, '%d', cfg.date_names.local_digits); -- translate 'local' digits enumerators to Western 0-9 end if not validate( k, config_t.CitationClass ) then if type (k) ~= 'string' then -- exclude empty numbered parameters if v:match("%S+") ~= nil then error_text = utilities.set_message ('err_text_ignored', {v}); end elseif validate (k:lower(), config_t.CitationClass) then error_text = utilities.set_message ('err_parameter_ignored_suggest', {k, k:lower()}); -- suggest the lowercase version of the parameter else if nil == suggestions.suggestions then -- if this table is nil then we need to load it suggestions = mw.loadData ('Module:Citation/CS1/Suggestions' .. sandbox); --load sandbox version of suggestion module when {{#invoke:Citation/CS1/sandbox|...}}; live module else end for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter capture = k:match (pattern); -- the whole match if no capture in pattern else the capture if a match if capture then -- if the pattern matches param = utilities.substitute (param, capture); -- add the capture to the suggested parameter (typically the enumerator) if validate (param, config_t.CitationClass) then -- validate the suggestion to make sure that the suggestion is supported by this template (necessary for limited parameter lists) error_text = utilities.set_message ('err_parameter_ignored_suggest', {k, param}); -- set the suggestion error message else error_text = utilities.set_message ('err_parameter_ignored', {k}); -- suggested param not supported by this template v = ''; -- unset end end end if not utilities.is_set (error_text) then -- couldn't match with a pattern, is there an explicit suggestion? if (suggestions.suggestions[ k:lower() ] ~= nil) and validate (suggestions.suggestions[ k:lower() ], config_t.CitationClass) then utilities.set_message ('err_parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}); else utilities.set_message ('err_parameter_ignored', {k}); v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists) end end end end cite_args_t[k] = v; -- save this parameter and its value elseif not utilities.is_set (v) then -- for empty parameters if not validate (k, config_t.CitationClass, true) then -- is this empty parameter a valid parameter k = ('' == k) and cfg.err_msg_supl.empty_str or k; -- when k is empty string (or was space(s) trimmed to empty string), replace with descriptive text table.insert (empty_unknowns, utilities.wrap_style ('parameter', k)); -- format for error message and add to the list end end end if 0 ~= #empty_unknowns then -- create empty unknown error message utilities.set_message ('err_param_unknown_empty', { 1 == #empty_unknowns and '' or 's', utilities.make_sep_list (#empty_unknowns, empty_unknowns) }); end local non_url_param_t = {}; -- table of parameters and values that are not url-holding parameters local url_param_t = {}; -- table of url-holding paramters and their values for k, v in pairs (cite_args_t) do if 'string' == type (k) then -- don't evaluate positional parameters has_invisible_chars (k, v); -- look for invisible characters end has_extraneous_punc (k, v); -- look for extraneous terminal punctuation in parameter values missing_pipe_check (k, v); -- do we think that there is a parameter that is missing a pipe? cite_args_t[k] = inter_wiki_check (k, v); -- when language interwiki-linked parameter missing leading colon replace with wiki-link label if 'string' == type (k) then -- when parameter k is not positional if not cfg.url_skip[k] then -- and not in url skip table non_url_param_t[k] = v; -- make a parameter/value list for extraneous url check else -- and is in url skip table (a url-holding parameter) url_param_t[k] = v; -- make a parameter/value list to check for values that are The Wikipedia Library url end end end if cfg.suppress_archive_today_urls then has_archive_today_url (cite_args_t); -- look for and suppress archive.today urls and dependent parameters for all templates end has_extraneous_url (non_url_param_t); -- look for url in parameter values where a url does not belong has_twl_url (url_param_t, cite_args_t); -- look for url-holding parameters that hold a The Wikipedia Library url return table.concat ({ frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1' .. sandbox .. '/styles.css'}), citation0 (config_t, cite_args_t) }); end --[[--------------------------< C I T A T I O N >-------------------------------------------------------------- Template entry point ]] local function citation (frame) local config_t = {}; -- table to store parameters from the module {{#invoke:}} local args_t = frame:getParent().args; -- get template's preset parameters for k, v in pairs (frame.args) do -- get parameters from the {{#invoke}} frame config_t[k] = v; -- args_t[k] = v; -- crude debug support that allows us to render a citation from module {{#invoke:}}; skips parameter validation; TODO: keep? end return _citation (frame, args_t, config_t) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { citation = citation, -- template entry point _citation = _citation, -- module entry point } o0mp7ygqu5bibs2dabkkkkneiickrfx Module:Citation/CS1/Configuration 828 12882 116878 114925 2026-02-28T15:14:44Z en>Trappist the monk 0 synch from sandbox; 116878 Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates --[[--------------------------< S E T T I N G S >-------------------------------------------------------------- boolean settings used to control various things. these setting located here to make them easy to find ]] -- these settings local to this module only local local_digits_from_mediawiki = false; -- for i18n; when true, module fills date_names['local_digits'] from MediaWiki; manual fill required else; always false at en.wiki local local_date_names_from_mediawiki = false; -- for i18n; when true, module fills date_names['local']['long'] and date_names['local']['short'] from MediaWiki; -- manual translation required else; ; always false at en.wiki -- these settings exported to other modules local use_identifier_redirects = true; -- when true use redirect name for identifier label links; always true at en.wiki local local_lang_cat_enable = false; -- when true categorizes pages where |language=<local wiki's language>; always false at en.wiki local date_name_auto_xlate_enable = false; -- when true translates English month-names to the local-wiki's language month names; always false at en.wiki local date_digit_auto_xlate_enable = false; -- when true translates Western date digit to the local-wiki's language digits (date_names['local_digits']); always false at en.wiki local enable_sort_keys = true; -- when true module adds namespace sort keys to error and maintenance category links local suppress_archive_today_urls = true; -- when true module suppresses all parameters with an archive.today url and any deprendent parameters --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces identifiers for namespaces that will not be included in citation error categories. Same as setting notracking = true by default. For wikis that have a current version of Module:cs1 documentation support, this #invoke will return an unordered list of namespace names and their associated identifiers: {{#invoke:cs1 documentation support|uncategorized_namespace_lister|all=<anything>}} ]] local uncategorized_namespaces_t = {[2]=true}; -- init with user namespace id for k, _ in pairs (mw.site.talkNamespaces) do -- add all talk namespace ids uncategorized_namespaces_t[k] = true; end local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', '/[Aa]rchive'}; -- list of Lua patterns found in page names of pages we should not categorize --[[ at en.wiki Greek characters are used as sort keys for certain items in a category so that those items are placed at the end of a category page. See Wikipedia:Categorization#Sort_keys. That works well for en.wiki because English is written using the Latn script. This may not work well for other languages. At en.wiki it is desireable to place content from certain namespaces at the end of a category listing so the module adds sort keys to error and maintenance category links when rendering a cs1|2 template on a page in that namespace. i18n: if this does not work well for your language, set <enable_sort_keys> to false. ]] local name_space_sort_keys = { -- sort keys to be used with these namespaces: [4] = 'ω', -- wikipedia; omega [10] = 'τ', -- template; tau [118] = 'Δ', -- draft; delta ['other'] = 'ο', -- all other non-talk namespaces except main (article); omicron } --[[--------------------------< M E S S A G E S >-------------------------------------------------------------- Translation table The following contains fixed text that may be output as part of a citation. This is separated from the main body to aid in future translations of this module. ]] local messages = { ['agency'] = '$1 $2', -- $1 is sepc, $2 is agency ['archived-dead'] = 'Archived from $1 on $2', ['archived-live'] = '$1 from the original on $2', ['archived-unfit'] = 'Archived from the original on $1', ['archived'] = 'Archived', ['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword ['cartography'] = 'Cartography by $1', ['editor'] = 'ed.', ['editors'] = 'eds.', ['edition'] = '($1&nbsp;ed.)', ['episode'] = 'Episode $1', ['et al'] = 'et&nbsp;al.', ['in'] = 'In', -- edited works ['inactive'] = ' (inactive $1)', -- $1 is date which the doi was found to be broken in ['inset'] = '$1 inset', ['interview'] = 'Interviewed by $1', invisible_1 = '$1 $2', -- $1 stripmarker name; $2 is text from <invisible_chars[1]> invisible_2 = '$1 character', -- $1 character name from <invisible_chars[1]> ['mismatch'] = '<code class="cs1-code">&#124;$1=</code> / <code class="cs1-code">&#124;$2=</code> mismatch', -- $1 is year param name; $2 is date param name ['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1', ['notitle'] = 'No title', -- for |title=(()) and (in the future) |title=none ['original'] = 'the original', ['origdate'] = ' [$1]', ['published'] = ' (published $1)', ['retrieved'] = 'Retrieved $1', ['season'] = 'Season $1', ['section'] = '§&nbsp;$1', ['sections'] = '§§&nbsp;$1', ['series'] = '$1 $2', -- $1 is sepc, $2 is series ['seriesnum'] = 'Series $1', ['translated'] = 'Translated by $1', ['type'] = ' ($1)', -- for titletype wikidata = 'Wikidata', -- these used for interwikilinked author/editor/... names wikipedia = 'Wikipedia', wikisource = 'Wikisource', ['written'] = 'Written at $1', ['vol'] = '$1 Vol.&nbsp;$2', -- $1 is sepc; bold journal style volume is in presentation{} ['vol-no'] = '$1 Vol.&nbsp;$2, no.&nbsp;$3', -- sepc, volume, issue (alternatively insert $1 after $2, but then we'd also have to change capitalization) ['issue'] = '$1 No.&nbsp;$2', -- $1 is sepc ['art'] = '$1 Art.&nbsp;$2', -- $1 is sepc; for {{cite conference}} only ['vol-art'] = '$1 Vol.&nbsp;$2, art.&nbsp;$3', -- sepc, volume, article-number; for {{cite conference}} only ['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{} ['j-issue'] = ' ($1)', ['j-article-num'] = ' $1', -- TODO: any punctuation here? static text? ['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc ['p-prefix'] = "$1 p.&nbsp;$2", -- $1 is sepc ['pp-prefix'] = "$1 pp.&nbsp;$2", -- $1 is sepc ['j-page(s)'] = ': $1', -- same for page and pages ['sheet'] = '$1 Sheet&nbsp;$2', -- $1 is sepc ['sheets'] = '$1 Sheets&nbsp;$2', -- $1 is sepc ['j-sheet'] = ': Sheet&nbsp;$1', ['j-sheets'] = ': Sheets&nbsp;$1', ['language'] = '(in $1)', ['via'] = " &ndash; via $1", ['event'] = 'Event occurs at', ['minutes'] = ' $1 minutes in', -- $1 is the number of minutes -- Determines the location of the help page ['help page link'] = 'Help:CS1 errors', ['help page label'] = 'help', -- categories ['cat wikilink'] = '[[Category:$1]]', -- $1 is the category name ['cat wikilink sk'] = '[[Category:$1|$2]]', -- $1 is the category name; $2 is namespace sort key [':cat wikilink'] = '[[:Category:$1|link]]', -- category name as maintenance message wikilink; $1 is the category name -- Internal errors (should only occur if configuration is bad) ['undefined_error'] = 'Called with an undefined error condition', ['unknown_ID_key'] = 'Unrecognized ID key: ', -- an ID key in id_handlers not found in ~/Identifiers func_map{} ['unknown_ID_access'] = 'Unrecognized ID access keyword: ', -- an ID access keyword in id_handlers not found in keywords_lists['id-access']{} ['unknown_argument_map'] = 'Argument map not defined for this variable', ['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty', ['warning_msg_e'] = '<span style="color:#d33"><code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code>: this [[#$2|reference]] has errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID ['warning_msg_m'] = '<span style="color:#085"><code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code>: this [[#$2|reference]] has maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID } --[[--------------------------< C I T A T I O N _ C L A S S _ M A P >------------------------------------------ this table maps the value assigned to |CitationClass= in the cs1|2 templates to the canonical template name when the value assigned to |CitationClass= is different from the canonical template name. |CitationClass= values are used as class attributes in the <cite> tag that encloses the citation so these names may not contain spaces while the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the template's documentation when an article is displayed in preview mode. ]] local citation_class_map_t = { -- TODO: in Module:Cite/config write a function to use this table arxiv = 'cite arXiv', -- as the source for known_templates_t and citation_classes_t ['audio-visual'] = 'cite AV media', ['AV-media-notes'] = 'cite AV media notes', biorxiv = 'cite bioRxiv', book = 'cite book', citation = 'citation', citeseerx = 'cite CiteSeerX', conference = 'cite conference', document = 'cite document', encyclopaedia = 'cite encyclopedia', episode = 'cite episode', interview = 'cite interview', journal = 'cite journal', magazine = 'cite magazine', mailinglist = 'cite mailing list', map = 'cite map', medrxiv = 'cite medRxiv', news = 'cite news', newsgroup = 'cite newsgroup', podcast = 'cite podcast', pressrelease = 'cite press release', report = 'cite report', serial = 'cite serial', sign = 'cite sign', speech = 'cite speech', ssrn = 'cite SSRN', techreport = 'cite tech report', thesis = 'cite thesis', web = 'cite web', } --[=[-------------------------< E T _ A L _ P A T T E R N S >-------------------------------------------------- This table provides Lua patterns for the phrase "et al" and variants in name text (author, editor, etc.). The main module uses these to identify and emit the 'etal' message. ]=] local et_al_patterns = { "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.;,\"']*$", -- variations on the 'et al' theme "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.;,\"']*$", -- variations on the 'et alia', 'et alii' and 'et aliae' themes (false positive 'et aliie' unlikely to match) "[;,]? *%f[%a]and [Oo]thers", -- an alternative to et al. "%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form "%(%( *[Ee][Tt]%.? *[Aa][Ll]%.? *%)%)", -- a double-bracketed form (to counter partial removal of ((...)) syntax) "[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form } --[[--------------------------< P R E S E N T A T I O N >------------------------ Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically correct place. ]] local presentation = { -- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display ['hidden-error'] = '<span class="cs1-hidden-error citation-comment">$1</span>', ['visible-error'] = '<span class="cs1-visible-error citation-comment">$1</span>', ['hidden-maint'] = '<span class="cs1-maint citation-comment">$1</span>', ['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal CSS ['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like ['cite'] = '<cite class="$1">$2</cite>'; -- for use when citation does not have a namelist and |ref= not set so no id="..." attribute ['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when when |ref= is set or when citation has a namelist ['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc. ['interwiki'] = ' <span class="cs1-format">[in $1]</span>', -- for interwiki-language-linked author, editor, etc ['interproj'] = ' <span class="cs1-format">[at $1]</span>', -- for interwiki-project-linked author, editor, etc (:d: and :s: supported; :w: ignored) -- various access levels, for |access=, |doi-access=, |arxiv=, ... -- narrow no-break space &#8239; may work better than nowrap CSS. Or not? Browser support? ['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon ['free'] = {class='id-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css ['registration'] = {class='id-lock-registration', title='Free registration required'}, ['limited'] = {class='id-lock-limited', title='Free access subject to limited trial, subscription normally required'}, ['subscription'] = {class='id-lock-subscription', title='Paid subscription required'}, ['interwiki-icon'] = '<span class="$1" title="$2">$3</span>', ['class-wikisource'] = 'cs1-ws-icon', ['italic-title'] = "''$1''", ['kern-left'] = '<span class="cs1-kern-left"></span>$1', -- spacing to use when title contains leading single or double quote mark ['kern-right'] = '$1<span class="cs1-kern-right"></span>', -- spacing to use when title contains trailing single or double quote mark ['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span> ['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space) ['ocins'] = '<span title="$1" class="Z3988"></span>', ['parameter'] = '<code class="cs1-code">&#124;$1=</code>', ['ps_cs1'] = '.'; -- CS1 style postscript (terminal) character ['ps_cs2'] = ''; -- CS2 style postscript (terminal) character (empty string) ['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content ['quoted-title'] = '"$1"', ['sep_cs1'] = '.', -- CS1 element separator ['sep_cs2'] = ',', -- CS2 separator ['sep_nl'] = ';', -- CS1|2 style name-list separator between names is a semicolon ['sep_nl_and'] = ' and ', -- used as last nl sep when |name-list-style=and and list has 2 items ['sep_nl_end'] = '; and ', -- used as last nl sep when |name-list-style=and and list has 3+ names ['sep_name'] = ', ', -- CS1|2 style last/first separator is <comma><space> ['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma ['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space ['sep_list'] = ', ', -- used for |language= when list has 3+ items except for last sep which uses sep_list_end ['sep_list_pair'] = ' and ', -- used for |language= when list has 2 items ['sep_list_end'] = ', and ', -- used as last list sep for |language= when list has 3+ items ['trans-italic-title'] = "&#91;''$1''&#93;", ['trans-quoted-title'] = "&#91;$1&#93;", -- for |trans-title= and |trans-quote= ['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{} } --[[--------------------------< A L I A S E S >--------------------------------- Aliases table for commonly passed parameters. Parameter names on the right side in the assignments in this table must have been defined in the Whitelist before they will be recognized as valid parameter names ]] local aliases = { ['AccessDate'] = {'access-date', 'accessdate'}, -- Used by InternetArchiveBot ['Agency'] = 'agency', ['ArchiveDate'] = {'archive-date', 'archivedate'}, -- Used by InternetArchiveBot ['ArchiveFormat'] = 'archive-format', ['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- Used by InternetArchiveBot ['ArticleNumber'] = 'article-number', ['ASINTLD'] = 'asin-tld', ['At'] = 'at', -- Used by InternetArchiveBot ['Authors'] = {'people', 'credits'}, ['BookTitle'] = {'book-title', 'booktitle'}, ['Cartography'] = 'cartography', ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'}, ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'}; ['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url'}, -- Used by InternetArchiveBot ['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot ['Class'] = 'class', -- cite arxiv and arxiv identifier ['Collaboration'] = 'collaboration', ['Conference'] = {'conference', 'event'}, ['ConferenceFormat'] = 'conference-format', ['ConferenceURL'] = 'conference-url', -- Used by InternetArchiveBot ['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only ['Degree'] = 'degree', ['DF'] = 'df', ['DisplayAuthors'] = {'display-authors', 'display-subjects'}, ['DisplayContributors'] = 'display-contributors', ['DisplayEditors'] = 'display-editors', ['DisplayInterviewers'] = 'display-interviewers', ['DisplayTranslators'] = 'display-translators', ['Docket'] = 'docket', ['DoiBroken'] = 'doi-broken-date', ['Edition'] = 'edition', ['Embargo'] = 'pmc-embargo-date', ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'dictionary'}, -- cite encyclopedia only ['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode? ['Format'] = 'format', ['ID'] = {'id', 'ID'}, ['Inset'] = 'inset', ['Issue'] = {'issue', 'number'}, ['Language'] = {'language', 'lang'}, ['MailingList'] = {'mailing-list', 'mailinglist'}, -- cite mailing list only ['Map'] = 'map', -- cite map only ['MapFormat'] = 'map-format', -- cite map only ['MapURL'] = {'map-url', 'mapurl'}, -- cite map only -- Used by InternetArchiveBot ['MapUrlAccess'] = 'map-url-access', -- cite map only -- Used by InternetArchiveBot ['Minutes'] = 'minutes', ['Mode'] = 'mode', ['NameListStyle'] = 'name-list-style', ['Network'] = 'network', ['Newsgroup'] = 'newsgroup', -- cite newsgroup only ['NoPP'] = {'no-pp', 'nopp'}, ['NoTracking'] = {'no-tracking', 'template-doc-demo'}, ['Number'] = 'number', -- this case only for cite techreport ['OrigDate'] = {'orig-date', 'orig-year', 'origyear'}, ['Others'] = 'others', ['Page'] = {'page', 'p'}, -- Used by InternetArchiveBot ['Pages'] = {'pages', 'pp'}, -- Used by InternetArchiveBot ['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'}, ['Place'] = {'place', 'location'}, ['PostScript'] = 'postscript', ['PublicationDate'] = {'publication-date', 'publicationdate'}, ['PublicationPlace'] = {'publication-place', 'publicationplace'}, ['PublisherName'] = {'publisher', 'institution'}, ['Quote'] = {'quote', 'quotation'}, ['QuotePage'] = 'quote-page', ['QuotePages'] = 'quote-pages', ['Ref'] = 'ref', ['Scale'] = 'scale', ['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry', 'script-article', 'script-section'}, ['ScriptEncyclopedia'] = {'script-encyclopedia', 'script-encyclopaedia'}, -- cite encyclopedia only ['ScriptMap'] = 'script-map', ['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'}, ['ScriptQuote'] = 'script-quote', ['ScriptTitle'] = 'script-title', -- Used by InternetArchiveBot ['Season'] = 'season', ['Sections'] = 'sections', -- cite map only ['Series'] = {'series', 'version'}, ['SeriesLink'] = {'series-link', 'serieslink'}, ['SeriesNumber'] = {'series-number', 'series-no'}, ['Sheet'] = 'sheet', -- cite map only ['Sheets'] = 'sheets', -- cite map only ['Station'] = 'station', ['Time'] = 'time', ['TimeCaption'] = 'time-caption', ['Title'] = 'title', -- Used by InternetArchiveBot ['TitleLink'] = {'title-link', 'episode-link', 'episodelink'}, -- Used by InternetArchiveBot ['TitleNote'] = {'title-note', 'department'}, ['TitleType'] = {'type', 'medium'}, ['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'}, ['Transcript'] = 'transcript', ['TranscriptFormat'] = 'transcript-format', ['TranscriptURL'] = 'transcript-url', -- Used by InternetArchiveBot ['TransEncyclopedia'] = {'trans-encyclopedia', 'trans-encyclopaedia'}, -- cite encyclopedia only ['TransMap'] = 'trans-map', -- cite map only ['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'}, ['TransQuote'] = 'trans-quote', ['TransTitle'] = 'trans-title', -- Used by InternetArchiveBot ['URL'] = {'url', 'URL'}, -- Used by InternetArchiveBot ['UrlAccess'] = 'url-access', -- Used by InternetArchiveBot ['UrlStatus'] = 'url-status', -- Used by InternetArchiveBot ['Vauthors'] = 'vauthors', ['Veditors'] = 'veditors', ['Via'] = 'via', ['Volume'] = 'volume', ['Year'] = 'year', ['AuthorList-First'] = {"first#", "author-first#", "author#-first", "author-given#", "author#-given", "subject-first#", "subject#-first", "subject-given#", "subject#-given", "given#"}, ['AuthorList-Last'] = {"last#", "author-last#", "author#-last", "author-surname#", "author#-surname", "subject-last#", "subject#-last", "subject-surname#", "subject#-surname", "author#", 'host#', "subject#", "surname#"}, ['AuthorList-Link'] = {"author-link#", "author#-link", "subject-link#", "subject#-link", "authorlink#", "author#link"}, ['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask"}, ['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'}, ['ContributorList-Last'] = {'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname', 'contributor#'}, ['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'}, ['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'}, ['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"}, ['EditorList-Last'] = {"editor-last#", "editor#-last", "editor-surname#", "editor#-surname", "editor#"}, ['EditorList-Link'] = {"editor-link#", "editor#-link"}, ['EditorList-Mask'] = {"editor-mask#", "editor#-mask"}, ['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first', 'interviewer-given#', 'interviewer#-given'}, ['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last', 'interviewer-surname#', 'interviewer#-surname', 'interviewer#'}, ['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'}, ['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'}, ['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'}, ['TranslatorList-Last'] = {'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname', 'translator#'}, ['TranslatorList-Link'] = {'translator-link#', 'translator#-link'}, ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, } --[[--------------------------< D E P E N D E N C I E S _ T >-------------------------------------------------- a table of url-holding parameters upon which other parameters are dependent. this table is used by has_archive_today_url() to suppress parameters that are dependant upon a url-holding parameter that has as a value an archive.today (or alternate tld) url. archive.today is deprecated at en.wiki; see Wikipedia:Requests_for_comment/Archive.is_RFC_5 ]] local url_dependency_map_t = { -- table of url-holding parameters and the meta-parameters that are dependent on them ['url'] = {'AccessDate', 'ArchiveURL', 'Format', 'UrlAccess'}, ['archive-url'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, ['archiveurl'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, ['article-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['chapter-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['conference-url'] = {'ConferenceFormat'}, ['contribution-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['entry-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['map-url'] = {'MapFormat', 'MapUrlAccess'}, ['section-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['transcript-url'] = {'TranscriptFormat'}, }; local dependencies_t = {}; -- the table of url-holding parameters and their dependent parameters for url_param, meta_parameters_t in pairs (url_dependency_map_t) do -- sequence of meta-parameters (indexes) into <aliases> table local dependant_params_t = {}; -- collection of parameters that are dependent on this <url_param> for _, meta_parameter in ipairs (meta_parameters_t) do -- for each <aliases> meta-parameter (index) if 'string' == type (aliases[meta_parameter]) then -- for single parameter names (no aliases), <aliases[meta_parameter]> will be a string table.insert (dependant_params_t, aliases[meta_parameter]); -- add to this <url_param>'s dependency sequence else for _, alias in ipairs (aliases[meta_parameter]) do -- for each alias in aliases[meta_parameter] (aliases['AccessDate'] for example) table.insert (dependant_params_t, alias); -- add to this <url_param>'s dependency sequence end end end dependencies_t[url_param] = dependant_params_t; -- add the <url_param> and its dependent parameters end --[[--------------------------< P U N C T _ S K I P >--------------------------- builds a table of parameter names that the extraneous terminal punctuation check should not check. ]] local punct_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value 'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters 'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators 'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', -- miscellaneous 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'MapURL', 'TranscriptURL', 'URL', -- URL-holding parameters } local url_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'ID', 'MapURL', 'TranscriptURL', 'URL', -- parameters allowed to hold urls 'Page', 'Pages', 'At', 'QuotePage', 'QuotePages', -- insource locators allowed to hold urls } local function build_skip_table (skip_t, meta_params) for _, meta_param in ipairs (meta_params) do -- for each meta parameter key local params = aliases[meta_param]; -- get the parameter or the table of parameters associated with the meta parameter name if 'string' == type (params) then skip_t[params] = 1; -- just a single parameter else for _, param in ipairs (params) do -- get the parameter name skip_t[param] = 1; -- add the parameter name to the skip table local count; param, count = param:gsub ('#', ''); -- remove enumerator marker from enumerated parameters if 0 ~= count then -- if removed skip_t[param] = 1; -- add param name without enumerator marker end end end end return skip_t; end local punct_skip = {}; local url_skip = {}; --[[--------------------------< U R L _ A C C E S S _ M A P >-------------------------------------------------- this table used by the wikipedia library url test, has_twl_url(), which automatically sets a url-access parameter to 'subscription' when it discovers a wikipedia library url in any of the url-holding paramters used as keys in this table. translators: if your wiki uses parameter names for these url-holding parameters and their matching -access parameters, add your wiki's parameters to this list. Leave the English parameters in place. TODO: is there a better way to do this? ]] local url_access_map_t = { ['chapter-url'] = 'chapter-url-access', ['contribution-url'] = 'contribution-url-access', ['entry-url'] = 'entry-url-access', ['article-url'] = 'article-url-access', ['section-url'] = 'section-url-access', ['map-url'] = 'map-url-access', ['mapurl'] = 'map-url-access', ['url'] = 'url-access', ['URL'] = 'url-access' } --[[--------------------------< S I N G L E - L E T T E R S E C O N D - L E V E L D O M A I N S >---------- this is a list of tlds that are known to have single-letter second-level domain names. This list does not include ccTLDs which are accepted in is_domain_name(). ]] local single_letter_2nd_lvl_domains_t = {'cash', 'company', 'foundation', 'media', 'org', 'today'}; --[[-----------< S P E C I A L C A S E T R A N S L A T I O N S >------------ This table is primarily here to support internationalization. Translations in this table are used, for example, when an error message, category name, etc., is extracted from the English alias key. There may be other cases where this translation table may be useful. ]] local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191'; local special_case_translation = { author = 'author', editor = 'editor', name_list_params = '$1-name-list parameters', -- $1 is 'author' or 'editor'; used with err_redundant_parameters ['AuthorList'] = 'authors list', -- used to assemble maintenance category names ['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below ['EditorList'] = 'editors list', -- must match the names of the actual categories ['InterviewerList'] = 'interviewers list', -- this group or translations used by name_has_ed_markup() and name_has_mult_names() ['TranslatorList'] = 'translators list', -- Lua patterns to match pseudo-titles used by InternetArchiveBot and others as placeholder for unknown |title= value ['archived_copy'] = { -- used with CS1 maint: Archive[d] copy as title ['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki ['local'] = nil, -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language }, -- Lua patterns to match generic titles; usually created by bots or reference filling tools -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language -- generic titles and patterns in this table should be lowercase only -- leave ['local'] nil except when there is a matching generic title in your language -- boolean 'true' for plain-text searches; 'false' for pattern searches ['generic_titles'] = { ['accept'] = { }, ['reject'] = { {['en'] = {'^wayback%s+machine$', false}, ['local'] = nil}, {['en'] = {'are you a robot', true}, ['local'] = nil}, {['en'] = {'hugedomains', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?no +title[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'page not found', true}, ['local'] = nil}, {['en'] = {'subscribe to read', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?unknown[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'website is for sale', true}, ['local'] = nil}, {['en'] = {'^404', false}, ['local'] = nil}, {['en'] = {'error[ %-]404', false}, ['local'] = nil}, {['en'] = {'internet archive wayback machine', true}, ['local'] = nil}, {['en'] = {'log into facebook', true}, ['local'] = nil}, {['en'] = {'login • instagram', true}, ['local'] = nil}, {['en'] = {'redirecting...', true}, ['local'] = nil}, {['en'] = {'usurped title', true}, ['local'] = nil}, -- added by a GreenC bot {['en'] = {'wayback machine', true}, ['local'] = nil}, {['en'] = {'webcite query result', true}, ['local'] = nil}, {['en'] = {'wikiwix\'s cache', true}, ['local'] = nil}, {['en'] = {'bot verification', true}, ['local'] = nil}, } }, -- boolean 'true' for plain-text searches, search string must be lowercase only -- boolean 'false' for pattern searches -- leave ['local'] nil except when there is a matching generic name in your language ['generic_names'] = { ['accept'] = { {['en'] = {'%[%[[^|]*%(author%) *|[^%]]*%]%]', false}, ['local'] = nil}, }, ['reject'] = { {['en'] = {'about us', true}, ['local'] = nil}, {['en'] = {'%f[%a][Aa]dvisor%f[%A]', false}, ['local'] = nil}, {['en'] = {'allmusic', true}, ['local'] = nil}, {['en'] = {'%f[%a][Aa]uthor%f[%A]', false}, ['local'] = nil}, {['en'] = {'^[Bb]ureau$', false}, ['local'] = nil}, {['en'] = {'business', true}, ['local'] = nil}, {['en'] = {'cnn', true}, ['local'] = nil}, {['en'] = {'collaborator', true}, ['local'] = nil}, {['en'] = {'^[Cc]ompany$', false}, ['local'] = nil}, {['en'] = {'contributor', true}, ['local'] = nil}, {['en'] = {'contact us', true}, ['local'] = nil}, {['en'] = {'correspondent', true}, ['local'] = nil}, {['en'] = {'^[Dd]esk$', false}, ['local'] = nil}, {['en'] = {'directory', true}, ['local'] = nil}, {['en'] = {'%f[%(%[][%(%[]%s*eds?%.?%s*[%)%]]?$', false}, ['local'] = nil}, {['en'] = {'[,%.%s]%f[e]eds?%.?$', false}, ['local'] = nil}, {['en'] = {'^eds?[%.,;]', false}, ['local'] = nil}, {['en'] = {'^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]dited%f[%A]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]ditors?%f[%A]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]mail%f[%A]', false}, ['local'] = nil}, {['en'] = {'facebook', true}, ['local'] = nil}, {['en'] = {'google', true}, ['local'] = nil}, {['en'] = {'^[Gg]roup$', false}, ['local'] = nil}, {['en'] = {'home page', true}, ['local'] = nil}, {['en'] = {'^[Ii]nc%.?$', false}, ['local'] = nil}, {['en'] = {'instagram', true}, ['local'] = nil}, {['en'] = {'interviewer', true}, ['local'] = nil}, {['en'] = {'^[Ll]imited$', false}, ['local'] = nil}, {['en'] = {'linkedIn', true}, ['local'] = nil}, {['en'] = {'^[Nn]ews$', false}, ['local'] = nil}, {['en'] = {'[Nn]ews[ %-]?[Rr]oom', false}, ['local'] = nil}, {['en'] = {'pinterest', true}, ['local'] = nil}, {['en'] = {'policy', true}, ['local'] = nil}, {['en'] = {'privacy', true}, ['local'] = nil}, {['en'] = {'reuters', true}, ['local'] = nil}, {['en'] = {'translator', true}, ['local'] = nil}, {['en'] = {'tumblr', true}, ['local'] = nil}, {['en'] = {'twitter', true}, ['local'] = nil}, {['en'] = {'site name', true}, ['local'] = nil}, {['en'] = {'statement', true}, ['local'] = nil}, {['en'] = {'submitted', true}, ['local'] = nil}, {['en'] = {'super.?user', false}, ['local'] = nil}, {['en'] = {'%f['..is_Latn..'][Uu]ser%f[^'..is_Latn..']', false}, ['local'] = nil}, {['en'] = {'updated', true}, ['local'] = nil}, {['en'] = {'verfasser', true}, ['local'] = nil}, } } } --[[--------------------------< D A T E _ N A M E S >---------------------------------------------------------- This table of tables lists local language date names and fallback English date names. The code in Date_validation will look first in the local table for valid date names. If date names are not found in the local table, the code will look in the English table. Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation function date_name_xlate() is used. In these tables, season numbering is defined by Extended Date/Time Format (EDTF) Specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. CS1|2 only supports generic seasons. EDTF does support the distinction between north and south hemisphere seasons but CS1|2 has no way to make that distinction. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) The standard does not address 'named' dates so, for the purposes of CS1|2, Easter and Christmas are defined here as 98 and 99, which should be out of the ISO 8601 (EDTF) range of uses for a while. local_date_names_from_mediawiki is a boolean. When set to: true – module will fetch local month names from MediaWiki for both date_names['local']['long'] and date_names['local']['short']; this will unconditionally overwrite manual translations false – module will *not* fetch local month names from MediaWiki Caveat lector: There is no guarantee that MediaWiki will provide short month names. At your wiki you can test the results of the MediaWiki fetch in the debug console with this command (the result is alpha sorted): =mw.dumpObject (p.date_names['local']) While the module can fetch month names from MediaWiki, it cannot fetch the quarter, season, and named date names from MediaWiki. Those must be translated manually. ]] local local_date_names_from_mediawiki = true; -- when false, manual translation required for date_names['local']['long'] and date_names['local']['short']; overwrites manual translations -- when true, module fetches long and short month names from MediaWiki local date_names = { ['en'] = { -- English ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, -- when local_date_names_from_mediawiki = false ['local'] = { -- replace these English date names with the local language equivalents ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, ['inv_local_long'] = {}, -- used in date reformatting & translation; copy of date_names['local'].long where k/v are inverted: [1]='<local name>' etc. ['inv_local_short'] = {}, -- used in date reformatting & translation; copy of date_names['local'].short where k/v are inverted: [1]='<local name>' etc. ['inv_local_quarter'] = {}, -- used in date translation; copy of date_names['local'].quarter where k/v are inverted: [1]='<local name>' etc. ['inv_local_season'] = {}, -- used in date translation; copy of date_names['local'].season where k/v are inverted: [1]='<local name>' etc. ['inv_local_named'] = {}, -- used in date translation; copy of date_names['local'].named where k/v are inverted: [1]='<local name>' etc. ['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}, -- used to convert local language digits to Western 0-9 ['xlate_digits'] = {}, } if local_date_names_from_mediawiki then -- if fetching local month names from MediaWiki is enabled local long_t = {}; local short_t = {}; for i=1, 12 do -- loop 12x and local name = lang_obj:formatDate('F', '2022-' .. i .. '-1'); -- get long month name for each i long_t[name] = i; -- save it name = lang_obj:formatDate('M', '2022-' .. i .. '-1'); -- get short month name for each i short_t[name] = i; -- save it end date_names['local']['long'] = long_t; -- write the long table – overwrites manual translation date_names['local']['short'] = short_t; -- write the short table – overwrites manual translation end -- create inverted date-name tables for reformatting and/or translation for _, invert_t in pairs {{'long', 'inv_local_long'}, {'short', 'inv_local_short'}, {'quarter', 'inv_local_quarter'}, {'season', 'inv_local_season'}, {'named', 'inv_local_named'}} do for name, i in pairs (date_names['local'][invert_t[1]]) do -- this table is ['name'] = i date_names[invert_t[2]][i] = name; -- invert to get [i] = 'name' for conversions from ymd end end if local_digits_from_mediawiki then -- if fetching local digits from MediaWiki is enabled local digits_t = {}; for i=0, 9 do -- loop 10x and digits_t [lang_obj:formatNum (i)] = tostring (i); -- format the loop indexer as local lang table index and assign loop indexer (a string) as the value end date_names['local_digits'] = digits_t; end for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value end local df_template_patterns = { -- table of redirects to {{Use dmy dates}} and {{Use mdy dates}} '{{ *[Uu]se +(dmy) +dates *[|}]', -- 1159k -- sorted by approximate transclusion count '{{ *[Uu]se +(mdy) +dates *[|}]', -- 212k '{{ *[Uu]se +(MDY) +dates *[|}]', -- 788 '{{ *[Uu]se +(DMY) +dates *[|}]', -- 343 '{{ *([Mm]dy) *[|}]', -- 176 '{{ *[Uu]se *(dmy) *[|}]', -- 156 + 18 '{{ *[Uu]se *(mdy) *[|}]', -- 149 + 11 '{{ *([Dd]my) *[|}]', -- 56 '{{ *[Uu]se +(MDY) *[|}]', -- 5 '{{ *([Dd]MY) *[|}]', -- 3 '{{ *[Uu]se(mdy)dates *[|}]', -- 1 '{{ *[Uu]se +(DMY) *[|}]', -- 0 '{{ *([Mm]DY) *[|}]', -- 0 } local title_object = mw.title.getCurrentTitle(); local content; -- done this way so that unused templates appear in unused-template-reports; self-transcluded makes them look like they are used if 10 ~= title_object.namespace then -- all namespaces except Template content = title_object:getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 end local function get_date_format () if not content then -- nil content when we're in template return nil; -- auto-formatting does not work in Template space so don't set global_df end for _, pattern in ipairs (df_template_patterns) do -- loop through the patterns looking for {{Use dmy dates}} or {{Use mdy dates}} or any of their redirects local start, _, match = content:find(pattern); -- match is the three letters indicating desired date format if match then local use_dates_template = content:match ('%b{}', start); -- get the whole template if use_dates_template:match ('| *cs1%-dates *= *[lsy][sy]?') then -- look for |cs1-dates=publication date length access-/archive-date length return match:lower() .. '-' .. use_dates_template:match ('| *cs1%-dates *= *([lsy][sy]?)'); else return match:lower() .. '-all'; -- no |cs1-dates= k/v pair; return value appropriate for use in |df= end end end end local global_df; -- TODO: add this to <global_cs1_config_t>? --[[-----------------< V O L U M E , I S S U E , P A G E S >------------------ These tables hold cite class values (from the template invocation) and identify those templates that support |volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which is handled in the main module. ]] local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'} local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news', 'podcast'} local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'} --[[ These tables control when it is appropriate for {{citation}} to render |volume= and/or |issue=. The parameter names in the tables constrain {{citation}} so that its renderings match the renderings of the equivalent cs1 templates. For example, {{cite web}} does not support |volume= so the equivalent {{citation |website=...}} must not support |volume=. ]] local citation_no_volume_t = { -- {{citation}} does not render |volume= when these parameters are used 'website', 'mailinglist', 'script-website', } local citation_issue_t = { -- {{citation}} may render |issue= when these parameters are used 'journal', 'magazine', 'newspaper', 'periodical', 'work', 'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work', } --[[ Patterns for finding extra text in |volume=, |issue=, |page=, |pages= ]] local vol_iss_pg_patterns = { good_ppattern = '^P[^%.PpGg]', -- OK to begin with uppercase P: P7 (page 7 of section P), but not p123 (page 123); TODO: this allows 'Pages' which it should not bad_ppatterns = { -- patterns for |page= and |pages= '^[Pp][PpGg]?%.?[ %d]', '^[Pp][Pp]?%.&nbsp;', -- from {{p.}} and {{pp.}} templates '^[Pp]ages?', '^[Pp]gs.?', }, vi_patterns_t = { -- combined to catch volume-like text in |issue= and issue-like text in |volume= '^volumes?', -- volume-like text '^vols?[%.:=]?', '^issues?', --issue-like text '^iss[%.:=]?', '^numbers?', '^nos?%A', -- don't match 'november' or 'nostradamus' '^nr[%.:=]?', '^n[%.:= ]', -- might be a valid issue without separator (space char is sep char here) '^n°', -- 'n' with degree sign (U+00B0) '^№', -- precomposed unicode numero character (U+2116) }, } --[[--------------------------< K E Y W O R D S >------------------------------- These tables hold keywords for those parameters that have defined sets of acceptable keywords. ]] --[[-------------------< K E Y W O R D S T A B L E >-------------------------- this is a list of keywords; each key in the list is associated with a table of synonymous keywords possibly from different languages. for I18N: add local-language keywords to value table; do not change the key. For example, adding the German keyword 'ja': ['affirmative'] = {'yes', 'true', 'y', 'ja'}, Because CS1|2 templates from en.wiki articles are often copied to other local wikis, it is recommended that the English keywords remain in these tables. ]] local keywords = { ['amp'] = {'&', 'amp', 'ampersand'}, -- |name-list-style= ['and'] = {'and', 'serial'}, -- |name-list-style= ['affirmative'] = {'yes', 'true', 'y'}, -- |no-tracking=, |no-pp= -- Used by InternetArchiveBot ['afterword'] = {'afterword'}, -- |contribution= ['bot: unknown'] = {'bot: unknown'}, -- |url-status= -- Used by InternetArchiveBot ['cs1'] = {'cs1'}, -- |mode= ['cs2'] = {'cs2'}, -- |mode= ['dead'] = {'dead', 'deviated'}, -- |url-status= -- Used by InternetArchiveBot ['dmy'] = {'dmy'}, -- |df= ['dmy-all'] = {'dmy-all'}, -- |df= ['foreword'] = {'foreword'}, -- |contribution= ['free'] = {'free'}, -- |<id>-access= -- Used by InternetArchiveBot ['harv'] = {'harv'}, -- |ref=; this no longer supported; is_valid_parameter_value() called with <invert> = true ['introduction'] = {'introduction'}, -- |contribution= ['limited'] = {'limited'}, -- |url-access= -- Used by InternetArchiveBot ['live'] = {'live'}, -- |url-status= -- Used by InternetArchiveBot ['mdy'] = {'mdy'}, -- |df= ['mdy-all'] = {'mdy-all'}, -- |df= ['none'] = {'none'}, -- |postscript=, |ref=, |title=, |type= -- Used by InternetArchiveBot ['off'] = {'off'}, -- |title= (potentially also: |title-link=, |postscript=, |ref=, |type=) ['preface'] = {'preface'}, -- |contribution= ['registration'] = {'registration'}, -- |url-access= -- Used by InternetArchiveBot ['subscription'] = {'subscription'}, -- |url-access= -- Used by InternetArchiveBot ['unfit'] = {'unfit'}, -- |url-status= -- Used by InternetArchiveBot ['usurped'] = {'usurped'}, -- |url-status= -- Used by InternetArchiveBot ['vanc'] = {'vanc'}, -- |name-list-style= ['ymd'] = {'ymd'}, -- |df= ['ymd-all'] = {'ymd-all'}, -- |df= -- ['yMd'] = {'yMd'}, -- |df=; not supported at en.wiki -- ['yMd-all'] = {'yMd-all'}, -- |df=; not supported at en.wiki } --[[------------------------< X L A T E _ K E Y W O R D S >--------------------- this function builds a list, keywords_xlate{}, of the keywords found in keywords{} where the values from keywords{} become the keys in keywords_xlate{} and the keys from keywords{} become the values in keywords_xlate{}: ['affirmative'] = {'yes', 'true', 'y'}, -- in keywords{} becomes ['yes'] = 'affirmative', -- in keywords_xlate{} ['true'] = 'affirmative', ['y'] = 'affirmative', the purpose of this function is to act as a translator between a non-English keyword and its English equivalent that may be used in other modules of this suite ]] local function xlate_keywords () local out_table = {}; -- output goes here for k, keywords_t in pairs (keywords) do -- spin through the keywords table for _, keyword in ipairs (keywords_t) do -- for each keyword out_table[keyword] = k; -- create an entry in the output table where keyword is the key end end return out_table; end local keywords_xlate = xlate_keywords (); -- the list of translated keywords --[[----------------< M A K E _ K E Y W O R D S _ L I S T >--------------------- this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter. keywords_lists{}, is a table of tables from keywords{} ]] local function make_keywords_list (keywords_lists) local out_table = {}; -- output goes here for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ... table.insert (out_table, keyword); -- ... as plain text, to the output list end end return out_table; end --[[----------------< K E Y W O R D S _ L I S T S >----------------------------- this is a list of lists of valid keywords for the various parameters in [key]. Generally the keys in this table are the canonical en.wiki parameter names though some are contrived because of use in multiple differently named parameters: ['yes_true_y'], ['id-access']. The function make_keywords_list() extracts the individual keywords from the appropriate list in keywords{}. The lists in this table are used to validate the keyword assignment for the parameters named in this table's keys. ]] local keywords_lists = { ['yes_true_y'] = make_keywords_list ({keywords.affirmative}), ['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}), ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}), -- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki ['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}), ['name-list-style'] = make_keywords_list ({keywords.amp, keywords['and'], keywords.vanc}), ['ref'] = make_keywords_list ({keywords.harv}), -- inverted check; |ref=harv no longer supported ['url-access'] = make_keywords_list ({keywords.subscription, keywords.limited, keywords.registration}), ['url-status'] = make_keywords_list ({keywords.dead, keywords.live, keywords.unfit, keywords.usurped, keywords['bot: unknown']}), ['id-access'] = make_keywords_list ({keywords.free}), } --[[--------------------------< C S 1 _ C O N F I G _ G E T >-------------------------------------------------- fetch and validate values from {{cs1 config}} template to fill <global_cs1_config_t> no error messages; when errors are detected, the parameter value from {{cs1 config}} is blanked. Supports all parameters and aliases associated with the metaparameters: DisplayAuthors, DisplayContributors, DisplayEditors, DisplayInterviewers, DisplayTranslators, NameListStyle, and Mode. The DisplayWhatever metaparameters accept numeric values only (|display-authors=etal and the like is not supported). ]] local global_cs1_config_t = {}; -- TODO: add value returned from get_date_format() to this table? local function get_cs1_config () if not content then -- nil content when we're in template return nil; -- auto-formatting does not work in Template space so don't set global_df end local start = content:find('{{ *[Cc][Ss]1 config *[|}]'); -- <start> is offset into <content> when {{cs1 config}} found; nil else if start then local cs1_config_template = content:match ('%b{}', start); -- get the whole template if not cs1_config_template then return nil; end local params_t = mw.text.split (cs1_config_template:gsub ('^{{%s*', ''):gsub ('%s*}}$', ''), '%s*|%s*'); -- remove '{{' and '}}'; make a sequence of parameter/value pairs (split on the pipe) table.remove (params_t, 1); -- remove the template name because it isn't a parameter/value pair local config_meta_params_t = {'DisplayAuthors', 'DisplayContributors', 'DisplayEditors', 'DisplayInterviewers', 'DisplayTranslators', 'NameListStyle', 'Mode'}; local meta_param_map_t = {}; -- list of accepted parameter names usable in {{cs1 config}} goes here for _, meta_param in ipairs (config_meta_params_t) do -- for i18n using <config_meta_params_t>, map template parameter names to their metaparameter equivalents if 'table' == type (aliases[meta_param]) then -- if <meta_param> is a sequence, for _, param in ipairs (aliases[meta_param]) do -- extract its contents meta_param_map_t[param] = meta_param; -- and add to <meta_param_map_t> end else meta_param_map_t[aliases[meta_param]] = meta_param; -- not a sequence so just add the parameter to <meta_param_map_t> end end local keywords_t = {}; -- map valid keywords to their associate metaparameter; reverse form of <keyword_lists[key] for these metaparameters for _, metaparam_t in ipairs ({{'NameListStyle', 'name-list-style'}, {'Mode', 'mode'}}) do -- only these metaparameter / keywords_lists key pairs for _, keyword in ipairs (keywords_lists[metaparam_t[2]]) do -- spin through the list of keywords keywords_t[keyword] = metaparam_t[1]; -- add [keyword] = metaparameter to the map end end for _, param in ipairs (params_t) do -- spin through the {{cs1 config}} parameters and fill <global_cs1_config_t> local k, v = param:match ('([^=]-)%s*=%s*(.+)'); -- <k> is the parameter name; <v> is parameter's assigned value if k then if k:find ('^display') then -- if <k> is one of the |display-<namelist>= parameters if v:match ('%d+') then -- the assigned value must be digits; doesn't accept 'etal' global_cs1_config_t[meta_param_map_t[k]]=v; -- add the display param and its value to globals table end else if keywords_t[v] == meta_param_map_t[k] then -- keywords_t[v] returns nil or the metaparam name; these must be the same global_cs1_config_t[meta_param_map_t[k]]=v; -- add the parameter and its value to globals table end end end end end end get_cs1_config (); -- fill <global_cs1_config_t> --[[---------------------< S T R I P M A R K E R S >---------------------------- Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when) MediaWiki changes their form. ]] local stripmarkers = { ['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker ['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker() } --[[------------< I N V I S I B L E _ C H A R A C T E R S >--------------------- This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal representations of UTF-8 codes. The table is organized as a table of tables because the Lua pairs keyword returns table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at the top of the table are also found in the ranges specified by the entries at the bottom of the table. Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki stripmarker is not an error but some others are because the parameter values that include them become part of the template's metadata before stripmarker replacement. ]] local invisible_defs = { del = '\127', -- used to distinguish between stripmarker and del char zwj = '\226\128\141', -- used with capture because zwj may be allowed } local invisible_chars = { {'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD {'zero width joiner', '('.. invisible_defs.zwj .. ')'}, -- U+200D, E2 80 8D; capture because zwj may be allowed {'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B {'hair space', '\226\128\138'}, -- U+200A, E2 80 8A {'soft hyphen', '\194\173'}, -- U+00AD, C2 AD {'horizontal tab', '\009'}, -- U+0009 (HT), 09 {'line feed', '\010'}, -- U+000A (LF), 0A {'no-break space', '\194\160'}, -- U+00A0 (NBSP), C2 A0 {'carriage return', '\013'}, -- U+000D (CR), 0D {'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type {'delete', '('.. invisible_defs.del .. ')'}, -- U+007F (DEL), 7F; must be done after stripmarker test; capture to distinguish isolated del chars not part of stripmarker {'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) {'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F -- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF -- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF -- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD -- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD } --[[ Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This pattern covers all of the unicode characters for these languages: Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf plus the not-necessarily Indic scripts for Sinhala and Burmese: Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf the pattern is used by has_invisible_chars() and coins_cleanup() ]] local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]'; -- list of emoji that use a zwj character (U+200D) to combine with another emoji -- from: https://unicode.org/Public/emoji/17.0/emoji-zwj-sequences.txt; version: 17.0; 2025-01-08 -- table created by: [[:en:Module:Make emoji zwj table]] local emoji_t = { -- indexes are decimal forms of the hex values in U+xxxx [8596] = true, -- U+2194 ↔ left right arrow [8597] = true, -- U+2195 ↕ up down arrow [9760] = true, -- U+2620 ☠ skull and crossbones [9792] = true, -- U+2640 ♀ female sign [9794] = true, -- U+2642 ♂ male sign [9877] = true, -- U+2695 ⚕ staff of aesculapius [9878] = true, -- U+2696 ⚖ scales [9895] = true, -- U+26A7 ⚧ male with stroke and male and female sign [9992] = true, -- U+2708 ✈ airplane [10052] = true, -- U+2744 ❄ snowflake [10084] = true, -- U+2764 ❤ heavy black heart [10145] = true, -- U+27A1 ➡ black rightwards arrow [11035] = true, -- U+2B1B ⬛ black large square [127752] = true, -- U+1F308 🌈 rainbow [127787] = true, -- U+1F32B 🌫 fog [127806] = true, -- U+1F33E 🌾 ear of rice [127859] = true, -- U+1F373 🍳 cooking [127868] = true, -- U+1F37C 🍼 baby bottle [127876] = true, -- U+1F384 🎄 christmas tree [127891] = true, -- U+1F393 🎓 graduation cap [127908] = true, -- U+1F3A4 🎤 microphone [127912] = true, -- U+1F3A8 🎨 artist palette [127979] = true, -- U+1F3EB 🏫 school [127981] = true, -- U+1F3ED 🏭 factory [128048] = true, -- U+1F430 🐰 rabbit face [128102] = true, -- U+1F466 👦 boy [128103] = true, -- U+1F467 👧 girl [128104] = true, -- U+1F468 👨 man [128105] = true, -- U+1F469 👩 woman [128139] = true, -- U+1F48B 💋 kiss mark [128165] = true, -- U+1F4A5 💥 collision symbol [128168] = true, -- U+1F4A8 💨 dash symbol [128171] = true, -- U+1F4AB 💫 dizzy symbol [128187] = true, -- U+1F4BB 💻 personal computer [128188] = true, -- U+1F4BC 💼 brief case [128293] = true, -- U+1F525 🔥 fire [128295] = true, -- U+1F527 🔧 wrench [128300] = true, -- U+1F52C 🔬 microscope [128488] = true, -- U+1F5E8 🗨 left speech bubble [128640] = true, -- U+1F680 🚀 rocket [128658] = true, -- U+1F692 🚒 fire engine [129001] = true, -- U+1F7E9 🟩 large green square [129003] = true, -- U+1F7EB 🟫 large brown square [129309] = true, -- U+1F91D 🤝 handshake [129455] = true, -- U+1F9AF 🦯 probing cane [129456] = true, -- U+1F9B0 🦰 emoji component red hair [129457] = true, -- U+1F9B1 🦱 emoji component curly hair [129458] = true, -- U+1F9B2 🦲 emoji component bald [129459] = true, -- U+1F9B3 🦳 emoji component white hair [129466] = true, -- U+1F9BA 🦺 safety vest [129468] = true, -- U+1F9BC 🦼 motorized wheelchair [129469] = true, -- U+1F9BD 🦽 manual wheelchair [129489] = true, -- U+1F9D1 🧑 adult [129490] = true, -- U+1F9D2 🧒 child [129648] = true, -- U+1FA70 🩰 ballet shoes [129657] = true, -- U+1FA79 🩹 adhesive bandage [129775] = true, -- U+1FAEF 🫯 fight cloud [129778] = true, -- U+1FAF2 🫲 leftwards hand } --[[----------------------< L A N G U A G E S U P P O R T >------------------- These tables and constants support various language-specific functionality. ]] --local this_wiki_code = mw.getContentLanguage():getCode(); -- get this wiki's language code local this_wiki_code = lang_obj:getCode(); -- get this wiki's language code if string.match (mw.site.server, 'wikidata') then this_wiki_code = mw.getCurrentFrame():callParserFunction('int', {'lang'}); -- on Wikidata so use interface language setting instead end local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_code, 'all'); -- get a table of language tag/name pairs known to Wikimedia; used for interwiki tests local mw_languages_by_name_t = {}; for k, v in pairs (mw_languages_by_tag_t) do -- build a 'reversed' table name/tag language pairs know to MediaWiki; used for |language= v = mw.ustring.lower (v); -- lowercase for tag fetch; get name's proper case from mw_languages_by_tag_t[<tag>] if mw_languages_by_name_t[v] then -- when name already in the table if 2 == #k or 3 == #k then -- if tag does not have subtags mw_languages_by_name_t[v] = k; -- prefer the shortest tag for this name end else -- here when name not in the table mw_languages_by_name_t[v] = k; -- so add name and matching tag end end local inter_wiki_map = {}; -- map of interwiki prefixes that are language-code prefixes for k, v in pairs (mw.site.interwikiMap ('local')) do -- spin through the base interwiki map (limited to local) if mw_languages_by_tag_t[v["prefix"]] then -- if the prefix matches a known language tag inter_wiki_map[v["prefix"]] = true; -- add it to our local map end end --[[--------------------< S C R I P T _ L A N G _ C O D E S >------------------- This table is used to hold ISO 639-1 two-character and ISO 639-3 three-character language codes that apply only to |script-title= and |script-chapter= ]] local script_lang_codes = { 'ab', 'am', 'ar', 'as', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', 'cu', 'dv', 'dz', 'el', 'fa', 'grc', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kaa', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mni', 'mr', 'my', 'ne', 'or', 'ota', 'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', 'ta', 'te', 'tg', 'th', 'ti', 'tkr', 'tt', 'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh', 'zgh' }; --[[---------------< L A N G U A G E R E M A P P I N G >---------------------- These tables hold language information that is different (correct) from MediaWiki's definitions For each ['<tag>'] = 'language name' in lang_code_remap{} there must be a matching ['language name'] = {'language name', '<tag>'} in lang_name_remap{} lang_tag_remap{}: key is always lowercase ISO 639-1, -2, -3 language tag or a valid lowercase IETF language tag value is properly spelled and capitalized language name associated with <tag> only one language name per <tag>; key/value pair must have matching entry in lang_name_remap{} lang_name_remap{}: key is always lowercase language name value is a table the holds correctly spelled and capitalized language name [1] and associated tag [2] (tag must match a tag key in lang_tag_remap{}) may have multiple keys referring to a common preferred name and tag; For example: ['kolsch'] and ['kölsch'] both refer to 'Kölsch' and 'ksh' ]] local lang_tag_remap = { -- used for |language= and |script-title= / |script-chapter= ['als'] = 'Tosk Albanian', -- MediaWiki returns Alemannisch ['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['bn'] = 'Bengali', -- MediaWiki returns Bangla ['ca-valencia'] = 'Valencian', -- IETF variant of Catalan ['fkv'] = 'Kven', -- MediaWiki returns Kvensk ['gsw'] = 'Swiss German', ['ilo'] = 'Ilocano', -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['ksh'] = 'Kölsch', -- MediaWiki: Colognian; use IANA/ISO 639 preferred name ['ksh-x-colog'] = 'Colognian', -- override MediaWiki ksh; no IANA/ISO 639 code for Colognian; IETF private code created at Module:Lang/data ['mis-x-ripuar'] = 'Ripuarian', -- override MediaWiki ksh; no IANA/ISO 639 code for Ripuarian; IETF private code created at Module:Lang/data ['nan-tw'] = 'Taiwanese Hokkien', -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese and support en.wiki preferred name ['sr-ec'] = 'Serbian (Cyrillic script)', -- MediaWiki returns српски (ћирилица) ['sr-el'] = 'Serbian (Latin script)', -- MediaWiki returns srpski (latinica) } local lang_name_remap = { -- used for |language=; names require proper capitalization; tags must be lowercase ['alemannic'] = {'Swiss German', 'gsw'}, -- ISO 639-2, -3 alternate for Swiss German; MediaWiki mediawiki returns Alemannic for gsw; en.wiki preferred name ['alemannisch'] = {'Swiss German', 'gsw'}, -- not an ISO or IANA language name; MediaWiki uses 'als' as a subdomain name for Alemannic Wikipedia: als.wikipedia.org ['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap ['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code ['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found ['blackfoot'] = {'Blackfoot', 'bla'}, -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['colognian'] = {'Colognian', 'ksh-x-colog'}, -- MediaWiki preferred name for ksh ['ilocano'] = {'Ilocano', 'ilo'}, -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['kolsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name (use non-diacritical o instead of umlaut ö) ['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name ['kven'] = {'Kven', 'fkv'}, -- Unicode CLDR have decided not to support English language name for these two... ['kvensk'] = {'Kven', 'fkv'}, -- ...they say to refer to IANA registry for English names ['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639 ['serbian (cyrillic script)'] = {'Serbian (Cyrillic script)', 'sr-cyrl'}, -- special case to get correct tag when |language=sr-ec ['serbian (latin script)'] = {'Serbian (Latin script)', 'sr-latn'}, -- special case to get correct tag when |language=sr-el ['swiss german'] = {'Swiss German', 'gsw'}, ['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-tw'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese ['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found ['valencian'] = {'Valencian', 'ca-valencia'}, -- variant of Catalan; categorizes as Valencian } --[[---------------< P R O P E R T I E S _ C A T E G O R I E S >---------------- Properties categories. These are used for investigating qualities of citations. ]] local prop_cats = { ['foreign-lang-source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is foreign-language name, $2 is ISO639-1 code ['foreign-lang-source-2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code used as a sort key ['interproj-linked-name'] = 'CS1 interproject-linked names|$1', -- any author, editor, etc that has an interproject link; $1 is interproject tag used as a sort key ['interwiki-linked-name'] = 'CS1 interwiki-linked names|$1', -- any author, editor, etc that has an interwiki link; $1 is interwiki tag used as a sort key; yeilds to interproject ['local-lang-source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is local-language name, $2 is ISO639-1 code; not emitted when local_lang_cat_enable is false ['location-test'] = 'CS1 location test', ['long-vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 characters ['script'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is language tag ['tracked-param'] = 'CS1 tracked parameter: $1', -- $1 is base (enumerators removed) parameter name ['unfit'] = 'CS1: unfit URL', -- |url-status=unfit or |url-status=usurped; used to be a maint cat ['vanc-accept'] = 'CS1:Vancouver names with accept markup', -- for |vauthors=/|veditors= with accept-as-written markup ['year-range-abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form } --[[-------------------< T I T L E _ T Y P E S >-------------------------------- Here we map a template's CitationClass to TitleType (default values for |type= parameter) ]] local title_types = { ['AV-media-notes'] = 'Media notes', ['document'] = 'Document', ['interview'] = 'Interview', ['mailinglist'] = 'Mailing list', ['map'] = 'Map', ['podcast'] = 'Podcast', ['pressrelease'] = 'Press release', ['report'] = 'Report', ['speech'] = 'Speech', ['techreport'] = 'Technical report', ['thesis'] = 'Thesis', } --[[--------------------------< B U I L D _ K N O W N _ F R E E _ D O I _ R E G I S T R A N T S _ T A B L E >-- build a table of doi registrants known to be free-to-read In a doi, the registrant ID is the series of digits between the '10.' and the first '/': in doi 10.1100/sommat, 1100 is the registrant ID see §3.2.2 DOI prefix of the Doi Handbook p. 43 https://www.doi.org/doi-handbook/DOI_Handbook_Final.pdf#page=43 ]] local function build_free_doi_registrants_table() local registrants_t = {}; for _, v in ipairs ({ '1045', '1074', '1096', '1100', '1155', '1186', '1194', '1371', '1613', '1629', '1989', '1999', '2147', '2196', '3285', '3389', '3390', '3906', '3748', '3814', '3847', '3897', '4061', '4089', '4103', '4172', '4175', '4230', '4236', '4239', '4240', '4249', '4251', '4252', '4253', '4254', '4291', '4292', '4329', '4330', '4331', '5086', '5194', '5210', '5306', '5312', '5313', '5314', '5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', '5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', '6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '9778', '11131', '11569', '11647', '11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', '17645', '18637', '19080', '19173', '20944', '21037', '21105', '21468', '21767', '21425', '22261', '22323', '22459', '24105', '24196', '24966', '26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128', '47622', '47959', '52437', '52975', '53288', '53347', '54081', '54947', '55667', '55914', '57009', '58647', '59081', }) do registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants end return registrants_t; end -- known free registrants identifiable by the doi suffix incipit local extended_registrants_t = { -- doi suffix incipits are evaluated as lua patterns ['1002'] = {'aelm', 'leap', 'loe2%.', 'lol2%.'}, -- Advanced Electronic Materials, Learned Publishing, L&O e-Lectures, L&O Letters ['1016'] = {'j%.aace', 'j%.aed', 'j%.aiopen', 'j%.animal', 'j%.apsb', 'j%.addicn', -- AACE Endocrinology and Diabetes, AACE Endocrinology and Diabetes, AI Open, Animal, Acta Pharmaceutica Sinica B, Addiction Neuroscience 'j%.abrep', 'j%.gpb', 'j%.heliyon', 'j%.nlp', 'j%.patter', 'j%.proche', -- Addictive Behaviors Reports, Genomics, Proteomics & Bioinformatics after 2015, Heliyon, Natural Language Processing, Patterns, Procedia Chemistry 'j%.vgie', 'S1672-0229'}, -- VideoGIE, Genomics, Proteomics & Bioinformatics before 2015 ['1017'] = {'apj%.', 'nlp', 'mdh', 'S15574660'}, -- Natural Language Processing Journal, Medical History, Asia Pacific Journal ['1046'] = {'j%.1365-8711', 'j%.1365-246x'}, -- MNRAS, GJI ['1021'] = {'acscentsci', 'acsomega'}, -- ACS Central Science, ACS Omega ['1093'] = {'mnras', 'mnrasl', 'gji', 'pnasnexus', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, PNAS Nexus, RASTI ['1098'] = {'rsbm', 'rsob', 'rsos'}, -- Biographical Memoirs of Fellows of the Royal Society, Open Biology, Royal Society Open Science ['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics ['1107'] = {'S20569890', 'S20522525', 'S16005775', 'S24143146'}, -- Acta Crystallographica E, IUCrJ, Journal of Synchrotron Radiation, IUCrData ['1109'] = {'oa', 'oj'}, -- IEEE Open Access..., IEEE Open Journal... ['1111'] = {'aogs', 'j%.1365-2966', 'j%.1745-3933', 'j%.1365-246X'}, -- Acta Obstetricia et Gynecologica Scandinavica, MNRAS, MNRAS Letters, GJI ['1128'] = {'asmcr', 'jmbe', 'mbio', 'mra', 'spectrum', 'msphere', 'msystems'}, --ASM Case Reports, Journal of Microbiology & Biology Education, mBio, Microbiology Resource Announcements, Microbiology Spectrum, mSphere, mSystems ['1136'] = {'bmjopen'}, -- BMJ Open ['1140'] = {'epjc'}, -- European Physical Journal C ['1192'] = {'bjo'}, -- BJPsych Open ['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports ['1215'] = {'21573689', '21573698'}, -- L&O Fluids ['1590'] = {'0102-3306'}, -- Acta Botanica Brasilica ['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine ['4319'] = {'lo%.', 'lol%.', 'lom%.'}, -- L&O, L&O e-Lectures, L&O Methods ['5852'] = {'ejt'}, -- European Journal of Taxonomy ['7155'] = {'jgaa'}, -- Journal of Graph Algorithms and Applications ['11158'] = {'saasp'}, -- Systematic and Applied Acarology Special Publications ['11646'] = {'megataxa', 'mesozoic'}, -- Megataxa, Mesozoic ['14231'] = {'ag'}, -- Algebraic Geometry ['15446'] = {'abc'}, -- Acta Biológica Colombiana ['17239'] = {'jowr'}, -- Journal of Writing Research ['22073'] = {'pja'}, -- Persian Journal of Acarology ['24310'] = {'abm'}, -- Acta Botanica Malacitana ['24425'] = {'agp'}, -- Acta Geologica Polonica ['35249'] = {'rche'}, -- Revista Chilena de Entomología ['37520'] = {'fi'}, -- Fossil Imprint ['53562'] = {'ajcb'} -- Asian Journal of Conservation Biology } --[[===================<< E R R O R M E S S A G I N G >>====================== ]] --[[----------< E R R O R M E S S A G E S U P P L E M E N T S >------------- I18N for those messages that are supplemented with additional specific text that describes the reason for the error TODO: merge this with special_case_translations{}? ]] local err_msg_supl = { ['char'] = 'invalid character', -- |isbn=, |sbn= ['check'] = 'checksum', -- |isbn=, |sbn= empty_str = '(empty string)', -- empty unknown parameter check when cite has |= ['flag'] = 'flag', -- |archive-url= ['form'] = 'invalid form', -- |isbn=, |sbn= ['group'] = 'invalid group id', -- |isbn= ['initials'] = 'initials', -- Vancouver ['invalid language code'] = 'invalid language code', -- |script-<param>= ['journal'] = 'journal', -- |bibcode= ['length'] = 'length', -- |isbn=, |bibcode=, |sbn= ['liveweb'] = 'liveweb', -- |archive-url= ['missing comma'] = 'missing comma', -- Vancouver ['missing prefix'] = 'missing prefix', -- |script-<param>= ['missing title part'] = 'missing title part', -- |script-<param>= ['name'] = 'name', -- Vancouver ['non-Latin char'] = 'non-Latin character', -- Vancouver ['path'] = 'path', -- |archive-url= ['prefix'] = 'invalid prefix', -- |isbn= ['punctuation'] = 'punctuation', -- Vancouver ['save'] = 'save command', -- |archive-url= ['suffix'] = 'suffix', -- Vancouver ['timestamp'] = 'timestamp', -- |archive-url= ['unknown language code'] = 'unknown language code', -- |script-<param>= ['value'] = 'value', -- |bibcode= ['year'] = 'year', -- |bibcode= } --[[--------------< E R R O R _ C O N D I T I O N S >--------------------------- Error condition table. This table has two sections: errors at the top, maintenance at the bottom. Maint 'messaging' does not have a 'message' (message=nil) The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment. Anchor changes require identical changes to matching anchor in Help:CS1 errors TODO: rename error_conditions{} to something more generic; create separate error and maint tables inside that? ]] local error_conditions = { err_accessdate_missing_url = { message = '<code class="cs1-code">&#124;access-date=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'accessdate_missing_url', category = 'CS1 errors: access-date without URL', hidden = false }, err_apostrophe_markup = { message = 'Italic or bold markup not allowed in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'apostrophe_markup', category = 'CS1 errors: markup', hidden = false }, err_archive_date_missing_url = { message = '<code class="cs1-code">&#124;archive-date=</code> requires <code class="cs1-code">&#124;archive-url=</code>', anchor = 'archive_date_missing_url', category = 'CS1 errors: archive-url', hidden = false }, err_archive_date_url_ts_mismatch = { message = '<code class="cs1-code">&#124;archive-date=</code> / <code class="cs1-code">&#124;archive-url=</code> timestamp mismatch; $1 suggested', anchor = 'archive_date_url_ts_mismatch', category = 'CS1 errors: archive-url', hidden = false }, err_archive_missing_date = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;archive-date=</code>', anchor = 'archive_missing_date', category = 'CS1 errors: archive-url', hidden = false }, err_archive_missing_url = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'archive_missing_url', category = 'CS1 errors: archive-url', hidden = false }, err_archive_url = { message = '<code class="cs1-code">&#124;archive-url=</code> is malformed: $1', -- $1 is error message detail anchor = 'archive_url', category = 'CS1 errors: archive-url', hidden = false }, err_arxiv_missing = { message = '<code class="cs1-code">&#124;arxiv=</code> required', anchor = 'arxiv_missing', category = 'CS1 errors: arXiv', -- same as bad arxiv hidden = false }, err_asintld_missing_asin = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;asin=</code>', -- $1 is parameter name anchor = 'asintld_missing_asin', category = 'CS1 errors: ASIN TLD', hidden = false }, err_bad_arxiv = { message = 'Check <code class="cs1-code">&#124;arxiv=</code> value', anchor = 'bad_arxiv', category = 'CS1 errors: arXiv', hidden = false }, err_bad_asin = { message = 'Check <code class="cs1-code">&#124;asin=</code> value', anchor = 'bad_asin', category ='CS1 errors: ASIN', hidden = false }, err_bad_asin_tld = { message = 'Check <code class="cs1-code">&#124;asin-tld=</code> value', anchor = 'bad_asin_tld', category ='CS1 errors: ASIN TLD', hidden = false }, err_bad_bibcode = { message = 'Check <code class="cs1-code">&#124;bibcode=</code> $1', -- $1 is error message detail anchor = 'bad_bibcode', category = 'CS1 errors: bibcode', hidden = false }, err_bad_biorxiv = { message = 'Check <code class="cs1-code">&#124;biorxiv=</code> value', anchor = 'bad_biorxiv', category = 'CS1 errors: bioRxiv', hidden = false }, err_bad_citeseerx = { message = 'Check <code class="cs1-code">&#124;citeseerx=</code> value', anchor = 'bad_citeseerx', category = 'CS1 errors: citeseerx', hidden = false }, err_bad_date = { message = 'Check date values in: $1', -- $1 is a parameter name list anchor = 'bad_date', category = 'CS1 errors: dates', hidden = false }, err_bad_doi = { message = 'Check <code class="cs1-code">&#124;doi=</code> value', anchor = 'bad_doi', category = 'CS1 errors: DOI', hidden = false }, err_bad_hdl = { message = 'Check <code class="cs1-code">&#124;hdl=</code> value', anchor = 'bad_hdl', category = 'CS1 errors: HDL', hidden = false }, err_bad_isbn = { message = 'Check <code class="cs1-code">&#124;isbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_isbn', category = 'CS1 errors: ISBN', hidden = false }, err_bad_ismn = { message = 'Check <code class="cs1-code">&#124;ismn=</code> value', anchor = 'bad_ismn', category = 'CS1 errors: ISMN', hidden = false }, err_bad_issn = { message = 'Check <code class="cs1-code">&#124;$1issn=</code> value', -- $1 is 'e' or '' for eissn or issn anchor = 'bad_issn', category = 'CS1 errors: ISSN', hidden = false }, err_bad_jfm = { message = 'Check <code class="cs1-code">&#124;jfm=</code> value', anchor = 'bad_jfm', category = 'CS1 errors: JFM', hidden = false }, err_bad_jstor = { message = 'Check <code class="cs1-code">&#124;jstor=</code> value', anchor = 'bad_jstor', category = 'CS1 errors: JSTOR', hidden = false }, err_bad_lccn = { message = 'Check <code class="cs1-code">&#124;lccn=</code> value', anchor = 'bad_lccn', category = 'CS1 errors: LCCN', hidden = false }, err_bad_medrxiv = { message = 'Check <code class="cs1-code">&#124;medrxiv=</code> value', anchor = 'bad_medrxiv', category = 'CS1 errors: medRxiv', hidden = false }, err_bad_mr = { message = 'Check <code class="cs1-code">&#124;mr=</code> value', anchor = 'bad_mr', category = 'CS1 errors: MR', hidden = false }, err_bad_oclc = { message = 'Check <code class="cs1-code">&#124;oclc=</code> value', anchor = 'bad_oclc', category = 'CS1 errors: OCLC', hidden = false }, err_bad_ol = { message = 'Check <code class="cs1-code">&#124;ol=</code> value', anchor = 'bad_ol', category = 'CS1 errors: OL', hidden = false }, err_bad_osti = { message = 'Check <code class="cs1-code">&#124;osti=</code> value', anchor = 'bad_osti', category = 'CS1 errors: OSTI', hidden = false }, err_bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link= message = 'Check <code class="cs1-code">&#124;$1=</code> value', -- $1 is parameter name anchor = 'bad_paramlink', category = 'CS1 errors: parameter link', hidden = false }, err_bad_pmc = { message = 'Check <code class="cs1-code">&#124;pmc=</code> value', anchor = 'bad_pmc', category = 'CS1 errors: PMC', hidden = false }, err_bad_pmid = { message = 'Check <code class="cs1-code">&#124;pmid=</code> value', anchor = 'bad_pmid', category = 'CS1 errors: PMID', hidden = false }, err_bad_rfc = { message = 'Check <code class="cs1-code">&#124;rfc=</code> value', anchor = 'bad_rfc', category = 'CS1 errors: RFC', hidden = false }, err_bad_s2cid = { message = 'Check <code class="cs1-code">&#124;s2cid=</code> value', anchor = 'bad_s2cid', category = 'CS1 errors: S2CID', hidden = false }, err_bad_sbn = { message = 'Check <code class="cs1-code">&#124;sbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_sbn', category = 'CS1 errors: SBN', hidden = false }, err_bad_ssrn = { message = 'Check <code class="cs1-code">&#124;ssrn=</code> value', anchor = 'bad_ssrn', category = 'CS1 errors: SSRN', hidden = false }, err_bad_url = { message = 'Check $1 value', -- $1 is parameter name anchor = 'bad_url', category = 'CS1 errors: URL', hidden = false }, err_bad_usenet_id = { message = 'Check <code class="cs1-code">&#124;message-id=</code> value', anchor = 'bad_message_id', category = 'CS1 errors: message-id', hidden = false }, err_bad_zbl = { message = 'Check <code class="cs1-code">&#124;zbl=</code> value', anchor = 'bad_zbl', category = 'CS1 errors: Zbl', hidden = false }, err_bare_url_missing_title = { message = '$1 missing title', -- $1 is parameter name anchor = 'bare_url_missing_title', category = 'CS1 errors: bare URL', hidden = false }, err_biorxiv_missing = { message = '<code class="cs1-code">&#124;biorxiv=</code> required', anchor = 'biorxiv_missing', category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv hidden = false }, err_chapter_ignored = { message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'chapter_ignored', category = 'CS1 errors: chapter ignored', hidden = false }, err_citation_missing_title = { message = 'Missing or empty <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'citation_missing_title', category = 'CS1 errors: missing title', hidden = false }, err_citeseerx_missing = { message = '<code class="cs1-code">&#124;citeseerx=</code> required', anchor = 'citeseerx_missing', category = 'CS1 errors: citeseerx', -- same as bad citeseerx hidden = false }, err_cite_web_url = { -- this error applies to cite web and to cite podcast message = 'Missing or empty <code class="cs1-code">&#124;url=</code>', anchor = 'cite_web_url', category = 'CS1 errors: requires URL', hidden = false }, err_class_ignored = { message = '<code class="cs1-code">&#124;class=</code> ignored', anchor = 'class_ignored', category = 'CS1 errors: class', hidden = false }, err_contributor_ignored = { message = '<code class="cs1-code">&#124;contributor=</code> ignored', anchor = 'contributor_ignored', category = 'CS1 errors: contributor', hidden = false }, err_contributor_missing_required_param = { message = '<code class="cs1-code">&#124;contributor=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'contributor_missing_required_param', category = 'CS1 errors: contributor', hidden = false }, err_deprecated_params = { message = 'Cite uses deprecated parameter <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'deprecated_params', category = 'CS1 errors: deprecated parameters', hidden = false }, err_disp_name = { message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name; $2 is the assigned value anchor = 'disp_name', category = 'CS1 errors: display-names', hidden = false, }, err_doibroken_missing_doi = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;doi=</code>', -- $1 is parameter name anchor = 'doibroken_missing_doi', category = 'CS1 errors: DOI', hidden = false }, err_embargo_missing_pmc = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;pmc=</code>', -- $1 is parameter name anchor = 'embargo_missing_pmc', category = 'CS1 errors: PMC embargo', hidden = false }, err_empty_citation = { message = 'Empty citation', anchor = 'empty_citation', category = 'CS1 errors: empty citation', hidden = false }, err_etal = { message = 'Explicit use of et al. in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'explicit_et_al', category = 'CS1 errors: explicit use of et al.', hidden = false }, err_extra_text_edition = { message = '<code class="cs1-code">&#124;edition=</code> has extra text', anchor = 'extra_text_edition', category = 'CS1 errors: extra text: edition', hidden = false, }, err_extra_text_issue = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_issue', category = 'CS1 errors: extra text: issue', hidden = false, }, err_extra_text_pages = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_pages', category = 'CS1 errors: extra text: pages', hidden = false, }, err_extra_text_volume = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_volume', category = 'CS1 errors: extra text: volume', hidden = false, }, err_first_missing_last = { message = '<code class="cs1-code">&#124;$1=</code> missing <code class="cs1-code">&#124;$2=</code>', -- $1 is first alias, $2 is matching last alias anchor = 'first_missing_last', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_format_missing_url = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;$2=</code>', -- $1 is format parameter $2 is url parameter anchor = 'format_missing_url', category = 'CS1 errors: format without URL', hidden = false }, err_generic_name = { message = '<code class="cs1-code">&#124;$1=</code> has generic name', -- $1 is parameter name anchor = 'generic_name', category = 'CS1 errors: generic name', hidden = false, }, err_generic_title = { message = 'Cite uses generic title', anchor = 'generic_title', category = 'CS1 errors: generic title', hidden = false, }, err_invalid_isbn_date = { message = 'ISBN / Date incompatibility', anchor = 'invalid_isbn_date', category = 'CS1 errors: ISBN date', hidden = true }, err_invalid_param_val = { message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name $2 is parameter value anchor = 'invalid_param_val', category = 'CS1 errors: invalid parameter value', hidden = false }, err_invisible_char = { message = '$1 in $2 at position $3', -- $1 is invisible char $2 is parameter name $3 is position number anchor = 'invisible_char', category = 'CS1 errors: invisible characters', hidden = false }, err_medrxiv_missing = { message = '<code class="cs1-code">&#124;medrxiv=</code> required', anchor = 'medrxiv_missing', category = 'CS1 errors: medRxiv', -- same as bad medRxiv hidden = false }, err_missing_name = { message = 'Missing <code class="cs1-code">&#124;$1$2=</code>', -- $1 is modified NameList; $2 is enumerator anchor = 'missing_name', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_missing_periodical = { message = 'Cite $1 requires <code class="cs1-code">&#124;$2=</code>', -- $1 is cs1 template name; $2 is canonical periodical parameter name for cite $1 anchor = 'missing_periodical', category = 'CS1 errors: missing periodical', hidden = false }, err_missing_pipe = { message = 'Missing pipe in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'missing_pipe', category = 'CS1 errors: missing pipe', hidden = false }, err_missing_publisher = { message = 'Cite $1 requires <code class="cs1-code">&#124;$2=</code>', -- $1 is cs1 template name; $2 is canonical publisher parameter name for cite $1 anchor = 'missing_publisher', category = 'CS1 errors: missing publisher', hidden = false }, err_numeric_names = { message = '<code class="cs1-code">&#124;$1=</code> has numeric name', -- $1 is parameter name', anchor = 'numeric_names', category = 'CS1 errors: numeric name', hidden = false, }, err_param_access_requires_param = { message = '<code class="cs1-code">&#124;$1-access=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'param_access_requires_param', category = 'CS1 errors: param-access', hidden = false }, err_param_has_ext_link = { message = 'External link in <code class="cs1-code">$1</code>', -- $1 is parameter name anchor = 'param_has_ext_link', category = 'CS1 errors: external links', hidden = false }, err_param_has_twl_url = { message = 'Wikipedia Library link in <code class="cs1-code">$1</code>', -- $1 is parameter name anchor = 'param_has_twl_url', category = 'CS1 errors: URL', hidden = false }, err_parameter_ignored = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'parameter_ignored', category = 'CS1 errors: unsupported parameter', hidden = false }, err_parameter_ignored_suggest = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored (<code class="cs1-code">&#124;$2=</code> suggested)', -- $1 is unknown parameter $2 is suggested parameter name anchor = 'parameter_ignored_suggest', category = 'CS1 errors: unsupported parameter', hidden = false }, err_periodical_ignored = { message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'periodical_ignored', category = 'CS1 errors: periodical ignored', hidden = false }, err_redundant_parameters = { message = 'More than one of $1 specified', -- $1 is error message detail anchor = 'redundant_parameters', category = 'CS1 errors: redundant parameter', hidden = false }, err_script_parameter = { message = 'Invalid <code class="cs1-code">&#124;$1=</code>: $2', -- $1 is parameter name $2 is script language code or error detail anchor = 'script_parameter', category = 'CS1 errors: script parameters', hidden = false }, err_ssrn_missing = { message = '<code class="cs1-code">&#124;ssrn=</code> required', anchor = 'ssrn_missing', category = 'CS1 errors: SSRN', hidden = false }, err_text_ignored = { message = 'Text "$1" ignored', -- $1 is ignored text anchor = 'text_ignored', category = 'CS1 errors: unrecognized parameter', hidden = false }, err_trans_missing_title = { message = '<code class="cs1-code">&#124;trans-$1=</code> requires <code class="cs1-code">&#124;$1=</code> or <code class="cs1-code">&#124;script-$1=</code>', -- $1 is base parameter name anchor = 'trans_missing_title', category = 'CS1 errors: translated title', hidden = false }, err_param_unknown_empty = { message = 'Cite has empty unknown parameter$1: $2', -- $1 is 's' or empty space; $2 is emty unknown param list anchor = 'param_unknown_empty', category = 'CS1 errors: empty unknown parameters', hidden = false }, err_vancouver = { message = 'Vancouver style error: $1 in name $2', -- $1 is error detail, $2 is the nth name anchor = 'vancouver', category = 'CS1 errors: Vancouver style', hidden = false }, err_wikilink_in_url = { message = 'URL–wikilink conflict', -- uses ndash anchor = 'wikilink_in_url', category = 'CS1 errors: URL–wikilink conflict', -- uses ndash hidden = false }, --[[--------------------------< M A I N T >------------------------------------- maint messages do not have a message (message = nil); otherwise the structure is the same as error messages ]] maint_archive_origin = { message = nil, anchor = 'archive_origin', category = 'CS1 maint: archive origin', hidden = true, }, maint_archived_copy = { message = nil, anchor = 'archived_copy', category = 'CS1 maint: archived copy as title', hidden = true, }, maint_bibcode = { message = nil, anchor = 'bibcode', category = 'CS1 maint: bibcode', hidden = true, }, maint_location_no_publisher = { -- cite book, conference, encyclopedia; citation as book cite or encyclopedia cite message = nil, anchor = 'location_no_publisher', category = 'CS1 maint: location missing publisher', hidden = true, }, maint_bot_unknown = { message = nil, anchor = 'bot:_unknown', category = 'CS1 maint: bot: original URL status unknown', hidden = true, }, maint_date_auto_xlated = { -- date auto-translation not supported by en.wiki message = nil, anchor = 'date_auto_xlated', category = 'CS1 maint: date auto-translated', hidden = true, }, maint_date_format = { message = nil, anchor = 'date_format', category = 'CS1 maint: date format', hidden = true, }, maint_date_year = { message = nil, anchor = 'date_year', category = 'CS1 maint: date and year', hidden = true, }, maint_deprecated_archive = { message = nil, anchor = 'deprecated_archive', category = 'CS1 maint: deprecated archival service', hidden = true, }, maint_doi_ignore = { message = nil, anchor = 'doi_ignore', category = 'CS1 maint: ignored DOI errors', hidden = true, }, maint_doi_inactive = { message = nil, anchor = 'doi_inactive', category = 'CS1 maint: DOI inactive', hidden = true, }, maint_doi_inactive_dated = { message = nil, anchor = 'doi_inactive_dated', category = 'CS1 maint: DOI inactive as of $2$3$1', -- $1 is year, $2 is month-name or empty string, $3 is space or empty string hidden = true, }, maint_doi_unflagged_free = { message = nil, anchor = 'doi_unflagged_free', category = 'CS1 maint: unflagged free DOI', hidden = true, }, maint_extra_punct = { message = nil, anchor = 'extra_punct', category = 'CS1 maint: extra punctuation', hidden = true, }, maint_id_limit_load_fail = { -- applies to all cs1|2 templates on a page; message = nil, -- maint message (category link) never emitted anchor = 'id_limit_load_fail', category = 'CS1 maint: ID limit load fail', hidden = true, }, maint_isbn_ignore = { message = nil, anchor = 'ignore_isbn_err', category = 'CS1 maint: ignored ISBN errors', hidden = true, }, maint_issn_ignore = { message = nil, anchor = 'ignore_issn', category = 'CS1 maint: ignored ISSN errors', hidden = true, }, maint_jfm_format = { message = nil, anchor = 'jfm_format', category = 'CS1 maint: JFM format', hidden = true, }, maint_location = { message = nil, anchor = 'location', category = 'CS1 maint: location', hidden = true, }, maint_missing_class = { message = nil, anchor = 'missing_class', category = 'CS1 maint: missing class', hidden = true, }, maint_mr_format = { message = nil, anchor = 'mr_format', category = 'CS1 maint: MR format', hidden = true, }, maint_mult_names = { message = nil, anchor = 'mult_names', category = 'CS1 maint: multiple names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_numeric_names = { message = nil, anchor = 'numeric_names', category = 'CS1 maint: numeric names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_others = { message = nil, anchor = 'others', category = 'CS1 maint: others', hidden = true, }, maint_others_avm = { message = nil, anchor = 'others_avm', category = 'CS1 maint: others in cite AV media (notes)', hidden = true, }, maint_overridden_setting = { message = nil, anchor = 'overridden', category = 'CS1 maint: overridden setting', hidden = true, }, maint_page_art_num = { message = nil, anchor = 'page_art_num', category = 'CS1 maint: article number as page number', hidden = true, }, maint_pmc_embargo = { message = nil, anchor = 'embargo', category = 'CS1 maint: PMC embargo expired', hidden = true, }, maint_pmc_format = { message = nil, anchor = 'pmc_format', category = 'CS1 maint: PMC format', hidden = true, }, maint_postscript = { message = nil, anchor = 'postscript', category = 'CS1 maint: postscript', hidden = true, }, maint_publisher_location = { message = nil, anchor = 'publisher_location', category = 'CS1 maint: publisher location', hidden = true, }, maint_ref_duplicates_default = { message = nil, anchor = 'ref_default', category = 'CS1 maint: ref duplicates default', hidden = true, }, maint_shortened_archive_url = { message = nil, anchor = 'shortened_archive_url', category = 'CS1 maint: shortened archive url', hidden = true, }, maint_unknown_lang = { message = nil, anchor = 'unknown_lang', category = 'CS1 maint: unrecognized language', hidden = true, }, maint_untitled = { message = nil, anchor = 'untitled', category = 'CS1 maint: untitled periodical', hidden = true, }, maint_url_status = { message = nil, anchor = 'url_status', category = 'CS1 maint: url-status', hidden = true, }, maint_work_isbn = { message = nil, anchor = 'work_isbn', category = 'CS1 maint: work parameter with ISBN', hidden = true, }, maint_year= { message = nil, anchor = 'year', category = 'CS1 maint: year', hidden = true, }, maint_zbl = { message = nil, anchor = 'zbl', category = 'CS1 maint: Zbl', hidden = true, }, } --[[--------------------------< I D _ L I M I T S _ D A T A _ T >---------------------------------------------- fetch id limits for certain identifiers from c:Data:CS1/Identifier limits.tab. This source is a json tabular data file maintained at wikipedia commons. Convert the json format to a table of k/v pairs. The values from <id_limits_data_t> are used to set handle.id_limit. From 2025-02-21, MediaWiki is broken. Use this link to edit the tablular data file: https://commons.wikimedia.org/w/index.php?title=Data:CS1/Identifier_limits.tab&action=edit See Phab:T389105 ]] local id_limits_data_t = {}; local use_commons_data = true; -- set to false if your wiki does not have access to mediawiki commons; then, if false == use_commons_data then -- update this table from https://commons.wikimedia.org/wiki/Data:CS1/Identifier_limits.tab; last update: 2025-02-21 id_limits_data_t = {['OCLC'] = 10450000000, ['OSTI'] = 23010000, ['PMC'] = 11900000, ['PMID'] = 40400000, ['RFC'] = 9300, ['SSRN'] = 5200000, ['S2CID'] = 276000000}; -- this table must be maintained locally else -- here for wikis that do have access to mediawiki commons local load_fail_limit = 99999999999; -- very high number to avoid error messages on load failure id_limits_data_t = {['OCLC'] = load_fail_limit, ['OSTI'] = load_fail_limit, ['PMC'] = load_fail_limit, ['PMID'] = load_fail_limit, ['RFC'] = load_fail_limit, ['SSRN'] = load_fail_limit, ['S2CID'] = load_fail_limit}; local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data if mw.ext.data == nil then id_limits_data_load_fail = true; -- safeguard against Lua errors if mw.ext.data is not available for some reason else local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab'); -- attempt to load the tabular data from commons into <tab_data_t> if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category else for _, limit_t in ipairs (tab_data_t.data) do -- overwrite default <load_fail_limit> values from the data table in the tabular data id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier end end end end --[[--------------------------< I D _ H A N D L E R S >-------------------------------------------------------- The following contains a list of values for various defined identifiers. For each identifier we specify a variety of information necessary to properly render the identifier in the citation. parameters: a list of parameter aliases for this identifier; first in the list is the canonical form link: Wikipedia article name redirect: a local redirect to a local Wikipedia article name; at en.wiki, 'ISBN (identifier)' is a redirect to 'International Standard Book Number' q: Wikidata q number for the identifier label: the label preceding the identifier; label is linked to a Wikipedia article (in this order): redirect from id_handlers['<id>'].redirect when use_identifier_redirects is true Wikidata-supplied article name for the local wiki from id_handlers['<id>'].q local article name from id_handlers['<id>'].link prefix: the first part of a URL that will be concatenated with a second part which usually contains the identifier suffix: optional third part to be added after the identifier encode: true if URI should be percent-encoded; otherwise false COinS: identifier link or keyword for use in COinS: for identifiers registered at info-uri.info use: info:.... where '...' is the appropriate identifier label for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn for |asin= and |ol=, which require assembly, use the keyword: url for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info', 'rft', or 'url' works here) set to nil to leave the identifier out of the COinS separator: character or text between label and the identifier in the rendered citation id_limit: for those identifiers with established limits, this property holds the upper limit access: use this parameter to set the access level for all instances of this identifier. the value must be a valid access level for an identifier (see ['id-access'] in this file). custom_access: to enable custom access level for an identifier, set this parameter to the parameter that should control it (normally 'id-access') ]] local id_handlers = { ['ARXIV'] = { parameters = {'arxiv', 'eprint'}, link = 'arXiv', redirect = 'arXiv (identifier)', q = 'Q118398', label = 'arXiv', prefix = 'https://arxiv.org/abs/', encode = false, COinS = 'info:arxiv', separator = ':', access = 'free', -- free to read }, ['ASIN'] = { parameters = { 'asin', 'ASIN' }, link = 'Amazon Standard Identification Number', redirect = 'ASIN (identifier)', q = 'Q1753278', label = 'ASIN', prefix = 'https://www.amazon.', COinS = 'url', separator = '&nbsp;', encode = false; }, ['BIBCODE'] = { parameters = {'bibcode'}, link = 'Bibcode', redirect = 'Bibcode (identifier)', q = 'Q25754', label = 'Bibcode', prefix = 'https://ui.adsabs.harvard.edu/abs/', encode = false, COinS = 'info:bibcode', separator = ':', custom_access = 'bibcode-access', }, ['BIORXIV'] = { parameters = {'biorxiv'}, link = 'bioRxiv', redirect = 'bioRxiv (identifier)', q = 'Q19835482', label = 'bioRxiv', prefix = 'https://doi.org/', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['CITESEERX'] = { parameters = {'citeseerx'}, link = 'CiteSeerX', redirect = 'CiteSeerX (identifier)', q = 'Q2715061', label = 'CiteSeerX', prefix = 'https://citeseerx.ist.psu.edu/viewdoc/summary?doi=', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['DOI'] = { -- Used by InternetArchiveBot parameters = { 'doi', 'DOI'}, link = 'Digital object identifier', redirect = 'doi (identifier)', q = 'Q25670', label = 'doi', prefix = 'https://doi.org/', COinS = 'info:doi', separator = ':', encode = true, custom_access = 'doi-access', }, ['EISSN'] = { parameters = {'eissn', 'EISSN'}, link = 'International Standard Serial Number#Electronic ISSN', redirect = 'eISSN (identifier)', q = 'Q46339674', label = 'eISSN', prefix = 'https://search.worldcat.org/issn/', COinS = 'rft.eissn', encode = false, separator = '&nbsp;', }, ['HDL'] = { parameters = { 'hdl', 'HDL' }, link = 'Handle System', redirect = 'hdl (identifier)', q = 'Q3126718', label = 'hdl', prefix = 'https://hdl.handle.net/', COinS = 'info:hdl', separator = ':', encode = true, custom_access = 'hdl-access', }, ['ISBN'] = { -- Used by InternetArchiveBot parameters = {'isbn', 'ISBN'}, link = 'International Standard Book Number', redirect = 'ISBN (identifier)', q = 'Q33057', label = 'ISBN', prefix = 'Special:BookSources/', COinS = 'rft.isbn', separator = '&nbsp;', }, ['ISMN'] = { parameters = {'ismn', 'ISMN'}, link = 'International Standard Music Number', redirect = 'ISMN (identifier)', q = 'Q1666938', label = 'ISMN', prefix = '', -- not currently used; COinS = nil, -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['ISSN'] = { parameters = {'issn', 'ISSN'}, link = 'International Standard Serial Number', redirect = 'ISSN (identifier)', q = 'Q131276', label = 'ISSN', prefix = 'https://search.worldcat.org/issn/', COinS = 'rft.issn', encode = false, separator = '&nbsp;', }, ['JFM'] = { parameters = {'jfm', 'JFM'}, link = 'Jahrbuch über die Fortschritte der Mathematik', redirect = 'JFM (identifier)', q = '', label = 'JFM', prefix = 'https://zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['JSTOR'] = { parameters = {'jstor', 'JSTOR'}, link = 'JSTOR', redirect = 'JSTOR (identifier)', q = 'Q1420342', label = 'JSTOR', prefix = 'https://www.jstor.org/stable/', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', custom_access = 'jstor-access', }, ['LCCN'] = { parameters = {'lccn', 'LCCN'}, link = 'Library of Congress Control Number', redirect = 'LCCN (identifier)', q = 'Q620946', label = 'LCCN', prefix = 'https://lccn.loc.gov/', COinS = 'info:lccn', encode = false, separator = '&nbsp;', }, ['MEDRXIV'] = { parameters = {'medrxiv'}, link = 'medRxiv', redirect = 'medRxiv (identifier)', q = 'Q58465838', label = 'medRxiv', prefix = 'https://www.medrxiv.org/content/', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = false, separator = '&nbsp;', }, ['MR'] = { parameters = {'mr', 'MR'}, link = 'Mathematical Reviews', redirect = 'MR (identifier)', q = 'Q211172', label = 'MR', prefix = 'https://mathscinet.ams.org/mathscinet-getitem?mr=', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['OCLC'] = { parameters = {'oclc', 'OCLC'}, link = 'OCLC', redirect = 'OCLC (identifier)', q = 'Q190593', label = 'OCLC', prefix = 'https://search.worldcat.org/oclc/', COinS = 'info:oclcnum', encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.OCLC or 0, }, ['OL'] = { parameters = { 'ol', 'OL' }, link = 'Open Library', redirect = 'OL (identifier)', q = 'Q1201876', label = 'OL', prefix = 'https://openlibrary.org/', COinS = 'url', separator = '&nbsp;', encode = true, custom_access = 'ol-access', }, ['OSTI'] = { parameters = {'osti', 'OSTI'}, link = 'Office of Scientific and Technical Information', redirect = 'OSTI (identifier)', q = 'Q2015776', label = 'OSTI', prefix = 'https://www.osti.gov/biblio/', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.OSTI or 0, custom_access = 'osti-access', }, ['PMC'] = { parameters = {'pmc', 'PMC'}, link = 'PubMed Central', redirect = 'PMC (identifier)', q = 'Q229883', label = 'PMC', prefix = 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC', suffix = '', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.PMC or 0, access = 'free', -- free to read }, ['PMID'] = { parameters = {'pmid', 'PMID'}, link = 'PubMed Identifier', redirect = 'PMID (identifier)', q = 'Q2082879', label = 'PMID', prefix = 'https://pubmed.ncbi.nlm.nih.gov/', COinS = 'info:pmid', encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.PMID or 0, }, ['RFC'] = { parameters = {'rfc', 'RFC'}, link = 'Request for Comments', redirect = 'RFC (identifier)', q = 'Q212971', label = 'RFC', prefix = 'https://tools.ietf.org/html/rfc', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.RFC or 0, access = 'free', -- free to read }, ['SBN'] = { parameters = {'sbn', 'SBN'}, link = 'Standard Book Number', -- redirect to International_Standard_Book_Number#History redirect = 'SBN (identifier)', label = 'SBN', prefix = 'Special:BookSources/0-', -- prefix has leading zero necessary to make 9-digit sbn a 10-digit isbn COinS = nil, -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['SSRN'] = { parameters = {'ssrn', 'SSRN'}, link = 'Social Science Research Network', redirect = 'SSRN (identifier)', q = 'Q7550801', label = 'SSRN', prefix = 'https://papers.ssrn.com/sol3/papers.cfm?abstract_id=', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.SSRN or 0, custom_access = 'ssrn-access', }, ['S2CID'] = { parameters = {'s2cid', 'S2CID'}, link = 'Semantic Scholar', redirect = 'S2CID (identifier)', q = 'Q22908627', label = 'S2CID', prefix = 'https://api.semanticscholar.org/CorpusID:', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.S2CID or 0, custom_access = 's2cid-access', }, ['USENETID'] = { parameters = {'message-id'}, link = 'Usenet', redirect = 'Usenet (identifier)', q = 'Q193162', label = 'Usenet:', prefix = 'news:', encode = false, COinS = 'pre', -- use prefix value separator = '&nbsp;', }, ['ZBL'] = { parameters = {'zbl', 'ZBL' }, link = 'Zentralblatt MATH', redirect = 'Zbl (identifier)', q = 'Q190269', label = 'Zbl', prefix = 'https://zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, } --[[--------------------------< E X P O R T S >--------------------------------- ]] return { use_identifier_redirects = use_identifier_redirects, -- booleans defined in the settings at the top of this module local_lang_cat_enable = local_lang_cat_enable, date_name_auto_xlate_enable = date_name_auto_xlate_enable, date_digit_auto_xlate_enable = date_digit_auto_xlate_enable, enable_sort_keys = enable_sort_keys, suppress_archive_today_urls = suppress_archive_today_urls, -- tables and variables created when this module is loaded dependencies_t = dependencies_t, -- used to suppress parameters dependent on url-holding parameters holding archive.today urls enum_needs_xlation = '1' ~= date_names.xlate_digits['1'], -- to avoid unnecessary enumerator translation global_df = get_date_format (), -- this line can be replaced with "global_df = 'dmy-all'," to have all dates auto translated to dmy format. global_cs1_config_t = global_cs1_config_t, -- global settings from {{cs1 config}} id_limits_data_load_fail = id_limits_data_load_fail, -- true when commons tabular identifier-limit data fails to load known_free_doi_registrants_t = build_free_doi_registrants_table(), punct_skip = build_skip_table (punct_skip, punct_meta_params), url_skip = build_skip_table (url_skip, url_meta_params), archive_today_tlds_t = {['today'] = true, ['ph'] = true, ['is'] = true, ['md'] = true, ['li'] = true, ['fo'] = true, ['vn'] = true}; -- used by is_archive_today_url() name_space_sort_keys = name_space_sort_keys, aliases = aliases, special_case_translation = special_case_translation, date_names = date_names, err_msg_supl = err_msg_supl, error_conditions = error_conditions, editor_markup_patterns = editor_markup_patterns, et_al_patterns = et_al_patterns, extended_registrants_t = extended_registrants_t, id_handlers = id_handlers, keywords_lists = keywords_lists, keywords_xlate = keywords_xlate, stripmarkers = stripmarkers, invisible_chars = invisible_chars, invisible_defs = invisible_defs, indic_script = indic_script, emoji_t = emoji_t, maint_cats = maint_cats, messages = messages, presentation = presentation, prop_cats = prop_cats, script_lang_codes = script_lang_codes, lang_tag_remap = lang_tag_remap, lang_name_remap = lang_name_remap, this_wiki_code = this_wiki_code, title_types = title_types, uncategorized_namespaces = uncategorized_namespaces_t, uncategorized_subpages = uncategorized_subpages, templates_using_volume = templates_using_volume, templates_using_issue = templates_using_issue, templates_not_using_page = templates_not_using_page, vol_iss_pg_patterns = vol_iss_pg_patterns, single_letter_2nd_lvl_domains_t = single_letter_2nd_lvl_domains_t, url_access_map_t = url_access_map_t, inter_wiki_map = inter_wiki_map, mw_languages_by_tag_t = mw_languages_by_tag_t, mw_languages_by_name_t = mw_languages_by_name_t, citation_class_map_t = citation_class_map_t, citation_issue_t = citation_issue_t, citation_no_volume_t = citation_no_volume_t, } 7oukcgh6jfipsgm5ag4ypttwht4cce8 116879 116878 2026-07-16T10:58:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1/Configuration]] 116878 Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates --[[--------------------------< S E T T I N G S >-------------------------------------------------------------- boolean settings used to control various things. these setting located here to make them easy to find ]] -- these settings local to this module only local local_digits_from_mediawiki = false; -- for i18n; when true, module fills date_names['local_digits'] from MediaWiki; manual fill required else; always false at en.wiki local local_date_names_from_mediawiki = false; -- for i18n; when true, module fills date_names['local']['long'] and date_names['local']['short'] from MediaWiki; -- manual translation required else; ; always false at en.wiki -- these settings exported to other modules local use_identifier_redirects = true; -- when true use redirect name for identifier label links; always true at en.wiki local local_lang_cat_enable = false; -- when true categorizes pages where |language=<local wiki's language>; always false at en.wiki local date_name_auto_xlate_enable = false; -- when true translates English month-names to the local-wiki's language month names; always false at en.wiki local date_digit_auto_xlate_enable = false; -- when true translates Western date digit to the local-wiki's language digits (date_names['local_digits']); always false at en.wiki local enable_sort_keys = true; -- when true module adds namespace sort keys to error and maintenance category links local suppress_archive_today_urls = true; -- when true module suppresses all parameters with an archive.today url and any deprendent parameters --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces identifiers for namespaces that will not be included in citation error categories. Same as setting notracking = true by default. For wikis that have a current version of Module:cs1 documentation support, this #invoke will return an unordered list of namespace names and their associated identifiers: {{#invoke:cs1 documentation support|uncategorized_namespace_lister|all=<anything>}} ]] local uncategorized_namespaces_t = {[2]=true}; -- init with user namespace id for k, _ in pairs (mw.site.talkNamespaces) do -- add all talk namespace ids uncategorized_namespaces_t[k] = true; end local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', '/[Aa]rchive'}; -- list of Lua patterns found in page names of pages we should not categorize --[[ at en.wiki Greek characters are used as sort keys for certain items in a category so that those items are placed at the end of a category page. See Wikipedia:Categorization#Sort_keys. That works well for en.wiki because English is written using the Latn script. This may not work well for other languages. At en.wiki it is desireable to place content from certain namespaces at the end of a category listing so the module adds sort keys to error and maintenance category links when rendering a cs1|2 template on a page in that namespace. i18n: if this does not work well for your language, set <enable_sort_keys> to false. ]] local name_space_sort_keys = { -- sort keys to be used with these namespaces: [4] = 'ω', -- wikipedia; omega [10] = 'τ', -- template; tau [118] = 'Δ', -- draft; delta ['other'] = 'ο', -- all other non-talk namespaces except main (article); omicron } --[[--------------------------< M E S S A G E S >-------------------------------------------------------------- Translation table The following contains fixed text that may be output as part of a citation. This is separated from the main body to aid in future translations of this module. ]] local messages = { ['agency'] = '$1 $2', -- $1 is sepc, $2 is agency ['archived-dead'] = 'Archived from $1 on $2', ['archived-live'] = '$1 from the original on $2', ['archived-unfit'] = 'Archived from the original on $1', ['archived'] = 'Archived', ['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword ['cartography'] = 'Cartography by $1', ['editor'] = 'ed.', ['editors'] = 'eds.', ['edition'] = '($1&nbsp;ed.)', ['episode'] = 'Episode $1', ['et al'] = 'et&nbsp;al.', ['in'] = 'In', -- edited works ['inactive'] = ' (inactive $1)', -- $1 is date which the doi was found to be broken in ['inset'] = '$1 inset', ['interview'] = 'Interviewed by $1', invisible_1 = '$1 $2', -- $1 stripmarker name; $2 is text from <invisible_chars[1]> invisible_2 = '$1 character', -- $1 character name from <invisible_chars[1]> ['mismatch'] = '<code class="cs1-code">&#124;$1=</code> / <code class="cs1-code">&#124;$2=</code> mismatch', -- $1 is year param name; $2 is date param name ['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1', ['notitle'] = 'No title', -- for |title=(()) and (in the future) |title=none ['original'] = 'the original', ['origdate'] = ' [$1]', ['published'] = ' (published $1)', ['retrieved'] = 'Retrieved $1', ['season'] = 'Season $1', ['section'] = '§&nbsp;$1', ['sections'] = '§§&nbsp;$1', ['series'] = '$1 $2', -- $1 is sepc, $2 is series ['seriesnum'] = 'Series $1', ['translated'] = 'Translated by $1', ['type'] = ' ($1)', -- for titletype wikidata = 'Wikidata', -- these used for interwikilinked author/editor/... names wikipedia = 'Wikipedia', wikisource = 'Wikisource', ['written'] = 'Written at $1', ['vol'] = '$1 Vol.&nbsp;$2', -- $1 is sepc; bold journal style volume is in presentation{} ['vol-no'] = '$1 Vol.&nbsp;$2, no.&nbsp;$3', -- sepc, volume, issue (alternatively insert $1 after $2, but then we'd also have to change capitalization) ['issue'] = '$1 No.&nbsp;$2', -- $1 is sepc ['art'] = '$1 Art.&nbsp;$2', -- $1 is sepc; for {{cite conference}} only ['vol-art'] = '$1 Vol.&nbsp;$2, art.&nbsp;$3', -- sepc, volume, article-number; for {{cite conference}} only ['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{} ['j-issue'] = ' ($1)', ['j-article-num'] = ' $1', -- TODO: any punctuation here? static text? ['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc ['p-prefix'] = "$1 p.&nbsp;$2", -- $1 is sepc ['pp-prefix'] = "$1 pp.&nbsp;$2", -- $1 is sepc ['j-page(s)'] = ': $1', -- same for page and pages ['sheet'] = '$1 Sheet&nbsp;$2', -- $1 is sepc ['sheets'] = '$1 Sheets&nbsp;$2', -- $1 is sepc ['j-sheet'] = ': Sheet&nbsp;$1', ['j-sheets'] = ': Sheets&nbsp;$1', ['language'] = '(in $1)', ['via'] = " &ndash; via $1", ['event'] = 'Event occurs at', ['minutes'] = ' $1 minutes in', -- $1 is the number of minutes -- Determines the location of the help page ['help page link'] = 'Help:CS1 errors', ['help page label'] = 'help', -- categories ['cat wikilink'] = '[[Category:$1]]', -- $1 is the category name ['cat wikilink sk'] = '[[Category:$1|$2]]', -- $1 is the category name; $2 is namespace sort key [':cat wikilink'] = '[[:Category:$1|link]]', -- category name as maintenance message wikilink; $1 is the category name -- Internal errors (should only occur if configuration is bad) ['undefined_error'] = 'Called with an undefined error condition', ['unknown_ID_key'] = 'Unrecognized ID key: ', -- an ID key in id_handlers not found in ~/Identifiers func_map{} ['unknown_ID_access'] = 'Unrecognized ID access keyword: ', -- an ID access keyword in id_handlers not found in keywords_lists['id-access']{} ['unknown_argument_map'] = 'Argument map not defined for this variable', ['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty', ['warning_msg_e'] = '<span style="color:#d33"><code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code>: this [[#$2|reference]] has errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID ['warning_msg_m'] = '<span style="color:#085"><code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code>: this [[#$2|reference]] has maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID } --[[--------------------------< C I T A T I O N _ C L A S S _ M A P >------------------------------------------ this table maps the value assigned to |CitationClass= in the cs1|2 templates to the canonical template name when the value assigned to |CitationClass= is different from the canonical template name. |CitationClass= values are used as class attributes in the <cite> tag that encloses the citation so these names may not contain spaces while the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the template's documentation when an article is displayed in preview mode. ]] local citation_class_map_t = { -- TODO: in Module:Cite/config write a function to use this table arxiv = 'cite arXiv', -- as the source for known_templates_t and citation_classes_t ['audio-visual'] = 'cite AV media', ['AV-media-notes'] = 'cite AV media notes', biorxiv = 'cite bioRxiv', book = 'cite book', citation = 'citation', citeseerx = 'cite CiteSeerX', conference = 'cite conference', document = 'cite document', encyclopaedia = 'cite encyclopedia', episode = 'cite episode', interview = 'cite interview', journal = 'cite journal', magazine = 'cite magazine', mailinglist = 'cite mailing list', map = 'cite map', medrxiv = 'cite medRxiv', news = 'cite news', newsgroup = 'cite newsgroup', podcast = 'cite podcast', pressrelease = 'cite press release', report = 'cite report', serial = 'cite serial', sign = 'cite sign', speech = 'cite speech', ssrn = 'cite SSRN', techreport = 'cite tech report', thesis = 'cite thesis', web = 'cite web', } --[=[-------------------------< E T _ A L _ P A T T E R N S >-------------------------------------------------- This table provides Lua patterns for the phrase "et al" and variants in name text (author, editor, etc.). The main module uses these to identify and emit the 'etal' message. ]=] local et_al_patterns = { "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.;,\"']*$", -- variations on the 'et al' theme "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.;,\"']*$", -- variations on the 'et alia', 'et alii' and 'et aliae' themes (false positive 'et aliie' unlikely to match) "[;,]? *%f[%a]and [Oo]thers", -- an alternative to et al. "%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form "%(%( *[Ee][Tt]%.? *[Aa][Ll]%.? *%)%)", -- a double-bracketed form (to counter partial removal of ((...)) syntax) "[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form } --[[--------------------------< P R E S E N T A T I O N >------------------------ Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically correct place. ]] local presentation = { -- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display ['hidden-error'] = '<span class="cs1-hidden-error citation-comment">$1</span>', ['visible-error'] = '<span class="cs1-visible-error citation-comment">$1</span>', ['hidden-maint'] = '<span class="cs1-maint citation-comment">$1</span>', ['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal CSS ['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like ['cite'] = '<cite class="$1">$2</cite>'; -- for use when citation does not have a namelist and |ref= not set so no id="..." attribute ['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when when |ref= is set or when citation has a namelist ['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc. ['interwiki'] = ' <span class="cs1-format">[in $1]</span>', -- for interwiki-language-linked author, editor, etc ['interproj'] = ' <span class="cs1-format">[at $1]</span>', -- for interwiki-project-linked author, editor, etc (:d: and :s: supported; :w: ignored) -- various access levels, for |access=, |doi-access=, |arxiv=, ... -- narrow no-break space &#8239; may work better than nowrap CSS. Or not? Browser support? ['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon ['free'] = {class='id-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css ['registration'] = {class='id-lock-registration', title='Free registration required'}, ['limited'] = {class='id-lock-limited', title='Free access subject to limited trial, subscription normally required'}, ['subscription'] = {class='id-lock-subscription', title='Paid subscription required'}, ['interwiki-icon'] = '<span class="$1" title="$2">$3</span>', ['class-wikisource'] = 'cs1-ws-icon', ['italic-title'] = "''$1''", ['kern-left'] = '<span class="cs1-kern-left"></span>$1', -- spacing to use when title contains leading single or double quote mark ['kern-right'] = '$1<span class="cs1-kern-right"></span>', -- spacing to use when title contains trailing single or double quote mark ['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span> ['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space) ['ocins'] = '<span title="$1" class="Z3988"></span>', ['parameter'] = '<code class="cs1-code">&#124;$1=</code>', ['ps_cs1'] = '.'; -- CS1 style postscript (terminal) character ['ps_cs2'] = ''; -- CS2 style postscript (terminal) character (empty string) ['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content ['quoted-title'] = '"$1"', ['sep_cs1'] = '.', -- CS1 element separator ['sep_cs2'] = ',', -- CS2 separator ['sep_nl'] = ';', -- CS1|2 style name-list separator between names is a semicolon ['sep_nl_and'] = ' and ', -- used as last nl sep when |name-list-style=and and list has 2 items ['sep_nl_end'] = '; and ', -- used as last nl sep when |name-list-style=and and list has 3+ names ['sep_name'] = ', ', -- CS1|2 style last/first separator is <comma><space> ['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma ['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space ['sep_list'] = ', ', -- used for |language= when list has 3+ items except for last sep which uses sep_list_end ['sep_list_pair'] = ' and ', -- used for |language= when list has 2 items ['sep_list_end'] = ', and ', -- used as last list sep for |language= when list has 3+ items ['trans-italic-title'] = "&#91;''$1''&#93;", ['trans-quoted-title'] = "&#91;$1&#93;", -- for |trans-title= and |trans-quote= ['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{} } --[[--------------------------< A L I A S E S >--------------------------------- Aliases table for commonly passed parameters. Parameter names on the right side in the assignments in this table must have been defined in the Whitelist before they will be recognized as valid parameter names ]] local aliases = { ['AccessDate'] = {'access-date', 'accessdate'}, -- Used by InternetArchiveBot ['Agency'] = 'agency', ['ArchiveDate'] = {'archive-date', 'archivedate'}, -- Used by InternetArchiveBot ['ArchiveFormat'] = 'archive-format', ['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- Used by InternetArchiveBot ['ArticleNumber'] = 'article-number', ['ASINTLD'] = 'asin-tld', ['At'] = 'at', -- Used by InternetArchiveBot ['Authors'] = {'people', 'credits'}, ['BookTitle'] = {'book-title', 'booktitle'}, ['Cartography'] = 'cartography', ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'}, ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'}; ['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url'}, -- Used by InternetArchiveBot ['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot ['Class'] = 'class', -- cite arxiv and arxiv identifier ['Collaboration'] = 'collaboration', ['Conference'] = {'conference', 'event'}, ['ConferenceFormat'] = 'conference-format', ['ConferenceURL'] = 'conference-url', -- Used by InternetArchiveBot ['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only ['Degree'] = 'degree', ['DF'] = 'df', ['DisplayAuthors'] = {'display-authors', 'display-subjects'}, ['DisplayContributors'] = 'display-contributors', ['DisplayEditors'] = 'display-editors', ['DisplayInterviewers'] = 'display-interviewers', ['DisplayTranslators'] = 'display-translators', ['Docket'] = 'docket', ['DoiBroken'] = 'doi-broken-date', ['Edition'] = 'edition', ['Embargo'] = 'pmc-embargo-date', ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'dictionary'}, -- cite encyclopedia only ['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode? ['Format'] = 'format', ['ID'] = {'id', 'ID'}, ['Inset'] = 'inset', ['Issue'] = {'issue', 'number'}, ['Language'] = {'language', 'lang'}, ['MailingList'] = {'mailing-list', 'mailinglist'}, -- cite mailing list only ['Map'] = 'map', -- cite map only ['MapFormat'] = 'map-format', -- cite map only ['MapURL'] = {'map-url', 'mapurl'}, -- cite map only -- Used by InternetArchiveBot ['MapUrlAccess'] = 'map-url-access', -- cite map only -- Used by InternetArchiveBot ['Minutes'] = 'minutes', ['Mode'] = 'mode', ['NameListStyle'] = 'name-list-style', ['Network'] = 'network', ['Newsgroup'] = 'newsgroup', -- cite newsgroup only ['NoPP'] = {'no-pp', 'nopp'}, ['NoTracking'] = {'no-tracking', 'template-doc-demo'}, ['Number'] = 'number', -- this case only for cite techreport ['OrigDate'] = {'orig-date', 'orig-year', 'origyear'}, ['Others'] = 'others', ['Page'] = {'page', 'p'}, -- Used by InternetArchiveBot ['Pages'] = {'pages', 'pp'}, -- Used by InternetArchiveBot ['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'}, ['Place'] = {'place', 'location'}, ['PostScript'] = 'postscript', ['PublicationDate'] = {'publication-date', 'publicationdate'}, ['PublicationPlace'] = {'publication-place', 'publicationplace'}, ['PublisherName'] = {'publisher', 'institution'}, ['Quote'] = {'quote', 'quotation'}, ['QuotePage'] = 'quote-page', ['QuotePages'] = 'quote-pages', ['Ref'] = 'ref', ['Scale'] = 'scale', ['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry', 'script-article', 'script-section'}, ['ScriptEncyclopedia'] = {'script-encyclopedia', 'script-encyclopaedia'}, -- cite encyclopedia only ['ScriptMap'] = 'script-map', ['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'}, ['ScriptQuote'] = 'script-quote', ['ScriptTitle'] = 'script-title', -- Used by InternetArchiveBot ['Season'] = 'season', ['Sections'] = 'sections', -- cite map only ['Series'] = {'series', 'version'}, ['SeriesLink'] = {'series-link', 'serieslink'}, ['SeriesNumber'] = {'series-number', 'series-no'}, ['Sheet'] = 'sheet', -- cite map only ['Sheets'] = 'sheets', -- cite map only ['Station'] = 'station', ['Time'] = 'time', ['TimeCaption'] = 'time-caption', ['Title'] = 'title', -- Used by InternetArchiveBot ['TitleLink'] = {'title-link', 'episode-link', 'episodelink'}, -- Used by InternetArchiveBot ['TitleNote'] = {'title-note', 'department'}, ['TitleType'] = {'type', 'medium'}, ['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'}, ['Transcript'] = 'transcript', ['TranscriptFormat'] = 'transcript-format', ['TranscriptURL'] = 'transcript-url', -- Used by InternetArchiveBot ['TransEncyclopedia'] = {'trans-encyclopedia', 'trans-encyclopaedia'}, -- cite encyclopedia only ['TransMap'] = 'trans-map', -- cite map only ['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'}, ['TransQuote'] = 'trans-quote', ['TransTitle'] = 'trans-title', -- Used by InternetArchiveBot ['URL'] = {'url', 'URL'}, -- Used by InternetArchiveBot ['UrlAccess'] = 'url-access', -- Used by InternetArchiveBot ['UrlStatus'] = 'url-status', -- Used by InternetArchiveBot ['Vauthors'] = 'vauthors', ['Veditors'] = 'veditors', ['Via'] = 'via', ['Volume'] = 'volume', ['Year'] = 'year', ['AuthorList-First'] = {"first#", "author-first#", "author#-first", "author-given#", "author#-given", "subject-first#", "subject#-first", "subject-given#", "subject#-given", "given#"}, ['AuthorList-Last'] = {"last#", "author-last#", "author#-last", "author-surname#", "author#-surname", "subject-last#", "subject#-last", "subject-surname#", "subject#-surname", "author#", 'host#', "subject#", "surname#"}, ['AuthorList-Link'] = {"author-link#", "author#-link", "subject-link#", "subject#-link", "authorlink#", "author#link"}, ['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask"}, ['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'}, ['ContributorList-Last'] = {'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname', 'contributor#'}, ['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'}, ['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'}, ['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"}, ['EditorList-Last'] = {"editor-last#", "editor#-last", "editor-surname#", "editor#-surname", "editor#"}, ['EditorList-Link'] = {"editor-link#", "editor#-link"}, ['EditorList-Mask'] = {"editor-mask#", "editor#-mask"}, ['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first', 'interviewer-given#', 'interviewer#-given'}, ['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last', 'interviewer-surname#', 'interviewer#-surname', 'interviewer#'}, ['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'}, ['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'}, ['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'}, ['TranslatorList-Last'] = {'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname', 'translator#'}, ['TranslatorList-Link'] = {'translator-link#', 'translator#-link'}, ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, } --[[--------------------------< D E P E N D E N C I E S _ T >-------------------------------------------------- a table of url-holding parameters upon which other parameters are dependent. this table is used by has_archive_today_url() to suppress parameters that are dependant upon a url-holding parameter that has as a value an archive.today (or alternate tld) url. archive.today is deprecated at en.wiki; see Wikipedia:Requests_for_comment/Archive.is_RFC_5 ]] local url_dependency_map_t = { -- table of url-holding parameters and the meta-parameters that are dependent on them ['url'] = {'AccessDate', 'ArchiveURL', 'Format', 'UrlAccess'}, ['archive-url'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, ['archiveurl'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, ['article-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['chapter-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['conference-url'] = {'ConferenceFormat'}, ['contribution-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['entry-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['map-url'] = {'MapFormat', 'MapUrlAccess'}, ['section-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, ['transcript-url'] = {'TranscriptFormat'}, }; local dependencies_t = {}; -- the table of url-holding parameters and their dependent parameters for url_param, meta_parameters_t in pairs (url_dependency_map_t) do -- sequence of meta-parameters (indexes) into <aliases> table local dependant_params_t = {}; -- collection of parameters that are dependent on this <url_param> for _, meta_parameter in ipairs (meta_parameters_t) do -- for each <aliases> meta-parameter (index) if 'string' == type (aliases[meta_parameter]) then -- for single parameter names (no aliases), <aliases[meta_parameter]> will be a string table.insert (dependant_params_t, aliases[meta_parameter]); -- add to this <url_param>'s dependency sequence else for _, alias in ipairs (aliases[meta_parameter]) do -- for each alias in aliases[meta_parameter] (aliases['AccessDate'] for example) table.insert (dependant_params_t, alias); -- add to this <url_param>'s dependency sequence end end end dependencies_t[url_param] = dependant_params_t; -- add the <url_param> and its dependent parameters end --[[--------------------------< P U N C T _ S K I P >--------------------------- builds a table of parameter names that the extraneous terminal punctuation check should not check. ]] local punct_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value 'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters 'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators 'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', -- miscellaneous 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'MapURL', 'TranscriptURL', 'URL', -- URL-holding parameters } local url_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'ID', 'MapURL', 'TranscriptURL', 'URL', -- parameters allowed to hold urls 'Page', 'Pages', 'At', 'QuotePage', 'QuotePages', -- insource locators allowed to hold urls } local function build_skip_table (skip_t, meta_params) for _, meta_param in ipairs (meta_params) do -- for each meta parameter key local params = aliases[meta_param]; -- get the parameter or the table of parameters associated with the meta parameter name if 'string' == type (params) then skip_t[params] = 1; -- just a single parameter else for _, param in ipairs (params) do -- get the parameter name skip_t[param] = 1; -- add the parameter name to the skip table local count; param, count = param:gsub ('#', ''); -- remove enumerator marker from enumerated parameters if 0 ~= count then -- if removed skip_t[param] = 1; -- add param name without enumerator marker end end end end return skip_t; end local punct_skip = {}; local url_skip = {}; --[[--------------------------< U R L _ A C C E S S _ M A P >-------------------------------------------------- this table used by the wikipedia library url test, has_twl_url(), which automatically sets a url-access parameter to 'subscription' when it discovers a wikipedia library url in any of the url-holding paramters used as keys in this table. translators: if your wiki uses parameter names for these url-holding parameters and their matching -access parameters, add your wiki's parameters to this list. Leave the English parameters in place. TODO: is there a better way to do this? ]] local url_access_map_t = { ['chapter-url'] = 'chapter-url-access', ['contribution-url'] = 'contribution-url-access', ['entry-url'] = 'entry-url-access', ['article-url'] = 'article-url-access', ['section-url'] = 'section-url-access', ['map-url'] = 'map-url-access', ['mapurl'] = 'map-url-access', ['url'] = 'url-access', ['URL'] = 'url-access' } --[[--------------------------< S I N G L E - L E T T E R S E C O N D - L E V E L D O M A I N S >---------- this is a list of tlds that are known to have single-letter second-level domain names. This list does not include ccTLDs which are accepted in is_domain_name(). ]] local single_letter_2nd_lvl_domains_t = {'cash', 'company', 'foundation', 'media', 'org', 'today'}; --[[-----------< S P E C I A L C A S E T R A N S L A T I O N S >------------ This table is primarily here to support internationalization. Translations in this table are used, for example, when an error message, category name, etc., is extracted from the English alias key. There may be other cases where this translation table may be useful. ]] local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191'; local special_case_translation = { author = 'author', editor = 'editor', name_list_params = '$1-name-list parameters', -- $1 is 'author' or 'editor'; used with err_redundant_parameters ['AuthorList'] = 'authors list', -- used to assemble maintenance category names ['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below ['EditorList'] = 'editors list', -- must match the names of the actual categories ['InterviewerList'] = 'interviewers list', -- this group or translations used by name_has_ed_markup() and name_has_mult_names() ['TranslatorList'] = 'translators list', -- Lua patterns to match pseudo-titles used by InternetArchiveBot and others as placeholder for unknown |title= value ['archived_copy'] = { -- used with CS1 maint: Archive[d] copy as title ['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki ['local'] = nil, -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language }, -- Lua patterns to match generic titles; usually created by bots or reference filling tools -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language -- generic titles and patterns in this table should be lowercase only -- leave ['local'] nil except when there is a matching generic title in your language -- boolean 'true' for plain-text searches; 'false' for pattern searches ['generic_titles'] = { ['accept'] = { }, ['reject'] = { {['en'] = {'^wayback%s+machine$', false}, ['local'] = nil}, {['en'] = {'are you a robot', true}, ['local'] = nil}, {['en'] = {'hugedomains', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?no +title[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'page not found', true}, ['local'] = nil}, {['en'] = {'subscribe to read', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?unknown[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'website is for sale', true}, ['local'] = nil}, {['en'] = {'^404', false}, ['local'] = nil}, {['en'] = {'error[ %-]404', false}, ['local'] = nil}, {['en'] = {'internet archive wayback machine', true}, ['local'] = nil}, {['en'] = {'log into facebook', true}, ['local'] = nil}, {['en'] = {'login • instagram', true}, ['local'] = nil}, {['en'] = {'redirecting...', true}, ['local'] = nil}, {['en'] = {'usurped title', true}, ['local'] = nil}, -- added by a GreenC bot {['en'] = {'wayback machine', true}, ['local'] = nil}, {['en'] = {'webcite query result', true}, ['local'] = nil}, {['en'] = {'wikiwix\'s cache', true}, ['local'] = nil}, {['en'] = {'bot verification', true}, ['local'] = nil}, } }, -- boolean 'true' for plain-text searches, search string must be lowercase only -- boolean 'false' for pattern searches -- leave ['local'] nil except when there is a matching generic name in your language ['generic_names'] = { ['accept'] = { {['en'] = {'%[%[[^|]*%(author%) *|[^%]]*%]%]', false}, ['local'] = nil}, }, ['reject'] = { {['en'] = {'about us', true}, ['local'] = nil}, {['en'] = {'%f[%a][Aa]dvisor%f[%A]', false}, ['local'] = nil}, {['en'] = {'allmusic', true}, ['local'] = nil}, {['en'] = {'%f[%a][Aa]uthor%f[%A]', false}, ['local'] = nil}, {['en'] = {'^[Bb]ureau$', false}, ['local'] = nil}, {['en'] = {'business', true}, ['local'] = nil}, {['en'] = {'cnn', true}, ['local'] = nil}, {['en'] = {'collaborator', true}, ['local'] = nil}, {['en'] = {'^[Cc]ompany$', false}, ['local'] = nil}, {['en'] = {'contributor', true}, ['local'] = nil}, {['en'] = {'contact us', true}, ['local'] = nil}, {['en'] = {'correspondent', true}, ['local'] = nil}, {['en'] = {'^[Dd]esk$', false}, ['local'] = nil}, {['en'] = {'directory', true}, ['local'] = nil}, {['en'] = {'%f[%(%[][%(%[]%s*eds?%.?%s*[%)%]]?$', false}, ['local'] = nil}, {['en'] = {'[,%.%s]%f[e]eds?%.?$', false}, ['local'] = nil}, {['en'] = {'^eds?[%.,;]', false}, ['local'] = nil}, {['en'] = {'^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]dited%f[%A]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]ditors?%f[%A]', false}, ['local'] = nil}, {['en'] = {'%f[%a][Ee]mail%f[%A]', false}, ['local'] = nil}, {['en'] = {'facebook', true}, ['local'] = nil}, {['en'] = {'google', true}, ['local'] = nil}, {['en'] = {'^[Gg]roup$', false}, ['local'] = nil}, {['en'] = {'home page', true}, ['local'] = nil}, {['en'] = {'^[Ii]nc%.?$', false}, ['local'] = nil}, {['en'] = {'instagram', true}, ['local'] = nil}, {['en'] = {'interviewer', true}, ['local'] = nil}, {['en'] = {'^[Ll]imited$', false}, ['local'] = nil}, {['en'] = {'linkedIn', true}, ['local'] = nil}, {['en'] = {'^[Nn]ews$', false}, ['local'] = nil}, {['en'] = {'[Nn]ews[ %-]?[Rr]oom', false}, ['local'] = nil}, {['en'] = {'pinterest', true}, ['local'] = nil}, {['en'] = {'policy', true}, ['local'] = nil}, {['en'] = {'privacy', true}, ['local'] = nil}, {['en'] = {'reuters', true}, ['local'] = nil}, {['en'] = {'translator', true}, ['local'] = nil}, {['en'] = {'tumblr', true}, ['local'] = nil}, {['en'] = {'twitter', true}, ['local'] = nil}, {['en'] = {'site name', true}, ['local'] = nil}, {['en'] = {'statement', true}, ['local'] = nil}, {['en'] = {'submitted', true}, ['local'] = nil}, {['en'] = {'super.?user', false}, ['local'] = nil}, {['en'] = {'%f['..is_Latn..'][Uu]ser%f[^'..is_Latn..']', false}, ['local'] = nil}, {['en'] = {'updated', true}, ['local'] = nil}, {['en'] = {'verfasser', true}, ['local'] = nil}, } } } --[[--------------------------< D A T E _ N A M E S >---------------------------------------------------------- This table of tables lists local language date names and fallback English date names. The code in Date_validation will look first in the local table for valid date names. If date names are not found in the local table, the code will look in the English table. Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation function date_name_xlate() is used. In these tables, season numbering is defined by Extended Date/Time Format (EDTF) Specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. CS1|2 only supports generic seasons. EDTF does support the distinction between north and south hemisphere seasons but CS1|2 has no way to make that distinction. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) The standard does not address 'named' dates so, for the purposes of CS1|2, Easter and Christmas are defined here as 98 and 99, which should be out of the ISO 8601 (EDTF) range of uses for a while. local_date_names_from_mediawiki is a boolean. When set to: true – module will fetch local month names from MediaWiki for both date_names['local']['long'] and date_names['local']['short']; this will unconditionally overwrite manual translations false – module will *not* fetch local month names from MediaWiki Caveat lector: There is no guarantee that MediaWiki will provide short month names. At your wiki you can test the results of the MediaWiki fetch in the debug console with this command (the result is alpha sorted): =mw.dumpObject (p.date_names['local']) While the module can fetch month names from MediaWiki, it cannot fetch the quarter, season, and named date names from MediaWiki. Those must be translated manually. ]] local local_date_names_from_mediawiki = true; -- when false, manual translation required for date_names['local']['long'] and date_names['local']['short']; overwrites manual translations -- when true, module fetches long and short month names from MediaWiki local date_names = { ['en'] = { -- English ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, -- when local_date_names_from_mediawiki = false ['local'] = { -- replace these English date names with the local language equivalents ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, ['inv_local_long'] = {}, -- used in date reformatting & translation; copy of date_names['local'].long where k/v are inverted: [1]='<local name>' etc. ['inv_local_short'] = {}, -- used in date reformatting & translation; copy of date_names['local'].short where k/v are inverted: [1]='<local name>' etc. ['inv_local_quarter'] = {}, -- used in date translation; copy of date_names['local'].quarter where k/v are inverted: [1]='<local name>' etc. ['inv_local_season'] = {}, -- used in date translation; copy of date_names['local'].season where k/v are inverted: [1]='<local name>' etc. ['inv_local_named'] = {}, -- used in date translation; copy of date_names['local'].named where k/v are inverted: [1]='<local name>' etc. ['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}, -- used to convert local language digits to Western 0-9 ['xlate_digits'] = {}, } if local_date_names_from_mediawiki then -- if fetching local month names from MediaWiki is enabled local long_t = {}; local short_t = {}; for i=1, 12 do -- loop 12x and local name = lang_obj:formatDate('F', '2022-' .. i .. '-1'); -- get long month name for each i long_t[name] = i; -- save it name = lang_obj:formatDate('M', '2022-' .. i .. '-1'); -- get short month name for each i short_t[name] = i; -- save it end date_names['local']['long'] = long_t; -- write the long table – overwrites manual translation date_names['local']['short'] = short_t; -- write the short table – overwrites manual translation end -- create inverted date-name tables for reformatting and/or translation for _, invert_t in pairs {{'long', 'inv_local_long'}, {'short', 'inv_local_short'}, {'quarter', 'inv_local_quarter'}, {'season', 'inv_local_season'}, {'named', 'inv_local_named'}} do for name, i in pairs (date_names['local'][invert_t[1]]) do -- this table is ['name'] = i date_names[invert_t[2]][i] = name; -- invert to get [i] = 'name' for conversions from ymd end end if local_digits_from_mediawiki then -- if fetching local digits from MediaWiki is enabled local digits_t = {}; for i=0, 9 do -- loop 10x and digits_t [lang_obj:formatNum (i)] = tostring (i); -- format the loop indexer as local lang table index and assign loop indexer (a string) as the value end date_names['local_digits'] = digits_t; end for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value end local df_template_patterns = { -- table of redirects to {{Use dmy dates}} and {{Use mdy dates}} '{{ *[Uu]se +(dmy) +dates *[|}]', -- 1159k -- sorted by approximate transclusion count '{{ *[Uu]se +(mdy) +dates *[|}]', -- 212k '{{ *[Uu]se +(MDY) +dates *[|}]', -- 788 '{{ *[Uu]se +(DMY) +dates *[|}]', -- 343 '{{ *([Mm]dy) *[|}]', -- 176 '{{ *[Uu]se *(dmy) *[|}]', -- 156 + 18 '{{ *[Uu]se *(mdy) *[|}]', -- 149 + 11 '{{ *([Dd]my) *[|}]', -- 56 '{{ *[Uu]se +(MDY) *[|}]', -- 5 '{{ *([Dd]MY) *[|}]', -- 3 '{{ *[Uu]se(mdy)dates *[|}]', -- 1 '{{ *[Uu]se +(DMY) *[|}]', -- 0 '{{ *([Mm]DY) *[|}]', -- 0 } local title_object = mw.title.getCurrentTitle(); local content; -- done this way so that unused templates appear in unused-template-reports; self-transcluded makes them look like they are used if 10 ~= title_object.namespace then -- all namespaces except Template content = title_object:getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 end local function get_date_format () if not content then -- nil content when we're in template return nil; -- auto-formatting does not work in Template space so don't set global_df end for _, pattern in ipairs (df_template_patterns) do -- loop through the patterns looking for {{Use dmy dates}} or {{Use mdy dates}} or any of their redirects local start, _, match = content:find(pattern); -- match is the three letters indicating desired date format if match then local use_dates_template = content:match ('%b{}', start); -- get the whole template if use_dates_template:match ('| *cs1%-dates *= *[lsy][sy]?') then -- look for |cs1-dates=publication date length access-/archive-date length return match:lower() .. '-' .. use_dates_template:match ('| *cs1%-dates *= *([lsy][sy]?)'); else return match:lower() .. '-all'; -- no |cs1-dates= k/v pair; return value appropriate for use in |df= end end end end local global_df; -- TODO: add this to <global_cs1_config_t>? --[[-----------------< V O L U M E , I S S U E , P A G E S >------------------ These tables hold cite class values (from the template invocation) and identify those templates that support |volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which is handled in the main module. ]] local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'} local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news', 'podcast'} local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'} --[[ These tables control when it is appropriate for {{citation}} to render |volume= and/or |issue=. The parameter names in the tables constrain {{citation}} so that its renderings match the renderings of the equivalent cs1 templates. For example, {{cite web}} does not support |volume= so the equivalent {{citation |website=...}} must not support |volume=. ]] local citation_no_volume_t = { -- {{citation}} does not render |volume= when these parameters are used 'website', 'mailinglist', 'script-website', } local citation_issue_t = { -- {{citation}} may render |issue= when these parameters are used 'journal', 'magazine', 'newspaper', 'periodical', 'work', 'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work', } --[[ Patterns for finding extra text in |volume=, |issue=, |page=, |pages= ]] local vol_iss_pg_patterns = { good_ppattern = '^P[^%.PpGg]', -- OK to begin with uppercase P: P7 (page 7 of section P), but not p123 (page 123); TODO: this allows 'Pages' which it should not bad_ppatterns = { -- patterns for |page= and |pages= '^[Pp][PpGg]?%.?[ %d]', '^[Pp][Pp]?%.&nbsp;', -- from {{p.}} and {{pp.}} templates '^[Pp]ages?', '^[Pp]gs.?', }, vi_patterns_t = { -- combined to catch volume-like text in |issue= and issue-like text in |volume= '^volumes?', -- volume-like text '^vols?[%.:=]?', '^issues?', --issue-like text '^iss[%.:=]?', '^numbers?', '^nos?%A', -- don't match 'november' or 'nostradamus' '^nr[%.:=]?', '^n[%.:= ]', -- might be a valid issue without separator (space char is sep char here) '^n°', -- 'n' with degree sign (U+00B0) '^№', -- precomposed unicode numero character (U+2116) }, } --[[--------------------------< K E Y W O R D S >------------------------------- These tables hold keywords for those parameters that have defined sets of acceptable keywords. ]] --[[-------------------< K E Y W O R D S T A B L E >-------------------------- this is a list of keywords; each key in the list is associated with a table of synonymous keywords possibly from different languages. for I18N: add local-language keywords to value table; do not change the key. For example, adding the German keyword 'ja': ['affirmative'] = {'yes', 'true', 'y', 'ja'}, Because CS1|2 templates from en.wiki articles are often copied to other local wikis, it is recommended that the English keywords remain in these tables. ]] local keywords = { ['amp'] = {'&', 'amp', 'ampersand'}, -- |name-list-style= ['and'] = {'and', 'serial'}, -- |name-list-style= ['affirmative'] = {'yes', 'true', 'y'}, -- |no-tracking=, |no-pp= -- Used by InternetArchiveBot ['afterword'] = {'afterword'}, -- |contribution= ['bot: unknown'] = {'bot: unknown'}, -- |url-status= -- Used by InternetArchiveBot ['cs1'] = {'cs1'}, -- |mode= ['cs2'] = {'cs2'}, -- |mode= ['dead'] = {'dead', 'deviated'}, -- |url-status= -- Used by InternetArchiveBot ['dmy'] = {'dmy'}, -- |df= ['dmy-all'] = {'dmy-all'}, -- |df= ['foreword'] = {'foreword'}, -- |contribution= ['free'] = {'free'}, -- |<id>-access= -- Used by InternetArchiveBot ['harv'] = {'harv'}, -- |ref=; this no longer supported; is_valid_parameter_value() called with <invert> = true ['introduction'] = {'introduction'}, -- |contribution= ['limited'] = {'limited'}, -- |url-access= -- Used by InternetArchiveBot ['live'] = {'live'}, -- |url-status= -- Used by InternetArchiveBot ['mdy'] = {'mdy'}, -- |df= ['mdy-all'] = {'mdy-all'}, -- |df= ['none'] = {'none'}, -- |postscript=, |ref=, |title=, |type= -- Used by InternetArchiveBot ['off'] = {'off'}, -- |title= (potentially also: |title-link=, |postscript=, |ref=, |type=) ['preface'] = {'preface'}, -- |contribution= ['registration'] = {'registration'}, -- |url-access= -- Used by InternetArchiveBot ['subscription'] = {'subscription'}, -- |url-access= -- Used by InternetArchiveBot ['unfit'] = {'unfit'}, -- |url-status= -- Used by InternetArchiveBot ['usurped'] = {'usurped'}, -- |url-status= -- Used by InternetArchiveBot ['vanc'] = {'vanc'}, -- |name-list-style= ['ymd'] = {'ymd'}, -- |df= ['ymd-all'] = {'ymd-all'}, -- |df= -- ['yMd'] = {'yMd'}, -- |df=; not supported at en.wiki -- ['yMd-all'] = {'yMd-all'}, -- |df=; not supported at en.wiki } --[[------------------------< X L A T E _ K E Y W O R D S >--------------------- this function builds a list, keywords_xlate{}, of the keywords found in keywords{} where the values from keywords{} become the keys in keywords_xlate{} and the keys from keywords{} become the values in keywords_xlate{}: ['affirmative'] = {'yes', 'true', 'y'}, -- in keywords{} becomes ['yes'] = 'affirmative', -- in keywords_xlate{} ['true'] = 'affirmative', ['y'] = 'affirmative', the purpose of this function is to act as a translator between a non-English keyword and its English equivalent that may be used in other modules of this suite ]] local function xlate_keywords () local out_table = {}; -- output goes here for k, keywords_t in pairs (keywords) do -- spin through the keywords table for _, keyword in ipairs (keywords_t) do -- for each keyword out_table[keyword] = k; -- create an entry in the output table where keyword is the key end end return out_table; end local keywords_xlate = xlate_keywords (); -- the list of translated keywords --[[----------------< M A K E _ K E Y W O R D S _ L I S T >--------------------- this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter. keywords_lists{}, is a table of tables from keywords{} ]] local function make_keywords_list (keywords_lists) local out_table = {}; -- output goes here for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ... table.insert (out_table, keyword); -- ... as plain text, to the output list end end return out_table; end --[[----------------< K E Y W O R D S _ L I S T S >----------------------------- this is a list of lists of valid keywords for the various parameters in [key]. Generally the keys in this table are the canonical en.wiki parameter names though some are contrived because of use in multiple differently named parameters: ['yes_true_y'], ['id-access']. The function make_keywords_list() extracts the individual keywords from the appropriate list in keywords{}. The lists in this table are used to validate the keyword assignment for the parameters named in this table's keys. ]] local keywords_lists = { ['yes_true_y'] = make_keywords_list ({keywords.affirmative}), ['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}), ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}), -- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki ['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}), ['name-list-style'] = make_keywords_list ({keywords.amp, keywords['and'], keywords.vanc}), ['ref'] = make_keywords_list ({keywords.harv}), -- inverted check; |ref=harv no longer supported ['url-access'] = make_keywords_list ({keywords.subscription, keywords.limited, keywords.registration}), ['url-status'] = make_keywords_list ({keywords.dead, keywords.live, keywords.unfit, keywords.usurped, keywords['bot: unknown']}), ['id-access'] = make_keywords_list ({keywords.free}), } --[[--------------------------< C S 1 _ C O N F I G _ G E T >-------------------------------------------------- fetch and validate values from {{cs1 config}} template to fill <global_cs1_config_t> no error messages; when errors are detected, the parameter value from {{cs1 config}} is blanked. Supports all parameters and aliases associated with the metaparameters: DisplayAuthors, DisplayContributors, DisplayEditors, DisplayInterviewers, DisplayTranslators, NameListStyle, and Mode. The DisplayWhatever metaparameters accept numeric values only (|display-authors=etal and the like is not supported). ]] local global_cs1_config_t = {}; -- TODO: add value returned from get_date_format() to this table? local function get_cs1_config () if not content then -- nil content when we're in template return nil; -- auto-formatting does not work in Template space so don't set global_df end local start = content:find('{{ *[Cc][Ss]1 config *[|}]'); -- <start> is offset into <content> when {{cs1 config}} found; nil else if start then local cs1_config_template = content:match ('%b{}', start); -- get the whole template if not cs1_config_template then return nil; end local params_t = mw.text.split (cs1_config_template:gsub ('^{{%s*', ''):gsub ('%s*}}$', ''), '%s*|%s*'); -- remove '{{' and '}}'; make a sequence of parameter/value pairs (split on the pipe) table.remove (params_t, 1); -- remove the template name because it isn't a parameter/value pair local config_meta_params_t = {'DisplayAuthors', 'DisplayContributors', 'DisplayEditors', 'DisplayInterviewers', 'DisplayTranslators', 'NameListStyle', 'Mode'}; local meta_param_map_t = {}; -- list of accepted parameter names usable in {{cs1 config}} goes here for _, meta_param in ipairs (config_meta_params_t) do -- for i18n using <config_meta_params_t>, map template parameter names to their metaparameter equivalents if 'table' == type (aliases[meta_param]) then -- if <meta_param> is a sequence, for _, param in ipairs (aliases[meta_param]) do -- extract its contents meta_param_map_t[param] = meta_param; -- and add to <meta_param_map_t> end else meta_param_map_t[aliases[meta_param]] = meta_param; -- not a sequence so just add the parameter to <meta_param_map_t> end end local keywords_t = {}; -- map valid keywords to their associate metaparameter; reverse form of <keyword_lists[key] for these metaparameters for _, metaparam_t in ipairs ({{'NameListStyle', 'name-list-style'}, {'Mode', 'mode'}}) do -- only these metaparameter / keywords_lists key pairs for _, keyword in ipairs (keywords_lists[metaparam_t[2]]) do -- spin through the list of keywords keywords_t[keyword] = metaparam_t[1]; -- add [keyword] = metaparameter to the map end end for _, param in ipairs (params_t) do -- spin through the {{cs1 config}} parameters and fill <global_cs1_config_t> local k, v = param:match ('([^=]-)%s*=%s*(.+)'); -- <k> is the parameter name; <v> is parameter's assigned value if k then if k:find ('^display') then -- if <k> is one of the |display-<namelist>= parameters if v:match ('%d+') then -- the assigned value must be digits; doesn't accept 'etal' global_cs1_config_t[meta_param_map_t[k]]=v; -- add the display param and its value to globals table end else if keywords_t[v] == meta_param_map_t[k] then -- keywords_t[v] returns nil or the metaparam name; these must be the same global_cs1_config_t[meta_param_map_t[k]]=v; -- add the parameter and its value to globals table end end end end end end get_cs1_config (); -- fill <global_cs1_config_t> --[[---------------------< S T R I P M A R K E R S >---------------------------- Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when) MediaWiki changes their form. ]] local stripmarkers = { ['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker ['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker() } --[[------------< I N V I S I B L E _ C H A R A C T E R S >--------------------- This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal representations of UTF-8 codes. The table is organized as a table of tables because the Lua pairs keyword returns table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at the top of the table are also found in the ranges specified by the entries at the bottom of the table. Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki stripmarker is not an error but some others are because the parameter values that include them become part of the template's metadata before stripmarker replacement. ]] local invisible_defs = { del = '\127', -- used to distinguish between stripmarker and del char zwj = '\226\128\141', -- used with capture because zwj may be allowed } local invisible_chars = { {'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD {'zero width joiner', '('.. invisible_defs.zwj .. ')'}, -- U+200D, E2 80 8D; capture because zwj may be allowed {'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B {'hair space', '\226\128\138'}, -- U+200A, E2 80 8A {'soft hyphen', '\194\173'}, -- U+00AD, C2 AD {'horizontal tab', '\009'}, -- U+0009 (HT), 09 {'line feed', '\010'}, -- U+000A (LF), 0A {'no-break space', '\194\160'}, -- U+00A0 (NBSP), C2 A0 {'carriage return', '\013'}, -- U+000D (CR), 0D {'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type {'delete', '('.. invisible_defs.del .. ')'}, -- U+007F (DEL), 7F; must be done after stripmarker test; capture to distinguish isolated del chars not part of stripmarker {'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) {'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F -- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF -- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF -- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD -- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD } --[[ Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This pattern covers all of the unicode characters for these languages: Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf plus the not-necessarily Indic scripts for Sinhala and Burmese: Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf the pattern is used by has_invisible_chars() and coins_cleanup() ]] local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]'; -- list of emoji that use a zwj character (U+200D) to combine with another emoji -- from: https://unicode.org/Public/emoji/17.0/emoji-zwj-sequences.txt; version: 17.0; 2025-01-08 -- table created by: [[:en:Module:Make emoji zwj table]] local emoji_t = { -- indexes are decimal forms of the hex values in U+xxxx [8596] = true, -- U+2194 ↔ left right arrow [8597] = true, -- U+2195 ↕ up down arrow [9760] = true, -- U+2620 ☠ skull and crossbones [9792] = true, -- U+2640 ♀ female sign [9794] = true, -- U+2642 ♂ male sign [9877] = true, -- U+2695 ⚕ staff of aesculapius [9878] = true, -- U+2696 ⚖ scales [9895] = true, -- U+26A7 ⚧ male with stroke and male and female sign [9992] = true, -- U+2708 ✈ airplane [10052] = true, -- U+2744 ❄ snowflake [10084] = true, -- U+2764 ❤ heavy black heart [10145] = true, -- U+27A1 ➡ black rightwards arrow [11035] = true, -- U+2B1B ⬛ black large square [127752] = true, -- U+1F308 🌈 rainbow [127787] = true, -- U+1F32B 🌫 fog [127806] = true, -- U+1F33E 🌾 ear of rice [127859] = true, -- U+1F373 🍳 cooking [127868] = true, -- U+1F37C 🍼 baby bottle [127876] = true, -- U+1F384 🎄 christmas tree [127891] = true, -- U+1F393 🎓 graduation cap [127908] = true, -- U+1F3A4 🎤 microphone [127912] = true, -- U+1F3A8 🎨 artist palette [127979] = true, -- U+1F3EB 🏫 school [127981] = true, -- U+1F3ED 🏭 factory [128048] = true, -- U+1F430 🐰 rabbit face [128102] = true, -- U+1F466 👦 boy [128103] = true, -- U+1F467 👧 girl [128104] = true, -- U+1F468 👨 man [128105] = true, -- U+1F469 👩 woman [128139] = true, -- U+1F48B 💋 kiss mark [128165] = true, -- U+1F4A5 💥 collision symbol [128168] = true, -- U+1F4A8 💨 dash symbol [128171] = true, -- U+1F4AB 💫 dizzy symbol [128187] = true, -- U+1F4BB 💻 personal computer [128188] = true, -- U+1F4BC 💼 brief case [128293] = true, -- U+1F525 🔥 fire [128295] = true, -- U+1F527 🔧 wrench [128300] = true, -- U+1F52C 🔬 microscope [128488] = true, -- U+1F5E8 🗨 left speech bubble [128640] = true, -- U+1F680 🚀 rocket [128658] = true, -- U+1F692 🚒 fire engine [129001] = true, -- U+1F7E9 🟩 large green square [129003] = true, -- U+1F7EB 🟫 large brown square [129309] = true, -- U+1F91D 🤝 handshake [129455] = true, -- U+1F9AF 🦯 probing cane [129456] = true, -- U+1F9B0 🦰 emoji component red hair [129457] = true, -- U+1F9B1 🦱 emoji component curly hair [129458] = true, -- U+1F9B2 🦲 emoji component bald [129459] = true, -- U+1F9B3 🦳 emoji component white hair [129466] = true, -- U+1F9BA 🦺 safety vest [129468] = true, -- U+1F9BC 🦼 motorized wheelchair [129469] = true, -- U+1F9BD 🦽 manual wheelchair [129489] = true, -- U+1F9D1 🧑 adult [129490] = true, -- U+1F9D2 🧒 child [129648] = true, -- U+1FA70 🩰 ballet shoes [129657] = true, -- U+1FA79 🩹 adhesive bandage [129775] = true, -- U+1FAEF 🫯 fight cloud [129778] = true, -- U+1FAF2 🫲 leftwards hand } --[[----------------------< L A N G U A G E S U P P O R T >------------------- These tables and constants support various language-specific functionality. ]] --local this_wiki_code = mw.getContentLanguage():getCode(); -- get this wiki's language code local this_wiki_code = lang_obj:getCode(); -- get this wiki's language code if string.match (mw.site.server, 'wikidata') then this_wiki_code = mw.getCurrentFrame():callParserFunction('int', {'lang'}); -- on Wikidata so use interface language setting instead end local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_code, 'all'); -- get a table of language tag/name pairs known to Wikimedia; used for interwiki tests local mw_languages_by_name_t = {}; for k, v in pairs (mw_languages_by_tag_t) do -- build a 'reversed' table name/tag language pairs know to MediaWiki; used for |language= v = mw.ustring.lower (v); -- lowercase for tag fetch; get name's proper case from mw_languages_by_tag_t[<tag>] if mw_languages_by_name_t[v] then -- when name already in the table if 2 == #k or 3 == #k then -- if tag does not have subtags mw_languages_by_name_t[v] = k; -- prefer the shortest tag for this name end else -- here when name not in the table mw_languages_by_name_t[v] = k; -- so add name and matching tag end end local inter_wiki_map = {}; -- map of interwiki prefixes that are language-code prefixes for k, v in pairs (mw.site.interwikiMap ('local')) do -- spin through the base interwiki map (limited to local) if mw_languages_by_tag_t[v["prefix"]] then -- if the prefix matches a known language tag inter_wiki_map[v["prefix"]] = true; -- add it to our local map end end --[[--------------------< S C R I P T _ L A N G _ C O D E S >------------------- This table is used to hold ISO 639-1 two-character and ISO 639-3 three-character language codes that apply only to |script-title= and |script-chapter= ]] local script_lang_codes = { 'ab', 'am', 'ar', 'as', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', 'cu', 'dv', 'dz', 'el', 'fa', 'grc', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kaa', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mni', 'mr', 'my', 'ne', 'or', 'ota', 'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', 'ta', 'te', 'tg', 'th', 'ti', 'tkr', 'tt', 'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh', 'zgh' }; --[[---------------< L A N G U A G E R E M A P P I N G >---------------------- These tables hold language information that is different (correct) from MediaWiki's definitions For each ['<tag>'] = 'language name' in lang_code_remap{} there must be a matching ['language name'] = {'language name', '<tag>'} in lang_name_remap{} lang_tag_remap{}: key is always lowercase ISO 639-1, -2, -3 language tag or a valid lowercase IETF language tag value is properly spelled and capitalized language name associated with <tag> only one language name per <tag>; key/value pair must have matching entry in lang_name_remap{} lang_name_remap{}: key is always lowercase language name value is a table the holds correctly spelled and capitalized language name [1] and associated tag [2] (tag must match a tag key in lang_tag_remap{}) may have multiple keys referring to a common preferred name and tag; For example: ['kolsch'] and ['kölsch'] both refer to 'Kölsch' and 'ksh' ]] local lang_tag_remap = { -- used for |language= and |script-title= / |script-chapter= ['als'] = 'Tosk Albanian', -- MediaWiki returns Alemannisch ['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['bn'] = 'Bengali', -- MediaWiki returns Bangla ['ca-valencia'] = 'Valencian', -- IETF variant of Catalan ['fkv'] = 'Kven', -- MediaWiki returns Kvensk ['gsw'] = 'Swiss German', ['ilo'] = 'Ilocano', -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['ksh'] = 'Kölsch', -- MediaWiki: Colognian; use IANA/ISO 639 preferred name ['ksh-x-colog'] = 'Colognian', -- override MediaWiki ksh; no IANA/ISO 639 code for Colognian; IETF private code created at Module:Lang/data ['mis-x-ripuar'] = 'Ripuarian', -- override MediaWiki ksh; no IANA/ISO 639 code for Ripuarian; IETF private code created at Module:Lang/data ['nan-tw'] = 'Taiwanese Hokkien', -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese and support en.wiki preferred name ['sr-ec'] = 'Serbian (Cyrillic script)', -- MediaWiki returns српски (ћирилица) ['sr-el'] = 'Serbian (Latin script)', -- MediaWiki returns srpski (latinica) } local lang_name_remap = { -- used for |language=; names require proper capitalization; tags must be lowercase ['alemannic'] = {'Swiss German', 'gsw'}, -- ISO 639-2, -3 alternate for Swiss German; MediaWiki mediawiki returns Alemannic for gsw; en.wiki preferred name ['alemannisch'] = {'Swiss German', 'gsw'}, -- not an ISO or IANA language name; MediaWiki uses 'als' as a subdomain name for Alemannic Wikipedia: als.wikipedia.org ['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap ['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code ['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found ['blackfoot'] = {'Blackfoot', 'bla'}, -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['colognian'] = {'Colognian', 'ksh-x-colog'}, -- MediaWiki preferred name for ksh ['ilocano'] = {'Ilocano', 'ilo'}, -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['kolsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name (use non-diacritical o instead of umlaut ö) ['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name ['kven'] = {'Kven', 'fkv'}, -- Unicode CLDR have decided not to support English language name for these two... ['kvensk'] = {'Kven', 'fkv'}, -- ...they say to refer to IANA registry for English names ['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639 ['serbian (cyrillic script)'] = {'Serbian (Cyrillic script)', 'sr-cyrl'}, -- special case to get correct tag when |language=sr-ec ['serbian (latin script)'] = {'Serbian (Latin script)', 'sr-latn'}, -- special case to get correct tag when |language=sr-el ['swiss german'] = {'Swiss German', 'gsw'}, ['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-tw'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese ['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found ['valencian'] = {'Valencian', 'ca-valencia'}, -- variant of Catalan; categorizes as Valencian } --[[---------------< P R O P E R T I E S _ C A T E G O R I E S >---------------- Properties categories. These are used for investigating qualities of citations. ]] local prop_cats = { ['foreign-lang-source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is foreign-language name, $2 is ISO639-1 code ['foreign-lang-source-2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code used as a sort key ['interproj-linked-name'] = 'CS1 interproject-linked names|$1', -- any author, editor, etc that has an interproject link; $1 is interproject tag used as a sort key ['interwiki-linked-name'] = 'CS1 interwiki-linked names|$1', -- any author, editor, etc that has an interwiki link; $1 is interwiki tag used as a sort key; yeilds to interproject ['local-lang-source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is local-language name, $2 is ISO639-1 code; not emitted when local_lang_cat_enable is false ['location-test'] = 'CS1 location test', ['long-vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 characters ['script'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is language tag ['tracked-param'] = 'CS1 tracked parameter: $1', -- $1 is base (enumerators removed) parameter name ['unfit'] = 'CS1: unfit URL', -- |url-status=unfit or |url-status=usurped; used to be a maint cat ['vanc-accept'] = 'CS1:Vancouver names with accept markup', -- for |vauthors=/|veditors= with accept-as-written markup ['year-range-abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form } --[[-------------------< T I T L E _ T Y P E S >-------------------------------- Here we map a template's CitationClass to TitleType (default values for |type= parameter) ]] local title_types = { ['AV-media-notes'] = 'Media notes', ['document'] = 'Document', ['interview'] = 'Interview', ['mailinglist'] = 'Mailing list', ['map'] = 'Map', ['podcast'] = 'Podcast', ['pressrelease'] = 'Press release', ['report'] = 'Report', ['speech'] = 'Speech', ['techreport'] = 'Technical report', ['thesis'] = 'Thesis', } --[[--------------------------< B U I L D _ K N O W N _ F R E E _ D O I _ R E G I S T R A N T S _ T A B L E >-- build a table of doi registrants known to be free-to-read In a doi, the registrant ID is the series of digits between the '10.' and the first '/': in doi 10.1100/sommat, 1100 is the registrant ID see §3.2.2 DOI prefix of the Doi Handbook p. 43 https://www.doi.org/doi-handbook/DOI_Handbook_Final.pdf#page=43 ]] local function build_free_doi_registrants_table() local registrants_t = {}; for _, v in ipairs ({ '1045', '1074', '1096', '1100', '1155', '1186', '1194', '1371', '1613', '1629', '1989', '1999', '2147', '2196', '3285', '3389', '3390', '3906', '3748', '3814', '3847', '3897', '4061', '4089', '4103', '4172', '4175', '4230', '4236', '4239', '4240', '4249', '4251', '4252', '4253', '4254', '4291', '4292', '4329', '4330', '4331', '5086', '5194', '5210', '5306', '5312', '5313', '5314', '5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', '5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', '6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '9778', '11131', '11569', '11647', '11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', '17645', '18637', '19080', '19173', '20944', '21037', '21105', '21468', '21767', '21425', '22261', '22323', '22459', '24105', '24196', '24966', '26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128', '47622', '47959', '52437', '52975', '53288', '53347', '54081', '54947', '55667', '55914', '57009', '58647', '59081', }) do registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants end return registrants_t; end -- known free registrants identifiable by the doi suffix incipit local extended_registrants_t = { -- doi suffix incipits are evaluated as lua patterns ['1002'] = {'aelm', 'leap', 'loe2%.', 'lol2%.'}, -- Advanced Electronic Materials, Learned Publishing, L&O e-Lectures, L&O Letters ['1016'] = {'j%.aace', 'j%.aed', 'j%.aiopen', 'j%.animal', 'j%.apsb', 'j%.addicn', -- AACE Endocrinology and Diabetes, AACE Endocrinology and Diabetes, AI Open, Animal, Acta Pharmaceutica Sinica B, Addiction Neuroscience 'j%.abrep', 'j%.gpb', 'j%.heliyon', 'j%.nlp', 'j%.patter', 'j%.proche', -- Addictive Behaviors Reports, Genomics, Proteomics & Bioinformatics after 2015, Heliyon, Natural Language Processing, Patterns, Procedia Chemistry 'j%.vgie', 'S1672-0229'}, -- VideoGIE, Genomics, Proteomics & Bioinformatics before 2015 ['1017'] = {'apj%.', 'nlp', 'mdh', 'S15574660'}, -- Natural Language Processing Journal, Medical History, Asia Pacific Journal ['1046'] = {'j%.1365-8711', 'j%.1365-246x'}, -- MNRAS, GJI ['1021'] = {'acscentsci', 'acsomega'}, -- ACS Central Science, ACS Omega ['1093'] = {'mnras', 'mnrasl', 'gji', 'pnasnexus', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, PNAS Nexus, RASTI ['1098'] = {'rsbm', 'rsob', 'rsos'}, -- Biographical Memoirs of Fellows of the Royal Society, Open Biology, Royal Society Open Science ['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics ['1107'] = {'S20569890', 'S20522525', 'S16005775', 'S24143146'}, -- Acta Crystallographica E, IUCrJ, Journal of Synchrotron Radiation, IUCrData ['1109'] = {'oa', 'oj'}, -- IEEE Open Access..., IEEE Open Journal... ['1111'] = {'aogs', 'j%.1365-2966', 'j%.1745-3933', 'j%.1365-246X'}, -- Acta Obstetricia et Gynecologica Scandinavica, MNRAS, MNRAS Letters, GJI ['1128'] = {'asmcr', 'jmbe', 'mbio', 'mra', 'spectrum', 'msphere', 'msystems'}, --ASM Case Reports, Journal of Microbiology & Biology Education, mBio, Microbiology Resource Announcements, Microbiology Spectrum, mSphere, mSystems ['1136'] = {'bmjopen'}, -- BMJ Open ['1140'] = {'epjc'}, -- European Physical Journal C ['1192'] = {'bjo'}, -- BJPsych Open ['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports ['1215'] = {'21573689', '21573698'}, -- L&O Fluids ['1590'] = {'0102-3306'}, -- Acta Botanica Brasilica ['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine ['4319'] = {'lo%.', 'lol%.', 'lom%.'}, -- L&O, L&O e-Lectures, L&O Methods ['5852'] = {'ejt'}, -- European Journal of Taxonomy ['7155'] = {'jgaa'}, -- Journal of Graph Algorithms and Applications ['11158'] = {'saasp'}, -- Systematic and Applied Acarology Special Publications ['11646'] = {'megataxa', 'mesozoic'}, -- Megataxa, Mesozoic ['14231'] = {'ag'}, -- Algebraic Geometry ['15446'] = {'abc'}, -- Acta Biológica Colombiana ['17239'] = {'jowr'}, -- Journal of Writing Research ['22073'] = {'pja'}, -- Persian Journal of Acarology ['24310'] = {'abm'}, -- Acta Botanica Malacitana ['24425'] = {'agp'}, -- Acta Geologica Polonica ['35249'] = {'rche'}, -- Revista Chilena de Entomología ['37520'] = {'fi'}, -- Fossil Imprint ['53562'] = {'ajcb'} -- Asian Journal of Conservation Biology } --[[===================<< E R R O R M E S S A G I N G >>====================== ]] --[[----------< E R R O R M E S S A G E S U P P L E M E N T S >------------- I18N for those messages that are supplemented with additional specific text that describes the reason for the error TODO: merge this with special_case_translations{}? ]] local err_msg_supl = { ['char'] = 'invalid character', -- |isbn=, |sbn= ['check'] = 'checksum', -- |isbn=, |sbn= empty_str = '(empty string)', -- empty unknown parameter check when cite has |= ['flag'] = 'flag', -- |archive-url= ['form'] = 'invalid form', -- |isbn=, |sbn= ['group'] = 'invalid group id', -- |isbn= ['initials'] = 'initials', -- Vancouver ['invalid language code'] = 'invalid language code', -- |script-<param>= ['journal'] = 'journal', -- |bibcode= ['length'] = 'length', -- |isbn=, |bibcode=, |sbn= ['liveweb'] = 'liveweb', -- |archive-url= ['missing comma'] = 'missing comma', -- Vancouver ['missing prefix'] = 'missing prefix', -- |script-<param>= ['missing title part'] = 'missing title part', -- |script-<param>= ['name'] = 'name', -- Vancouver ['non-Latin char'] = 'non-Latin character', -- Vancouver ['path'] = 'path', -- |archive-url= ['prefix'] = 'invalid prefix', -- |isbn= ['punctuation'] = 'punctuation', -- Vancouver ['save'] = 'save command', -- |archive-url= ['suffix'] = 'suffix', -- Vancouver ['timestamp'] = 'timestamp', -- |archive-url= ['unknown language code'] = 'unknown language code', -- |script-<param>= ['value'] = 'value', -- |bibcode= ['year'] = 'year', -- |bibcode= } --[[--------------< E R R O R _ C O N D I T I O N S >--------------------------- Error condition table. This table has two sections: errors at the top, maintenance at the bottom. Maint 'messaging' does not have a 'message' (message=nil) The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment. Anchor changes require identical changes to matching anchor in Help:CS1 errors TODO: rename error_conditions{} to something more generic; create separate error and maint tables inside that? ]] local error_conditions = { err_accessdate_missing_url = { message = '<code class="cs1-code">&#124;access-date=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'accessdate_missing_url', category = 'CS1 errors: access-date without URL', hidden = false }, err_apostrophe_markup = { message = 'Italic or bold markup not allowed in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'apostrophe_markup', category = 'CS1 errors: markup', hidden = false }, err_archive_date_missing_url = { message = '<code class="cs1-code">&#124;archive-date=</code> requires <code class="cs1-code">&#124;archive-url=</code>', anchor = 'archive_date_missing_url', category = 'CS1 errors: archive-url', hidden = false }, err_archive_date_url_ts_mismatch = { message = '<code class="cs1-code">&#124;archive-date=</code> / <code class="cs1-code">&#124;archive-url=</code> timestamp mismatch; $1 suggested', anchor = 'archive_date_url_ts_mismatch', category = 'CS1 errors: archive-url', hidden = false }, err_archive_missing_date = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;archive-date=</code>', anchor = 'archive_missing_date', category = 'CS1 errors: archive-url', hidden = false }, err_archive_missing_url = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'archive_missing_url', category = 'CS1 errors: archive-url', hidden = false }, err_archive_url = { message = '<code class="cs1-code">&#124;archive-url=</code> is malformed: $1', -- $1 is error message detail anchor = 'archive_url', category = 'CS1 errors: archive-url', hidden = false }, err_arxiv_missing = { message = '<code class="cs1-code">&#124;arxiv=</code> required', anchor = 'arxiv_missing', category = 'CS1 errors: arXiv', -- same as bad arxiv hidden = false }, err_asintld_missing_asin = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;asin=</code>', -- $1 is parameter name anchor = 'asintld_missing_asin', category = 'CS1 errors: ASIN TLD', hidden = false }, err_bad_arxiv = { message = 'Check <code class="cs1-code">&#124;arxiv=</code> value', anchor = 'bad_arxiv', category = 'CS1 errors: arXiv', hidden = false }, err_bad_asin = { message = 'Check <code class="cs1-code">&#124;asin=</code> value', anchor = 'bad_asin', category ='CS1 errors: ASIN', hidden = false }, err_bad_asin_tld = { message = 'Check <code class="cs1-code">&#124;asin-tld=</code> value', anchor = 'bad_asin_tld', category ='CS1 errors: ASIN TLD', hidden = false }, err_bad_bibcode = { message = 'Check <code class="cs1-code">&#124;bibcode=</code> $1', -- $1 is error message detail anchor = 'bad_bibcode', category = 'CS1 errors: bibcode', hidden = false }, err_bad_biorxiv = { message = 'Check <code class="cs1-code">&#124;biorxiv=</code> value', anchor = 'bad_biorxiv', category = 'CS1 errors: bioRxiv', hidden = false }, err_bad_citeseerx = { message = 'Check <code class="cs1-code">&#124;citeseerx=</code> value', anchor = 'bad_citeseerx', category = 'CS1 errors: citeseerx', hidden = false }, err_bad_date = { message = 'Check date values in: $1', -- $1 is a parameter name list anchor = 'bad_date', category = 'CS1 errors: dates', hidden = false }, err_bad_doi = { message = 'Check <code class="cs1-code">&#124;doi=</code> value', anchor = 'bad_doi', category = 'CS1 errors: DOI', hidden = false }, err_bad_hdl = { message = 'Check <code class="cs1-code">&#124;hdl=</code> value', anchor = 'bad_hdl', category = 'CS1 errors: HDL', hidden = false }, err_bad_isbn = { message = 'Check <code class="cs1-code">&#124;isbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_isbn', category = 'CS1 errors: ISBN', hidden = false }, err_bad_ismn = { message = 'Check <code class="cs1-code">&#124;ismn=</code> value', anchor = 'bad_ismn', category = 'CS1 errors: ISMN', hidden = false }, err_bad_issn = { message = 'Check <code class="cs1-code">&#124;$1issn=</code> value', -- $1 is 'e' or '' for eissn or issn anchor = 'bad_issn', category = 'CS1 errors: ISSN', hidden = false }, err_bad_jfm = { message = 'Check <code class="cs1-code">&#124;jfm=</code> value', anchor = 'bad_jfm', category = 'CS1 errors: JFM', hidden = false }, err_bad_jstor = { message = 'Check <code class="cs1-code">&#124;jstor=</code> value', anchor = 'bad_jstor', category = 'CS1 errors: JSTOR', hidden = false }, err_bad_lccn = { message = 'Check <code class="cs1-code">&#124;lccn=</code> value', anchor = 'bad_lccn', category = 'CS1 errors: LCCN', hidden = false }, err_bad_medrxiv = { message = 'Check <code class="cs1-code">&#124;medrxiv=</code> value', anchor = 'bad_medrxiv', category = 'CS1 errors: medRxiv', hidden = false }, err_bad_mr = { message = 'Check <code class="cs1-code">&#124;mr=</code> value', anchor = 'bad_mr', category = 'CS1 errors: MR', hidden = false }, err_bad_oclc = { message = 'Check <code class="cs1-code">&#124;oclc=</code> value', anchor = 'bad_oclc', category = 'CS1 errors: OCLC', hidden = false }, err_bad_ol = { message = 'Check <code class="cs1-code">&#124;ol=</code> value', anchor = 'bad_ol', category = 'CS1 errors: OL', hidden = false }, err_bad_osti = { message = 'Check <code class="cs1-code">&#124;osti=</code> value', anchor = 'bad_osti', category = 'CS1 errors: OSTI', hidden = false }, err_bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link= message = 'Check <code class="cs1-code">&#124;$1=</code> value', -- $1 is parameter name anchor = 'bad_paramlink', category = 'CS1 errors: parameter link', hidden = false }, err_bad_pmc = { message = 'Check <code class="cs1-code">&#124;pmc=</code> value', anchor = 'bad_pmc', category = 'CS1 errors: PMC', hidden = false }, err_bad_pmid = { message = 'Check <code class="cs1-code">&#124;pmid=</code> value', anchor = 'bad_pmid', category = 'CS1 errors: PMID', hidden = false }, err_bad_rfc = { message = 'Check <code class="cs1-code">&#124;rfc=</code> value', anchor = 'bad_rfc', category = 'CS1 errors: RFC', hidden = false }, err_bad_s2cid = { message = 'Check <code class="cs1-code">&#124;s2cid=</code> value', anchor = 'bad_s2cid', category = 'CS1 errors: S2CID', hidden = false }, err_bad_sbn = { message = 'Check <code class="cs1-code">&#124;sbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_sbn', category = 'CS1 errors: SBN', hidden = false }, err_bad_ssrn = { message = 'Check <code class="cs1-code">&#124;ssrn=</code> value', anchor = 'bad_ssrn', category = 'CS1 errors: SSRN', hidden = false }, err_bad_url = { message = 'Check $1 value', -- $1 is parameter name anchor = 'bad_url', category = 'CS1 errors: URL', hidden = false }, err_bad_usenet_id = { message = 'Check <code class="cs1-code">&#124;message-id=</code> value', anchor = 'bad_message_id', category = 'CS1 errors: message-id', hidden = false }, err_bad_zbl = { message = 'Check <code class="cs1-code">&#124;zbl=</code> value', anchor = 'bad_zbl', category = 'CS1 errors: Zbl', hidden = false }, err_bare_url_missing_title = { message = '$1 missing title', -- $1 is parameter name anchor = 'bare_url_missing_title', category = 'CS1 errors: bare URL', hidden = false }, err_biorxiv_missing = { message = '<code class="cs1-code">&#124;biorxiv=</code> required', anchor = 'biorxiv_missing', category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv hidden = false }, err_chapter_ignored = { message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'chapter_ignored', category = 'CS1 errors: chapter ignored', hidden = false }, err_citation_missing_title = { message = 'Missing or empty <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'citation_missing_title', category = 'CS1 errors: missing title', hidden = false }, err_citeseerx_missing = { message = '<code class="cs1-code">&#124;citeseerx=</code> required', anchor = 'citeseerx_missing', category = 'CS1 errors: citeseerx', -- same as bad citeseerx hidden = false }, err_cite_web_url = { -- this error applies to cite web and to cite podcast message = 'Missing or empty <code class="cs1-code">&#124;url=</code>', anchor = 'cite_web_url', category = 'CS1 errors: requires URL', hidden = false }, err_class_ignored = { message = '<code class="cs1-code">&#124;class=</code> ignored', anchor = 'class_ignored', category = 'CS1 errors: class', hidden = false }, err_contributor_ignored = { message = '<code class="cs1-code">&#124;contributor=</code> ignored', anchor = 'contributor_ignored', category = 'CS1 errors: contributor', hidden = false }, err_contributor_missing_required_param = { message = '<code class="cs1-code">&#124;contributor=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'contributor_missing_required_param', category = 'CS1 errors: contributor', hidden = false }, err_deprecated_params = { message = 'Cite uses deprecated parameter <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'deprecated_params', category = 'CS1 errors: deprecated parameters', hidden = false }, err_disp_name = { message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name; $2 is the assigned value anchor = 'disp_name', category = 'CS1 errors: display-names', hidden = false, }, err_doibroken_missing_doi = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;doi=</code>', -- $1 is parameter name anchor = 'doibroken_missing_doi', category = 'CS1 errors: DOI', hidden = false }, err_embargo_missing_pmc = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;pmc=</code>', -- $1 is parameter name anchor = 'embargo_missing_pmc', category = 'CS1 errors: PMC embargo', hidden = false }, err_empty_citation = { message = 'Empty citation', anchor = 'empty_citation', category = 'CS1 errors: empty citation', hidden = false }, err_etal = { message = 'Explicit use of et al. in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'explicit_et_al', category = 'CS1 errors: explicit use of et al.', hidden = false }, err_extra_text_edition = { message = '<code class="cs1-code">&#124;edition=</code> has extra text', anchor = 'extra_text_edition', category = 'CS1 errors: extra text: edition', hidden = false, }, err_extra_text_issue = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_issue', category = 'CS1 errors: extra text: issue', hidden = false, }, err_extra_text_pages = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_pages', category = 'CS1 errors: extra text: pages', hidden = false, }, err_extra_text_volume = { message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name anchor = 'extra_text_volume', category = 'CS1 errors: extra text: volume', hidden = false, }, err_first_missing_last = { message = '<code class="cs1-code">&#124;$1=</code> missing <code class="cs1-code">&#124;$2=</code>', -- $1 is first alias, $2 is matching last alias anchor = 'first_missing_last', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_format_missing_url = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;$2=</code>', -- $1 is format parameter $2 is url parameter anchor = 'format_missing_url', category = 'CS1 errors: format without URL', hidden = false }, err_generic_name = { message = '<code class="cs1-code">&#124;$1=</code> has generic name', -- $1 is parameter name anchor = 'generic_name', category = 'CS1 errors: generic name', hidden = false, }, err_generic_title = { message = 'Cite uses generic title', anchor = 'generic_title', category = 'CS1 errors: generic title', hidden = false, }, err_invalid_isbn_date = { message = 'ISBN / Date incompatibility', anchor = 'invalid_isbn_date', category = 'CS1 errors: ISBN date', hidden = true }, err_invalid_param_val = { message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name $2 is parameter value anchor = 'invalid_param_val', category = 'CS1 errors: invalid parameter value', hidden = false }, err_invisible_char = { message = '$1 in $2 at position $3', -- $1 is invisible char $2 is parameter name $3 is position number anchor = 'invisible_char', category = 'CS1 errors: invisible characters', hidden = false }, err_medrxiv_missing = { message = '<code class="cs1-code">&#124;medrxiv=</code> required', anchor = 'medrxiv_missing', category = 'CS1 errors: medRxiv', -- same as bad medRxiv hidden = false }, err_missing_name = { message = 'Missing <code class="cs1-code">&#124;$1$2=</code>', -- $1 is modified NameList; $2 is enumerator anchor = 'missing_name', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_missing_periodical = { message = 'Cite $1 requires <code class="cs1-code">&#124;$2=</code>', -- $1 is cs1 template name; $2 is canonical periodical parameter name for cite $1 anchor = 'missing_periodical', category = 'CS1 errors: missing periodical', hidden = false }, err_missing_pipe = { message = 'Missing pipe in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'missing_pipe', category = 'CS1 errors: missing pipe', hidden = false }, err_missing_publisher = { message = 'Cite $1 requires <code class="cs1-code">&#124;$2=</code>', -- $1 is cs1 template name; $2 is canonical publisher parameter name for cite $1 anchor = 'missing_publisher', category = 'CS1 errors: missing publisher', hidden = false }, err_numeric_names = { message = '<code class="cs1-code">&#124;$1=</code> has numeric name', -- $1 is parameter name', anchor = 'numeric_names', category = 'CS1 errors: numeric name', hidden = false, }, err_param_access_requires_param = { message = '<code class="cs1-code">&#124;$1-access=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'param_access_requires_param', category = 'CS1 errors: param-access', hidden = false }, err_param_has_ext_link = { message = 'External link in <code class="cs1-code">$1</code>', -- $1 is parameter name anchor = 'param_has_ext_link', category = 'CS1 errors: external links', hidden = false }, err_param_has_twl_url = { message = 'Wikipedia Library link in <code class="cs1-code">$1</code>', -- $1 is parameter name anchor = 'param_has_twl_url', category = 'CS1 errors: URL', hidden = false }, err_parameter_ignored = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'parameter_ignored', category = 'CS1 errors: unsupported parameter', hidden = false }, err_parameter_ignored_suggest = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored (<code class="cs1-code">&#124;$2=</code> suggested)', -- $1 is unknown parameter $2 is suggested parameter name anchor = 'parameter_ignored_suggest', category = 'CS1 errors: unsupported parameter', hidden = false }, err_periodical_ignored = { message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'periodical_ignored', category = 'CS1 errors: periodical ignored', hidden = false }, err_redundant_parameters = { message = 'More than one of $1 specified', -- $1 is error message detail anchor = 'redundant_parameters', category = 'CS1 errors: redundant parameter', hidden = false }, err_script_parameter = { message = 'Invalid <code class="cs1-code">&#124;$1=</code>: $2', -- $1 is parameter name $2 is script language code or error detail anchor = 'script_parameter', category = 'CS1 errors: script parameters', hidden = false }, err_ssrn_missing = { message = '<code class="cs1-code">&#124;ssrn=</code> required', anchor = 'ssrn_missing', category = 'CS1 errors: SSRN', hidden = false }, err_text_ignored = { message = 'Text "$1" ignored', -- $1 is ignored text anchor = 'text_ignored', category = 'CS1 errors: unrecognized parameter', hidden = false }, err_trans_missing_title = { message = '<code class="cs1-code">&#124;trans-$1=</code> requires <code class="cs1-code">&#124;$1=</code> or <code class="cs1-code">&#124;script-$1=</code>', -- $1 is base parameter name anchor = 'trans_missing_title', category = 'CS1 errors: translated title', hidden = false }, err_param_unknown_empty = { message = 'Cite has empty unknown parameter$1: $2', -- $1 is 's' or empty space; $2 is emty unknown param list anchor = 'param_unknown_empty', category = 'CS1 errors: empty unknown parameters', hidden = false }, err_vancouver = { message = 'Vancouver style error: $1 in name $2', -- $1 is error detail, $2 is the nth name anchor = 'vancouver', category = 'CS1 errors: Vancouver style', hidden = false }, err_wikilink_in_url = { message = 'URL–wikilink conflict', -- uses ndash anchor = 'wikilink_in_url', category = 'CS1 errors: URL–wikilink conflict', -- uses ndash hidden = false }, --[[--------------------------< M A I N T >------------------------------------- maint messages do not have a message (message = nil); otherwise the structure is the same as error messages ]] maint_archive_origin = { message = nil, anchor = 'archive_origin', category = 'CS1 maint: archive origin', hidden = true, }, maint_archived_copy = { message = nil, anchor = 'archived_copy', category = 'CS1 maint: archived copy as title', hidden = true, }, maint_bibcode = { message = nil, anchor = 'bibcode', category = 'CS1 maint: bibcode', hidden = true, }, maint_location_no_publisher = { -- cite book, conference, encyclopedia; citation as book cite or encyclopedia cite message = nil, anchor = 'location_no_publisher', category = 'CS1 maint: location missing publisher', hidden = true, }, maint_bot_unknown = { message = nil, anchor = 'bot:_unknown', category = 'CS1 maint: bot: original URL status unknown', hidden = true, }, maint_date_auto_xlated = { -- date auto-translation not supported by en.wiki message = nil, anchor = 'date_auto_xlated', category = 'CS1 maint: date auto-translated', hidden = true, }, maint_date_format = { message = nil, anchor = 'date_format', category = 'CS1 maint: date format', hidden = true, }, maint_date_year = { message = nil, anchor = 'date_year', category = 'CS1 maint: date and year', hidden = true, }, maint_deprecated_archive = { message = nil, anchor = 'deprecated_archive', category = 'CS1 maint: deprecated archival service', hidden = true, }, maint_doi_ignore = { message = nil, anchor = 'doi_ignore', category = 'CS1 maint: ignored DOI errors', hidden = true, }, maint_doi_inactive = { message = nil, anchor = 'doi_inactive', category = 'CS1 maint: DOI inactive', hidden = true, }, maint_doi_inactive_dated = { message = nil, anchor = 'doi_inactive_dated', category = 'CS1 maint: DOI inactive as of $2$3$1', -- $1 is year, $2 is month-name or empty string, $3 is space or empty string hidden = true, }, maint_doi_unflagged_free = { message = nil, anchor = 'doi_unflagged_free', category = 'CS1 maint: unflagged free DOI', hidden = true, }, maint_extra_punct = { message = nil, anchor = 'extra_punct', category = 'CS1 maint: extra punctuation', hidden = true, }, maint_id_limit_load_fail = { -- applies to all cs1|2 templates on a page; message = nil, -- maint message (category link) never emitted anchor = 'id_limit_load_fail', category = 'CS1 maint: ID limit load fail', hidden = true, }, maint_isbn_ignore = { message = nil, anchor = 'ignore_isbn_err', category = 'CS1 maint: ignored ISBN errors', hidden = true, }, maint_issn_ignore = { message = nil, anchor = 'ignore_issn', category = 'CS1 maint: ignored ISSN errors', hidden = true, }, maint_jfm_format = { message = nil, anchor = 'jfm_format', category = 'CS1 maint: JFM format', hidden = true, }, maint_location = { message = nil, anchor = 'location', category = 'CS1 maint: location', hidden = true, }, maint_missing_class = { message = nil, anchor = 'missing_class', category = 'CS1 maint: missing class', hidden = true, }, maint_mr_format = { message = nil, anchor = 'mr_format', category = 'CS1 maint: MR format', hidden = true, }, maint_mult_names = { message = nil, anchor = 'mult_names', category = 'CS1 maint: multiple names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_numeric_names = { message = nil, anchor = 'numeric_names', category = 'CS1 maint: numeric names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_others = { message = nil, anchor = 'others', category = 'CS1 maint: others', hidden = true, }, maint_others_avm = { message = nil, anchor = 'others_avm', category = 'CS1 maint: others in cite AV media (notes)', hidden = true, }, maint_overridden_setting = { message = nil, anchor = 'overridden', category = 'CS1 maint: overridden setting', hidden = true, }, maint_page_art_num = { message = nil, anchor = 'page_art_num', category = 'CS1 maint: article number as page number', hidden = true, }, maint_pmc_embargo = { message = nil, anchor = 'embargo', category = 'CS1 maint: PMC embargo expired', hidden = true, }, maint_pmc_format = { message = nil, anchor = 'pmc_format', category = 'CS1 maint: PMC format', hidden = true, }, maint_postscript = { message = nil, anchor = 'postscript', category = 'CS1 maint: postscript', hidden = true, }, maint_publisher_location = { message = nil, anchor = 'publisher_location', category = 'CS1 maint: publisher location', hidden = true, }, maint_ref_duplicates_default = { message = nil, anchor = 'ref_default', category = 'CS1 maint: ref duplicates default', hidden = true, }, maint_shortened_archive_url = { message = nil, anchor = 'shortened_archive_url', category = 'CS1 maint: shortened archive url', hidden = true, }, maint_unknown_lang = { message = nil, anchor = 'unknown_lang', category = 'CS1 maint: unrecognized language', hidden = true, }, maint_untitled = { message = nil, anchor = 'untitled', category = 'CS1 maint: untitled periodical', hidden = true, }, maint_url_status = { message = nil, anchor = 'url_status', category = 'CS1 maint: url-status', hidden = true, }, maint_work_isbn = { message = nil, anchor = 'work_isbn', category = 'CS1 maint: work parameter with ISBN', hidden = true, }, maint_year= { message = nil, anchor = 'year', category = 'CS1 maint: year', hidden = true, }, maint_zbl = { message = nil, anchor = 'zbl', category = 'CS1 maint: Zbl', hidden = true, }, } --[[--------------------------< I D _ L I M I T S _ D A T A _ T >---------------------------------------------- fetch id limits for certain identifiers from c:Data:CS1/Identifier limits.tab. This source is a json tabular data file maintained at wikipedia commons. Convert the json format to a table of k/v pairs. The values from <id_limits_data_t> are used to set handle.id_limit. From 2025-02-21, MediaWiki is broken. Use this link to edit the tablular data file: https://commons.wikimedia.org/w/index.php?title=Data:CS1/Identifier_limits.tab&action=edit See Phab:T389105 ]] local id_limits_data_t = {}; local use_commons_data = true; -- set to false if your wiki does not have access to mediawiki commons; then, if false == use_commons_data then -- update this table from https://commons.wikimedia.org/wiki/Data:CS1/Identifier_limits.tab; last update: 2025-02-21 id_limits_data_t = {['OCLC'] = 10450000000, ['OSTI'] = 23010000, ['PMC'] = 11900000, ['PMID'] = 40400000, ['RFC'] = 9300, ['SSRN'] = 5200000, ['S2CID'] = 276000000}; -- this table must be maintained locally else -- here for wikis that do have access to mediawiki commons local load_fail_limit = 99999999999; -- very high number to avoid error messages on load failure id_limits_data_t = {['OCLC'] = load_fail_limit, ['OSTI'] = load_fail_limit, ['PMC'] = load_fail_limit, ['PMID'] = load_fail_limit, ['RFC'] = load_fail_limit, ['SSRN'] = load_fail_limit, ['S2CID'] = load_fail_limit}; local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data if mw.ext.data == nil then id_limits_data_load_fail = true; -- safeguard against Lua errors if mw.ext.data is not available for some reason else local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab'); -- attempt to load the tabular data from commons into <tab_data_t> if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category else for _, limit_t in ipairs (tab_data_t.data) do -- overwrite default <load_fail_limit> values from the data table in the tabular data id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier end end end end --[[--------------------------< I D _ H A N D L E R S >-------------------------------------------------------- The following contains a list of values for various defined identifiers. For each identifier we specify a variety of information necessary to properly render the identifier in the citation. parameters: a list of parameter aliases for this identifier; first in the list is the canonical form link: Wikipedia article name redirect: a local redirect to a local Wikipedia article name; at en.wiki, 'ISBN (identifier)' is a redirect to 'International Standard Book Number' q: Wikidata q number for the identifier label: the label preceding the identifier; label is linked to a Wikipedia article (in this order): redirect from id_handlers['<id>'].redirect when use_identifier_redirects is true Wikidata-supplied article name for the local wiki from id_handlers['<id>'].q local article name from id_handlers['<id>'].link prefix: the first part of a URL that will be concatenated with a second part which usually contains the identifier suffix: optional third part to be added after the identifier encode: true if URI should be percent-encoded; otherwise false COinS: identifier link or keyword for use in COinS: for identifiers registered at info-uri.info use: info:.... where '...' is the appropriate identifier label for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn for |asin= and |ol=, which require assembly, use the keyword: url for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info', 'rft', or 'url' works here) set to nil to leave the identifier out of the COinS separator: character or text between label and the identifier in the rendered citation id_limit: for those identifiers with established limits, this property holds the upper limit access: use this parameter to set the access level for all instances of this identifier. the value must be a valid access level for an identifier (see ['id-access'] in this file). custom_access: to enable custom access level for an identifier, set this parameter to the parameter that should control it (normally 'id-access') ]] local id_handlers = { ['ARXIV'] = { parameters = {'arxiv', 'eprint'}, link = 'arXiv', redirect = 'arXiv (identifier)', q = 'Q118398', label = 'arXiv', prefix = 'https://arxiv.org/abs/', encode = false, COinS = 'info:arxiv', separator = ':', access = 'free', -- free to read }, ['ASIN'] = { parameters = { 'asin', 'ASIN' }, link = 'Amazon Standard Identification Number', redirect = 'ASIN (identifier)', q = 'Q1753278', label = 'ASIN', prefix = 'https://www.amazon.', COinS = 'url', separator = '&nbsp;', encode = false; }, ['BIBCODE'] = { parameters = {'bibcode'}, link = 'Bibcode', redirect = 'Bibcode (identifier)', q = 'Q25754', label = 'Bibcode', prefix = 'https://ui.adsabs.harvard.edu/abs/', encode = false, COinS = 'info:bibcode', separator = ':', custom_access = 'bibcode-access', }, ['BIORXIV'] = { parameters = {'biorxiv'}, link = 'bioRxiv', redirect = 'bioRxiv (identifier)', q = 'Q19835482', label = 'bioRxiv', prefix = 'https://doi.org/', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['CITESEERX'] = { parameters = {'citeseerx'}, link = 'CiteSeerX', redirect = 'CiteSeerX (identifier)', q = 'Q2715061', label = 'CiteSeerX', prefix = 'https://citeseerx.ist.psu.edu/viewdoc/summary?doi=', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['DOI'] = { -- Used by InternetArchiveBot parameters = { 'doi', 'DOI'}, link = 'Digital object identifier', redirect = 'doi (identifier)', q = 'Q25670', label = 'doi', prefix = 'https://doi.org/', COinS = 'info:doi', separator = ':', encode = true, custom_access = 'doi-access', }, ['EISSN'] = { parameters = {'eissn', 'EISSN'}, link = 'International Standard Serial Number#Electronic ISSN', redirect = 'eISSN (identifier)', q = 'Q46339674', label = 'eISSN', prefix = 'https://search.worldcat.org/issn/', COinS = 'rft.eissn', encode = false, separator = '&nbsp;', }, ['HDL'] = { parameters = { 'hdl', 'HDL' }, link = 'Handle System', redirect = 'hdl (identifier)', q = 'Q3126718', label = 'hdl', prefix = 'https://hdl.handle.net/', COinS = 'info:hdl', separator = ':', encode = true, custom_access = 'hdl-access', }, ['ISBN'] = { -- Used by InternetArchiveBot parameters = {'isbn', 'ISBN'}, link = 'International Standard Book Number', redirect = 'ISBN (identifier)', q = 'Q33057', label = 'ISBN', prefix = 'Special:BookSources/', COinS = 'rft.isbn', separator = '&nbsp;', }, ['ISMN'] = { parameters = {'ismn', 'ISMN'}, link = 'International Standard Music Number', redirect = 'ISMN (identifier)', q = 'Q1666938', label = 'ISMN', prefix = '', -- not currently used; COinS = nil, -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['ISSN'] = { parameters = {'issn', 'ISSN'}, link = 'International Standard Serial Number', redirect = 'ISSN (identifier)', q = 'Q131276', label = 'ISSN', prefix = 'https://search.worldcat.org/issn/', COinS = 'rft.issn', encode = false, separator = '&nbsp;', }, ['JFM'] = { parameters = {'jfm', 'JFM'}, link = 'Jahrbuch über die Fortschritte der Mathematik', redirect = 'JFM (identifier)', q = '', label = 'JFM', prefix = 'https://zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['JSTOR'] = { parameters = {'jstor', 'JSTOR'}, link = 'JSTOR', redirect = 'JSTOR (identifier)', q = 'Q1420342', label = 'JSTOR', prefix = 'https://www.jstor.org/stable/', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', custom_access = 'jstor-access', }, ['LCCN'] = { parameters = {'lccn', 'LCCN'}, link = 'Library of Congress Control Number', redirect = 'LCCN (identifier)', q = 'Q620946', label = 'LCCN', prefix = 'https://lccn.loc.gov/', COinS = 'info:lccn', encode = false, separator = '&nbsp;', }, ['MEDRXIV'] = { parameters = {'medrxiv'}, link = 'medRxiv', redirect = 'medRxiv (identifier)', q = 'Q58465838', label = 'medRxiv', prefix = 'https://www.medrxiv.org/content/', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = false, separator = '&nbsp;', }, ['MR'] = { parameters = {'mr', 'MR'}, link = 'Mathematical Reviews', redirect = 'MR (identifier)', q = 'Q211172', label = 'MR', prefix = 'https://mathscinet.ams.org/mathscinet-getitem?mr=', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['OCLC'] = { parameters = {'oclc', 'OCLC'}, link = 'OCLC', redirect = 'OCLC (identifier)', q = 'Q190593', label = 'OCLC', prefix = 'https://search.worldcat.org/oclc/', COinS = 'info:oclcnum', encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.OCLC or 0, }, ['OL'] = { parameters = { 'ol', 'OL' }, link = 'Open Library', redirect = 'OL (identifier)', q = 'Q1201876', label = 'OL', prefix = 'https://openlibrary.org/', COinS = 'url', separator = '&nbsp;', encode = true, custom_access = 'ol-access', }, ['OSTI'] = { parameters = {'osti', 'OSTI'}, link = 'Office of Scientific and Technical Information', redirect = 'OSTI (identifier)', q = 'Q2015776', label = 'OSTI', prefix = 'https://www.osti.gov/biblio/', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.OSTI or 0, custom_access = 'osti-access', }, ['PMC'] = { parameters = {'pmc', 'PMC'}, link = 'PubMed Central', redirect = 'PMC (identifier)', q = 'Q229883', label = 'PMC', prefix = 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC', suffix = '', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.PMC or 0, access = 'free', -- free to read }, ['PMID'] = { parameters = {'pmid', 'PMID'}, link = 'PubMed Identifier', redirect = 'PMID (identifier)', q = 'Q2082879', label = 'PMID', prefix = 'https://pubmed.ncbi.nlm.nih.gov/', COinS = 'info:pmid', encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.PMID or 0, }, ['RFC'] = { parameters = {'rfc', 'RFC'}, link = 'Request for Comments', redirect = 'RFC (identifier)', q = 'Q212971', label = 'RFC', prefix = 'https://tools.ietf.org/html/rfc', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.RFC or 0, access = 'free', -- free to read }, ['SBN'] = { parameters = {'sbn', 'SBN'}, link = 'Standard Book Number', -- redirect to International_Standard_Book_Number#History redirect = 'SBN (identifier)', label = 'SBN', prefix = 'Special:BookSources/0-', -- prefix has leading zero necessary to make 9-digit sbn a 10-digit isbn COinS = nil, -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['SSRN'] = { parameters = {'ssrn', 'SSRN'}, link = 'Social Science Research Network', redirect = 'SSRN (identifier)', q = 'Q7550801', label = 'SSRN', prefix = 'https://papers.ssrn.com/sol3/papers.cfm?abstract_id=', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = id_limits_data_t.SSRN or 0, custom_access = 'ssrn-access', }, ['S2CID'] = { parameters = {'s2cid', 'S2CID'}, link = 'Semantic Scholar', redirect = 'S2CID (identifier)', q = 'Q22908627', label = 'S2CID', prefix = 'https://api.semanticscholar.org/CorpusID:', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = id_limits_data_t.S2CID or 0, custom_access = 's2cid-access', }, ['USENETID'] = { parameters = {'message-id'}, link = 'Usenet', redirect = 'Usenet (identifier)', q = 'Q193162', label = 'Usenet:', prefix = 'news:', encode = false, COinS = 'pre', -- use prefix value separator = '&nbsp;', }, ['ZBL'] = { parameters = {'zbl', 'ZBL' }, link = 'Zentralblatt MATH', redirect = 'Zbl (identifier)', q = 'Q190269', label = 'Zbl', prefix = 'https://zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, } --[[--------------------------< E X P O R T S >--------------------------------- ]] return { use_identifier_redirects = use_identifier_redirects, -- booleans defined in the settings at the top of this module local_lang_cat_enable = local_lang_cat_enable, date_name_auto_xlate_enable = date_name_auto_xlate_enable, date_digit_auto_xlate_enable = date_digit_auto_xlate_enable, enable_sort_keys = enable_sort_keys, suppress_archive_today_urls = suppress_archive_today_urls, -- tables and variables created when this module is loaded dependencies_t = dependencies_t, -- used to suppress parameters dependent on url-holding parameters holding archive.today urls enum_needs_xlation = '1' ~= date_names.xlate_digits['1'], -- to avoid unnecessary enumerator translation global_df = get_date_format (), -- this line can be replaced with "global_df = 'dmy-all'," to have all dates auto translated to dmy format. global_cs1_config_t = global_cs1_config_t, -- global settings from {{cs1 config}} id_limits_data_load_fail = id_limits_data_load_fail, -- true when commons tabular identifier-limit data fails to load known_free_doi_registrants_t = build_free_doi_registrants_table(), punct_skip = build_skip_table (punct_skip, punct_meta_params), url_skip = build_skip_table (url_skip, url_meta_params), archive_today_tlds_t = {['today'] = true, ['ph'] = true, ['is'] = true, ['md'] = true, ['li'] = true, ['fo'] = true, ['vn'] = true}; -- used by is_archive_today_url() name_space_sort_keys = name_space_sort_keys, aliases = aliases, special_case_translation = special_case_translation, date_names = date_names, err_msg_supl = err_msg_supl, error_conditions = error_conditions, editor_markup_patterns = editor_markup_patterns, et_al_patterns = et_al_patterns, extended_registrants_t = extended_registrants_t, id_handlers = id_handlers, keywords_lists = keywords_lists, keywords_xlate = keywords_xlate, stripmarkers = stripmarkers, invisible_chars = invisible_chars, invisible_defs = invisible_defs, indic_script = indic_script, emoji_t = emoji_t, maint_cats = maint_cats, messages = messages, presentation = presentation, prop_cats = prop_cats, script_lang_codes = script_lang_codes, lang_tag_remap = lang_tag_remap, lang_name_remap = lang_name_remap, this_wiki_code = this_wiki_code, title_types = title_types, uncategorized_namespaces = uncategorized_namespaces_t, uncategorized_subpages = uncategorized_subpages, templates_using_volume = templates_using_volume, templates_using_issue = templates_using_issue, templates_not_using_page = templates_not_using_page, vol_iss_pg_patterns = vol_iss_pg_patterns, single_letter_2nd_lvl_domains_t = single_letter_2nd_lvl_domains_t, url_access_map_t = url_access_map_t, inter_wiki_map = inter_wiki_map, mw_languages_by_tag_t = mw_languages_by_tag_t, mw_languages_by_name_t = mw_languages_by_name_t, citation_class_map_t = citation_class_map_t, citation_issue_t = citation_issue_t, citation_no_volume_t = citation_no_volume_t, } 7oukcgh6jfipsgm5ag4ypttwht4cce8 Module:Citation/CS1/Utilities 828 12884 116880 114929 2026-01-17T19:25:10Z en>Trappist the monk 0 synch from sandbox; 116880 Scribunto text/plain local z = { error_cats_t = {}; -- for categorizing citations that contain errors error_ids_t = {}; -- list of error identifiers; used to prevent duplication of certain errors; local to this module error_msgs_t = {}; -- sequence table of error messages maint_cats_t = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work prop_cats_t = {}; -- for categorizing citations based on certain properties, language of source for instance prop_keys_t = {}; -- for adding classes to the citation's <cite> tag }; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set (var) return not (var == nil or var == ''); end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array (needle, haystack) if needle == nil then return false; end for n, v in ipairs (haystack) do if v == needle then return n; end end return false; end --[[--------------------------< H A S _ A C C E P T _ A S _ W R I T T E N >------------------------------------ When <str> is wholly wrapped in accept-as-written markup, return <str> without markup and true; return <str> and false else with allow_empty = false, <str> must have at least one character inside the markup with allow_empty = true, <str> the markup frame can be empty like (()) to distinguish an empty template parameter from the specific condition "has no applicable value" in citation-context. After further evaluation the two cases might be merged at a later stage, but should be kept separated for now. ]] local function has_accept_as_written (str, allow_empty) if not is_set (str) then return str, false; end local count; if true == allow_empty then str, count = str:gsub ('^%(%((.*)%)%)$', '%1'); -- allows (()) to be an empty set else str, count = str:gsub ('^%(%((.+)%)%)$', '%1'); end return str, 0 ~= count; end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. <args> may be a single string or a sequence table of multiple strings. ]] local function substitute (msg, args) return args and mw.message.newRawMessage (msg, args):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with CSS markup according to the state of hidden. <content> may be a single string or a sequence table of multiple strings. ]] local function error_comment (content, hidden) return substitute (hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content); end --[[--------------------------< H Y P H E N _ T O _ D A S H >-------------------------------------------------- Converts a hyphen, endash, emdash to endash under certain conditions. The hyphen/en/em must separate like items; unlike items are returned unmodified. These forms are modified: letter - letter (A-B) digit - digit (4-5) digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5) letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5) digitletter - digitletter (5a-5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d) any other forms are returned unmodified. str may be a comma- or semicolon-separated list of page ranges with/without single pages ]] local function hyphen_to_dash (str) if not is_set (str) then return str; end str = str:gsub ("(%(%(.-%)%))", function(m) return m:gsub(",", ","):gsub(";", ";") end) -- replace commas and semicolons in accept-as-written markup with similar unicode characters so they'll be ignored during the split str = str:gsub ('&[nm]dash;', {['&ndash;'] = '–', ['&mdash;'] = '—'}); -- replace &mdash; and &ndash; entities with their characters; semicolon mucks up the text.split str = str:gsub ('&#45;', '-'); -- replace HTML numeric entity with hyphen character str = str:gsub ('&nbsp;', ' '); -- replace &nbsp; entity with generic keyboard space character local out = {}; local list = mw.text.split (str, '%s*[,;]%s*'); -- split str at comma or semicolon separators if there are any local accept; -- boolean for _, item in ipairs (list) do -- for each item in the list item, accept = has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of item if not accept and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[—–-]%s*%w*[%.%-]?%w+$') then -- if pagination uses <hyphen|dot> separators with hyphen/endash/emdash <range separator> if mw.ustring.match (item, '^%a+[%.%-]%d+%s*[—–-]%s*%a+[%.%-]%d+$') or -- letter<hyphen|dot>digit <range separator> letter<hyphen|dot>digit (requires <hyphen|dot> separator between letter and digit) mw.ustring.match (item, '^%d+[%.%-]%a+%s*[—–-]%s*%d+[%.%-]%a+$') or -- digit<hyphen|dot>letter <range separator> digit<hyphen|dot>letter (requires <hyphen|dot> separator between digit and letter) mw.ustring.match (item, '^%d+[%.%-]%d+%s*[—–-]%s*%d+[%.%-]%d+$') then -- digit<hyphen|dot>digit <range separator> digit<hyphen|dot>digit (requires <hyphen|dot> separator between digit and digit) item = mw.ustring.gsub (item, '(%w*[%.%-]%w+)%s*[—–-]%s*(%w*[%.%-]%w+)', '<span class="nowrap">%1 –</span> <span class="nowrap">%2</span>'); -- replace <range separator>, with spaced endash elseif mw.ustring.match (item, '^%d+%a+%s*[—–-]%s*%d+%a+$') or -- digitletter <range separator> digitletter mw.ustring.match (item, '^%a+%d+%s*[—–-]%s*%a+%d+$') or -- letterdigit <range separator> letterdigit mw.ustring.match (item, '^%d+%s*[—–-]%s*%d+$') or -- digit <range separator> digit mw.ustring.match (item, '^%a+%s*[—–-]%s*%a+$') then -- letter<range separator> letter item = mw.ustring.gsub (item, '(%w+)%s*[—–-]%s*(%w+)', '<span class="nowrap">%1–</span>%2'); -- replace <range separator> with endash, remove extraneous space characters else -- item = mw.ustring.gsub (item, '%s*[—–-]%s*', '–'); -- disabled; here when 'unlike' items so return <item> as is end end table.insert (out, item); -- add the (possibly modified) item to the output table end local temp_str = ''; -- concatenate the output table into a comma separated string temp_str, accept = has_accept_as_written (table.concat (out, ', ')); -- remove accept-this-as-written markup when it wraps all of concatenated out if accept then temp_str = has_accept_as_written (str); -- when global markup removed, return original str; do it this way to suppress boolean second return value return temp_str:gsub(",", ","):gsub(";", ";"); else return temp_str:gsub(",", ","):gsub(";", ";"); -- else, return assembled temp_str end end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided (or link and display are the same), returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if not is_set (link) then return '' end if is_set (display) and link ~= display then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end end --[[--------------------------< S E T _ M E S S A G E >---------------------------------------------------------- Sets an error message using the ~/Configuration error_conditions{} table along with arguments supplied in the function call, inserts the resulting message in z.error_msgs_t{} sequence table, and returns the error message. <error_id> – key value for appropriate error handler in ~/Configuration error_conditions{} table <arguments> – may be a single string or a sequence table of multiple strings to be subsititued into error_conditions[error_id].message <raw> – boolean true – causes this function to return the error message not wrapped in visible-error, hidden-error span tag; returns error_conditions[error_id].hidden as a second return value does not add message to z.error_msgs_t sequence table false, nil – adds message wrapped in visible-error, hidden-error span tag to z.error_msgs_t returns the error message wrapped in visible-error, hidden-error span tag; there is no second return value <prefix> – string to be prepended to <message> -- TODO: remove support for these unused(?) arguments? <suffix> – string to be appended to <message> TODO: change z.error_cats_t and z.maint_cats_t to have the form cat_name = true? this to avoid dups without having to have an extra table ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maint_cats_t; TODO: figure out how to delete this table local function set_message (error_id, arguments, raw, prefix, suffix) local error_state = cfg.error_conditions[error_id]; prefix = prefix or ''; suffix = suffix or ''; if error_state == nil then error (cfg.messages['undefined_error'] .. ': ' .. error_id); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set (error_state.category) then if error_state.message then -- when error_state.message defined, this is an error message table.insert (z.error_cats_t, error_state.category); else if not added_maint_cats[error_id] then added_maint_cats[error_id] = true; -- note that we've added this category table.insert (z.maint_cats_t, substitute (error_state.category, arguments)); -- make cat name then add to table end return; -- because no message, nothing more to do end end local message = substitute (error_state.message, arguments); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids_t[error_id] = true; if z.error_ids_t['err_citation_missing_title'] and -- if missing-title error already noted in_array (error_id, {'err_bare_url_missing_title', 'err_trans_missing_title'}) then -- and this error is one of these return '', false; -- don't bother because one flavor of missing title is sufficient end message = table.concat ({prefix, message, suffix}); if true == raw then return message, error_state.hidden; -- return message not wrapped in visible-error, hidden-error span tag end message = error_comment (message, error_state.hidden); -- wrap message in visible-error, hidden-error span tag table.insert (z.error_msgs_t, message); -- add it to the messages sequence table return message; -- and done; return value generally not used but is used as a flag in various functions of ~/Identifiers end --[[-------------------------< I S _ A L I A S _ U S E D >----------------------------------------------------- This function is used by select_one() to determine if one of a list of alias parameters is in the argument list provided by the template. Input: args – pointer to the arguments table from calling template alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration index – for enumerated parameters, identifies which one enumerated – true/false flag used to choose how enumerated aliases are examined value – value associated with an alias that has previously been selected; nil if not yet selected selected – the alias that has previously been selected; nil if not yet selected error_list – list of aliases that are duplicates of the alias already selected Returns: value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected ]] local function is_alias_used (args, alias, index, enumerated, value, selected, error_list) if enumerated then -- is this a test for an enumerated parameters? alias = alias:gsub ('#', index); -- replace '#' with the value in index else alias = alias:gsub ('#', ''); -- remove '#' if it exists end if is_set (args[alias]) then -- alias is in the template's argument list if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases local skip; for _, v in ipairs (error_list) do -- spin through the error list to see if we've added this alias if v == alias then skip = true; break; -- has been added so stop looking end end if not skip then -- has not been added so table.insert (error_list, alias); -- add error alias to the error list end else value = args[alias]; -- not yet selected an alias, so select this one selected = alias; end end return value, selected; -- return newly selected alias, or previously selected alias end --[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------ Adds a category to z.maint_cats_t using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maint_cats_t. ]] local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert (z.maint_cats_t, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< A D D _ P R O P _ C A T >-------------------------------------------------------- Adds a category to z.prop_cats_t using names from the configuration file with additional text if any. foreign_lang_source and foreign_lang_source_2 keys have a language code appended to them so that multiple languages may be categorized but multiples of the same language are not categorized. added_prop_cats is a table declared in page scope variables above ]] local added_prop_cats = {}; -- list of property categories that have been added to z.prop_cats_t local function add_prop_cat (key, arguments, key_modifier) local key_modified = key .. ((key_modifier and key_modifier) or ''); -- modify <key> with <key_modifier> if present and not nil if not added_prop_cats [key_modified] then added_prop_cats [key_modified] = true; -- note that we've added this category table.insert (z.prop_cats_t, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table table.insert (z.prop_keys_t, 'cs1-prop-' .. key); -- convert key to class for use in the citation's <cite> tag end end --[[--------------------------< S A F E _ F O R _ I T A L I C S >---------------------------------------------- Protects a string that will be wrapped in wiki italic markup '' ... '' Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact poorly under Mediawiki's HTML tidy. ]] local function safe_for_italics (str) if not is_set (str) then return str end if str:sub (1, 1) == "'" then str = "<span></span>" .. str; end if str:sub (-1, -1) == "'" then str = str .. "<span></span>"; end return str:gsub ('\n', ' '); -- Remove newlines as they break italics. end --[[--------------------------< W R A P _ S T Y L E >---------------------------------------------------------- Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason this function is similar to but separate from wrap_msg(). ]] local function wrap_style (key, str) if not is_set (str) then return ""; elseif in_array (key, {'italic-title', 'trans-italic-title'}) then str = safe_for_italics (str); end return substitute (cfg.presentation[key], {str}); end --[[--------------------------< M A K E _ S E P _ L I S T >------------------------------------------------------------ make a separated list of items using provided separators. <sep_list> - typically '<comma><space>' <sep_list_pair> - typically '<space>and<space>' <sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>' defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end'] if <sep_list_end> is specified, <sep_list> and <sep_list_pair> must also be supplied ]] local function make_sep_list (count, list_seq, sep_list, sep_list_pair, sep_list_end) local list = ''; if not sep_list then -- set the defaults sep_list = cfg.presentation['sep_list']; sep_list_pair = cfg.presentation['sep_list_pair']; sep_list_end = cfg.presentation['sep_list_end']; end if 2 >= count then list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item elseif 2 < count then list = table.concat (list_seq, sep_list, 1, count - 1); -- concatenate all but last item with plain list separator list = table.concat ({list, list_seq[count]}, sep_list_end); -- concatenate last item onto end of <list> with final separator end return list; end --[[--------------------------< S E L E C T _ O N E >---------------------------------------------------------- Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'. Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities. Generates an error if more than one match is present. ]] local function select_one (args, aliases_list, error_condition, index) local value = nil; -- the value assigned to the selected parameter local selected = ''; -- the name of the parameter we have chosen local error_list = {}; if index ~= nil then index = tostring(index); end for _, alias in ipairs (aliases_list) do -- for each alias in the aliases list if alias:match ('#') then -- if this alias can be enumerated if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias end value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias else value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- test for non-enumerated alias end end if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names() for i, v in ipairs (error_list) do error_list[i] = wrap_style ('parameter', v); end table.insert (error_list, wrap_style ('parameter', selected)); set_message (error_condition, {make_sep_list (#error_list, error_list)}); end return value, selected; end --[=[-------------------------< R E M O V E _ W I K I _ L I N K >---------------------------------------------- Gets the display text from a wikilink like [[A|B]] or [[B]] gives B The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup). In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims whitespace from the label if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match in the initial gsub, the replacement function l() doesn't get called. ]=] local function remove_wiki_link (str) return (str:gsub ("%[%[([^%[%]]*)%]%]", function(l) return l:gsub ("^[^|]*|(.*)$", "%1" ):gsub ("^%s*(.-)%s*$", "%1"); end)); end --[=[-------------------------< I S _ W I K I L I N K >-------------------------------------------------------- Determines if str is a wikilink, extracts, and returns the wikilink type, link text, and display text parts. If str is a complex wikilink ([[L|D]]): returns wl_type 2 and D and L from [[L|D]]; if str is a simple wikilink ([[D]]) returns wl_type 1 and D from [[D]] and L as empty string; if not a wikilink: returns wl_type 0, str as D, and L as empty string. trims leading and trailing whitespace and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes). ]=] local function is_wikilink (str) local D, L local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content) return 0, str, ''; -- not a wikilink; return wl_type as 0, str as D, and empty string as L end L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate display D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]] wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters return wl_type, D, L or ''; end --[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >-------------------------------- Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata. This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind. Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was removed; returns the argument and nil when no markup removed ]] local function strip_apostrophe_markup (argument) if not is_set (argument) then return argument, nil; -- no argument, nothing to do end if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit. return argument, nil; end local flag; while true do if argument:find ("'''''", 1, true) then -- bold italic (5) argument, flag = argument:gsub ("%'%'%'%'%'", ""); -- remove all instances of it elseif argument:find ("''''", 1, true) then -- italic start and end without content (4) argument, flag=argument:gsub ("%'%'%'%'", ""); elseif argument:find ("'''", 1, true) then -- bold (3) argument, flag=argument:gsub ("%'%'%'", ""); elseif argument:find ("''", 1, true) then -- italic (2) argument, flag = argument:gsub ("%'%'", ""); else break; end end return argument, flag; -- done end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr) cfg = cfg_table_ptr; end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { add_maint_cat = add_maint_cat, -- exported functions add_prop_cat = add_prop_cat, error_comment = error_comment, has_accept_as_written = has_accept_as_written, hyphen_to_dash = hyphen_to_dash, in_array = in_array, is_set = is_set, is_wikilink = is_wikilink, make_sep_list = make_sep_list, make_wikilink = make_wikilink, remove_wiki_link = remove_wiki_link, safe_for_italics = safe_for_italics, select_one = select_one, set_message = set_message, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, substitute = substitute, wrap_style = wrap_style, z = z, -- exported table } ipuk2skv52zxnbboa2zzah6ug9yuin7 116881 116880 2026-07-16T10:58:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1/Utilities]] 116880 Scribunto text/plain local z = { error_cats_t = {}; -- for categorizing citations that contain errors error_ids_t = {}; -- list of error identifiers; used to prevent duplication of certain errors; local to this module error_msgs_t = {}; -- sequence table of error messages maint_cats_t = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work prop_cats_t = {}; -- for categorizing citations based on certain properties, language of source for instance prop_keys_t = {}; -- for adding classes to the citation's <cite> tag }; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set (var) return not (var == nil or var == ''); end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array (needle, haystack) if needle == nil then return false; end for n, v in ipairs (haystack) do if v == needle then return n; end end return false; end --[[--------------------------< H A S _ A C C E P T _ A S _ W R I T T E N >------------------------------------ When <str> is wholly wrapped in accept-as-written markup, return <str> without markup and true; return <str> and false else with allow_empty = false, <str> must have at least one character inside the markup with allow_empty = true, <str> the markup frame can be empty like (()) to distinguish an empty template parameter from the specific condition "has no applicable value" in citation-context. After further evaluation the two cases might be merged at a later stage, but should be kept separated for now. ]] local function has_accept_as_written (str, allow_empty) if not is_set (str) then return str, false; end local count; if true == allow_empty then str, count = str:gsub ('^%(%((.*)%)%)$', '%1'); -- allows (()) to be an empty set else str, count = str:gsub ('^%(%((.+)%)%)$', '%1'); end return str, 0 ~= count; end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. <args> may be a single string or a sequence table of multiple strings. ]] local function substitute (msg, args) return args and mw.message.newRawMessage (msg, args):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with CSS markup according to the state of hidden. <content> may be a single string or a sequence table of multiple strings. ]] local function error_comment (content, hidden) return substitute (hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content); end --[[--------------------------< H Y P H E N _ T O _ D A S H >-------------------------------------------------- Converts a hyphen, endash, emdash to endash under certain conditions. The hyphen/en/em must separate like items; unlike items are returned unmodified. These forms are modified: letter - letter (A-B) digit - digit (4-5) digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5) letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5) digitletter - digitletter (5a-5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d) any other forms are returned unmodified. str may be a comma- or semicolon-separated list of page ranges with/without single pages ]] local function hyphen_to_dash (str) if not is_set (str) then return str; end str = str:gsub ("(%(%(.-%)%))", function(m) return m:gsub(",", ","):gsub(";", ";") end) -- replace commas and semicolons in accept-as-written markup with similar unicode characters so they'll be ignored during the split str = str:gsub ('&[nm]dash;', {['&ndash;'] = '–', ['&mdash;'] = '—'}); -- replace &mdash; and &ndash; entities with their characters; semicolon mucks up the text.split str = str:gsub ('&#45;', '-'); -- replace HTML numeric entity with hyphen character str = str:gsub ('&nbsp;', ' '); -- replace &nbsp; entity with generic keyboard space character local out = {}; local list = mw.text.split (str, '%s*[,;]%s*'); -- split str at comma or semicolon separators if there are any local accept; -- boolean for _, item in ipairs (list) do -- for each item in the list item, accept = has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of item if not accept and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[—–-]%s*%w*[%.%-]?%w+$') then -- if pagination uses <hyphen|dot> separators with hyphen/endash/emdash <range separator> if mw.ustring.match (item, '^%a+[%.%-]%d+%s*[—–-]%s*%a+[%.%-]%d+$') or -- letter<hyphen|dot>digit <range separator> letter<hyphen|dot>digit (requires <hyphen|dot> separator between letter and digit) mw.ustring.match (item, '^%d+[%.%-]%a+%s*[—–-]%s*%d+[%.%-]%a+$') or -- digit<hyphen|dot>letter <range separator> digit<hyphen|dot>letter (requires <hyphen|dot> separator between digit and letter) mw.ustring.match (item, '^%d+[%.%-]%d+%s*[—–-]%s*%d+[%.%-]%d+$') then -- digit<hyphen|dot>digit <range separator> digit<hyphen|dot>digit (requires <hyphen|dot> separator between digit and digit) item = mw.ustring.gsub (item, '(%w*[%.%-]%w+)%s*[—–-]%s*(%w*[%.%-]%w+)', '<span class="nowrap">%1 –</span> <span class="nowrap">%2</span>'); -- replace <range separator>, with spaced endash elseif mw.ustring.match (item, '^%d+%a+%s*[—–-]%s*%d+%a+$') or -- digitletter <range separator> digitletter mw.ustring.match (item, '^%a+%d+%s*[—–-]%s*%a+%d+$') or -- letterdigit <range separator> letterdigit mw.ustring.match (item, '^%d+%s*[—–-]%s*%d+$') or -- digit <range separator> digit mw.ustring.match (item, '^%a+%s*[—–-]%s*%a+$') then -- letter<range separator> letter item = mw.ustring.gsub (item, '(%w+)%s*[—–-]%s*(%w+)', '<span class="nowrap">%1–</span>%2'); -- replace <range separator> with endash, remove extraneous space characters else -- item = mw.ustring.gsub (item, '%s*[—–-]%s*', '–'); -- disabled; here when 'unlike' items so return <item> as is end end table.insert (out, item); -- add the (possibly modified) item to the output table end local temp_str = ''; -- concatenate the output table into a comma separated string temp_str, accept = has_accept_as_written (table.concat (out, ', ')); -- remove accept-this-as-written markup when it wraps all of concatenated out if accept then temp_str = has_accept_as_written (str); -- when global markup removed, return original str; do it this way to suppress boolean second return value return temp_str:gsub(",", ","):gsub(";", ";"); else return temp_str:gsub(",", ","):gsub(";", ";"); -- else, return assembled temp_str end end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided (or link and display are the same), returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if not is_set (link) then return '' end if is_set (display) and link ~= display then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end end --[[--------------------------< S E T _ M E S S A G E >---------------------------------------------------------- Sets an error message using the ~/Configuration error_conditions{} table along with arguments supplied in the function call, inserts the resulting message in z.error_msgs_t{} sequence table, and returns the error message. <error_id> – key value for appropriate error handler in ~/Configuration error_conditions{} table <arguments> – may be a single string or a sequence table of multiple strings to be subsititued into error_conditions[error_id].message <raw> – boolean true – causes this function to return the error message not wrapped in visible-error, hidden-error span tag; returns error_conditions[error_id].hidden as a second return value does not add message to z.error_msgs_t sequence table false, nil – adds message wrapped in visible-error, hidden-error span tag to z.error_msgs_t returns the error message wrapped in visible-error, hidden-error span tag; there is no second return value <prefix> – string to be prepended to <message> -- TODO: remove support for these unused(?) arguments? <suffix> – string to be appended to <message> TODO: change z.error_cats_t and z.maint_cats_t to have the form cat_name = true? this to avoid dups without having to have an extra table ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maint_cats_t; TODO: figure out how to delete this table local function set_message (error_id, arguments, raw, prefix, suffix) local error_state = cfg.error_conditions[error_id]; prefix = prefix or ''; suffix = suffix or ''; if error_state == nil then error (cfg.messages['undefined_error'] .. ': ' .. error_id); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set (error_state.category) then if error_state.message then -- when error_state.message defined, this is an error message table.insert (z.error_cats_t, error_state.category); else if not added_maint_cats[error_id] then added_maint_cats[error_id] = true; -- note that we've added this category table.insert (z.maint_cats_t, substitute (error_state.category, arguments)); -- make cat name then add to table end return; -- because no message, nothing more to do end end local message = substitute (error_state.message, arguments); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids_t[error_id] = true; if z.error_ids_t['err_citation_missing_title'] and -- if missing-title error already noted in_array (error_id, {'err_bare_url_missing_title', 'err_trans_missing_title'}) then -- and this error is one of these return '', false; -- don't bother because one flavor of missing title is sufficient end message = table.concat ({prefix, message, suffix}); if true == raw then return message, error_state.hidden; -- return message not wrapped in visible-error, hidden-error span tag end message = error_comment (message, error_state.hidden); -- wrap message in visible-error, hidden-error span tag table.insert (z.error_msgs_t, message); -- add it to the messages sequence table return message; -- and done; return value generally not used but is used as a flag in various functions of ~/Identifiers end --[[-------------------------< I S _ A L I A S _ U S E D >----------------------------------------------------- This function is used by select_one() to determine if one of a list of alias parameters is in the argument list provided by the template. Input: args – pointer to the arguments table from calling template alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration index – for enumerated parameters, identifies which one enumerated – true/false flag used to choose how enumerated aliases are examined value – value associated with an alias that has previously been selected; nil if not yet selected selected – the alias that has previously been selected; nil if not yet selected error_list – list of aliases that are duplicates of the alias already selected Returns: value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected ]] local function is_alias_used (args, alias, index, enumerated, value, selected, error_list) if enumerated then -- is this a test for an enumerated parameters? alias = alias:gsub ('#', index); -- replace '#' with the value in index else alias = alias:gsub ('#', ''); -- remove '#' if it exists end if is_set (args[alias]) then -- alias is in the template's argument list if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases local skip; for _, v in ipairs (error_list) do -- spin through the error list to see if we've added this alias if v == alias then skip = true; break; -- has been added so stop looking end end if not skip then -- has not been added so table.insert (error_list, alias); -- add error alias to the error list end else value = args[alias]; -- not yet selected an alias, so select this one selected = alias; end end return value, selected; -- return newly selected alias, or previously selected alias end --[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------ Adds a category to z.maint_cats_t using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maint_cats_t. ]] local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert (z.maint_cats_t, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< A D D _ P R O P _ C A T >-------------------------------------------------------- Adds a category to z.prop_cats_t using names from the configuration file with additional text if any. foreign_lang_source and foreign_lang_source_2 keys have a language code appended to them so that multiple languages may be categorized but multiples of the same language are not categorized. added_prop_cats is a table declared in page scope variables above ]] local added_prop_cats = {}; -- list of property categories that have been added to z.prop_cats_t local function add_prop_cat (key, arguments, key_modifier) local key_modified = key .. ((key_modifier and key_modifier) or ''); -- modify <key> with <key_modifier> if present and not nil if not added_prop_cats [key_modified] then added_prop_cats [key_modified] = true; -- note that we've added this category table.insert (z.prop_cats_t, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table table.insert (z.prop_keys_t, 'cs1-prop-' .. key); -- convert key to class for use in the citation's <cite> tag end end --[[--------------------------< S A F E _ F O R _ I T A L I C S >---------------------------------------------- Protects a string that will be wrapped in wiki italic markup '' ... '' Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact poorly under Mediawiki's HTML tidy. ]] local function safe_for_italics (str) if not is_set (str) then return str end if str:sub (1, 1) == "'" then str = "<span></span>" .. str; end if str:sub (-1, -1) == "'" then str = str .. "<span></span>"; end return str:gsub ('\n', ' '); -- Remove newlines as they break italics. end --[[--------------------------< W R A P _ S T Y L E >---------------------------------------------------------- Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason this function is similar to but separate from wrap_msg(). ]] local function wrap_style (key, str) if not is_set (str) then return ""; elseif in_array (key, {'italic-title', 'trans-italic-title'}) then str = safe_for_italics (str); end return substitute (cfg.presentation[key], {str}); end --[[--------------------------< M A K E _ S E P _ L I S T >------------------------------------------------------------ make a separated list of items using provided separators. <sep_list> - typically '<comma><space>' <sep_list_pair> - typically '<space>and<space>' <sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>' defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end'] if <sep_list_end> is specified, <sep_list> and <sep_list_pair> must also be supplied ]] local function make_sep_list (count, list_seq, sep_list, sep_list_pair, sep_list_end) local list = ''; if not sep_list then -- set the defaults sep_list = cfg.presentation['sep_list']; sep_list_pair = cfg.presentation['sep_list_pair']; sep_list_end = cfg.presentation['sep_list_end']; end if 2 >= count then list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item elseif 2 < count then list = table.concat (list_seq, sep_list, 1, count - 1); -- concatenate all but last item with plain list separator list = table.concat ({list, list_seq[count]}, sep_list_end); -- concatenate last item onto end of <list> with final separator end return list; end --[[--------------------------< S E L E C T _ O N E >---------------------------------------------------------- Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'. Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities. Generates an error if more than one match is present. ]] local function select_one (args, aliases_list, error_condition, index) local value = nil; -- the value assigned to the selected parameter local selected = ''; -- the name of the parameter we have chosen local error_list = {}; if index ~= nil then index = tostring(index); end for _, alias in ipairs (aliases_list) do -- for each alias in the aliases list if alias:match ('#') then -- if this alias can be enumerated if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias end value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias else value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- test for non-enumerated alias end end if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names() for i, v in ipairs (error_list) do error_list[i] = wrap_style ('parameter', v); end table.insert (error_list, wrap_style ('parameter', selected)); set_message (error_condition, {make_sep_list (#error_list, error_list)}); end return value, selected; end --[=[-------------------------< R E M O V E _ W I K I _ L I N K >---------------------------------------------- Gets the display text from a wikilink like [[A|B]] or [[B]] gives B The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup). In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims whitespace from the label if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match in the initial gsub, the replacement function l() doesn't get called. ]=] local function remove_wiki_link (str) return (str:gsub ("%[%[([^%[%]]*)%]%]", function(l) return l:gsub ("^[^|]*|(.*)$", "%1" ):gsub ("^%s*(.-)%s*$", "%1"); end)); end --[=[-------------------------< I S _ W I K I L I N K >-------------------------------------------------------- Determines if str is a wikilink, extracts, and returns the wikilink type, link text, and display text parts. If str is a complex wikilink ([[L|D]]): returns wl_type 2 and D and L from [[L|D]]; if str is a simple wikilink ([[D]]) returns wl_type 1 and D from [[D]] and L as empty string; if not a wikilink: returns wl_type 0, str as D, and L as empty string. trims leading and trailing whitespace and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes). ]=] local function is_wikilink (str) local D, L local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content) return 0, str, ''; -- not a wikilink; return wl_type as 0, str as D, and empty string as L end L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate display D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]] wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters return wl_type, D, L or ''; end --[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >-------------------------------- Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata. This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind. Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was removed; returns the argument and nil when no markup removed ]] local function strip_apostrophe_markup (argument) if not is_set (argument) then return argument, nil; -- no argument, nothing to do end if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit. return argument, nil; end local flag; while true do if argument:find ("'''''", 1, true) then -- bold italic (5) argument, flag = argument:gsub ("%'%'%'%'%'", ""); -- remove all instances of it elseif argument:find ("''''", 1, true) then -- italic start and end without content (4) argument, flag=argument:gsub ("%'%'%'%'", ""); elseif argument:find ("'''", 1, true) then -- bold (3) argument, flag=argument:gsub ("%'%'%'", ""); elseif argument:find ("''", 1, true) then -- italic (2) argument, flag = argument:gsub ("%'%'", ""); else break; end end return argument, flag; -- done end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr) cfg = cfg_table_ptr; end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { add_maint_cat = add_maint_cat, -- exported functions add_prop_cat = add_prop_cat, error_comment = error_comment, has_accept_as_written = has_accept_as_written, hyphen_to_dash = hyphen_to_dash, in_array = in_array, is_set = is_set, is_wikilink = is_wikilink, make_sep_list = make_sep_list, make_wikilink = make_wikilink, remove_wiki_link = remove_wiki_link, safe_for_italics = safe_for_italics, select_one = select_one, set_message = set_message, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, substitute = substitute, wrap_style = wrap_style, z = z, -- exported table } ipuk2skv52zxnbboa2zzah6ug9yuin7 Module:Citation/CS1/Identifiers 828 12886 116884 114933 2026-01-19T15:36:14Z en>Trappist the monk 0 fix doi accept-as-written but; 116884 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local has_accept_as_written, is_set, in_array, set_message, select_one, -- functions in Module:Citation/CS1/Utilities substitute, make_wikilink; local z; -- table of tables defined in Module:Citation/CS1/Utilities local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration --[[--------------------------< P A G E S C O P E V A R I A B L E S >-------------------------------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local auto_link_urls = {}; -- holds identifier URLs for those identifiers that can auto-link |title= --============================<< H E L P E R F U N C T I O N S >>============================================ --[[--------------------------< W I K I D A T A _ A R T I C L E _ N A M E _ G E T >---------------------------- as an aid to internationalizing identifier-label wikilinks, gets identifier article names from Wikidata. returns w:<lang code>:<article title> when <q> has an <article title> for <lang code>; nil else. 'w:<lang code>' ensures that sister project (like wiktionary) will link to the <lang code>.wikipedia article. for identifiers that do not have <q>, returns nil for wikis that do not have mw.wikibase installed, returns nil ]] local function wikidata_article_name_get (q) if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki return nil; -- abandon end local wd_article; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki if wd_article then wd_article = table.concat ({'w:', this_wiki_code, ':', wd_article}); -- interwiki-style link without brackets if taken from WD; leading 'w:' required end return wd_article; -- article title from WD; nil else end --[[--------------------------< L A B E L _ L I N K _ M A K E >------------------------------------------------ common function to create a link for an identifier label from handler table or from Wikidata returns the first available of: 1. redirect from local wiki's handler table (if enabled) 2. Wikidata sitelink to the local language wikipedia article (if there is a Wikidata entry for this identifier in the local language) 3. link to wikipedia article specified in the local wiki's handler table ]] local function label_link_make (handler) local wd_article; if not (cfg.use_identifier_redirects and is_set (handler.redirect)) then -- redirect has priority so if enabled and available don't fetch from Wikidata because expensive wd_article = wikidata_article_name_get (handler.q); -- if Wikidata has an article title for this wiki, get it; end return (cfg.use_identifier_redirects and is_set (handler.redirect) and handler.redirect) or wd_article or handler.link; end --[[--------------------------< E X T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style external link ]] local function external_link_id (options) local url_string = options.id; local ext_link; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org local wd_article; -- article title from Wikidata if options.encode == true or options.encode == nil then url_string = mw.uri.encode (url_string, 'PATH'); end if options.auto_link and is_set (options.access) then auto_link_urls[options.auto_link] = table.concat ({options.prefix, url_string, options.suffix}); end ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki (options.id)); if is_set (options.access) then ext_link = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[options.access].class, cfg.presentation[options.access].title, ext_link}); -- add the free-to-read / paywall lock end return table.concat ({ make_wikilink (label_link_make (options), options.label), -- redirect, Wikidata link, or locally specified link (in that order) options.separator or '&nbsp;', ext_link }); end --[[--------------------------< I N T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style internal link TODO: Does not currently need to support options.access, options.encode, auto-linking and COinS (as in external_link_id), but may be needed in the future for :m:Interwiki_map custom-prefixes like :arxiv:, :bibcode:, :DOI:, :hdl:, :ISSN:, :JSTOR:, :Openlibrary:, :PMID:, :RFC:. ]] local function internal_link_id (options) local id = mw.ustring.gsub (options.id, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 return table.concat ( { make_wikilink (label_link_make (options), options.label), -- wiki-link the identifier label options.separator or '&nbsp;', -- add the separator make_wikilink ( table.concat ( { options.prefix, id, -- translated to Western digits options.suffix or '' }), substitute (cfg.presentation['bdi'], {'', mw.text.nowiki (options.id)}) -- bdi tags to prevent Latin script identifiers from being reversed at RTL language wikis ); -- nowiki because MediaWiki still has magic links for ISBN and the like; TODO: is it really required? }); end --[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------ Determines if a PMC identifier's online version is embargoed. Compares the date in |pmc-embargo-date= against today's date. If embargo date is in the future, returns the content of |pmc-embargo-date=; otherwise, returns an empty string because the embargo has expired or because |pmc-embargo-date= was not set in this cite. ]] local function is_embargoed (embargo) if is_set (embargo) then local lang = mw.getContentLanguage(); local good1, embargo_date, todays_date; good1, embargo_date = pcall (lang.formatDate, lang, 'U', embargo); todays_date = lang:formatDate ('U'); if good1 then -- if embargo date is a good date if tonumber (embargo_date) >= tonumber (todays_date) then -- is embargo date is in the future? return embargo; -- still embargoed else set_message ('maint_pmc_embargo'); -- embargo has expired; add main cat return ''; -- unset because embargo has expired end end end return ''; -- |pmc-embargo-date= not set return empty string end --[=[-------------------------< I S _ V A L I D _ R X I V _ D A T E >------------------------------------------ for biorxiv, returns true if: 2019-12-11T00:00Z <= biorxiv_date < today + 2 days for medrxiv, returns true if: 2020-01-01T00:00Z <= medrxiv_date < today + 2 days The dated form of biorxiv identifier has a start date of 2019-12-11. The Unix timestamp for that date is {{#time:U|2019-12-11}} = 1576022400 The medrxiv identifier has a start date of 2020-01-01. The Unix timestamp for that date is {{#time:U|2020-01-01}} = 1577836800 <rxiv_date> is the date provided in those |biorxiv= parameter values that are dated and in |medrxiv= parameter values at time 00:00:00 UTC <today> is the current date at time 00:00:00 UTC plus 48 hours if today's date is 2023-01-01T00:00:00 then adding 24 hours gives 2023-01-02T00:00:00 – one second more than today adding 24 hours gives 2023-01-03T00:00:00 – one second more than tomorrow inputs: <y>, <m>, <d> – year, month, day parts of the date from the birxiv or medrxiv identifier <select> 'b' for biorxiv, 'm' for medrxiv; defaults to 'b' ]=] local function is_valid_rxiv_date (y, m, d, select) if 0 == tonumber (m) and 12 < tonumber (m) then -- <m> must be a number 1–12 return false; end if 0 == tonumber (d) and 31 < tonumber (d) then -- <d> must be a number 1–31; TODO: account for month length and leap yer? return false; end local rxiv_date = table.concat ({y, m, d}, '-'); -- make ymd date string local good1, good2; local rxiv_ts, tomorrow_ts; -- to hold Unix timestamps representing the dates local lang_object = mw.getContentLanguage(); good1, rxiv_ts = pcall (lang_object.formatDate, lang_object, 'U', rxiv_date); -- convert rxiv_date value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which tonumber() may not understand rxiv_ts = tonumber (rxiv_ts) or lang_object:parseFormattedNumber (rxiv_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix timestamp end local limit_ts = ((select and ('m' == select)) and 1577836800) or 1576022400; -- choose the appropriate limit timesatmp return ((limit_ts <= rxiv_ts) and (rxiv_ts < tomorrow_ts)) -- limit_ts <= rxiv_date < tomorrow's date end --[[--------------------------< IS _ V A L I D _ I S X N >----------------------------------------------------- ISBN-10 and ISSN validator code calculates checksum across all ISBN/ISSN digits including the check digit. ISBN-13 is checked in isbn(). If the number is valid the result will be 0. Before calling this function, ISBN/ISSN must be checked for length and stripped of dashes, spaces and other non-ISxN characters. ]] local function is_valid_isxn (isxn_str, len) local temp = 0; isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58 len = len + 1; -- adjust to be a loop counter for i, v in ipairs (isxn_str) do -- loop through all of the bytes and calculate the checksum if v == string.byte ("X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58) temp = temp + 10 * (len - i); -- it represents 10 decimal else temp = temp + tonumber (string.char (v) )*(len-i); end end return temp % 11 == 0; -- returns true if calculation result is zero end --[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >----------------------------------------------- ISBN-13 and ISMN validator code calculates checksum across all 13 ISBN/ISMN digits including the check digit. If the number is valid, the result will be 0. Before calling this function, ISBN-13/ISMN must be checked for length and stripped of dashes, spaces and other non-ISxN-13 characters. ]] local function is_valid_isxn_13 (isxn_str) local temp=0; isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39 for i, v in ipairs (isxn_str) do temp = temp + (3 - 2*(i % 2)) * tonumber (string.char (v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit end return temp % 10 == 0; -- sum modulo 10 is zero when ISBN-13/ISMN is correct end --[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- LCCN normalization (https://www.loc.gov/marc/lccn-namespace.html#normalization) 1. Remove all blanks. 2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash. 3. If there is a hyphen in the string: a. Remove it. b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out): 1. All these characters should be digits, and there should be six or less. (not done in this function) 2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six. Returns a normalized LCCN for lccn() to validate. There is no error checking (step 3.b.1) performed in this function. ]] local function normalize_lccn (lccn) lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace if nil ~= string.find (lccn, '/') then lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it end local prefix local suffix prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix if nil ~= suffix then -- if there was a hyphen suffix = string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6 lccn = prefix..suffix; -- reassemble the LCCN end return lccn; end --============================<< I D E N T I F I E R F U N C T I O N S >>==================================== --[[--------------------------< A R X I V >-------------------------------------------------------------------- See: https://arxiv.org/help/arxiv_identifier format and error check arXiv identifier. There are three valid forms of the identifier: the first form, valid only between date codes 9107 and 0703, is: arXiv:<archive>.<class>/<date code><number><version> where: <archive> is a string of alpha characters - may be hyphenated; no other punctuation <class> is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 first digit of YY for this form can only 9 and 0 <number> is a three-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented) the second form, valid from April 2007 through December 2014 is: arXiv:<date code>.<number><version> where: <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 <number> is a four-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces the third form, valid from January 2015 is: arXiv:<date code>.<number><version> where: <date code> and <version> are as defined for 0704-1412 <number> is a five-digit number ]] local function arxiv (options) local id = options.id; local class = options.Class; -- TODO: lowercase? local handler = options.handler; local year, month, version; local err_msg = false; -- assume no error message local text; -- output text if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9107-0703 format with or without version year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((not (90 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month ((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok? err_msg = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((7 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years) ((7 == year) and (4 > month)) then -- when year is 07, is month invalid (before April)? err_msg = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((15 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years) err_msg = true; -- flag for error message end else err_msg = true; -- not a recognized format; flag for error message end if err_msg then options.coins_list_t['ARXIV'] = nil; -- when error, unset so not included in COinS end local err_msg_t = {}; if err_msg then set_message ('err_bad_arxiv'); end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); if is_set (class) then if id:match ('^%d+') then text = table.concat ({text, ' [[https://arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink else set_message ('err_class_ignored'); end else -- class not set if id:match ('^%d+') and options.CitationClass == 'arxiv' then -- new (post 2007) format; {{cite arxiv}} only set_message ('maint_missing_class'); -- add maint cat end end return text; end --[[--------------------------< B I B C O D E >-------------------------------------------------------------------- Validates (sort of) and formats a bibcode ID. Format for bibcodes is specified here: https://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters and first four digits must be a year. This function makes these tests: length must be 19 characters characters in position 1–4 must be digits and must represent a year in the range of 1000 – next year 5 must be a letter 6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. ) 9–18 must be letter, digit, or dot 19 must be a letter or dot ]] local function bibcode (options) local id = options.id; local access = options.access; local handler = options.handler; local ignore_invalid = options.accept; local err_type; local err_msg = ''; local year; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); if 19 ~= id:len() then err_type = cfg.err_msg_supl.length; else year = id:match ("^(%d%d%d%d)[%a][%w&%.][%w&%.][%w&%.][%w.]+[%a%.]$"); if not year then -- if nil then no pattern match err_type = cfg.err_msg_supl.value; -- so value error else local next_year = tonumber (os.date ('%Y')) + 1; -- get the current year as a number and add one for next year year = tonumber (year); -- convert year portion of bibcode to a number if (1000 > year) or (year > next_year) then err_type = cfg.err_msg_supl.year; -- year out of bounds end if id:find('&%.') then err_type = cfg.err_msg_supl.journal; -- journal abbreviation must not have '&.' (if it does it's missing a letter) end if id:match ('.........%.tmp%.') then -- temporary bibcodes when positions 10–14 are '.tmp.' set_message ('maint_bibcode'); end end end if is_set (err_type) and not ignore_invalid then -- if there was an error detected and accept-as-written markup not used set_message ('err_bad_bibcode', {err_type}); options.coins_list_t['BIBCODE'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< B I O R X I V >----------------------------------------------------------------- Format bioRxiv ID and do simple error checking. Before 2019-12-11, biorXiv IDs were 10.1101/ followed by exactly 6 digits. After 2019-12-11, biorXiv IDs retained the six-digit identifier but prefixed that with a yyyy.mm.dd. date and suffixed with an optional version identifier. From December 2025 biorxiv added a new 'doi' prefix: 10.64898: 10.64898/2025.12.10.693067 The bioRxiv ID is the string of characters: https://doi.org/10.1101/078733 -> 10.1101/078733 or a date followed by a six-digit number followed by an optional version indicator 'v' and one or more digits: https://www.biorxiv.org/content/10.1101/2019.12.11.123456v2 -> 10.1101/2019.12.11.123456v2 see https://www.biorxiv.org/about-biorxiv ]] local function biorxiv (options) local id = options.id; local handler = options.handler; local err_msg = true; -- flag; assume that there will be an error local patterns = { '^10%.1101/%d%d%d%d%d%d$', -- simple 6-digit identifier (before 2019-12-11) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (after 2019-12-11) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (after 2019-12-11) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (from December 2025) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (from December 2025) } for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match if id:match (pattern) then local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier if m then -- m is nil when id is the six-digit form if not is_valid_rxiv_date (y, m, d, 'b') then -- validate the encoded date; 'b' for biorxiv limit break; -- date fail; break out early so we don't unset the error message end end err_msg = nil; -- we found a match so unset the error message break; -- and done end end -- err_cat remains set here when no match if err_msg then options.coins_list_t['BIORXIV'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_biorxiv'); -- and set the error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< C I T E S E E R X >------------------------------------------------------------ CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org). The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure ]] local function citeseerx (options) local id = options.id; local handler = options.handler; local matched; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$"); if not matched then set_message ('err_bad_citeseerx' ); options.coins_list_t['CITESEERX'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< D O I >------------------------------------------------------------------------ Formats a DOI and checks for DOI errors. DOI names contain two parts: prefix and suffix separated by a forward slash. Prefix: directory indicator '10.' followed by a registrant code Suffix: character string of any length chosen by the registrant This function checks a DOI name for: prefix/suffix. If the DOI name contains spaces or endashes, or, if it ends with a period or a comma, this function will emit a bad_doi error message. DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash, and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in DOI names. https://www.doi.org/doi_handbook/2_Numbering.html -- 2.2 Syntax of a DOI name https://www.doi.org/doi_handbook/2_Numbering.html#2.2.2 -- 2.2.2 DOI prefix ]] local function doi (options) local id = options.id; local inactive = options.DoiBroken local access = options.access; local ignore_invalid = options.accept; local handler = options.handler; local err_flag; local function is_extended_free (registrant, suffix) -- local function to check those few registrants that are mixed; identifiable by the doi suffix <incipit> suffix = suffix:lower(); -- ascii [a-z] same as [A-Z] in doi names; see §3.4.4 Case Insensitivity of the Doi Name if cfg.extended_registrants_t[registrant] then -- if this registrant has known free-to-read extentions for _, incipit in ipairs (cfg.extended_registrants_t[registrant]) do -- loop through the registrant's incipits if mw.ustring.find (suffix, '^' .. incipit:lower()) then -- ascii [a-z] same as [A-Z] in doi names return true; -- if foundm done end end end end local text; if is_set (inactive) then local inactive_year = inactive:match("%d%d%d%d"); -- try to get the year portion from the inactive date local inactive_month, good; if is_set (inactive_year) then if 4 < inactive:len() then -- inactive date has more than just a year (could be anything) local lang_obj = mw.getContentLanguage(); -- get a language object for this wiki good, inactive_month = pcall (lang_obj.formatDate, lang_obj, 'F', inactive); -- try to get the month name from the inactive date if not good then inactive_month = nil; -- something went wrong so make sure this is unset end end end -- otherwise, |doi-broken-date= has something but it isn't a date if is_set (inactive_year) and is_set (inactive_month) then set_message ('maint_doi_inactive_dated', {inactive_year, inactive_month, ' '}); elseif is_set (inactive_year) then set_message ('maint_doi_inactive_dated', {inactive_year, '', ''}); else set_message ('maint_doi_inactive'); end inactive = substitute (cfg.messages['inactive'], inactive ); end local suffix; local registrant, suffix = mw.ustring.match (id, '^10%.([^/]+)/([^%s–]-[^%.,])$'); -- registrant and suffix set when DOI has the proper basic form; both nil else local registrant_err_patterns = { -- these patterns are for code ranges that are not supported '^[^1-3]%d%d%d%d%.%d+$', -- 5 digits with subcode (reject 0xxxx, 40000+); accepts: 10000–39999 '^[^1-8]%d%d%d%d$', -- 5 digits without subcode (reject 0xxxx, 90000+); accepts: 10000–89999 '^[^1-9]%d%d%d%.%d+$', -- 4 digits with subcode (reject 0xxx); accepts: 1000–9999 '^[^1-9]%d%d%d$', -- 4 digits without subcode (reject 0xxx); accepts: 1000–9999 '^%d%d%d%d%d%d+', -- 6 or more digits '^%d%d?%d?$', -- less than 4 digits without subcode (3 digits with subcode is legitimate) '^%d%d?%.[%d%.]+', -- 1 or 2 digits with subcode '^5555$', -- test registrant will never resolve '[^%d%.]', -- any character that isn't a digit or a dot } if not ignore_invalid then if registrant then -- when DOI has proper form for i, pattern in ipairs (registrant_err_patterns) do -- spin through error patterns if registrant:match (pattern) then -- to validate registrant codes err_flag = set_message ('err_bad_doi'); -- when found, mark this DOI as bad break; -- and done end end else err_flag = set_message ('err_bad_doi'); -- invalid directory or malformed end else set_message ('maint_doi_ignore'); end if err_flag then options.coins_list_t['DOI'] = nil; -- when error, unset so not included in COinS else -- here when doi has no errors or has been wrapped in accept-as-written markup suffix = mw.ustring.match (id, '^10%.[^/]+/(.+)'); -- refetch suffix because doi may have been wrapped in accept-as-written markup if not access and (cfg.known_free_doi_registrants_t[registrant] or is_extended_free (registrant, suffix)) then -- |doi-access=free not set and <registrant> is known to be free set_message ('maint_doi_unflagged_free'); -- set a maint cat end end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access, auto_link = not (err_flag or is_set (inactive) or ignore_invalid) and 'doi' or nil -- do not auto-link when |doi-broken-date= has a value or when there is a DOI error or (to play it safe, after all, auto-linking is not essential) when invalid DOIs are ignored }) .. (inactive or ''); return text; end --[[--------------------------< H D L >------------------------------------------------------------------------ Formats an HDL with minor error checking. HDL names contain two parts: prefix and suffix separated by a forward slash. Prefix: character string using any character in the UCS-2 character set except '/' Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends with a period or a comma, this function will emit a bad_hdl error message. HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in HDLs. Query string parameters are named here: https://www.handle.net/proxy_servlet.html. query strings are not displayed but since '?' is an allowed character in an HDL, '?' followed by one of the query parameters is the only way we have to detect the query string so that it isn't URL-encoded with the rest of the identifier. ]] local function hdl (options) local id = options.id; local access = options.access; local handler = options.handler; local query_params = { -- list of known query parameters from https://www.handle.net/proxy_servlet.html 'noredirect', 'ignore_aliases', 'auth', 'cert', 'index', 'type', 'urlappend', 'locatt', 'action', } local hdl, suffix, param = id:match ('(.-)(%?(%a+).+)$'); -- look for query string local found; if hdl then -- when there are query strings, this is the handle identifier portion for _, q in ipairs (query_params) do -- spin through the list of query parameters if param:match ('^' .. q) then -- if the query string begins with one of the parameters found = true; -- announce a find break; -- and stop looking end end end if found then id = hdl; -- found so replace id with the handle portion; this will be URL-encoded, suffix will not else suffix = ''; -- make sure suffix is empty string for concatenation else end local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, suffix = suffix, separator = handler.separator, encode = handler.encode, access = access}) if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- HDL must contain a forward slash, must not contain spaces, endashes, and must not end with period or comma set_message ('err_bad_hdl' ); options.coins_list_t['HDL'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< I S B N >---------------------------------------------------------------------- Determines whether an ISBN string is valid ]] local function isbn (options_t) local isbn_str = options_t.id; local ignore_invalid = options_t.accept; local handler = options_t.handler; local year = options_t.Year; -- when set, valid anchor_year; may have a disambiguator which must be removed local function return_result (check, err_type) -- local function to handle the various returns local ISBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = isbn_str, separator = handler.separator}); if ignore_invalid then -- if ignoring ISBN errors set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error else -- here when not ignoring if not check then -- and there is an error options_t.coins_list_t['ISBN'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_isbn', err_type); -- set an error message return ISBN; -- return id text end end return ISBN; -- return id text end if year and not ignore_invalid then -- year = year:match ('%d%d%d%d?'); -- strip disambiguator if present if year and (1965 > tonumber(year)) then -- <year> will be nil here when |year=n.d. or |year=nd set_message ('err_invalid_isbn_date'); -- set an error message return internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = isbn_str, separator = handler.separator}); end end if nil ~= isbn_str:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X end local id = isbn_str:gsub ('[%s-]', ''); -- remove hyphens and whitespace local len = id:len(); if len ~= 10 and len ~= 13 then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if len == 10 then if id:match ('^%d*X?$') == nil then -- fail if isbn_str has 'X' anywhere but last position return return_result (false, cfg.err_msg_supl.form); end if not is_valid_isxn (id, 10) then -- test isbn-10 for numerical validity return return_result (false, cfg.err_msg_supl.check); -- fail if isbn-10 is not numerically valid end if id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not valid isbn group ids but are used by amazon as numeric identifiers (asin) return return_result (false, cfg.err_msg_supl.group); -- fail if isbn-10 begins with 630/1 end return return_result (true, cfg.err_msg_supl.check); -- pass if isbn-10 is numerically valid else if id:match ('^%d+$') == nil then return return_result (false, cfg.err_msg_supl.char); -- fail if ISBN-13 is not all digits end if id:match ('^97[89]%d*$') == nil then return return_result (false, cfg.err_msg_supl.prefix); -- fail when ISBN-13 does not begin with 978 or 979 end if id:match ('^9790') then return return_result (false, cfg.err_msg_supl.group); -- group identifier '0' is reserved to ISMN end return return_result (is_valid_isxn_13 (id), cfg.err_msg_supl.check); end end --[[--------------------------< A S I N >---------------------------------------------------------------------- Formats a link to Amazon. Do simple error checking: ASIN must be mix of 10 numeric or uppercase alpha characters. If a mix, first character must be uppercase alpha; if all numeric, ASINs must be 10-digit ISBN. If 10-digit ISBN, add a maintenance category so a bot or AWB script can replace |asin= with |isbn=. Error message if not 10 characters, if not ISBN-10, if mixed and first character is a digit. |asin=630....... and |asin=631....... are (apparently) not a legitimate ISBN though it checksums as one; these do not cause this function to emit the maint_asin message This function is positioned here because it calls isbn() ]] local function asin (options) local id = options.id; local domain = options.ASINTLD; local err_flag; if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then err_flag = set_message ('err_bad_asin'); -- ASIN is not a mix of 10 uppercase alpha and numeric characters else if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X) if is_valid_isxn (id, 10) then -- see if ASIN value is or validates as ISBN-10 if not id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not a valid isbn prefixes but are used by amazon as a numeric identifier err_flag = set_message ('err_bad_asin'); -- ASIN has ISBN-10 form but begins with something other than 630/1 so probably an isbn end elseif not is_set (err_flag) then err_flag = set_message ('err_bad_asin'); -- ASIN is not ISBN-10 end elseif not id:match("^%u[%d%u]+$") then err_flag = set_message ('err_bad_asin'); -- asin doesn't begin with uppercase alpha end end if (not is_set (domain)) or in_array (domain, {'us'}) then -- default: United States domain = "com"; elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom domain = "co." .. domain; elseif in_array (domain, {'z.cn'}) then -- China domain = "cn"; elseif in_array (domain, {'au', 'br', 'mx', 'sg', 'tr'}) then -- Australia, Brazil, Mexico, Singapore, Turkey domain = "com." .. domain; elseif not in_array (domain, {'ae', 'ca', 'cn', 'de', 'es', 'fr', 'in', 'it', 'nl', 'pl', 'sa', 'se', 'co.jp', 'co.uk', 'com', 'com.au', 'com.br', 'com.mx', 'com.sg', 'com.tr'}) then -- Arabic Emirates, Canada, China, Germany, Spain, France, Indonesia, Italy, Netherlands, Poland, Saudi Arabia, Sweden (as of 2021-03 Austria (.at), Liechtenstein (.li) and Switzerland (.ch) still redirect to the German site (.de) with special settings, so don't maintain local ASINs for them) err_flag = set_message ('err_bad_asin_tld'); -- unsupported asin-tld value end local handler = options.handler; if not is_set (err_flag) then options.coins_list_t['ASIN'] = handler.prefix .. domain .. "/dp/" .. id; -- asin for coins else options.coins_list_t['ASIN'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. domain .. "/dp/", id = id, encode = handler.encode, separator = handler.separator}) end --[[--------------------------< I S M N >---------------------------------------------------------------------- Determines whether an ISMN string is valid. Similar to ISBN-13, ISMN is 13 digits beginning 979-0-... and uses the same check digit calculations. See https://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf section 2, pages 9–12. ismn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx) or an identifier registered at info-uri.info (info:) ]] local function ismn (options) local id = options.id; local handler = options.handler; local text; local valid_ismn = true; local id_copy; id_copy = id; -- save a copy because this testing is destructive id = id:gsub ('[%s-]', ''); -- remove hyphens and white space if 13 ~= id:len() or id:match ("^9790%d*$" ) == nil then -- ISMN must be 13 digits and begin with 9790 valid_ismn = false; else valid_ismn=is_valid_isxn_13 (id); -- validate ISMN end -- text = internal_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- use this (or external version) when there is some place to link to -- prefix = handler.prefix, id = id_copy, separator = handler.separator, encode = handler.encode}) text = table.concat ( -- because no place to link to yet { make_wikilink (label_link_make (handler), handler.label), handler.separator, id_copy }); if false == valid_ismn then options.coins_list_t['ISMN'] = nil; -- when error, unset so not included in COinS; not really necessary here because ismn not made part of COinS set_message ('err_bad_ismn'); -- create an error message if the ISMN is invalid end return text; end --[[--------------------------< I S S N >---------------------------------------------------------------------- Validate and format an ISSN. This code fixes the case where an editor has included an ISSN in the citation but has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked like this: |issn=0819 4327 gives: [https://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link This code now prevents that by inserting a hyphen at the ISSN midpoint. It also validates the ISSN for length and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check ISSN error message. The ISSN is always displayed with a hyphen, even if the ISSN was given as a single group of 8 digits. ]] local function issn (options) local id = options.id; local handler = options.handler; local ignore_invalid = options.accept; local issn_copy = id; -- save a copy of unadulterated ISSN; use this version for display if ISSN does not validate local text; local valid_issn = true; id = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace if 8 ~= id:len() or nil == id:match ("^%d*X?$" ) then -- validate the ISSN: 8 digits long, containing only 0-9 or X in the last position valid_issn = false; -- wrong length or improper character else valid_issn = is_valid_isxn (id, 8); -- validate ISSN end if true == valid_issn then id = string.sub (id, 1, 4 ) .. "-" .. string.sub (id, 5 ); -- if valid, display correctly formatted version else id = issn_copy; -- if not valid, show the invalid ISSN with error message end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if ignore_invalid then set_message ('maint_issn_ignore'); else if false == valid_issn then options.coins_list_t['ISSN'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_issn', (options.hkey == 'EISSN') and 'e' or ''); -- create an error message if the ISSN is invalid end end return text; end --[[--------------------------< J F M >----------------------------------------------------------------------- A numerical identifier in the form nn.nnnn.nn ]] local function jfm (options) local id = options.id; local handler = options.handler; local id_num; id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier if is_set (id_num) then set_message ('maint_jfm_format'); else -- plain number without JFM prefix id_num = id; -- if here id does not have prefix end if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then id = id_num; -- jfm matches pattern else set_message ('err_bad_jfm' ); -- set an error message options.coins_list_t['JFM'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< J S T O R >-------------------------------------------------------------------- Format a JSTOR with some error checking ]] local function jstor (options) local id = options.id; local access = options.access; local handler = options.handler; if id:find ('[Jj][Ss][Tt][Oo][Rr]') or id:find ('^https?://') or id:find ('%s') then set_message ('err_bad_jstor'); -- set an error message options.coins_list_t['JSTOR'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< L C C N >---------------------------------------------------------------------- Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits. https://oclc-research.github.io/infoURI-Frozen/info-uri.info/info:lccn/reg.html length = 8 then all digits length = 9 then lccn[1] is lowercase alpha length = 10 then lccn[1] and lccn[2] are both lowercase alpha or both digits length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lowercase alpha or both digits length = 12 then lccn[1] and lccn[2] are both lowercase alpha ]] local function lccn (options) local lccn = options.id; local handler = options.handler; local err_flag; -- presume that LCCN is valid local id = lccn; -- local copy of the LCCN id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes) local len = id:len(); -- get the length of the LCCN if 8 == len then if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) err_flag = set_message ('err_bad_lccn'); -- set an error message end elseif 9 == len then -- LCCN should be adddddddd if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern? err_flag = set_message ('err_bad_lccn'); -- set an error message end elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ... if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end end elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end elseif 12 == len then -- LCCN should be aadddddddddd if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end else err_flag = set_message ('err_bad_lccn'); -- wrong length, set an error message end if not is_set (err_flag) and nil ~= lccn:find ('%s') then err_flag = set_message ('err_bad_lccn'); -- lccn contains a space, set an error message end if is_set (err_flag) then options.coins_list_t['LCCN'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = lccn, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< M E D R X I V >----------------------------------------------------------------- Format medRxiv ID and do simple error checking. Similar to later bioRxiv IDs, medRxiv IDs are prefixed with a yyyy.mm.dd. date and suffixed with an optional version identifier. Ealiest date accepted is 2020.01.01 The medRxiv ID is a date followed by an eight-digit number followed by an optional version indicator 'v' and one or more digits: https://www.medrxiv.org/content/10.1101/2020.11.16.20232009v2 -> 10.1101/2020.11.16.20232009v2 ]] local function medrxiv (options) local id = options.id; local handler = options.handler; local err_msg_flag = true; -- flag; assume that there will be an error local patterns = { '^%d%d%d%d%d%d%d%d$', -- simple 8-digit identifier; these should be relatively rare '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%dv%d+$', -- y.m.d. date + 8-digit identifier + version (2020-01-01 and later) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%d$', -- y.m.d. date + 8-digit identifier (2020-01-01 and later) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%dv%d+$', -- y.m.d. date + 8-digit identifier + version (2025-12-01 and later) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%d$', -- y.m.d. date + 8-digit identifier (2025-12-01 and later) } for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match if id:match (pattern) then local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier if m then -- m is nil when id is the 8-digit form if not is_valid_rxiv_date (y, m, d, 'b') then -- validate the encoded date; 'b' for medrxiv limit break; -- date fail; break out early so we don't unset the error message end end err_msg_flag = nil; -- we found a match so unset the error message break; -- and done end end -- <err_msg_flag> remains set here when no match if err_msg_flag then options.coins_list_t['MEDRXIV'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_medrxiv'); -- and set the error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< M R >-------------------------------------------------------------------------- A seven digit number; if not seven digits, zero-fill leading digits to make seven digits. ]] local function mr (options) local id = options.id; local handler = options.handler; local id_num; local id_len; id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix if is_set (id_num) then set_message ('maint_mr_format'); -- add maint cat else -- plain number without mr prefix id_num = id:match ('^%d+$'); -- if here id is all digits end id_len = id_num and id_num:len() or 0; if (7 >= id_len) and (0 ~= id_len) then id = string.rep ('0', 7-id_len) .. id_num; -- zero-fill leading digits else set_message ('err_bad_mr'); -- set an error message options.coins_list_t['MR'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< O C L C >---------------------------------------------------------------------- Validate and format an OCLC ID. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}} archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html ]] local function oclc (options) local id = options.id; local handler = options.handler; local number; if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters) number = id:match('ocm(%d+)'); -- get the number elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters) number = id:match('ocn(%d+)'); -- get the number elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters) number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number if 9 < number:len() then number = nil; -- constrain to 1 to 9 digits; change this when OCLC issues 10-digit numbers end elseif id:match('^%d+$') then -- no prefix number = id; -- get the number if tonumber (id) > handler.id_limit then number = nil; -- unset when id value exceeds the limit end end if number then -- proper format id = number; -- exclude prefix, if any, from external link else set_message ('err_bad_oclc') -- add an error message if the id is malformed options.coins_list_t['OCLC'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< O P E N L I B R A R Y >-------------------------------------------------------- Formats an OpenLibrary link, and checks for associated errors. ]] local function openlibrary (options) local id = options.id; local access = options.access; local handler = options.handler; local ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- strip optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W'; local err_flag; local prefix = { -- these are appended to the handler.prefix according to code ['A']='authors/OL', ['M']='books/OL', ['W']='works/OL', ['X']='OL' -- not a code; spoof when 'code' in id is invalid }; if not ident then code = 'X'; -- no code or id completely invalid ident = id; -- copy id to ident so that we display the flawed identifier err_flag = set_message ('err_bad_ol'); end if not is_set (err_flag) then options.coins_list_t['OL'] = handler.prefix .. prefix[code] .. ident; -- experiment for ol coins else options.coins_list_t['OL'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. prefix[code], id = ident, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< O S T I >---------------------------------------------------------------------- Format OSTI and do simple error checking. OSTIs are sequential numbers beginning at 1 and counting up. This code checks the OSTI to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more OSTIs are issued. NB. 1018 is the lowest OSTI number found in the wild (so far) and resolving OK on the OSTI site ]] local function osti (options) local id = options.id; local access = options.access; local handler = options.handler; if id:match("[^%d]") then -- if OSTI has anything but digits set_message ('err_bad_osti'); -- set an error message options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS else -- OSTI is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1018 > id_num or handler.id_limit < id_num then -- if OSTI is outside test limit boundaries set_message ('err_bad_osti'); -- set an error message options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< P M C >------------------------------------------------------------------------ Format a PMC, do simple error checking, and check for embargoed articles. The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix. PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation has |pmc=<value> but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed () returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string. PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued. ]] local function pmc (options) local id = options.id; local embargo = options.Embargo; -- TODO: lowercase? local handler = options.handler; local err_flag; local id_num; local text; id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with PMC prefix if is_set (id_num) then set_message ('maint_pmc_format'); else -- plain number without PMC prefix id_num = id:match ('^%d+$'); -- if here id is all digits end if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMC is outside test limit boundaries err_flag = set_message ('err_bad_pmc'); -- set an error message else id = tostring (id_num); -- make sure id is a string end else -- when id format incorrect err_flag = set_message ('err_bad_pmc'); -- set an error message end if is_set (embargo) and is_set (is_embargoed (embargo)) then -- is PMC is still embargoed? text = table.concat ( -- still embargoed so no external link { make_wikilink (label_link_make (handler), handler.label), handler.separator, id, }); else text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- no embargo date or embargo has expired, ok to link to article prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access, auto_link = not err_flag and 'pmc' or nil -- do not auto-link when PMC has error }); end if err_flag then options.coins_list_t['PMC'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< P M I D >---------------------------------------------------------------------- Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMIDs are issued. ]] local function pmid (options) local id = options.id; local handler = options.handler; if id:match("[^%d]") then -- if PMID has anything but digits set_message ('err_bad_pmid'); -- set an error message options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS else -- PMID is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMID is outside test limit boundaries set_message ('err_bad_pmid'); -- set an error message options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< R F C >------------------------------------------------------------------------ Format RFC and do simple error checking. RFCs are sequential numbers beginning at 1 and counting up. This code checks the RFC to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more RFCs are issued. An index of all RFCs is here: https://tools.ietf.org/rfc/ ]] local function rfc (options) local id = options.id; local handler = options.handler; if id:match("[^%d]") then -- if RFC has anything but digits set_message ('err_bad_rfc'); -- set an error message options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS else -- RFC is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if RFC is outside test limit boundaries set_message ('err_bad_rfc'); -- set an error message options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< S 2 C I D >-------------------------------------------------------------------- Format an S2CID, do simple error checking S2CIDs are sequential numbers beginning at 1 and counting up. This code checks the S2CID to see that it is only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more S2CIDs are issued. ]] local function s2cid (options) local id = options.id; local access = options.access; local handler = options.handler; local id_num; local text; id_num = id:match ('^[1-9]%d*$'); -- id must be all digits; must not begin with 0; no open access flag if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if handler.id_limit < id_num then -- if S2CID is outside test limit boundaries set_message ('err_bad_s2cid'); -- set an error message options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS end else -- when id format incorrect set_message ('err_bad_s2cid'); -- set an error message options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); return text; end --[[--------------------------< S B N >------------------------------------------------------------------------ 9-digit form of ISBN-10; uses same check-digit validation when SBN is prefixed with an additional '0' to make 10 digits sbn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx) or an identifier registered at info-uri.info (info:) ]] local function sbn (options) local id = options.id; local ignore_invalid = options.accept; local handler = options.handler; local function return_result (check, err_type) -- local function to handle the various returns local SBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator}); if not ignore_invalid then -- if not ignoring SBN errors if not check then options.coins_list_t['SBN'] = nil; -- when error, unset so not included in COinS; not really necessary here because sbn not made part of COinS set_message ('err_bad_sbn', {err_type}); -- display an error message return SBN; end else set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error (ToDo: Possibly switch to separate message for SBNs only) end return SBN; end if id:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if SBN contains anything but digits, hyphens, or the uppercase X end local ident = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace; they interfere with the rest of the tests if 9 ~= ident:len() then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if ident:match ('^%d*X?$') == nil then return return_result (false, cfg.err_msg_supl.form); -- fail if SBN has 'X' anywhere but last position end return return_result (is_valid_isxn ('0' .. ident, 10), cfg.err_msg_supl.check); end --[[--------------------------< S S R N >---------------------------------------------------------------------- Format an SSRN, do simple error checking SSRNs are sequential numbers beginning at 100? and counting up. This code checks the SSRN to see that it is only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need to be updated periodically as more SSRNs are issued. ]] local function ssrn (options) local id = options.id; local handler = options.handler; local id_num; local text; id_num = id:match ('^%d+$'); -- id must be all digits if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 100 > id_num or handler.id_limit < id_num then -- if SSRN is outside test limit boundaries set_message ('err_bad_ssrn'); -- set an error message options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS end else -- when id format incorrect set_message ('err_bad_ssrn'); -- set an error message options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = options.access}); return text; end --[[--------------------------< U S E N E T _ I D >------------------------------------------------------------ Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in '<' and/or '>' angle brackets. ]] local function usenet_id (options) local id = options.id; local handler = options.handler; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if not id:match('^.+@.+$') or not id:match('^[^<].*[^>]$') then -- doesn't have '@' or has one or first or last character is '< or '>' set_message ('err_bad_usenet_id') -- add an error message if the message id is invalid options.coins_list_t['USENETID'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< Z B L >----------------------------------------------------------------------- A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional format described here: http://emis.mi.sanu.ac.rs/ZMATH/zmath/en/help/search/ temporary format is apparently eight digits. Anything else is an error ]] local function zbl (options) local id = options.id; local handler = options.handler; if id:match('^%d%d%d%d%d%d%d%d$') then -- is this identifier using temporary format? set_message ('maint_zbl'); -- yes, add maint cat elseif not id:match('^%d?%d?%d?%d%.%d%d%d%d%d$') then -- not temporary, is it normal format? set_message ('err_bad_zbl'); -- no, set an error message options.coins_list_t['ZBL'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --============================<< I N T E R F A C E F U N C T I O N S >>========================================== --[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------ Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to the identifier list. Emits redundant error message if more than one alias exists in args ]] local function extract_ids (args) local id_list = {}; -- list of identifiers found in args for k, v in pairs (cfg.id_handlers) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table v = select_one (args, v.parameters, 'err_redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present if is_set (v) then id_list[k] = v; end -- if found in args, add identifier to our list end return id_list; end --[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >-------------------------------------- Fetches custom id access levels from arguments using configuration settings. Parameters which have a predefined access level (e.g. arxiv) do not use this function as they are directly rendered as free without using an additional parameter. returns a table of k/v pairs where k is same as the identifier's key in cfg.id_handlers and v is the assigned (valid) keyword access-level values must match the case used in cfg.keywords_lists['id-access'] (lowercase unless there is some special reason for something else) ]] local function extract_id_access_levels (args, id_list) local id_accesses_list = {}; for k, v in pairs (cfg.id_handlers) do local access_param = v.custom_access; -- name of identifier's access-level parameter if is_set (access_param) then local access_level = args[access_param]; -- get the assigned value if there is one if is_set (access_level) then if not in_array (access_level, cfg.keywords_lists['id-access']) then -- exact match required set_message ('err_invalid_param_val', {access_param, access_level}); access_level = nil; -- invalid so unset end if not is_set (id_list[k]) then -- identifier access-level must have a matching identifier set_message ('err_param_access_requires_param', {k:lower()}); -- parameter name is uppercase in cfg.id_handlers (k); lowercase for error message end id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword end end end return id_accesses_list; end --[[--------------------------< B U I L D _ I D _ L I S T >---------------------------------------------------- render the identifiers into a sorted sequence table <ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value <options_t> is a table of various k/v option pairs provided in the call to new_build_id_list(); modified by this function and passed to all identifier rendering functions <access_levels_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value (if valid) returns a sequence table of sorted (by hkey - 'handler' key) rendered identifier strings ]] local function build_id_list (ID_list_coins_t, options_t, access_levels_t) local ID_list_t = {}; local accept; local func_map = { --function map points to functions associated with hkey identifier ['ARXIV'] = arxiv, ['ASIN'] = asin, ['BIBCODE'] = bibcode, ['BIORXIV'] = biorxiv, ['CITESEERX'] = citeseerx, ['DOI'] = doi, ['EISSN'] = issn, ['HDL'] = hdl, ['ISBN'] = isbn, ['ISMN'] = ismn, ['ISSN'] = issn, ['JFM'] = jfm, ['JSTOR'] = jstor, ['LCCN'] = lccn, ['MEDRXIV'] = medrxiv, ['MR'] = mr, ['OCLC'] = oclc, ['OL'] = openlibrary, ['OSTI'] = osti, ['PMC'] = pmc, ['PMID'] = pmid, ['RFC'] = rfc, ['S2CID'] = s2cid, ['SBN'] = sbn, ['SSRN'] = ssrn, ['USENETID'] = usenet_id, ['ZBL'] = zbl, } for hkey, v in pairs (ID_list_coins_t) do v, accept = has_accept_as_written (v); -- remove accept-as-written markup if present; accept is boolean true when markup removed; false else -- every function gets the options table with value v and accept boolean options_t.hkey = hkey; -- ~/Configuration handler key options_t.id = v; -- add that identifier value to the options table options_t.accept = accept; -- add the accept boolean flag options_t.access = access_levels_t[hkey]; -- add the access level for those that have an |<identifier-access= parameter options_t.handler = cfg.id_handlers[hkey]; options_t.coins_list_t = ID_list_coins_t; -- pointer to ID_list_coins_t; for |asin= and |ol=; also to keep erroneous values out of the citation's metadata options_t.coins_list_t[hkey] = v; -- id value without accept-as-written markup for metadata if options_t.handler.access and not in_array (options_t.handler.access, cfg.keywords_lists['id-access']) then error (cfg.messages['unknown_ID_access'] .. options_t.handler.access); -- here when handler access key set to a value not listed in list of allowed id access keywords end if func_map[hkey] then local id_text = func_map[hkey] (options_t); -- call the function to get identifier text and any error message table.insert (ID_list_t, {hkey, id_text}); -- add identifier text to the output sequence table else error (cfg.messages['unknown_ID_key'] .. hkey); -- here when func_map doesn't have a function for hkey end end local function comp (a, b) -- used by following table.sort() return a[1]:lower() < b[1]:lower(); -- sort by hkey end table.sort (ID_list_t, comp); -- sequence table of tables sort for k, v in ipairs (ID_list_t) do -- convert sequence table of tables to simple sequence table of strings ID_list_t[k] = v[2]; -- v[2] is the identifier rendering from the call to the various functions in func_map{} end return ID_list_t; end --[[--------------------------< O P T I O N S _ C H E C K >---------------------------------------------------- check that certain option parameters have their associated identifier parameters with values <ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value <ID_support_t> is a sequence table of tables created in citation0() where each subtable has four elements: [1] is the support parameter's assigned value; empty string if not set [2] is a text string same as key in cfg.id_handlers [3] is cfg.error_conditions key used to create error message [4] is original ID support parameter name used to create error message returns nothing; on error emits an appropriate error message ]] local function options_check (ID_list_coins_t, ID_support_t) for _, v in ipairs (ID_support_t) do if is_set (v[1]) and not ID_list_coins_t[v[2]] then -- when support parameter has a value but matching identifier parameter is missing or empty set_message (v[3], (v[4])); -- emit the appropriate error message end end end --[[--------------------------< I D E N T I F I E R _ L I S T S _ G E T >-------------------------------------- Creates two identifier lists: a k/v table of identifiers and their values to be used locally and for use in the COinS metadata, and a sequence table of the rendered identifier strings that will be included in the rendered citation. ]] local function identifier_lists_get (args_t, options_t, ID_support_t) local ID_list_coins_t = extract_ids (args_t); -- get a table of identifiers and their values for use locally and for use in COinS options_check (ID_list_coins_t, ID_support_t); -- ID support parameters must have matching identifier parameters local ID_access_levels_t = extract_id_access_levels (args_t, ID_list_coins_t); -- get a table of identifier access levels local ID_list_t = build_id_list (ID_list_coins_t, options_t, ID_access_levels_t); -- get a sequence table of rendered identifier strings return ID_list_t, ID_list_coins_t; -- return the tables end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) cfg = cfg_table_ptr; has_accept_as_written = utilities_page_ptr.has_accept_as_written; -- import functions from select Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; set_message = utilities_page_ptr.set_message; select_one = utilities_page_ptr.select_one; substitute = utilities_page_ptr.substitute; make_wikilink = utilities_page_ptr.make_wikilink; z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { auto_link_urls = auto_link_urls, -- table of identifier URLs to be used when auto-linking |title= identifier_lists_get = identifier_lists_get, -- experiment to replace individual calls to build_id_list(), extract_ids, extract_id_access_levels is_embargoed = is_embargoed; set_selected_modules = set_selected_modules; } e4jc9mw0kujge8fok9aztk214jmz0lr 116885 116884 2026-07-16T10:58:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1/Identifiers]] 116884 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local has_accept_as_written, is_set, in_array, set_message, select_one, -- functions in Module:Citation/CS1/Utilities substitute, make_wikilink; local z; -- table of tables defined in Module:Citation/CS1/Utilities local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration --[[--------------------------< P A G E S C O P E V A R I A B L E S >-------------------------------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local auto_link_urls = {}; -- holds identifier URLs for those identifiers that can auto-link |title= --============================<< H E L P E R F U N C T I O N S >>============================================ --[[--------------------------< W I K I D A T A _ A R T I C L E _ N A M E _ G E T >---------------------------- as an aid to internationalizing identifier-label wikilinks, gets identifier article names from Wikidata. returns w:<lang code>:<article title> when <q> has an <article title> for <lang code>; nil else. 'w:<lang code>' ensures that sister project (like wiktionary) will link to the <lang code>.wikipedia article. for identifiers that do not have <q>, returns nil for wikis that do not have mw.wikibase installed, returns nil ]] local function wikidata_article_name_get (q) if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki return nil; -- abandon end local wd_article; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki if wd_article then wd_article = table.concat ({'w:', this_wiki_code, ':', wd_article}); -- interwiki-style link without brackets if taken from WD; leading 'w:' required end return wd_article; -- article title from WD; nil else end --[[--------------------------< L A B E L _ L I N K _ M A K E >------------------------------------------------ common function to create a link for an identifier label from handler table or from Wikidata returns the first available of: 1. redirect from local wiki's handler table (if enabled) 2. Wikidata sitelink to the local language wikipedia article (if there is a Wikidata entry for this identifier in the local language) 3. link to wikipedia article specified in the local wiki's handler table ]] local function label_link_make (handler) local wd_article; if not (cfg.use_identifier_redirects and is_set (handler.redirect)) then -- redirect has priority so if enabled and available don't fetch from Wikidata because expensive wd_article = wikidata_article_name_get (handler.q); -- if Wikidata has an article title for this wiki, get it; end return (cfg.use_identifier_redirects and is_set (handler.redirect) and handler.redirect) or wd_article or handler.link; end --[[--------------------------< E X T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style external link ]] local function external_link_id (options) local url_string = options.id; local ext_link; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org local wd_article; -- article title from Wikidata if options.encode == true or options.encode == nil then url_string = mw.uri.encode (url_string, 'PATH'); end if options.auto_link and is_set (options.access) then auto_link_urls[options.auto_link] = table.concat ({options.prefix, url_string, options.suffix}); end ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki (options.id)); if is_set (options.access) then ext_link = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[options.access].class, cfg.presentation[options.access].title, ext_link}); -- add the free-to-read / paywall lock end return table.concat ({ make_wikilink (label_link_make (options), options.label), -- redirect, Wikidata link, or locally specified link (in that order) options.separator or '&nbsp;', ext_link }); end --[[--------------------------< I N T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style internal link TODO: Does not currently need to support options.access, options.encode, auto-linking and COinS (as in external_link_id), but may be needed in the future for :m:Interwiki_map custom-prefixes like :arxiv:, :bibcode:, :DOI:, :hdl:, :ISSN:, :JSTOR:, :Openlibrary:, :PMID:, :RFC:. ]] local function internal_link_id (options) local id = mw.ustring.gsub (options.id, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 return table.concat ( { make_wikilink (label_link_make (options), options.label), -- wiki-link the identifier label options.separator or '&nbsp;', -- add the separator make_wikilink ( table.concat ( { options.prefix, id, -- translated to Western digits options.suffix or '' }), substitute (cfg.presentation['bdi'], {'', mw.text.nowiki (options.id)}) -- bdi tags to prevent Latin script identifiers from being reversed at RTL language wikis ); -- nowiki because MediaWiki still has magic links for ISBN and the like; TODO: is it really required? }); end --[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------ Determines if a PMC identifier's online version is embargoed. Compares the date in |pmc-embargo-date= against today's date. If embargo date is in the future, returns the content of |pmc-embargo-date=; otherwise, returns an empty string because the embargo has expired or because |pmc-embargo-date= was not set in this cite. ]] local function is_embargoed (embargo) if is_set (embargo) then local lang = mw.getContentLanguage(); local good1, embargo_date, todays_date; good1, embargo_date = pcall (lang.formatDate, lang, 'U', embargo); todays_date = lang:formatDate ('U'); if good1 then -- if embargo date is a good date if tonumber (embargo_date) >= tonumber (todays_date) then -- is embargo date is in the future? return embargo; -- still embargoed else set_message ('maint_pmc_embargo'); -- embargo has expired; add main cat return ''; -- unset because embargo has expired end end end return ''; -- |pmc-embargo-date= not set return empty string end --[=[-------------------------< I S _ V A L I D _ R X I V _ D A T E >------------------------------------------ for biorxiv, returns true if: 2019-12-11T00:00Z <= biorxiv_date < today + 2 days for medrxiv, returns true if: 2020-01-01T00:00Z <= medrxiv_date < today + 2 days The dated form of biorxiv identifier has a start date of 2019-12-11. The Unix timestamp for that date is {{#time:U|2019-12-11}} = 1576022400 The medrxiv identifier has a start date of 2020-01-01. The Unix timestamp for that date is {{#time:U|2020-01-01}} = 1577836800 <rxiv_date> is the date provided in those |biorxiv= parameter values that are dated and in |medrxiv= parameter values at time 00:00:00 UTC <today> is the current date at time 00:00:00 UTC plus 48 hours if today's date is 2023-01-01T00:00:00 then adding 24 hours gives 2023-01-02T00:00:00 – one second more than today adding 24 hours gives 2023-01-03T00:00:00 – one second more than tomorrow inputs: <y>, <m>, <d> – year, month, day parts of the date from the birxiv or medrxiv identifier <select> 'b' for biorxiv, 'm' for medrxiv; defaults to 'b' ]=] local function is_valid_rxiv_date (y, m, d, select) if 0 == tonumber (m) and 12 < tonumber (m) then -- <m> must be a number 1–12 return false; end if 0 == tonumber (d) and 31 < tonumber (d) then -- <d> must be a number 1–31; TODO: account for month length and leap yer? return false; end local rxiv_date = table.concat ({y, m, d}, '-'); -- make ymd date string local good1, good2; local rxiv_ts, tomorrow_ts; -- to hold Unix timestamps representing the dates local lang_object = mw.getContentLanguage(); good1, rxiv_ts = pcall (lang_object.formatDate, lang_object, 'U', rxiv_date); -- convert rxiv_date value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which tonumber() may not understand rxiv_ts = tonumber (rxiv_ts) or lang_object:parseFormattedNumber (rxiv_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix timestamp end local limit_ts = ((select and ('m' == select)) and 1577836800) or 1576022400; -- choose the appropriate limit timesatmp return ((limit_ts <= rxiv_ts) and (rxiv_ts < tomorrow_ts)) -- limit_ts <= rxiv_date < tomorrow's date end --[[--------------------------< IS _ V A L I D _ I S X N >----------------------------------------------------- ISBN-10 and ISSN validator code calculates checksum across all ISBN/ISSN digits including the check digit. ISBN-13 is checked in isbn(). If the number is valid the result will be 0. Before calling this function, ISBN/ISSN must be checked for length and stripped of dashes, spaces and other non-ISxN characters. ]] local function is_valid_isxn (isxn_str, len) local temp = 0; isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58 len = len + 1; -- adjust to be a loop counter for i, v in ipairs (isxn_str) do -- loop through all of the bytes and calculate the checksum if v == string.byte ("X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58) temp = temp + 10 * (len - i); -- it represents 10 decimal else temp = temp + tonumber (string.char (v) )*(len-i); end end return temp % 11 == 0; -- returns true if calculation result is zero end --[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >----------------------------------------------- ISBN-13 and ISMN validator code calculates checksum across all 13 ISBN/ISMN digits including the check digit. If the number is valid, the result will be 0. Before calling this function, ISBN-13/ISMN must be checked for length and stripped of dashes, spaces and other non-ISxN-13 characters. ]] local function is_valid_isxn_13 (isxn_str) local temp=0; isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39 for i, v in ipairs (isxn_str) do temp = temp + (3 - 2*(i % 2)) * tonumber (string.char (v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit end return temp % 10 == 0; -- sum modulo 10 is zero when ISBN-13/ISMN is correct end --[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- LCCN normalization (https://www.loc.gov/marc/lccn-namespace.html#normalization) 1. Remove all blanks. 2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash. 3. If there is a hyphen in the string: a. Remove it. b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out): 1. All these characters should be digits, and there should be six or less. (not done in this function) 2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six. Returns a normalized LCCN for lccn() to validate. There is no error checking (step 3.b.1) performed in this function. ]] local function normalize_lccn (lccn) lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace if nil ~= string.find (lccn, '/') then lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it end local prefix local suffix prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix if nil ~= suffix then -- if there was a hyphen suffix = string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6 lccn = prefix..suffix; -- reassemble the LCCN end return lccn; end --============================<< I D E N T I F I E R F U N C T I O N S >>==================================== --[[--------------------------< A R X I V >-------------------------------------------------------------------- See: https://arxiv.org/help/arxiv_identifier format and error check arXiv identifier. There are three valid forms of the identifier: the first form, valid only between date codes 9107 and 0703, is: arXiv:<archive>.<class>/<date code><number><version> where: <archive> is a string of alpha characters - may be hyphenated; no other punctuation <class> is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 first digit of YY for this form can only 9 and 0 <number> is a three-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented) the second form, valid from April 2007 through December 2014 is: arXiv:<date code>.<number><version> where: <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 <number> is a four-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces the third form, valid from January 2015 is: arXiv:<date code>.<number><version> where: <date code> and <version> are as defined for 0704-1412 <number> is a five-digit number ]] local function arxiv (options) local id = options.id; local class = options.Class; -- TODO: lowercase? local handler = options.handler; local year, month, version; local err_msg = false; -- assume no error message local text; -- output text if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9107-0703 format with or without version year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((not (90 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month ((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok? err_msg = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((7 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years) ((7 == year) and (4 > month)) then -- when year is 07, is month invalid (before April)? err_msg = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((15 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years) err_msg = true; -- flag for error message end else err_msg = true; -- not a recognized format; flag for error message end if err_msg then options.coins_list_t['ARXIV'] = nil; -- when error, unset so not included in COinS end local err_msg_t = {}; if err_msg then set_message ('err_bad_arxiv'); end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); if is_set (class) then if id:match ('^%d+') then text = table.concat ({text, ' [[https://arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink else set_message ('err_class_ignored'); end else -- class not set if id:match ('^%d+') and options.CitationClass == 'arxiv' then -- new (post 2007) format; {{cite arxiv}} only set_message ('maint_missing_class'); -- add maint cat end end return text; end --[[--------------------------< B I B C O D E >-------------------------------------------------------------------- Validates (sort of) and formats a bibcode ID. Format for bibcodes is specified here: https://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters and first four digits must be a year. This function makes these tests: length must be 19 characters characters in position 1–4 must be digits and must represent a year in the range of 1000 – next year 5 must be a letter 6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. ) 9–18 must be letter, digit, or dot 19 must be a letter or dot ]] local function bibcode (options) local id = options.id; local access = options.access; local handler = options.handler; local ignore_invalid = options.accept; local err_type; local err_msg = ''; local year; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); if 19 ~= id:len() then err_type = cfg.err_msg_supl.length; else year = id:match ("^(%d%d%d%d)[%a][%w&%.][%w&%.][%w&%.][%w.]+[%a%.]$"); if not year then -- if nil then no pattern match err_type = cfg.err_msg_supl.value; -- so value error else local next_year = tonumber (os.date ('%Y')) + 1; -- get the current year as a number and add one for next year year = tonumber (year); -- convert year portion of bibcode to a number if (1000 > year) or (year > next_year) then err_type = cfg.err_msg_supl.year; -- year out of bounds end if id:find('&%.') then err_type = cfg.err_msg_supl.journal; -- journal abbreviation must not have '&.' (if it does it's missing a letter) end if id:match ('.........%.tmp%.') then -- temporary bibcodes when positions 10–14 are '.tmp.' set_message ('maint_bibcode'); end end end if is_set (err_type) and not ignore_invalid then -- if there was an error detected and accept-as-written markup not used set_message ('err_bad_bibcode', {err_type}); options.coins_list_t['BIBCODE'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< B I O R X I V >----------------------------------------------------------------- Format bioRxiv ID and do simple error checking. Before 2019-12-11, biorXiv IDs were 10.1101/ followed by exactly 6 digits. After 2019-12-11, biorXiv IDs retained the six-digit identifier but prefixed that with a yyyy.mm.dd. date and suffixed with an optional version identifier. From December 2025 biorxiv added a new 'doi' prefix: 10.64898: 10.64898/2025.12.10.693067 The bioRxiv ID is the string of characters: https://doi.org/10.1101/078733 -> 10.1101/078733 or a date followed by a six-digit number followed by an optional version indicator 'v' and one or more digits: https://www.biorxiv.org/content/10.1101/2019.12.11.123456v2 -> 10.1101/2019.12.11.123456v2 see https://www.biorxiv.org/about-biorxiv ]] local function biorxiv (options) local id = options.id; local handler = options.handler; local err_msg = true; -- flag; assume that there will be an error local patterns = { '^10%.1101/%d%d%d%d%d%d$', -- simple 6-digit identifier (before 2019-12-11) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (after 2019-12-11) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (after 2019-12-11) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (from December 2025) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (from December 2025) } for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match if id:match (pattern) then local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier if m then -- m is nil when id is the six-digit form if not is_valid_rxiv_date (y, m, d, 'b') then -- validate the encoded date; 'b' for biorxiv limit break; -- date fail; break out early so we don't unset the error message end end err_msg = nil; -- we found a match so unset the error message break; -- and done end end -- err_cat remains set here when no match if err_msg then options.coins_list_t['BIORXIV'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_biorxiv'); -- and set the error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< C I T E S E E R X >------------------------------------------------------------ CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org). The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure ]] local function citeseerx (options) local id = options.id; local handler = options.handler; local matched; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$"); if not matched then set_message ('err_bad_citeseerx' ); options.coins_list_t['CITESEERX'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< D O I >------------------------------------------------------------------------ Formats a DOI and checks for DOI errors. DOI names contain two parts: prefix and suffix separated by a forward slash. Prefix: directory indicator '10.' followed by a registrant code Suffix: character string of any length chosen by the registrant This function checks a DOI name for: prefix/suffix. If the DOI name contains spaces or endashes, or, if it ends with a period or a comma, this function will emit a bad_doi error message. DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash, and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in DOI names. https://www.doi.org/doi_handbook/2_Numbering.html -- 2.2 Syntax of a DOI name https://www.doi.org/doi_handbook/2_Numbering.html#2.2.2 -- 2.2.2 DOI prefix ]] local function doi (options) local id = options.id; local inactive = options.DoiBroken local access = options.access; local ignore_invalid = options.accept; local handler = options.handler; local err_flag; local function is_extended_free (registrant, suffix) -- local function to check those few registrants that are mixed; identifiable by the doi suffix <incipit> suffix = suffix:lower(); -- ascii [a-z] same as [A-Z] in doi names; see §3.4.4 Case Insensitivity of the Doi Name if cfg.extended_registrants_t[registrant] then -- if this registrant has known free-to-read extentions for _, incipit in ipairs (cfg.extended_registrants_t[registrant]) do -- loop through the registrant's incipits if mw.ustring.find (suffix, '^' .. incipit:lower()) then -- ascii [a-z] same as [A-Z] in doi names return true; -- if foundm done end end end end local text; if is_set (inactive) then local inactive_year = inactive:match("%d%d%d%d"); -- try to get the year portion from the inactive date local inactive_month, good; if is_set (inactive_year) then if 4 < inactive:len() then -- inactive date has more than just a year (could be anything) local lang_obj = mw.getContentLanguage(); -- get a language object for this wiki good, inactive_month = pcall (lang_obj.formatDate, lang_obj, 'F', inactive); -- try to get the month name from the inactive date if not good then inactive_month = nil; -- something went wrong so make sure this is unset end end end -- otherwise, |doi-broken-date= has something but it isn't a date if is_set (inactive_year) and is_set (inactive_month) then set_message ('maint_doi_inactive_dated', {inactive_year, inactive_month, ' '}); elseif is_set (inactive_year) then set_message ('maint_doi_inactive_dated', {inactive_year, '', ''}); else set_message ('maint_doi_inactive'); end inactive = substitute (cfg.messages['inactive'], inactive ); end local suffix; local registrant, suffix = mw.ustring.match (id, '^10%.([^/]+)/([^%s–]-[^%.,])$'); -- registrant and suffix set when DOI has the proper basic form; both nil else local registrant_err_patterns = { -- these patterns are for code ranges that are not supported '^[^1-3]%d%d%d%d%.%d+$', -- 5 digits with subcode (reject 0xxxx, 40000+); accepts: 10000–39999 '^[^1-8]%d%d%d%d$', -- 5 digits without subcode (reject 0xxxx, 90000+); accepts: 10000–89999 '^[^1-9]%d%d%d%.%d+$', -- 4 digits with subcode (reject 0xxx); accepts: 1000–9999 '^[^1-9]%d%d%d$', -- 4 digits without subcode (reject 0xxx); accepts: 1000–9999 '^%d%d%d%d%d%d+', -- 6 or more digits '^%d%d?%d?$', -- less than 4 digits without subcode (3 digits with subcode is legitimate) '^%d%d?%.[%d%.]+', -- 1 or 2 digits with subcode '^5555$', -- test registrant will never resolve '[^%d%.]', -- any character that isn't a digit or a dot } if not ignore_invalid then if registrant then -- when DOI has proper form for i, pattern in ipairs (registrant_err_patterns) do -- spin through error patterns if registrant:match (pattern) then -- to validate registrant codes err_flag = set_message ('err_bad_doi'); -- when found, mark this DOI as bad break; -- and done end end else err_flag = set_message ('err_bad_doi'); -- invalid directory or malformed end else set_message ('maint_doi_ignore'); end if err_flag then options.coins_list_t['DOI'] = nil; -- when error, unset so not included in COinS else -- here when doi has no errors or has been wrapped in accept-as-written markup suffix = mw.ustring.match (id, '^10%.[^/]+/(.+)'); -- refetch suffix because doi may have been wrapped in accept-as-written markup if not access and (cfg.known_free_doi_registrants_t[registrant] or is_extended_free (registrant, suffix)) then -- |doi-access=free not set and <registrant> is known to be free set_message ('maint_doi_unflagged_free'); -- set a maint cat end end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access, auto_link = not (err_flag or is_set (inactive) or ignore_invalid) and 'doi' or nil -- do not auto-link when |doi-broken-date= has a value or when there is a DOI error or (to play it safe, after all, auto-linking is not essential) when invalid DOIs are ignored }) .. (inactive or ''); return text; end --[[--------------------------< H D L >------------------------------------------------------------------------ Formats an HDL with minor error checking. HDL names contain two parts: prefix and suffix separated by a forward slash. Prefix: character string using any character in the UCS-2 character set except '/' Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends with a period or a comma, this function will emit a bad_hdl error message. HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in HDLs. Query string parameters are named here: https://www.handle.net/proxy_servlet.html. query strings are not displayed but since '?' is an allowed character in an HDL, '?' followed by one of the query parameters is the only way we have to detect the query string so that it isn't URL-encoded with the rest of the identifier. ]] local function hdl (options) local id = options.id; local access = options.access; local handler = options.handler; local query_params = { -- list of known query parameters from https://www.handle.net/proxy_servlet.html 'noredirect', 'ignore_aliases', 'auth', 'cert', 'index', 'type', 'urlappend', 'locatt', 'action', } local hdl, suffix, param = id:match ('(.-)(%?(%a+).+)$'); -- look for query string local found; if hdl then -- when there are query strings, this is the handle identifier portion for _, q in ipairs (query_params) do -- spin through the list of query parameters if param:match ('^' .. q) then -- if the query string begins with one of the parameters found = true; -- announce a find break; -- and stop looking end end end if found then id = hdl; -- found so replace id with the handle portion; this will be URL-encoded, suffix will not else suffix = ''; -- make sure suffix is empty string for concatenation else end local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, suffix = suffix, separator = handler.separator, encode = handler.encode, access = access}) if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- HDL must contain a forward slash, must not contain spaces, endashes, and must not end with period or comma set_message ('err_bad_hdl' ); options.coins_list_t['HDL'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< I S B N >---------------------------------------------------------------------- Determines whether an ISBN string is valid ]] local function isbn (options_t) local isbn_str = options_t.id; local ignore_invalid = options_t.accept; local handler = options_t.handler; local year = options_t.Year; -- when set, valid anchor_year; may have a disambiguator which must be removed local function return_result (check, err_type) -- local function to handle the various returns local ISBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = isbn_str, separator = handler.separator}); if ignore_invalid then -- if ignoring ISBN errors set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error else -- here when not ignoring if not check then -- and there is an error options_t.coins_list_t['ISBN'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_isbn', err_type); -- set an error message return ISBN; -- return id text end end return ISBN; -- return id text end if year and not ignore_invalid then -- year = year:match ('%d%d%d%d?'); -- strip disambiguator if present if year and (1965 > tonumber(year)) then -- <year> will be nil here when |year=n.d. or |year=nd set_message ('err_invalid_isbn_date'); -- set an error message return internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = isbn_str, separator = handler.separator}); end end if nil ~= isbn_str:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X end local id = isbn_str:gsub ('[%s-]', ''); -- remove hyphens and whitespace local len = id:len(); if len ~= 10 and len ~= 13 then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if len == 10 then if id:match ('^%d*X?$') == nil then -- fail if isbn_str has 'X' anywhere but last position return return_result (false, cfg.err_msg_supl.form); end if not is_valid_isxn (id, 10) then -- test isbn-10 for numerical validity return return_result (false, cfg.err_msg_supl.check); -- fail if isbn-10 is not numerically valid end if id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not valid isbn group ids but are used by amazon as numeric identifiers (asin) return return_result (false, cfg.err_msg_supl.group); -- fail if isbn-10 begins with 630/1 end return return_result (true, cfg.err_msg_supl.check); -- pass if isbn-10 is numerically valid else if id:match ('^%d+$') == nil then return return_result (false, cfg.err_msg_supl.char); -- fail if ISBN-13 is not all digits end if id:match ('^97[89]%d*$') == nil then return return_result (false, cfg.err_msg_supl.prefix); -- fail when ISBN-13 does not begin with 978 or 979 end if id:match ('^9790') then return return_result (false, cfg.err_msg_supl.group); -- group identifier '0' is reserved to ISMN end return return_result (is_valid_isxn_13 (id), cfg.err_msg_supl.check); end end --[[--------------------------< A S I N >---------------------------------------------------------------------- Formats a link to Amazon. Do simple error checking: ASIN must be mix of 10 numeric or uppercase alpha characters. If a mix, first character must be uppercase alpha; if all numeric, ASINs must be 10-digit ISBN. If 10-digit ISBN, add a maintenance category so a bot or AWB script can replace |asin= with |isbn=. Error message if not 10 characters, if not ISBN-10, if mixed and first character is a digit. |asin=630....... and |asin=631....... are (apparently) not a legitimate ISBN though it checksums as one; these do not cause this function to emit the maint_asin message This function is positioned here because it calls isbn() ]] local function asin (options) local id = options.id; local domain = options.ASINTLD; local err_flag; if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then err_flag = set_message ('err_bad_asin'); -- ASIN is not a mix of 10 uppercase alpha and numeric characters else if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X) if is_valid_isxn (id, 10) then -- see if ASIN value is or validates as ISBN-10 if not id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not a valid isbn prefixes but are used by amazon as a numeric identifier err_flag = set_message ('err_bad_asin'); -- ASIN has ISBN-10 form but begins with something other than 630/1 so probably an isbn end elseif not is_set (err_flag) then err_flag = set_message ('err_bad_asin'); -- ASIN is not ISBN-10 end elseif not id:match("^%u[%d%u]+$") then err_flag = set_message ('err_bad_asin'); -- asin doesn't begin with uppercase alpha end end if (not is_set (domain)) or in_array (domain, {'us'}) then -- default: United States domain = "com"; elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom domain = "co." .. domain; elseif in_array (domain, {'z.cn'}) then -- China domain = "cn"; elseif in_array (domain, {'au', 'br', 'mx', 'sg', 'tr'}) then -- Australia, Brazil, Mexico, Singapore, Turkey domain = "com." .. domain; elseif not in_array (domain, {'ae', 'ca', 'cn', 'de', 'es', 'fr', 'in', 'it', 'nl', 'pl', 'sa', 'se', 'co.jp', 'co.uk', 'com', 'com.au', 'com.br', 'com.mx', 'com.sg', 'com.tr'}) then -- Arabic Emirates, Canada, China, Germany, Spain, France, Indonesia, Italy, Netherlands, Poland, Saudi Arabia, Sweden (as of 2021-03 Austria (.at), Liechtenstein (.li) and Switzerland (.ch) still redirect to the German site (.de) with special settings, so don't maintain local ASINs for them) err_flag = set_message ('err_bad_asin_tld'); -- unsupported asin-tld value end local handler = options.handler; if not is_set (err_flag) then options.coins_list_t['ASIN'] = handler.prefix .. domain .. "/dp/" .. id; -- asin for coins else options.coins_list_t['ASIN'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. domain .. "/dp/", id = id, encode = handler.encode, separator = handler.separator}) end --[[--------------------------< I S M N >---------------------------------------------------------------------- Determines whether an ISMN string is valid. Similar to ISBN-13, ISMN is 13 digits beginning 979-0-... and uses the same check digit calculations. See https://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf section 2, pages 9–12. ismn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx) or an identifier registered at info-uri.info (info:) ]] local function ismn (options) local id = options.id; local handler = options.handler; local text; local valid_ismn = true; local id_copy; id_copy = id; -- save a copy because this testing is destructive id = id:gsub ('[%s-]', ''); -- remove hyphens and white space if 13 ~= id:len() or id:match ("^9790%d*$" ) == nil then -- ISMN must be 13 digits and begin with 9790 valid_ismn = false; else valid_ismn=is_valid_isxn_13 (id); -- validate ISMN end -- text = internal_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- use this (or external version) when there is some place to link to -- prefix = handler.prefix, id = id_copy, separator = handler.separator, encode = handler.encode}) text = table.concat ( -- because no place to link to yet { make_wikilink (label_link_make (handler), handler.label), handler.separator, id_copy }); if false == valid_ismn then options.coins_list_t['ISMN'] = nil; -- when error, unset so not included in COinS; not really necessary here because ismn not made part of COinS set_message ('err_bad_ismn'); -- create an error message if the ISMN is invalid end return text; end --[[--------------------------< I S S N >---------------------------------------------------------------------- Validate and format an ISSN. This code fixes the case where an editor has included an ISSN in the citation but has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked like this: |issn=0819 4327 gives: [https://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link This code now prevents that by inserting a hyphen at the ISSN midpoint. It also validates the ISSN for length and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check ISSN error message. The ISSN is always displayed with a hyphen, even if the ISSN was given as a single group of 8 digits. ]] local function issn (options) local id = options.id; local handler = options.handler; local ignore_invalid = options.accept; local issn_copy = id; -- save a copy of unadulterated ISSN; use this version for display if ISSN does not validate local text; local valid_issn = true; id = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace if 8 ~= id:len() or nil == id:match ("^%d*X?$" ) then -- validate the ISSN: 8 digits long, containing only 0-9 or X in the last position valid_issn = false; -- wrong length or improper character else valid_issn = is_valid_isxn (id, 8); -- validate ISSN end if true == valid_issn then id = string.sub (id, 1, 4 ) .. "-" .. string.sub (id, 5 ); -- if valid, display correctly formatted version else id = issn_copy; -- if not valid, show the invalid ISSN with error message end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if ignore_invalid then set_message ('maint_issn_ignore'); else if false == valid_issn then options.coins_list_t['ISSN'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_issn', (options.hkey == 'EISSN') and 'e' or ''); -- create an error message if the ISSN is invalid end end return text; end --[[--------------------------< J F M >----------------------------------------------------------------------- A numerical identifier in the form nn.nnnn.nn ]] local function jfm (options) local id = options.id; local handler = options.handler; local id_num; id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier if is_set (id_num) then set_message ('maint_jfm_format'); else -- plain number without JFM prefix id_num = id; -- if here id does not have prefix end if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then id = id_num; -- jfm matches pattern else set_message ('err_bad_jfm' ); -- set an error message options.coins_list_t['JFM'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< J S T O R >-------------------------------------------------------------------- Format a JSTOR with some error checking ]] local function jstor (options) local id = options.id; local access = options.access; local handler = options.handler; if id:find ('[Jj][Ss][Tt][Oo][Rr]') or id:find ('^https?://') or id:find ('%s') then set_message ('err_bad_jstor'); -- set an error message options.coins_list_t['JSTOR'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< L C C N >---------------------------------------------------------------------- Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits. https://oclc-research.github.io/infoURI-Frozen/info-uri.info/info:lccn/reg.html length = 8 then all digits length = 9 then lccn[1] is lowercase alpha length = 10 then lccn[1] and lccn[2] are both lowercase alpha or both digits length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lowercase alpha or both digits length = 12 then lccn[1] and lccn[2] are both lowercase alpha ]] local function lccn (options) local lccn = options.id; local handler = options.handler; local err_flag; -- presume that LCCN is valid local id = lccn; -- local copy of the LCCN id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes) local len = id:len(); -- get the length of the LCCN if 8 == len then if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) err_flag = set_message ('err_bad_lccn'); -- set an error message end elseif 9 == len then -- LCCN should be adddddddd if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern? err_flag = set_message ('err_bad_lccn'); -- set an error message end elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ... if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end end elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end elseif 12 == len then -- LCCN should be aadddddddddd if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern err_flag = set_message ('err_bad_lccn'); -- no match, set an error message end else err_flag = set_message ('err_bad_lccn'); -- wrong length, set an error message end if not is_set (err_flag) and nil ~= lccn:find ('%s') then err_flag = set_message ('err_bad_lccn'); -- lccn contains a space, set an error message end if is_set (err_flag) then options.coins_list_t['LCCN'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = lccn, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< M E D R X I V >----------------------------------------------------------------- Format medRxiv ID and do simple error checking. Similar to later bioRxiv IDs, medRxiv IDs are prefixed with a yyyy.mm.dd. date and suffixed with an optional version identifier. Ealiest date accepted is 2020.01.01 The medRxiv ID is a date followed by an eight-digit number followed by an optional version indicator 'v' and one or more digits: https://www.medrxiv.org/content/10.1101/2020.11.16.20232009v2 -> 10.1101/2020.11.16.20232009v2 ]] local function medrxiv (options) local id = options.id; local handler = options.handler; local err_msg_flag = true; -- flag; assume that there will be an error local patterns = { '^%d%d%d%d%d%d%d%d$', -- simple 8-digit identifier; these should be relatively rare '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%dv%d+$', -- y.m.d. date + 8-digit identifier + version (2020-01-01 and later) '^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%d$', -- y.m.d. date + 8-digit identifier (2020-01-01 and later) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%dv%d+$', -- y.m.d. date + 8-digit identifier + version (2025-12-01 and later) '^10%.64898/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%d$', -- y.m.d. date + 8-digit identifier (2025-12-01 and later) } for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match if id:match (pattern) then local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier if m then -- m is nil when id is the 8-digit form if not is_valid_rxiv_date (y, m, d, 'b') then -- validate the encoded date; 'b' for medrxiv limit break; -- date fail; break out early so we don't unset the error message end end err_msg_flag = nil; -- we found a match so unset the error message break; -- and done end end -- <err_msg_flag> remains set here when no match if err_msg_flag then options.coins_list_t['MEDRXIV'] = nil; -- when error, unset so not included in COinS set_message ('err_bad_medrxiv'); -- and set the error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< M R >-------------------------------------------------------------------------- A seven digit number; if not seven digits, zero-fill leading digits to make seven digits. ]] local function mr (options) local id = options.id; local handler = options.handler; local id_num; local id_len; id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix if is_set (id_num) then set_message ('maint_mr_format'); -- add maint cat else -- plain number without mr prefix id_num = id:match ('^%d+$'); -- if here id is all digits end id_len = id_num and id_num:len() or 0; if (7 >= id_len) and (0 ~= id_len) then id = string.rep ('0', 7-id_len) .. id_num; -- zero-fill leading digits else set_message ('err_bad_mr'); -- set an error message options.coins_list_t['MR'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< O C L C >---------------------------------------------------------------------- Validate and format an OCLC ID. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}} archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html ]] local function oclc (options) local id = options.id; local handler = options.handler; local number; if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters) number = id:match('ocm(%d+)'); -- get the number elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters) number = id:match('ocn(%d+)'); -- get the number elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters) number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number if 9 < number:len() then number = nil; -- constrain to 1 to 9 digits; change this when OCLC issues 10-digit numbers end elseif id:match('^%d+$') then -- no prefix number = id; -- get the number if tonumber (id) > handler.id_limit then number = nil; -- unset when id value exceeds the limit end end if number then -- proper format id = number; -- exclude prefix, if any, from external link else set_message ('err_bad_oclc') -- add an error message if the id is malformed options.coins_list_t['OCLC'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< O P E N L I B R A R Y >-------------------------------------------------------- Formats an OpenLibrary link, and checks for associated errors. ]] local function openlibrary (options) local id = options.id; local access = options.access; local handler = options.handler; local ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- strip optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W'; local err_flag; local prefix = { -- these are appended to the handler.prefix according to code ['A']='authors/OL', ['M']='books/OL', ['W']='works/OL', ['X']='OL' -- not a code; spoof when 'code' in id is invalid }; if not ident then code = 'X'; -- no code or id completely invalid ident = id; -- copy id to ident so that we display the flawed identifier err_flag = set_message ('err_bad_ol'); end if not is_set (err_flag) then options.coins_list_t['OL'] = handler.prefix .. prefix[code] .. ident; -- experiment for ol coins else options.coins_list_t['OL'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. prefix[code], id = ident, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< O S T I >---------------------------------------------------------------------- Format OSTI and do simple error checking. OSTIs are sequential numbers beginning at 1 and counting up. This code checks the OSTI to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more OSTIs are issued. NB. 1018 is the lowest OSTI number found in the wild (so far) and resolving OK on the OSTI site ]] local function osti (options) local id = options.id; local access = options.access; local handler = options.handler; if id:match("[^%d]") then -- if OSTI has anything but digits set_message ('err_bad_osti'); -- set an error message options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS else -- OSTI is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1018 > id_num or handler.id_limit < id_num then -- if OSTI is outside test limit boundaries set_message ('err_bad_osti'); -- set an error message options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); end --[[--------------------------< P M C >------------------------------------------------------------------------ Format a PMC, do simple error checking, and check for embargoed articles. The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix. PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation has |pmc=<value> but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed () returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string. PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued. ]] local function pmc (options) local id = options.id; local embargo = options.Embargo; -- TODO: lowercase? local handler = options.handler; local err_flag; local id_num; local text; id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with PMC prefix if is_set (id_num) then set_message ('maint_pmc_format'); else -- plain number without PMC prefix id_num = id:match ('^%d+$'); -- if here id is all digits end if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMC is outside test limit boundaries err_flag = set_message ('err_bad_pmc'); -- set an error message else id = tostring (id_num); -- make sure id is a string end else -- when id format incorrect err_flag = set_message ('err_bad_pmc'); -- set an error message end if is_set (embargo) and is_set (is_embargoed (embargo)) then -- is PMC is still embargoed? text = table.concat ( -- still embargoed so no external link { make_wikilink (label_link_make (handler), handler.label), handler.separator, id, }); else text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- no embargo date or embargo has expired, ok to link to article prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access, auto_link = not err_flag and 'pmc' or nil -- do not auto-link when PMC has error }); end if err_flag then options.coins_list_t['PMC'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< P M I D >---------------------------------------------------------------------- Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMIDs are issued. ]] local function pmid (options) local id = options.id; local handler = options.handler; if id:match("[^%d]") then -- if PMID has anything but digits set_message ('err_bad_pmid'); -- set an error message options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS else -- PMID is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMID is outside test limit boundaries set_message ('err_bad_pmid'); -- set an error message options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --[[--------------------------< R F C >------------------------------------------------------------------------ Format RFC and do simple error checking. RFCs are sequential numbers beginning at 1 and counting up. This code checks the RFC to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more RFCs are issued. An index of all RFCs is here: https://tools.ietf.org/rfc/ ]] local function rfc (options) local id = options.id; local handler = options.handler; if id:match("[^%d]") then -- if RFC has anything but digits set_message ('err_bad_rfc'); -- set an error message options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS else -- RFC is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if RFC is outside test limit boundaries set_message ('err_bad_rfc'); -- set an error message options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); end --[[--------------------------< S 2 C I D >-------------------------------------------------------------------- Format an S2CID, do simple error checking S2CIDs are sequential numbers beginning at 1 and counting up. This code checks the S2CID to see that it is only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more S2CIDs are issued. ]] local function s2cid (options) local id = options.id; local access = options.access; local handler = options.handler; local id_num; local text; id_num = id:match ('^[1-9]%d*$'); -- id must be all digits; must not begin with 0; no open access flag if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if handler.id_limit < id_num then -- if S2CID is outside test limit boundaries set_message ('err_bad_s2cid'); -- set an error message options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS end else -- when id format incorrect set_message ('err_bad_s2cid'); -- set an error message options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); return text; end --[[--------------------------< S B N >------------------------------------------------------------------------ 9-digit form of ISBN-10; uses same check-digit validation when SBN is prefixed with an additional '0' to make 10 digits sbn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx) or an identifier registered at info-uri.info (info:) ]] local function sbn (options) local id = options.id; local ignore_invalid = options.accept; local handler = options.handler; local function return_result (check, err_type) -- local function to handle the various returns local SBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator}); if not ignore_invalid then -- if not ignoring SBN errors if not check then options.coins_list_t['SBN'] = nil; -- when error, unset so not included in COinS; not really necessary here because sbn not made part of COinS set_message ('err_bad_sbn', {err_type}); -- display an error message return SBN; end else set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error (ToDo: Possibly switch to separate message for SBNs only) end return SBN; end if id:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if SBN contains anything but digits, hyphens, or the uppercase X end local ident = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace; they interfere with the rest of the tests if 9 ~= ident:len() then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if ident:match ('^%d*X?$') == nil then return return_result (false, cfg.err_msg_supl.form); -- fail if SBN has 'X' anywhere but last position end return return_result (is_valid_isxn ('0' .. ident, 10), cfg.err_msg_supl.check); end --[[--------------------------< S S R N >---------------------------------------------------------------------- Format an SSRN, do simple error checking SSRNs are sequential numbers beginning at 100? and counting up. This code checks the SSRN to see that it is only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need to be updated periodically as more SSRNs are issued. ]] local function ssrn (options) local id = options.id; local handler = options.handler; local id_num; local text; id_num = id:match ('^%d+$'); -- id must be all digits if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 100 > id_num or handler.id_limit < id_num then -- if SSRN is outside test limit boundaries set_message ('err_bad_ssrn'); -- set an error message options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS end else -- when id format incorrect set_message ('err_bad_ssrn'); -- set an error message options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = options.access}); return text; end --[[--------------------------< U S E N E T _ I D >------------------------------------------------------------ Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in '<' and/or '>' angle brackets. ]] local function usenet_id (options) local id = options.id; local handler = options.handler; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if not id:match('^.+@.+$') or not id:match('^[^<].*[^>]$') then -- doesn't have '@' or has one or first or last character is '< or '>' set_message ('err_bad_usenet_id') -- add an error message if the message id is invalid options.coins_list_t['USENETID'] = nil; -- when error, unset so not included in COinS end return text; end --[[--------------------------< Z B L >----------------------------------------------------------------------- A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional format described here: http://emis.mi.sanu.ac.rs/ZMATH/zmath/en/help/search/ temporary format is apparently eight digits. Anything else is an error ]] local function zbl (options) local id = options.id; local handler = options.handler; if id:match('^%d%d%d%d%d%d%d%d$') then -- is this identifier using temporary format? set_message ('maint_zbl'); -- yes, add maint cat elseif not id:match('^%d?%d?%d?%d%.%d%d%d%d%d$') then -- not temporary, is it normal format? set_message ('err_bad_zbl'); -- no, set an error message options.coins_list_t['ZBL'] = nil; -- when error, unset so not included in COinS end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}); end --============================<< I N T E R F A C E F U N C T I O N S >>========================================== --[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------ Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to the identifier list. Emits redundant error message if more than one alias exists in args ]] local function extract_ids (args) local id_list = {}; -- list of identifiers found in args for k, v in pairs (cfg.id_handlers) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table v = select_one (args, v.parameters, 'err_redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present if is_set (v) then id_list[k] = v; end -- if found in args, add identifier to our list end return id_list; end --[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >-------------------------------------- Fetches custom id access levels from arguments using configuration settings. Parameters which have a predefined access level (e.g. arxiv) do not use this function as they are directly rendered as free without using an additional parameter. returns a table of k/v pairs where k is same as the identifier's key in cfg.id_handlers and v is the assigned (valid) keyword access-level values must match the case used in cfg.keywords_lists['id-access'] (lowercase unless there is some special reason for something else) ]] local function extract_id_access_levels (args, id_list) local id_accesses_list = {}; for k, v in pairs (cfg.id_handlers) do local access_param = v.custom_access; -- name of identifier's access-level parameter if is_set (access_param) then local access_level = args[access_param]; -- get the assigned value if there is one if is_set (access_level) then if not in_array (access_level, cfg.keywords_lists['id-access']) then -- exact match required set_message ('err_invalid_param_val', {access_param, access_level}); access_level = nil; -- invalid so unset end if not is_set (id_list[k]) then -- identifier access-level must have a matching identifier set_message ('err_param_access_requires_param', {k:lower()}); -- parameter name is uppercase in cfg.id_handlers (k); lowercase for error message end id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword end end end return id_accesses_list; end --[[--------------------------< B U I L D _ I D _ L I S T >---------------------------------------------------- render the identifiers into a sorted sequence table <ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value <options_t> is a table of various k/v option pairs provided in the call to new_build_id_list(); modified by this function and passed to all identifier rendering functions <access_levels_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value (if valid) returns a sequence table of sorted (by hkey - 'handler' key) rendered identifier strings ]] local function build_id_list (ID_list_coins_t, options_t, access_levels_t) local ID_list_t = {}; local accept; local func_map = { --function map points to functions associated with hkey identifier ['ARXIV'] = arxiv, ['ASIN'] = asin, ['BIBCODE'] = bibcode, ['BIORXIV'] = biorxiv, ['CITESEERX'] = citeseerx, ['DOI'] = doi, ['EISSN'] = issn, ['HDL'] = hdl, ['ISBN'] = isbn, ['ISMN'] = ismn, ['ISSN'] = issn, ['JFM'] = jfm, ['JSTOR'] = jstor, ['LCCN'] = lccn, ['MEDRXIV'] = medrxiv, ['MR'] = mr, ['OCLC'] = oclc, ['OL'] = openlibrary, ['OSTI'] = osti, ['PMC'] = pmc, ['PMID'] = pmid, ['RFC'] = rfc, ['S2CID'] = s2cid, ['SBN'] = sbn, ['SSRN'] = ssrn, ['USENETID'] = usenet_id, ['ZBL'] = zbl, } for hkey, v in pairs (ID_list_coins_t) do v, accept = has_accept_as_written (v); -- remove accept-as-written markup if present; accept is boolean true when markup removed; false else -- every function gets the options table with value v and accept boolean options_t.hkey = hkey; -- ~/Configuration handler key options_t.id = v; -- add that identifier value to the options table options_t.accept = accept; -- add the accept boolean flag options_t.access = access_levels_t[hkey]; -- add the access level for those that have an |<identifier-access= parameter options_t.handler = cfg.id_handlers[hkey]; options_t.coins_list_t = ID_list_coins_t; -- pointer to ID_list_coins_t; for |asin= and |ol=; also to keep erroneous values out of the citation's metadata options_t.coins_list_t[hkey] = v; -- id value without accept-as-written markup for metadata if options_t.handler.access and not in_array (options_t.handler.access, cfg.keywords_lists['id-access']) then error (cfg.messages['unknown_ID_access'] .. options_t.handler.access); -- here when handler access key set to a value not listed in list of allowed id access keywords end if func_map[hkey] then local id_text = func_map[hkey] (options_t); -- call the function to get identifier text and any error message table.insert (ID_list_t, {hkey, id_text}); -- add identifier text to the output sequence table else error (cfg.messages['unknown_ID_key'] .. hkey); -- here when func_map doesn't have a function for hkey end end local function comp (a, b) -- used by following table.sort() return a[1]:lower() < b[1]:lower(); -- sort by hkey end table.sort (ID_list_t, comp); -- sequence table of tables sort for k, v in ipairs (ID_list_t) do -- convert sequence table of tables to simple sequence table of strings ID_list_t[k] = v[2]; -- v[2] is the identifier rendering from the call to the various functions in func_map{} end return ID_list_t; end --[[--------------------------< O P T I O N S _ C H E C K >---------------------------------------------------- check that certain option parameters have their associated identifier parameters with values <ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value <ID_support_t> is a sequence table of tables created in citation0() where each subtable has four elements: [1] is the support parameter's assigned value; empty string if not set [2] is a text string same as key in cfg.id_handlers [3] is cfg.error_conditions key used to create error message [4] is original ID support parameter name used to create error message returns nothing; on error emits an appropriate error message ]] local function options_check (ID_list_coins_t, ID_support_t) for _, v in ipairs (ID_support_t) do if is_set (v[1]) and not ID_list_coins_t[v[2]] then -- when support parameter has a value but matching identifier parameter is missing or empty set_message (v[3], (v[4])); -- emit the appropriate error message end end end --[[--------------------------< I D E N T I F I E R _ L I S T S _ G E T >-------------------------------------- Creates two identifier lists: a k/v table of identifiers and their values to be used locally and for use in the COinS metadata, and a sequence table of the rendered identifier strings that will be included in the rendered citation. ]] local function identifier_lists_get (args_t, options_t, ID_support_t) local ID_list_coins_t = extract_ids (args_t); -- get a table of identifiers and their values for use locally and for use in COinS options_check (ID_list_coins_t, ID_support_t); -- ID support parameters must have matching identifier parameters local ID_access_levels_t = extract_id_access_levels (args_t, ID_list_coins_t); -- get a table of identifier access levels local ID_list_t = build_id_list (ID_list_coins_t, options_t, ID_access_levels_t); -- get a sequence table of rendered identifier strings return ID_list_t, ID_list_coins_t; -- return the tables end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) cfg = cfg_table_ptr; has_accept_as_written = utilities_page_ptr.has_accept_as_written; -- import functions from select Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; set_message = utilities_page_ptr.set_message; select_one = utilities_page_ptr.select_one; substitute = utilities_page_ptr.substitute; make_wikilink = utilities_page_ptr.make_wikilink; z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { auto_link_urls = auto_link_urls, -- table of identifier URLs to be used when auto-linking |title= identifier_lists_get = identifier_lists_get, -- experiment to replace individual calls to build_id_list(), extract_ids, extract_id_access_levels is_embargoed = is_embargoed; set_selected_modules = set_selected_modules; } e4jc9mw0kujge8fok9aztk214jmz0lr Module:Citation/CS1/styles.css 828 12888 116886 114937 2026-01-17T19:25:08Z en>Trappist the monk 0 synch from sandbox; 116886 sanitized-css text/css /* Protection icon the following line controls the page-protection icon in the upper right corner it must remain within this comment {{sandbox other||{{pp-template}}}} */ /* Overrides Some wikis do not override user agent default styles for HTML <cite> and <q>, unlike en.wp. On en.wp, keep these the same as [[MediaWiki:Common.css]]. The word-wrap and :target styles were moved here from Common.css. On en.wp, keep these the same as [[Template:Citation/styles.css]]. */ cite.citation { font-style: inherit; /* Remove italics for <cite> */ /* Break long urls, etc., rather than overflowing box */ word-wrap: break-word; } .citation q { quotes: '"' '"' "'" "'"; /* Straight quote marks for <q> */ } /* Highlight linked elements (such as clicked references) in blue */ .citation:target { /* ignore the linter - all browsers of interest implement this */ background-color: rgba(0, 127, 255, 0.133); } /* ID and URL access Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon. That's essentially 2 classes and 1 element. the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}} bg-size `contain` in Minerva and Timeless is too large, so we set a size for them and then exclude them later */ .id-lock-free.id-lock-free a { background: url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg) right 0.1em center/9px no-repeat; } .id-lock-limited.id-lock-limited a, .id-lock-registration.id-lock-registration a { background: url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg) right 0.1em center/9px no-repeat; } .id-lock-subscription.id-lock-subscription a { background: url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg) right 0.1em center/9px no-repeat; } /* Wikisource Wikisource icon when |chapter= or |title= is wikilinked to Wikisource as in cite wikisource */ .cs1-ws-icon a { background: url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg) right 0.1em center/12px no-repeat; } body:not(.skin-timeless):not(.skin-minerva) .id-lock-free a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-limited a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-registration a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-subscription a, body:not(.skin-timeless):not(.skin-minerva) .cs1-ws-icon a { background-size: contain; /* Common.css has a padding set for PDF URLs. bg-contain expands to the * size of the padding which makes the icons very large. we "reset" the * padding here. 1em picked out of a hat based on console having a similar * rule from elsewhere */ padding: 0 1em 0 0; } /* Errors and maintenance */ .cs1-code { /* <code>...</code> style override: mediawiki's css definition is specified here: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/ 69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 */ color: inherit; background: inherit; border: none; padding: inherit; } .cs1-hidden-error { display: none; color: var(--color-error, #bf3c2c); } .cs1-visible-error { color: var(--color-error, #bf3c2c); } .cs1-maint { display: none; color: #085; margin-left: 0.3em; } /* kerning */ .cs1-kern-left { padding-left: 0.2em; } .cs1-kern-right { padding-right: 0.2em; } /* selflinks – avoid bold font style when cs1|2 template links to the current page */ .citation .mw-selflink { font-weight: inherit; } @media screen { /* Small text size Set small text size in one place. 0.95 (here) * 0.9 (from references list) is ~0.85, which is the lower bound for size for accessibility. Old styling for this was just 0.85. We could write the rule so that when this template is inside references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */ .cs1-format { font-size: 95%; } html.skin-theme-clientpref-night .cs1-maint { color: #18911f; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cs1-maint { color: #18911f; } } 2wrho6o1q12cvwhaslan5n9g140q3wl 116887 116886 2026-07-16T10:58:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1/styles.css]] 116886 sanitized-css text/css /* Protection icon the following line controls the page-protection icon in the upper right corner it must remain within this comment {{sandbox other||{{pp-template}}}} */ /* Overrides Some wikis do not override user agent default styles for HTML <cite> and <q>, unlike en.wp. On en.wp, keep these the same as [[MediaWiki:Common.css]]. The word-wrap and :target styles were moved here from Common.css. On en.wp, keep these the same as [[Template:Citation/styles.css]]. */ cite.citation { font-style: inherit; /* Remove italics for <cite> */ /* Break long urls, etc., rather than overflowing box */ word-wrap: break-word; } .citation q { quotes: '"' '"' "'" "'"; /* Straight quote marks for <q> */ } /* Highlight linked elements (such as clicked references) in blue */ .citation:target { /* ignore the linter - all browsers of interest implement this */ background-color: rgba(0, 127, 255, 0.133); } /* ID and URL access Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon. That's essentially 2 classes and 1 element. the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}} bg-size `contain` in Minerva and Timeless is too large, so we set a size for them and then exclude them later */ .id-lock-free.id-lock-free a { background: url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg) right 0.1em center/9px no-repeat; } .id-lock-limited.id-lock-limited a, .id-lock-registration.id-lock-registration a { background: url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg) right 0.1em center/9px no-repeat; } .id-lock-subscription.id-lock-subscription a { background: url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg) right 0.1em center/9px no-repeat; } /* Wikisource Wikisource icon when |chapter= or |title= is wikilinked to Wikisource as in cite wikisource */ .cs1-ws-icon a { background: url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg) right 0.1em center/12px no-repeat; } body:not(.skin-timeless):not(.skin-minerva) .id-lock-free a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-limited a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-registration a, body:not(.skin-timeless):not(.skin-minerva) .id-lock-subscription a, body:not(.skin-timeless):not(.skin-minerva) .cs1-ws-icon a { background-size: contain; /* Common.css has a padding set for PDF URLs. bg-contain expands to the * size of the padding which makes the icons very large. we "reset" the * padding here. 1em picked out of a hat based on console having a similar * rule from elsewhere */ padding: 0 1em 0 0; } /* Errors and maintenance */ .cs1-code { /* <code>...</code> style override: mediawiki's css definition is specified here: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/ 69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 */ color: inherit; background: inherit; border: none; padding: inherit; } .cs1-hidden-error { display: none; color: var(--color-error, #bf3c2c); } .cs1-visible-error { color: var(--color-error, #bf3c2c); } .cs1-maint { display: none; color: #085; margin-left: 0.3em; } /* kerning */ .cs1-kern-left { padding-left: 0.2em; } .cs1-kern-right { padding-right: 0.2em; } /* selflinks – avoid bold font style when cs1|2 template links to the current page */ .citation .mw-selflink { font-weight: inherit; } @media screen { /* Small text size Set small text size in one place. 0.95 (here) * 0.9 (from references list) is ~0.85, which is the lower bound for size for accessibility. Old styling for this was just 0.85. We could write the rule so that when this template is inside references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */ .cs1-format { font-size: 95%; } html.skin-theme-clientpref-night .cs1-maint { color: #18911f; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cs1-maint { color: #18911f; } } 2wrho6o1q12cvwhaslan5n9g140q3wl Module:Pagetype 828 12890 117050 109964 2024-05-21T17:35:20Z en>MSGJ 0 fix for files and interface messages which do exist but are not stored locally 117050 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- This meta-module which automatically detects namespaces, and allows -- -- for a great deal of customisation. It can easily be ported to other -- -- wikis by changing the values in the [[Module:Pagetype/config]]. -- -- -- -------------------------------------------------------------------------------- -- Load config. local cfg = mw.loadData('Module:Pagetype/config') -- Load required modules. local yesno = require('Module:Yesno') local p = {} -- Look up a namespace argument in the args table. local function lookUpNamespaceArg(args, key) local arg = args[key] -- Convert "yes", "1" etc. to true, "no", "0" etc. to false, and leave -- other values the same. return yesno(arg, arg) end -- Append multiple values to an array local function appendMultiple(target, source) for _, value in ipairs(source) do table.insert(target, value) end end -- Get argument keys for a title's namespace local function getNamespaceArgKeys(title) local nsInfo = mw.site.namespaces[title.namespace] local customAliases = cfg.customNamespaceAliases[title.namespace] or {} local keys = {} if nsInfo.name ~= '' then table.insert(keys, nsInfo.name) end if nsInfo.canonicalName ~= nsInfo.name and nsInfo.canonicalName ~= '' then table.insert(keys, nsInfo.canonicalName) end appendMultiple(keys, nsInfo.aliases) appendMultiple(keys, customAliases) return keys end -- Get the argument for a title's namespace, if it was specified in the args table. local function getNamespaceArg(title, args) if title.isTalkPage then return lookUpNamespaceArg(args, cfg.talk) end for _, key in ipairs(getNamespaceArgKeys(title)) do local arg = lookUpNamespaceArg(args, mw.ustring.lower(key)) if arg ~= nil then return arg end end return nil end -- Look up a page type specific to the title's namespace local function getExplicitPageType(title) if title.isTalkPage then return cfg.talkDefault else return cfg.pagetypes[title.namespace] end end -- Get a default page type that is not specific to the title's namespace local function getDefaultPageType(args) local other = lookUpNamespaceArg(args, cfg.other) if type(other) == 'string' then return other else return cfg.otherDefault end end local function detectRedirects(title, args) local redirect = lookUpNamespaceArg(args, cfg.redirect) if redirect == false then -- Don't detect redirects if they have been specifically disallowed. return nil end -- Allow custom values for redirects. if not title.isRedirect then return nil elseif type(redirect) == 'string' then return redirect else return cfg.redirectDefault end end local function capitalize(pageType) local first = mw.ustring.sub(pageType, 1, 1) local rest = mw.ustring.sub(pageType, 2) return mw.ustring.upper(first) .. rest end local function pluralize(pageType) if cfg.irregularPlurals[pageType] then return cfg.irregularPlurals[pageType] else return pageType .. cfg.plural -- often 's' end end local function parseContent(title, args, optionsList) if title.namespace==828 and title.subpageText~='doc' -- don't detect modules or not title.exists -- can't check unless page exists then return nil end local content = title:getContent() if content == nil then return nil end local templates -- lazily evaluated for _, options in next, optionsList do local list, parameter, default, articleOnly = unpack(options, 1, 4) if not articleOnly or title.namespace==0 then -- only check for templates if we should... local out = lookUpNamespaceArg(args, parameter) if type(out) == "string" or (out ~= false and default) then -- ...and if we actually have anything to say about them if not templates then templates = {} -- do our delayed evaluation now that we are required to content = require('Module:Wikitext Parsing').PrepareText(content) -- disregard templates which do not have any affect for template in string.gmatch(content, "{{%s*([^|}]-)%s*[|}]") do templates[#templates+1] = capitalize(template) end end local wantedTemplates = mw.loadData('Module:Pagetype/' .. list) local templateFound = false for _, template in next, templates do if wantedTemplates[template] then templateFound = true break end end if templateFound then if type(out)=='string' then return out elseif out ~= false and default then return default end end end end end end -- Find pages which do not exist local function nonExistent(title, args) local arg = lookUpNamespaceArg(args, cfg.ne) if arg == false then return nil end local exists = false if title.exists then -- not an article if it does not exist exists = true elseif title.namespace==8 and mw.message.new(title.text):exists() then exists = true elseif title.namespace==6 and title.fileExists then exists = true end if not exists then if type(arg) == 'string' then return arg else return cfg.naDefault end end end -- Get page types for mainspaces pages with an explicit class specified local function getMainNamespaceClassPageType(title, args) local class = args[1] if type(class) == 'string' then -- Put in lower case so e.g. "na" and "NA" will both match class = mw.ustring.lower(class) end local arg = lookUpNamespaceArg(args, cfg.na) if arg == false then -- don't check for this class if it is specifically disallowed return nil end if cfg.naAliases[class] then if type(arg) == 'string' then return arg else return cfg.naDefault end else return nil end end -- Get page type specified by an explicit namespace argument. local function getNamespaceArgPageType(title, args) local namespaceArg = getNamespaceArg(title, args) if namespaceArg == true then -- Namespace has been explicitly enabled, so return the default for -- this namespace return getExplicitPageType(title) elseif namespaceArg == false then -- Namespace has been explicitly disabled return getDefaultPageType(args) elseif namespaceArg then -- This namespaces uses custom text return namespaceArg else return nil end end -- Get page type not specified or detected by other means local function getOtherPageType(title, args) -- Whether the title is in the set of default active namespaces which are looked up in cfg.pagetypes. local isInDefaultActiveNamespace = false local defaultNamespacesKey = args[cfg.defaultns] if defaultNamespacesKey == cfg.defaultnsAll then isInDefaultActiveNamespace = true else local defaultNamespaces if defaultNamespacesKey == cfg.defaultnsExtended then defaultNamespaces = cfg.extendedNamespaces elseif defaultNamespacesKey == cfg.defaultnsNone then defaultNamespaces = {} else defaultNamespaces = cfg.defaultNamespaces end isInDefaultActiveNamespace = defaultNamespaces[title.namespace] end if isInDefaultActiveNamespace then return getExplicitPageType(title) else return getDefaultPageType(args) end end function p._main(args) local title if args.page then title = mw.title.new(args.page) else title = mw.title.getCurrentTitle() end if title and not yesno(args.talk, true) and args[cfg.defaultns] ~= cfg.defaultnsAll then title = title.subjectPageTitle end local pageType = detectRedirects(title, args) or nonExistent(title, args) or parseContent(title, args, { {'softredirect', cfg.softRedirect, cfg.softRedirectDefault}, {'setindex', cfg.sia, cfg.siaDefault, true}, {'disambiguation', cfg.dab, cfg.dabDefault, true}, {'rfd', cfg.rfd, cfg.rfdDefault}, }) or (title.namespace == 0 and getMainNamespaceClassPageType(title, args)) or getNamespaceArgPageType(title, args) or getOtherPageType(title, args) if yesno(args.plural, false) then pageType = pluralize(pageType) end if yesno(args.caps, false) then pageType = capitalize(pageType) end return pageType end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) return p._main(args) end return p nqu0kvn2uc9jqptetkmoluzmahcxzzp 117051 117050 2026-07-16T11:39:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype]] 117050 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- This meta-module which automatically detects namespaces, and allows -- -- for a great deal of customisation. It can easily be ported to other -- -- wikis by changing the values in the [[Module:Pagetype/config]]. -- -- -- -------------------------------------------------------------------------------- -- Load config. local cfg = mw.loadData('Module:Pagetype/config') -- Load required modules. local yesno = require('Module:Yesno') local p = {} -- Look up a namespace argument in the args table. local function lookUpNamespaceArg(args, key) local arg = args[key] -- Convert "yes", "1" etc. to true, "no", "0" etc. to false, and leave -- other values the same. return yesno(arg, arg) end -- Append multiple values to an array local function appendMultiple(target, source) for _, value in ipairs(source) do table.insert(target, value) end end -- Get argument keys for a title's namespace local function getNamespaceArgKeys(title) local nsInfo = mw.site.namespaces[title.namespace] local customAliases = cfg.customNamespaceAliases[title.namespace] or {} local keys = {} if nsInfo.name ~= '' then table.insert(keys, nsInfo.name) end if nsInfo.canonicalName ~= nsInfo.name and nsInfo.canonicalName ~= '' then table.insert(keys, nsInfo.canonicalName) end appendMultiple(keys, nsInfo.aliases) appendMultiple(keys, customAliases) return keys end -- Get the argument for a title's namespace, if it was specified in the args table. local function getNamespaceArg(title, args) if title.isTalkPage then return lookUpNamespaceArg(args, cfg.talk) end for _, key in ipairs(getNamespaceArgKeys(title)) do local arg = lookUpNamespaceArg(args, mw.ustring.lower(key)) if arg ~= nil then return arg end end return nil end -- Look up a page type specific to the title's namespace local function getExplicitPageType(title) if title.isTalkPage then return cfg.talkDefault else return cfg.pagetypes[title.namespace] end end -- Get a default page type that is not specific to the title's namespace local function getDefaultPageType(args) local other = lookUpNamespaceArg(args, cfg.other) if type(other) == 'string' then return other else return cfg.otherDefault end end local function detectRedirects(title, args) local redirect = lookUpNamespaceArg(args, cfg.redirect) if redirect == false then -- Don't detect redirects if they have been specifically disallowed. return nil end -- Allow custom values for redirects. if not title.isRedirect then return nil elseif type(redirect) == 'string' then return redirect else return cfg.redirectDefault end end local function capitalize(pageType) local first = mw.ustring.sub(pageType, 1, 1) local rest = mw.ustring.sub(pageType, 2) return mw.ustring.upper(first) .. rest end local function pluralize(pageType) if cfg.irregularPlurals[pageType] then return cfg.irregularPlurals[pageType] else return pageType .. cfg.plural -- often 's' end end local function parseContent(title, args, optionsList) if title.namespace==828 and title.subpageText~='doc' -- don't detect modules or not title.exists -- can't check unless page exists then return nil end local content = title:getContent() if content == nil then return nil end local templates -- lazily evaluated for _, options in next, optionsList do local list, parameter, default, articleOnly = unpack(options, 1, 4) if not articleOnly or title.namespace==0 then -- only check for templates if we should... local out = lookUpNamespaceArg(args, parameter) if type(out) == "string" or (out ~= false and default) then -- ...and if we actually have anything to say about them if not templates then templates = {} -- do our delayed evaluation now that we are required to content = require('Module:Wikitext Parsing').PrepareText(content) -- disregard templates which do not have any affect for template in string.gmatch(content, "{{%s*([^|}]-)%s*[|}]") do templates[#templates+1] = capitalize(template) end end local wantedTemplates = mw.loadData('Module:Pagetype/' .. list) local templateFound = false for _, template in next, templates do if wantedTemplates[template] then templateFound = true break end end if templateFound then if type(out)=='string' then return out elseif out ~= false and default then return default end end end end end end -- Find pages which do not exist local function nonExistent(title, args) local arg = lookUpNamespaceArg(args, cfg.ne) if arg == false then return nil end local exists = false if title.exists then -- not an article if it does not exist exists = true elseif title.namespace==8 and mw.message.new(title.text):exists() then exists = true elseif title.namespace==6 and title.fileExists then exists = true end if not exists then if type(arg) == 'string' then return arg else return cfg.naDefault end end end -- Get page types for mainspaces pages with an explicit class specified local function getMainNamespaceClassPageType(title, args) local class = args[1] if type(class) == 'string' then -- Put in lower case so e.g. "na" and "NA" will both match class = mw.ustring.lower(class) end local arg = lookUpNamespaceArg(args, cfg.na) if arg == false then -- don't check for this class if it is specifically disallowed return nil end if cfg.naAliases[class] then if type(arg) == 'string' then return arg else return cfg.naDefault end else return nil end end -- Get page type specified by an explicit namespace argument. local function getNamespaceArgPageType(title, args) local namespaceArg = getNamespaceArg(title, args) if namespaceArg == true then -- Namespace has been explicitly enabled, so return the default for -- this namespace return getExplicitPageType(title) elseif namespaceArg == false then -- Namespace has been explicitly disabled return getDefaultPageType(args) elseif namespaceArg then -- This namespaces uses custom text return namespaceArg else return nil end end -- Get page type not specified or detected by other means local function getOtherPageType(title, args) -- Whether the title is in the set of default active namespaces which are looked up in cfg.pagetypes. local isInDefaultActiveNamespace = false local defaultNamespacesKey = args[cfg.defaultns] if defaultNamespacesKey == cfg.defaultnsAll then isInDefaultActiveNamespace = true else local defaultNamespaces if defaultNamespacesKey == cfg.defaultnsExtended then defaultNamespaces = cfg.extendedNamespaces elseif defaultNamespacesKey == cfg.defaultnsNone then defaultNamespaces = {} else defaultNamespaces = cfg.defaultNamespaces end isInDefaultActiveNamespace = defaultNamespaces[title.namespace] end if isInDefaultActiveNamespace then return getExplicitPageType(title) else return getDefaultPageType(args) end end function p._main(args) local title if args.page then title = mw.title.new(args.page) else title = mw.title.getCurrentTitle() end if title and not yesno(args.talk, true) and args[cfg.defaultns] ~= cfg.defaultnsAll then title = title.subjectPageTitle end local pageType = detectRedirects(title, args) or nonExistent(title, args) or parseContent(title, args, { {'softredirect', cfg.softRedirect, cfg.softRedirectDefault}, {'setindex', cfg.sia, cfg.siaDefault, true}, {'disambiguation', cfg.dab, cfg.dabDefault, true}, {'rfd', cfg.rfd, cfg.rfdDefault}, }) or (title.namespace == 0 and getMainNamespaceClassPageType(title, args)) or getNamespaceArgPageType(title, args) or getOtherPageType(title, args) if yesno(args.plural, false) then pageType = pluralize(pageType) end if yesno(args.caps, false) then pageType = capitalize(pageType) end return pageType end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) return p._main(args) end return p nqu0kvn2uc9jqptetkmoluzmahcxzzp Module:Pagetype/config 828 12891 117052 109966 2026-04-25T00:17:56Z en>Anomie 0 + MOS and Event namespaces 117052 Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Pagetype configuration data -- -- This page holds localisation and configuration data for Module:Pagetype. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -- This table holds the default page types for each namespace. Keys to this -- table should be integers that can be used as keys to mw.site.namespaces. cfg.pagetypes = { [0] = 'article', -- Main namespace [2] = 'user page', [4] = 'project page', [6] = 'file', [8] = 'interface page', -- MediaWiki namespace [10] = 'template', [12] = 'help page', [14] = 'category', [100] = 'portal', [118] = 'draft', [126] = 'MOS page', [710] = 'Timed Text page', [828] = 'module', [1728] = 'event page', [2300] = 'gadget', [2302] = 'gadget definition', [-1] = 'special page', [-2] = 'file', -- Media namespace } -- This table holds the namespaces to be looked up from cfg.pagetypes by -- default. cfg.defaultNamespaces = { [0] = true, -- main [6] = true, -- file [10] = true, -- template [14] = true, -- category [828] = true, -- module } -- This table holds the namespaces to be looked up from cfg.pagetypes if -- cfg.defaultnsExtended is set. cfg.extendedNamespaces = { [0] = true, -- main [2] = true, -- user [4] = true, -- project [6] = true, -- file [8] = true, -- mediawiki [10] = true, -- template [12] = true, -- help [14] = true, -- category [100] = true, -- portal [118] = true, -- draft [828] = true, -- module } -- This table holds custom aliases for each namespace. cfg.customNamespaceAliases = { [0] = {'main'}, } -- The parameter name to set which default namespace values to be looked up from -- cfg.pagetypes. cfg.defaultns = 'defaultns' -- The value of cfg.defaultns to set all namespaces, including talk. cfg.defaultnsAll = 'all' -- The value of cfg.defaultns to set the namespaces listed in -- cfg.extendedNamespaces cfg.defaultnsExtended = 'extended' -- The value of cfg.defaultns to set no default namespaces. cfg.defaultnsNone = 'none' -- The parameter name to use for talk pages. cfg.talk = 'talk' -- The default value for talk pages. cfg.talkDefault = 'talk page' -- The parameter name to use for disambiguation pages page. cfg.dab = 'dab' -- The parameter name to use for non-existent pages. cfg.ne = 'nonexistent' cfg.neDefault = 'page' cfg.softRedirect = 'soft_redirect' cfg.softRedirectDefault = 'redirect' cfg.sia = 'sia' cfg.siaDefault = 'article' cfg.rfd = 'redirect' cfg.rfdDefault = 'redirect' -- This table holds the different possible aliases for disambiguation-class -- pages. These should be lower-case. cfg.dabAliases = { ['disambiguation'] = true, ['disambig'] = true, ['disamb'] = true, ['dab'] = true, } -- The default value for disambiguation pages. cfg.dabDefault = 'page' -- The parameter name to use for N/A-class page. cfg.na = 'na' -- This table holds the different possible aliases for N/A-class pages. These -- should be lower-case. cfg.naAliases = { ['na'] = true, ['n/a'] = true, } -- The default value for N/A-class pages. cfg.naDefault = 'page' -- The parameter name to use for redirects. cfg.redirect = 'redirect' -- The default value to use for redirects. cfg.redirectDefault = 'redirect' -- The parameter name for undefined namespaces. cfg.other = 'other' -- The value used if the module detects an undefined namespace. cfg.otherDefault = 'page' -- The usual suffix denoting a plural. cfg.plural = 's' -- This table holds plurals not formed by a simple suffix. cfg.irregularPlurals = { ["category"] = "categories" } -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line dbot8rq8sjl2bypo7kiymiyo4gxz08i 117053 117052 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/config]] 117052 Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Pagetype configuration data -- -- This page holds localisation and configuration data for Module:Pagetype. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -- This table holds the default page types for each namespace. Keys to this -- table should be integers that can be used as keys to mw.site.namespaces. cfg.pagetypes = { [0] = 'article', -- Main namespace [2] = 'user page', [4] = 'project page', [6] = 'file', [8] = 'interface page', -- MediaWiki namespace [10] = 'template', [12] = 'help page', [14] = 'category', [100] = 'portal', [118] = 'draft', [126] = 'MOS page', [710] = 'Timed Text page', [828] = 'module', [1728] = 'event page', [2300] = 'gadget', [2302] = 'gadget definition', [-1] = 'special page', [-2] = 'file', -- Media namespace } -- This table holds the namespaces to be looked up from cfg.pagetypes by -- default. cfg.defaultNamespaces = { [0] = true, -- main [6] = true, -- file [10] = true, -- template [14] = true, -- category [828] = true, -- module } -- This table holds the namespaces to be looked up from cfg.pagetypes if -- cfg.defaultnsExtended is set. cfg.extendedNamespaces = { [0] = true, -- main [2] = true, -- user [4] = true, -- project [6] = true, -- file [8] = true, -- mediawiki [10] = true, -- template [12] = true, -- help [14] = true, -- category [100] = true, -- portal [118] = true, -- draft [828] = true, -- module } -- This table holds custom aliases for each namespace. cfg.customNamespaceAliases = { [0] = {'main'}, } -- The parameter name to set which default namespace values to be looked up from -- cfg.pagetypes. cfg.defaultns = 'defaultns' -- The value of cfg.defaultns to set all namespaces, including talk. cfg.defaultnsAll = 'all' -- The value of cfg.defaultns to set the namespaces listed in -- cfg.extendedNamespaces cfg.defaultnsExtended = 'extended' -- The value of cfg.defaultns to set no default namespaces. cfg.defaultnsNone = 'none' -- The parameter name to use for talk pages. cfg.talk = 'talk' -- The default value for talk pages. cfg.talkDefault = 'talk page' -- The parameter name to use for disambiguation pages page. cfg.dab = 'dab' -- The parameter name to use for non-existent pages. cfg.ne = 'nonexistent' cfg.neDefault = 'page' cfg.softRedirect = 'soft_redirect' cfg.softRedirectDefault = 'redirect' cfg.sia = 'sia' cfg.siaDefault = 'article' cfg.rfd = 'redirect' cfg.rfdDefault = 'redirect' -- This table holds the different possible aliases for disambiguation-class -- pages. These should be lower-case. cfg.dabAliases = { ['disambiguation'] = true, ['disambig'] = true, ['disamb'] = true, ['dab'] = true, } -- The default value for disambiguation pages. cfg.dabDefault = 'page' -- The parameter name to use for N/A-class page. cfg.na = 'na' -- This table holds the different possible aliases for N/A-class pages. These -- should be lower-case. cfg.naAliases = { ['na'] = true, ['n/a'] = true, } -- The default value for N/A-class pages. cfg.naDefault = 'page' -- The parameter name to use for redirects. cfg.redirect = 'redirect' -- The default value to use for redirects. cfg.redirectDefault = 'redirect' -- The parameter name for undefined namespaces. cfg.other = 'other' -- The value used if the module detects an undefined namespace. cfg.otherDefault = 'page' -- The usual suffix denoting a plural. cfg.plural = 's' -- This table holds plurals not formed by a simple suffix. cfg.irregularPlurals = { ["category"] = "categories" } -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line dbot8rq8sjl2bypo7kiymiyo4gxz08i Template:Short description 10 12893 116955 43103 2026-02-04T19:08:44Z en>Fayenatic london 0 edit requested on talk page by [[user:GhostInTheMachine]] 116955 wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|{{SHORTDESC:|{{{2|}}}}}<nowiki/><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> kneamzwadjt95irj9gnv7bocpjuw4uz 116956 116955 2026-07-16T11:15:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Short_description]] 116955 wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|{{SHORTDESC:|{{{2|}}}}}<nowiki/><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> kneamzwadjt95irj9gnv7bocpjuw4uz 116993 116956 2026-07-16T11:27:54Z Tumbuka Arch 6863 116993 wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|{{SHORTDESC:|{{{2|}}}}}<nowiki/><!--Kuŵikapo kuti paleke kuŵa malo ghambura kukhumbikwa para kwagwiliskirika ntchito na mizere yakulondezgana-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Masamba ghakupambaniska|{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Yambani kulondezga -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> pkwovs9v3xv6la6wx4f2s7enwjknviz Module:EditAtWikidata 828 12919 116888 33314 2025-10-14T19:53:05Z en>Sdkb 0 Undid revision [[Special:Diff/1316834471|1316834471]] by [[Special:Contributions/Anomie|Anomie]] ([[User talk:Anomie|talk]]) It's now appropriately licensed as PD-simple at Commons. See [[User_talk:Sdkb#File:OOUI_icon_userAdd-ltr.svg]]. 33313 Scribunto text/plain -- Module to display an icon with a tooltip such as "Edit this at Wikidata". -- Icon is linked to the Wikidata entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it can be coded not to display the message. -- The qid of a Wikidata entry can optionally be supplied for testing outside the article. -- Usage: -- {{#invoke:EditAtWikidata|showMessage|local_parameter}} -- {{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}} local p = {} local i18n = { ["message"] = "Edit this at Wikidata" } local function trimToNil(text) -- Return trimmed non-empty text, or nil. if type(text) == 'string' then return text:match('(%S.-)%s*$') end end function p._showMessage(args) local local_parm = trimToNil(args[1]) if local_parm then return "" end -- Parameter qid=x specifies the Wikidata ID for the article. -- This is not normally used except for testing outside the article. local qid = trimToNil(args.qid) or mw.wikibase.getEntityIdForCurrentPage() if qid and mw.wikibase.entityExists(qid) then -- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. local anchor = trimToNil(args.pid) -- Parameter nbsp replaces the leading space with &nbsp; local space = trimToNil(args.nbsp) and "&nbsp;" or " " return space .. "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px" .. "|alt=" .. i18n.message .. "|link=https://www.wikidata.org/wiki/" .. qid .. (anchor and ("#" .. anchor) or "") .. "|class=noprint" .. "|" .. i18n.message .. "]]" end return "" end function p.showMessage(frame) return p._showMessage(frame.args) end return p hod1hfo0n331jsuhscew67pebepcmju 116889 116888 2026-07-16T10:58:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:EditAtWikidata]] 33313 Scribunto text/plain -- Module to display an icon with a tooltip such as "Edit this at Wikidata". -- Icon is linked to the Wikidata entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it can be coded not to display the message. -- The qid of a Wikidata entry can optionally be supplied for testing outside the article. -- Usage: -- {{#invoke:EditAtWikidata|showMessage|local_parameter}} -- {{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}} local p = {} local i18n = { ["message"] = "Edit this at Wikidata" } local function trimToNil(text) -- Return trimmed non-empty text, or nil. if type(text) == 'string' then return text:match('(%S.-)%s*$') end end function p._showMessage(args) local local_parm = trimToNil(args[1]) if local_parm then return "" end -- Parameter qid=x specifies the Wikidata ID for the article. -- This is not normally used except for testing outside the article. local qid = trimToNil(args.qid) or mw.wikibase.getEntityIdForCurrentPage() if qid and mw.wikibase.entityExists(qid) then -- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. local anchor = trimToNil(args.pid) -- Parameter nbsp replaces the leading space with &nbsp; local space = trimToNil(args.nbsp) and "&nbsp;" or " " return space .. "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px" .. "|alt=" .. i18n.message .. "|link=https://www.wikidata.org/wiki/" .. qid .. (anchor and ("#" .. anchor) or "") .. "|class=noprint" .. "|" .. i18n.message .. "]]" end return "" end function p.showMessage(frame) return p._showMessage(frame.args) end return p hod1hfo0n331jsuhscew67pebepcmju Module:If preview 828 12926 117082 33330 2024-09-09T19:58:02Z en>MSGJ 0 requested enhancements by [[User:Awesome Aasim]] 117082 Scribunto text/plain local p = {} local getArgs = require("Module:Arguments").getArgs local yn = require("Module:Yesno") local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) local args = getArgs(frame) if cfg.preview then return args[1] or '' else return args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end if yn(args['consolewarning']) then mw.addWarning(args[1] or cfg.missing_warning) end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. ]] -- function p.warning(frame) -- mw.addWarning(frame.args[1] or cfg.missing_warning) -- return p._warning(frame.args) -- end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) local args = getArgs(frame) return p._warning(args) end --[[ Does both mw.addWarning and preview warning ]] function p.warn(text) if text == nil or text == "" then return "" end mw.addWarning(text) return p._warning({text}) end --[[ Console warning ]] function p.consoleWarning(frame) local args = getArgs(frame) mw.addWarning(args[1] or cfg.missing_warning) return '' end return p 9xxiwh6yksz0t17svyd7nlq7rj3f5rk 117083 117082 2026-07-16T11:39:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:If_preview]] 117082 Scribunto text/plain local p = {} local getArgs = require("Module:Arguments").getArgs local yn = require("Module:Yesno") local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) local args = getArgs(frame) if cfg.preview then return args[1] or '' else return args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end if yn(args['consolewarning']) then mw.addWarning(args[1] or cfg.missing_warning) end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. ]] -- function p.warning(frame) -- mw.addWarning(frame.args[1] or cfg.missing_warning) -- return p._warning(frame.args) -- end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) local args = getArgs(frame) return p._warning(args) end --[[ Does both mw.addWarning and preview warning ]] function p.warn(text) if text == nil or text == "" then return "" end mw.addWarning(text) return p._warning({text}) end --[[ Console warning ]] function p.consoleWarning(frame) local args = getArgs(frame) mw.addWarning(args[1] or cfg.missing_warning) return '' end return p 9xxiwh6yksz0t17svyd7nlq7rj3f5rk Module:If preview/styles.css 828 12928 117084 33334 2026-05-11T21:46:11Z en>Izno 0 + 117084 sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: var(--color-error, red); } /* The templatestyles causes an 'empty' span between hatnotes */ .preview-warning + span.mw-empty-elt + .preview-warning, /* remove this selector when Parsoid is the only parser, see also [[phab:T200206]] */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } f1m5cy9ikp9xcry3obpmw1xl2aem71y 117085 117084 2026-07-16T11:39:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:If_preview/styles.css]] 117084 sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: var(--color-error, red); } /* The templatestyles causes an 'empty' span between hatnotes */ .preview-warning + span.mw-empty-elt + .preview-warning, /* remove this selector when Parsoid is the only parser, see also [[phab:T200206]] */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } f1m5cy9ikp9xcry3obpmw1xl2aem71y Module:Hatnote/styles.css 828 12947 116890 114951 2026-05-11T21:45:51Z en>Izno 0 selector 116890 sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles causes an 'empty' span between hatnotes */ .hatnote + span.mw-empty-elt + .hatnote, /* remove this selector when Parsoid is the only parser, see also [[phab:T200206]] */ .hatnote + link + .hatnote { margin-top: -0.5em; } @media print { body.ns-0 .hatnote { display: none !important; } } 8oift3eve95te8chs4adr5fpl4pmpmd 116891 116890 2026-07-16T10:58:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Hatnote/styles.css]] 116890 sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles causes an 'empty' span between hatnotes */ .hatnote + span.mw-empty-elt + .hatnote, /* remove this selector when Parsoid is the only parser, see also [[phab:T200206]] */ .hatnote + link + .hatnote { margin-top: -0.5em; } @media print { body.ns-0 .hatnote { display: none !important; } } 8oift3eve95te8chs4adr5fpl4pmpmd Module:Navbar/configuration 828 12951 116696 68454 2026-06-11T17:30:52Z en>MSGJ 0 this_box -> box_text 116696 Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['box_text'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } itag4bw69ebqpc0fw4hgkr4pkizazgr 116697 116696 2026-07-15T17:38:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Navbar/configuration]] 116696 Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['box_text'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } itag4bw69ebqpc0fw4hgkr4pkizazgr Module:Navbox 828 12953 116751 111735 2026-02-24T17:16:57Z en>Epicgenius 0 Undoing changes for now - this is causing errors, per [[Special:PermanentLink/1340234983#Navbox:American Revolutionary War...]] 116751 Scribunto text/plain require('strict') local p = {} local cfg = mw.loadData('Module:Navbox/configuration') local inArray = require("Module:TableTools").inArray local getArgs -- lazily initialized local hiding_templatestyles = {} -- global passthrough variables local passthrough = { [cfg.arg.above]=true,[cfg.arg.aboveclass]=true,[cfg.arg.abovestyle]=true, [cfg.arg.basestyle]=true, [cfg.arg.below]=true,[cfg.arg.belowclass]=true,[cfg.arg.belowstyle]=true, [cfg.arg.bodyclass]=true, [cfg.arg.groupclass]=true, [cfg.arg.image]=true,[cfg.arg.imageclass]=true,[cfg.arg.imagestyle]=true, [cfg.arg.imageleft]=true,[cfg.arg.imageleftstyle]=true, [cfg.arg.listclass]=true, [cfg.arg.name]=true, [cfg.arg.navbar]=true, [cfg.arg.state]=true, [cfg.arg.title]=true,[cfg.arg.titleclass]=true,[cfg.arg.titlestyle]=true, argHash=true } -- helper functions local andnum = function(s, n) return string.format(cfg.arg[s .. '_and_num'], n) end local isblank = function(v) return (v or '') == '' end local function concatstrings(s) local r = table.concat(s, '') if r:match('^%s*$') then return nil end return r end local function concatstyles(s) local r = '' for _, v in ipairs(s) do v = mw.text.trim(v, "%s;") if not isblank(v) then r = r .. v .. ';' end end if isblank(r) then return nil end return r end local function getSubgroup(args, listnum, listText, prefix) local subArgs = { [cfg.arg.border] = cfg.keyword.border_subgroup, [cfg.arg.navbar] = cfg.keyword.navbar_plain, argHash = 0 } local hasSubArgs = false local subgroups_and_num = prefix and {prefix} or cfg.arg.subgroups_and_num for k, v in pairs(args) do k = tostring(k) for _, w in ipairs(subgroups_and_num) do w = string.format(w, listnum) .. "_" if (#k > #w) and (k:sub(1, #w) == w) then subArgs[k:sub(#w + 1)] = v hasSubArgs = true subArgs.argHash = subArgs.argHash + (v and #v or 0) end end end return hasSubArgs and p._navbox(subArgs) or listText end -- Main functions function p._navbox(args) if args.type == cfg.keyword.with_collapsible_groups then return p._withCollapsibleGroups(args) elseif args.type == cfg.keyword.with_columns then return p._withColumns(args) end local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item .. '\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = string.format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item .. '\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end -- extract text color from css, which is the only permitted inline CSS for the navbar local function extract_color(css_str) -- return nil because navbar takes its argument into mw.html which handles -- nil gracefully, removing the associated style attribute return mw.ustring.match(';' .. css_str .. ';', '.*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') or nil end local function renderNavBar(titleCell) if has_navbar() then local navbar = require('Module:Navbar')._navbar titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = extract_color( (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') ) }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title]) .. args.argHash) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and (mw.uri.anchorEncode(args[cfg.arg.above]) .. args.argHash) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = andnum('group', listnum) local groupstyle_and_num = andnum('groupstyle', listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1]) .. args.argHash) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = andnum('list', listnum) local listText = inArray(cfg.keyword.subgroups, args[list_and_num]) and getSubgroup(args, listnum, args[list_and_num]) or args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = andnum('liststyle', listnum) local listclass_and_num = andnum('listclass', listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if not isblank(templatestyles) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' local argHash = 0 for k, arg in pairs(args) do if type(arg) == 'string' then for marker in string.gfind(arg, strip_marker_pattern) do table.insert(hiding_templatestyles, marker) end argHash = argHash + #arg args[k] = string.gsub(arg, strip_marker_pattern, '') end end if not args.argHash then args.argHash = argHash end local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum and args[andnum('list', tonumber(listnum))] then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) .. args.argHash ) else nav:attr('aria-label', cfg.aria_label .. args.argHash) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) .. args.argHash ) else nav:attr('aria-label', cfg.aria_label .. args.argHash) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end --p._navbox function p._withCollapsibleGroups(pargs) -- table for args passed to navbox local targs = {} -- process args local passthroughLocal = { [cfg.arg.bodystyle] = true, [cfg.arg.border] = true, [cfg.arg.style] = true, } for k,v in pairs(pargs) do if k and type(k) == 'string' then if passthrough[k] or passthroughLocal[k] then targs[k] = v elseif (k:match(cfg.pattern.num)) then local n = k:match(cfg.pattern.num) local list_and_num = andnum('list', n) if ((k:match(cfg.pattern.listnum) or k:match(cfg.pattern.contentnum)) and targs[list_and_num] == nil and pargs[andnum('group', n)] == nil and pargs[andnum('sect', n)] == nil and pargs[andnum('section', n)] == nil) then targs[list_and_num] = concatstrings({ pargs[list_and_num] or '', pargs[andnum('content', n)] or '' }) if (targs[list_and_num] and inArray(cfg.keyword.subgroups, targs[list_and_num])) then targs[list_and_num] = getSubgroup(pargs, n, targs[list_and_num]) end elseif ((k:match(cfg.pattern.groupnum) or k:match(cfg.pattern.sectnum) or k:match(cfg.pattern.sectionnum)) and targs[list_and_num] == nil) then local titlestyle = concatstyles({ pargs[cfg.arg.groupstyle] or '', pargs[cfg.arg.secttitlestyle] or '', pargs[andnum('groupstyle', n)] or '', pargs[andnum('sectiontitlestyle', n)] or '' }) local liststyle = concatstyles({ pargs[cfg.arg.liststyle] or '', pargs[cfg.arg.contentstyle] or '', pargs[andnum('liststyle', n)] or '', pargs[andnum('contentstyle', n)] or '' }) local title = concatstrings({ pargs[andnum('group', n)] or '', pargs[andnum('sect', n)] or '', pargs[andnum('section', n)] or '' }) local list = concatstrings({ pargs[list_and_num] or '', pargs[andnum('content', n)] or '' }) if list and inArray(cfg.keyword.subgroups, list) then list = getSubgroup(pargs, n, list) end local abbr_and_num = andnum('abbr', n) local state = (pargs[abbr_and_num] and pargs[abbr_and_num] == pargs[cfg.arg.selected]) and cfg.keyword.state_uncollapsed or (pargs[andnum('state', n)] or cfg.keyword.state_collapsed) targs[list_and_num] =p._navbox({ cfg.keyword.border_child, [cfg.arg.navbar] = cfg.keyword.navbar_plain, [cfg.arg.state] = state, [cfg.arg.basestyle] = pargs[cfg.arg.basestyle], [cfg.arg.title] = title, [cfg.arg.titlestyle] = titlestyle, [andnum('list', 1)] = list, [cfg.arg.liststyle] = liststyle, [cfg.arg.listclass] = pargs[andnum('listclass', n)], [cfg.arg.image] = pargs[andnum('image', n)], [cfg.arg.imageleft] = pargs[andnum('imageleft', n)], [cfg.arg.listpadding] = pargs[cfg.arg.listpadding], argHash = pargs.argHash }) end end end end -- ordering of style and bodystyle targs[cfg.arg.style] = concatstyles({targs[cfg.arg.style] or '', targs[cfg.arg.bodystyle] or ''}) targs[cfg.arg.bodystyle] = nil -- child or subgroup if targs[cfg.arg.border] == nil then targs[cfg.arg.border] = pargs[1] end return p._navbox(targs) end --p._withCollapsibleGroups function p._withColumns(pargs) -- table for args passed to navbox local targs = {} -- tables of column numbers local colheadernums = {} local colnums = {} local colfooternums = {} -- process args local passthroughLocal = { [cfg.arg.evenstyle]=true, [cfg.arg.groupstyle]=true, [cfg.arg.liststyle]=true, [cfg.arg.oddstyle]=true, [cfg.arg.state]=true, } for k,v in pairs(pargs) do if passthrough[k] or passthroughLocal[k] then targs[k] = v elseif type(k) == 'string' then if k:match(cfg.pattern.listnum) then local n = k:match(cfg.pattern.listnum) targs[andnum('liststyle', n + 2)] = pargs[andnum('liststyle', n)] targs[andnum('group', n + 2)] = pargs[andnum('group', n)] targs[andnum('groupstyle', n + 2)] = pargs[andnum('groupstyle', n)] if v and inArray(cfg.keyword.subgroups, v) then targs[andnum('list', n + 2)] = getSubgroup(pargs, n, v) else targs[andnum('list', n + 2)] = v end elseif (k:match(cfg.pattern.colheadernum) and v ~= '') then table.insert(colheadernums, tonumber(k:match(cfg.pattern.colheadernum))) elseif (k:match(cfg.pattern.colnum) and v ~= '') then table.insert(colnums, tonumber(k:match(cfg.pattern.colnum))) elseif (k:match(cfg.pattern.colfooternum) and v ~= '') then table.insert(colfooternums, tonumber(k:match(cfg.pattern.colfooternum))) end end end table.sort(colheadernums) table.sort(colnums) table.sort(colfooternums) -- HTML table for list1 local coltable = mw.html.create( 'table' ):addClass('navbox-columns-table') local row, col local tablestyle = ( (#colheadernums > 0) or (not isblank(pargs[cfg.arg.fullwidth])) ) and 'width:100%' or 'width:auto; margin-left:auto; margin-right:auto' coltable:cssText(concatstyles({ 'border-spacing: 0px; text-align:left', tablestyle, pargs[cfg.arg.coltablestyle] or '' })) --- Header row --- if (#colheadernums > 0) then row = coltable:tag('tr') for k, n in ipairs(colheadernums) do col = row:tag('th'):addClass('navbox-abovebelow') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'font-weight:bold', pargs[cfg.arg.colheaderstyle] or '', pargs[andnum('colheaderstyle', n)] or '' })) col:attr('colspan', tonumber(pargs[andnum('colheadercolspan', n)])) col:wikitext(pargs[andnum('colheader', n)]) end end --- Main columns --- row = coltable:tag('tr'):css('vertical-align', 'top') for k, n in ipairs(colnums) do if k == 1 and isblank(pargs[andnum('colheader', 1)]) and isblank(pargs[andnum('colfooter', 1)]) and isblank(pargs[cfg.arg.fullwidth]) then local nopad = inArray( {'off', '0', '0em', '0px'}, mw.ustring.gsub(pargs[cfg.arg.padding] or '', '[;%%]', '')) if not nopad then row:tag('td'):wikitext('&nbsp;&nbsp;&nbsp;') :css('width', (pargs[cfg.arg.padding] or '5em')) end end col = row:tag('td'):addClass('navbox-list') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'padding:0px', pargs[cfg.arg.colstyle] or '', ((n%2 == 0) and pargs[cfg.arg.evencolstyle] or pargs[cfg.arg.oddcolstyle]) or '', pargs[andnum('colstyle', n)] or '', 'width:' .. (pargs[andnum('colwidth', n)] or pargs[cfg.arg.colwidth] or '10em') })) local wt = pargs[andnum('col', n)] if wt and inArray(cfg.keyword.subgroups, wt) then wt = getSubgroup(pargs, n, wt, cfg.arg.col_and_num) end col:tag('div'):newline():wikitext(wt):newline() end --- Footer row --- if (#colfooternums > 0) then row = coltable:tag('tr') for k, n in ipairs(colfooternums) do col = row:tag('td'):addClass('navbox-abovebelow') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'font-weight:bold', pargs[cfg.arg.colfooterstyle] or '', pargs[andnum('colfooterstyle', n)] or '' })) col:attr('colspan', tonumber(pargs[andnum('colfootercolspan', n)])) col:wikitext(pargs[andnum('colfooter', n)]) end end -- assign table to list1 targs[andnum('list', 1)] = tostring(coltable) if isblank(pargs[andnum('colheader', 1)]) and isblank(pargs[andnum('col', 1)]) and isblank(pargs[andnum('colfooter', 1)]) then targs[andnum('list', 1)] = targs[andnum('list', 1)] .. cfg.category.without_first_col end -- Other parameters targs[cfg.arg.border] = pargs[cfg.arg.border] or pargs[1] targs[cfg.arg.evenodd] = (not isblank(pargs[cfg.arg.evenodd])) and pargs[cfg.arg.evenodd] or nil targs[cfg.arg.list1padding] = '0px' targs[andnum('liststyle', 1)] = 'background:transparent;color:inherit;' targs[cfg.arg.style] = concatstyles({pargs[cfg.arg.style], pargs[cfg.arg.bodystyle]}) targs[cfg.arg.tracking] = 'no' return p._navbox(targs) end --p._withColumns -- Template entry points function p.navbox (frame, boxtype) local function readArgs(args, prefix) local function readSubgroups(element, i) if inArray(cfg.keyword.subgroups, args[prefix .. andnum(element, i)]) then for _, v in ipairs(cfg.arg.subgroups_and_num) do readArgs(args, prefix .. string.format(v, i) .. "_") end readArgs(args, prefix .. andnum('col', i) .. "_") end end -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[prefix .. cfg.arg.title] _ = args[prefix .. cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here local boxtype = args.type or cfg.keyword[boxtype] if boxtype == cfg.keyword.with_columns then for i = 1, 20 do _ = args[prefix .. andnum('colheader', i)] end for i = 1, 20 do readSubgroups('col', i) end for i = 1, 20 do _ = args[prefix .. andnum('colfooter', i)] end end for i = 1, 20 do _ = args[prefix .. andnum('group', i)] readSubgroups('list', i) end _ = args[prefix .. cfg.arg.below] end if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, {wrappers = {cfg.pattern[boxtype or 'navbox']}}) readArgs(args, "") args.argHash = nil -- we shouldn't accept argHash passed from a template args.type = args.type or cfg.keyword[boxtype] return p['_navbox'](args) end p[cfg.keyword.with_collapsible_groups] = function (frame) return p.navbox(frame, 'with_collapsible_groups') end p[cfg.keyword.with_columns] = function (frame) return p.navbox(frame, 'with_columns') end return p 1s4hl193ornydh8zrrhga8nr1v6arn9 116752 116751 2026-07-15T18:13:32Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Navbox]] 116751 Scribunto text/plain require('strict') local p = {} local cfg = mw.loadData('Module:Navbox/configuration') local inArray = require("Module:TableTools").inArray local getArgs -- lazily initialized local hiding_templatestyles = {} -- global passthrough variables local passthrough = { [cfg.arg.above]=true,[cfg.arg.aboveclass]=true,[cfg.arg.abovestyle]=true, [cfg.arg.basestyle]=true, [cfg.arg.below]=true,[cfg.arg.belowclass]=true,[cfg.arg.belowstyle]=true, [cfg.arg.bodyclass]=true, [cfg.arg.groupclass]=true, [cfg.arg.image]=true,[cfg.arg.imageclass]=true,[cfg.arg.imagestyle]=true, [cfg.arg.imageleft]=true,[cfg.arg.imageleftstyle]=true, [cfg.arg.listclass]=true, [cfg.arg.name]=true, [cfg.arg.navbar]=true, [cfg.arg.state]=true, [cfg.arg.title]=true,[cfg.arg.titleclass]=true,[cfg.arg.titlestyle]=true, argHash=true } -- helper functions local andnum = function(s, n) return string.format(cfg.arg[s .. '_and_num'], n) end local isblank = function(v) return (v or '') == '' end local function concatstrings(s) local r = table.concat(s, '') if r:match('^%s*$') then return nil end return r end local function concatstyles(s) local r = '' for _, v in ipairs(s) do v = mw.text.trim(v, "%s;") if not isblank(v) then r = r .. v .. ';' end end if isblank(r) then return nil end return r end local function getSubgroup(args, listnum, listText, prefix) local subArgs = { [cfg.arg.border] = cfg.keyword.border_subgroup, [cfg.arg.navbar] = cfg.keyword.navbar_plain, argHash = 0 } local hasSubArgs = false local subgroups_and_num = prefix and {prefix} or cfg.arg.subgroups_and_num for k, v in pairs(args) do k = tostring(k) for _, w in ipairs(subgroups_and_num) do w = string.format(w, listnum) .. "_" if (#k > #w) and (k:sub(1, #w) == w) then subArgs[k:sub(#w + 1)] = v hasSubArgs = true subArgs.argHash = subArgs.argHash + (v and #v or 0) end end end return hasSubArgs and p._navbox(subArgs) or listText end -- Main functions function p._navbox(args) if args.type == cfg.keyword.with_collapsible_groups then return p._withCollapsibleGroups(args) elseif args.type == cfg.keyword.with_columns then return p._withColumns(args) end local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item .. '\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = string.format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item .. '\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end -- extract text color from css, which is the only permitted inline CSS for the navbar local function extract_color(css_str) -- return nil because navbar takes its argument into mw.html which handles -- nil gracefully, removing the associated style attribute return mw.ustring.match(';' .. css_str .. ';', '.*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') or nil end local function renderNavBar(titleCell) if has_navbar() then local navbar = require('Module:Navbar')._navbar titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = extract_color( (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') ) }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title]) .. args.argHash) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and (mw.uri.anchorEncode(args[cfg.arg.above]) .. args.argHash) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = andnum('group', listnum) local groupstyle_and_num = andnum('groupstyle', listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1]) .. args.argHash) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = andnum('list', listnum) local listText = inArray(cfg.keyword.subgroups, args[list_and_num]) and getSubgroup(args, listnum, args[list_and_num]) or args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = andnum('liststyle', listnum) local listclass_and_num = andnum('listclass', listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if not isblank(templatestyles) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' local argHash = 0 for k, arg in pairs(args) do if type(arg) == 'string' then for marker in string.gfind(arg, strip_marker_pattern) do table.insert(hiding_templatestyles, marker) end argHash = argHash + #arg args[k] = string.gsub(arg, strip_marker_pattern, '') end end if not args.argHash then args.argHash = argHash end local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum and args[andnum('list', tonumber(listnum))] then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) .. args.argHash ) else nav:attr('aria-label', cfg.aria_label .. args.argHash) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) .. args.argHash ) else nav:attr('aria-label', cfg.aria_label .. args.argHash) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end --p._navbox function p._withCollapsibleGroups(pargs) -- table for args passed to navbox local targs = {} -- process args local passthroughLocal = { [cfg.arg.bodystyle] = true, [cfg.arg.border] = true, [cfg.arg.style] = true, } for k,v in pairs(pargs) do if k and type(k) == 'string' then if passthrough[k] or passthroughLocal[k] then targs[k] = v elseif (k:match(cfg.pattern.num)) then local n = k:match(cfg.pattern.num) local list_and_num = andnum('list', n) if ((k:match(cfg.pattern.listnum) or k:match(cfg.pattern.contentnum)) and targs[list_and_num] == nil and pargs[andnum('group', n)] == nil and pargs[andnum('sect', n)] == nil and pargs[andnum('section', n)] == nil) then targs[list_and_num] = concatstrings({ pargs[list_and_num] or '', pargs[andnum('content', n)] or '' }) if (targs[list_and_num] and inArray(cfg.keyword.subgroups, targs[list_and_num])) then targs[list_and_num] = getSubgroup(pargs, n, targs[list_and_num]) end elseif ((k:match(cfg.pattern.groupnum) or k:match(cfg.pattern.sectnum) or k:match(cfg.pattern.sectionnum)) and targs[list_and_num] == nil) then local titlestyle = concatstyles({ pargs[cfg.arg.groupstyle] or '', pargs[cfg.arg.secttitlestyle] or '', pargs[andnum('groupstyle', n)] or '', pargs[andnum('sectiontitlestyle', n)] or '' }) local liststyle = concatstyles({ pargs[cfg.arg.liststyle] or '', pargs[cfg.arg.contentstyle] or '', pargs[andnum('liststyle', n)] or '', pargs[andnum('contentstyle', n)] or '' }) local title = concatstrings({ pargs[andnum('group', n)] or '', pargs[andnum('sect', n)] or '', pargs[andnum('section', n)] or '' }) local list = concatstrings({ pargs[list_and_num] or '', pargs[andnum('content', n)] or '' }) if list and inArray(cfg.keyword.subgroups, list) then list = getSubgroup(pargs, n, list) end local abbr_and_num = andnum('abbr', n) local state = (pargs[abbr_and_num] and pargs[abbr_and_num] == pargs[cfg.arg.selected]) and cfg.keyword.state_uncollapsed or (pargs[andnum('state', n)] or cfg.keyword.state_collapsed) targs[list_and_num] =p._navbox({ cfg.keyword.border_child, [cfg.arg.navbar] = cfg.keyword.navbar_plain, [cfg.arg.state] = state, [cfg.arg.basestyle] = pargs[cfg.arg.basestyle], [cfg.arg.title] = title, [cfg.arg.titlestyle] = titlestyle, [andnum('list', 1)] = list, [cfg.arg.liststyle] = liststyle, [cfg.arg.listclass] = pargs[andnum('listclass', n)], [cfg.arg.image] = pargs[andnum('image', n)], [cfg.arg.imageleft] = pargs[andnum('imageleft', n)], [cfg.arg.listpadding] = pargs[cfg.arg.listpadding], argHash = pargs.argHash }) end end end end -- ordering of style and bodystyle targs[cfg.arg.style] = concatstyles({targs[cfg.arg.style] or '', targs[cfg.arg.bodystyle] or ''}) targs[cfg.arg.bodystyle] = nil -- child or subgroup if targs[cfg.arg.border] == nil then targs[cfg.arg.border] = pargs[1] end return p._navbox(targs) end --p._withCollapsibleGroups function p._withColumns(pargs) -- table for args passed to navbox local targs = {} -- tables of column numbers local colheadernums = {} local colnums = {} local colfooternums = {} -- process args local passthroughLocal = { [cfg.arg.evenstyle]=true, [cfg.arg.groupstyle]=true, [cfg.arg.liststyle]=true, [cfg.arg.oddstyle]=true, [cfg.arg.state]=true, } for k,v in pairs(pargs) do if passthrough[k] or passthroughLocal[k] then targs[k] = v elseif type(k) == 'string' then if k:match(cfg.pattern.listnum) then local n = k:match(cfg.pattern.listnum) targs[andnum('liststyle', n + 2)] = pargs[andnum('liststyle', n)] targs[andnum('group', n + 2)] = pargs[andnum('group', n)] targs[andnum('groupstyle', n + 2)] = pargs[andnum('groupstyle', n)] if v and inArray(cfg.keyword.subgroups, v) then targs[andnum('list', n + 2)] = getSubgroup(pargs, n, v) else targs[andnum('list', n + 2)] = v end elseif (k:match(cfg.pattern.colheadernum) and v ~= '') then table.insert(colheadernums, tonumber(k:match(cfg.pattern.colheadernum))) elseif (k:match(cfg.pattern.colnum) and v ~= '') then table.insert(colnums, tonumber(k:match(cfg.pattern.colnum))) elseif (k:match(cfg.pattern.colfooternum) and v ~= '') then table.insert(colfooternums, tonumber(k:match(cfg.pattern.colfooternum))) end end end table.sort(colheadernums) table.sort(colnums) table.sort(colfooternums) -- HTML table for list1 local coltable = mw.html.create( 'table' ):addClass('navbox-columns-table') local row, col local tablestyle = ( (#colheadernums > 0) or (not isblank(pargs[cfg.arg.fullwidth])) ) and 'width:100%' or 'width:auto; margin-left:auto; margin-right:auto' coltable:cssText(concatstyles({ 'border-spacing: 0px; text-align:left', tablestyle, pargs[cfg.arg.coltablestyle] or '' })) --- Header row --- if (#colheadernums > 0) then row = coltable:tag('tr') for k, n in ipairs(colheadernums) do col = row:tag('th'):addClass('navbox-abovebelow') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'font-weight:bold', pargs[cfg.arg.colheaderstyle] or '', pargs[andnum('colheaderstyle', n)] or '' })) col:attr('colspan', tonumber(pargs[andnum('colheadercolspan', n)])) col:wikitext(pargs[andnum('colheader', n)]) end end --- Main columns --- row = coltable:tag('tr'):css('vertical-align', 'top') for k, n in ipairs(colnums) do if k == 1 and isblank(pargs[andnum('colheader', 1)]) and isblank(pargs[andnum('colfooter', 1)]) and isblank(pargs[cfg.arg.fullwidth]) then local nopad = inArray( {'off', '0', '0em', '0px'}, mw.ustring.gsub(pargs[cfg.arg.padding] or '', '[;%%]', '')) if not nopad then row:tag('td'):wikitext('&nbsp;&nbsp;&nbsp;') :css('width', (pargs[cfg.arg.padding] or '5em')) end end col = row:tag('td'):addClass('navbox-list') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'padding:0px', pargs[cfg.arg.colstyle] or '', ((n%2 == 0) and pargs[cfg.arg.evencolstyle] or pargs[cfg.arg.oddcolstyle]) or '', pargs[andnum('colstyle', n)] or '', 'width:' .. (pargs[andnum('colwidth', n)] or pargs[cfg.arg.colwidth] or '10em') })) local wt = pargs[andnum('col', n)] if wt and inArray(cfg.keyword.subgroups, wt) then wt = getSubgroup(pargs, n, wt, cfg.arg.col_and_num) end col:tag('div'):newline():wikitext(wt):newline() end --- Footer row --- if (#colfooternums > 0) then row = coltable:tag('tr') for k, n in ipairs(colfooternums) do col = row:tag('td'):addClass('navbox-abovebelow') col:cssText(concatstyles({ (k > 1) and 'border-left:2px solid #fdfdfd' or '', 'font-weight:bold', pargs[cfg.arg.colfooterstyle] or '', pargs[andnum('colfooterstyle', n)] or '' })) col:attr('colspan', tonumber(pargs[andnum('colfootercolspan', n)])) col:wikitext(pargs[andnum('colfooter', n)]) end end -- assign table to list1 targs[andnum('list', 1)] = tostring(coltable) if isblank(pargs[andnum('colheader', 1)]) and isblank(pargs[andnum('col', 1)]) and isblank(pargs[andnum('colfooter', 1)]) then targs[andnum('list', 1)] = targs[andnum('list', 1)] .. cfg.category.without_first_col end -- Other parameters targs[cfg.arg.border] = pargs[cfg.arg.border] or pargs[1] targs[cfg.arg.evenodd] = (not isblank(pargs[cfg.arg.evenodd])) and pargs[cfg.arg.evenodd] or nil targs[cfg.arg.list1padding] = '0px' targs[andnum('liststyle', 1)] = 'background:transparent;color:inherit;' targs[cfg.arg.style] = concatstyles({pargs[cfg.arg.style], pargs[cfg.arg.bodystyle]}) targs[cfg.arg.tracking] = 'no' return p._navbox(targs) end --p._withColumns -- Template entry points function p.navbox (frame, boxtype) local function readArgs(args, prefix) local function readSubgroups(element, i) if inArray(cfg.keyword.subgroups, args[prefix .. andnum(element, i)]) then for _, v in ipairs(cfg.arg.subgroups_and_num) do readArgs(args, prefix .. string.format(v, i) .. "_") end readArgs(args, prefix .. andnum('col', i) .. "_") end end -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[prefix .. cfg.arg.title] _ = args[prefix .. cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here local boxtype = args.type or cfg.keyword[boxtype] if boxtype == cfg.keyword.with_columns then for i = 1, 20 do _ = args[prefix .. andnum('colheader', i)] end for i = 1, 20 do readSubgroups('col', i) end for i = 1, 20 do _ = args[prefix .. andnum('colfooter', i)] end end for i = 1, 20 do _ = args[prefix .. andnum('group', i)] readSubgroups('list', i) end _ = args[prefix .. cfg.arg.below] end if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, {wrappers = {cfg.pattern[boxtype or 'navbox']}}) readArgs(args, "") args.argHash = nil -- we shouldn't accept argHash passed from a template args.type = args.type or cfg.keyword[boxtype] return p['_navbox'](args) end p[cfg.keyword.with_collapsible_groups] = function (frame) return p.navbox(frame, 'with_collapsible_groups') end p[cfg.keyword.with_columns] = function (frame) return p.navbox(frame, 'with_columns') end return p 1s4hl193ornydh8zrrhga8nr1v6arn9 Module:Navbox/configuration 828 12954 116753 42600 2026-02-23T23:40:03Z en>Ahecht 0 do this the right way 116753 Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', without_first_col = '[[Category:Pages using navbox columns without the first column]]' }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', state_uncollapsed = 'uncollapsed', subgroups = {'subgroup', 'child', ''}, subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no', with_collapsible_groups = 'with collapsible groups', with_collapsible_groups_short = 'collapsible', with_columns = 'with columns', with_columns_short = 'columns', }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer', -- used to remove images from MediaViewer notheme = 'notheme' }, pattern = { class = 'class', colnum = '^col(%d+)$', colheadernum = '^col(%d+)header$', colfooternum = '^col(%d+)footer$', contentnum = '^content(%d+)$', groupnum = '^group(%d+)$', hlist = 'hlist', listnum = '^list(%d+)$', navbox = 'Template:Navbox', navbox_title = '<th[^>]*"navbox%-title"', nowrap = '^<span class="nowrap">', num = '^%a+(%d+)$', plainlist = 'plainlist', sandbox = '/sandbox$', sectionnum = '^section(%d+)$', sectnum = '^sect(%d+)$', style = 'style$', with_collapsible_groups = 'Template:Navbox with collapsible groups', with_columns = 'Template:Navbox with columns', }, arg = { abbr_and_num = 'abbr%d', above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', content_and_num = 'content%d', contentstyle = 'contentstyle', contentstyle_and_num = 'content%dstyle', colheaderstyle = 'colheaderstyle', colheader_and_num = 'col%dheader', colheaderstyle_and_num = 'col%dheaderstyle', colheadercolspan_and_num = 'col%dheadercolspan', colstyle = 'colstyle', col_and_num = 'col%d', colstyle_and_num = 'col%dstyle', colwidth = 'colwidth', colwidth_and_num = 'col%dwidth', colfooterstyle = 'colfooterstyle', colfooter_and_num = 'col%dfooter', colfooterstyle_and_num = 'col%dfooterstyle', colfootercolspan_and_num = 'col%dfootercolspan', coltablestyle = 'coltablestyle', evencolstyle = 'evencolstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', fullwidth = 'fullwidth', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupclass = 'groupclass', groupstyle = 'groupstyle', groupstyle_and_num = 'group%dstyle', groupwidth = 'groupwidth', image = 'image', image_and_num = 'image%d', imageclass = 'imageclass', imageleft = 'imageleft', imageleft_and_num = 'imageleft%d', imageleftstyle = 'imageleftstyle', imagestyle = 'imagestyle', innerstyle = 'innerstyle', list1padding = 'list1padding', list_and_num = 'list%d', listclass = 'listclass', listclass_and_num = 'list%dclass', listpadding = 'listpadding', liststyle = 'liststyle', liststyle_and_num = 'list%dstyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddcolstyle = 'oddcolstyle', oddstyle = 'oddstyle', orphan = 'orphan', padding = 'padding', sect_and_num = 'sect%d', section_and_num = 'section%d', sectiontitlestyle_and_num = 'section%dtitlestyle', secttitlestyle = 'secttitlestyle', selected = 'selected', state = 'state', state_and_num = 'state%d', style = 'style', subgroups_and_num = {'subgroup%d', 'child%d', '%d'}, templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking', }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } hfe9tuviwm23frg4eyuetl5fcr6lsto 116754 116753 2026-07-15T18:13:33Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Navbox/configuration]] 116753 Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', without_first_col = '[[Category:Pages using navbox columns without the first column]]' }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', state_uncollapsed = 'uncollapsed', subgroups = {'subgroup', 'child', ''}, subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no', with_collapsible_groups = 'with collapsible groups', with_collapsible_groups_short = 'collapsible', with_columns = 'with columns', with_columns_short = 'columns', }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer', -- used to remove images from MediaViewer notheme = 'notheme' }, pattern = { class = 'class', colnum = '^col(%d+)$', colheadernum = '^col(%d+)header$', colfooternum = '^col(%d+)footer$', contentnum = '^content(%d+)$', groupnum = '^group(%d+)$', hlist = 'hlist', listnum = '^list(%d+)$', navbox = 'Template:Navbox', navbox_title = '<th[^>]*"navbox%-title"', nowrap = '^<span class="nowrap">', num = '^%a+(%d+)$', plainlist = 'plainlist', sandbox = '/sandbox$', sectionnum = '^section(%d+)$', sectnum = '^sect(%d+)$', style = 'style$', with_collapsible_groups = 'Template:Navbox with collapsible groups', with_columns = 'Template:Navbox with columns', }, arg = { abbr_and_num = 'abbr%d', above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', content_and_num = 'content%d', contentstyle = 'contentstyle', contentstyle_and_num = 'content%dstyle', colheaderstyle = 'colheaderstyle', colheader_and_num = 'col%dheader', colheaderstyle_and_num = 'col%dheaderstyle', colheadercolspan_and_num = 'col%dheadercolspan', colstyle = 'colstyle', col_and_num = 'col%d', colstyle_and_num = 'col%dstyle', colwidth = 'colwidth', colwidth_and_num = 'col%dwidth', colfooterstyle = 'colfooterstyle', colfooter_and_num = 'col%dfooter', colfooterstyle_and_num = 'col%dfooterstyle', colfootercolspan_and_num = 'col%dfootercolspan', coltablestyle = 'coltablestyle', evencolstyle = 'evencolstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', fullwidth = 'fullwidth', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupclass = 'groupclass', groupstyle = 'groupstyle', groupstyle_and_num = 'group%dstyle', groupwidth = 'groupwidth', image = 'image', image_and_num = 'image%d', imageclass = 'imageclass', imageleft = 'imageleft', imageleft_and_num = 'imageleft%d', imageleftstyle = 'imageleftstyle', imagestyle = 'imagestyle', innerstyle = 'innerstyle', list1padding = 'list1padding', list_and_num = 'list%d', listclass = 'listclass', listclass_and_num = 'list%dclass', listpadding = 'listpadding', liststyle = 'liststyle', liststyle_and_num = 'list%dstyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddcolstyle = 'oddcolstyle', oddstyle = 'oddstyle', orphan = 'orphan', padding = 'padding', sect_and_num = 'sect%d', section_and_num = 'section%d', sectiontitlestyle_and_num = 'section%dtitlestyle', secttitlestyle = 'secttitlestyle', selected = 'selected', state = 'state', state_and_num = 'state%d', style = 'style', subgroups_and_num = {'subgroup%d', 'child%d', '%d'}, templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking', }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } hfe9tuviwm23frg4eyuetl5fcr6lsto Module:Navbox/styles.css 828 12955 116755 33398 2026-07-15T16:49:33Z en>Izno 0 Undid revision [[Special:Diff/1364216074|1364216074]] by [[Special:Contributions/Hike395|Hike395]] ([[User talk:Hike395|talk]]) please fix those in those places. Navbox is much more widely used. 116755 sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox-styles + .navbox, /* category positions are wrapped in an "empty" span in Parsoid [[phab:T378906]] */ .navbox + span.mw-empty-elt + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; color:inherit; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ color:inherit; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ color:inherit; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ color:inherit; } .navbox-even { background-color: #f7f7f7; color:inherit; } .navbox-odd { background-color: transparent; color:inherit; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } /** T367463 */ body.skin--responsive .navbox-image img { max-width: none !important; } @media print { body.ns-0 .navbox { display: none !important; } } ku94g873nj9xaasowc6yies69ls74c5 116756 116755 2026-07-15T18:13:33Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Navbox/styles.css]] 116755 sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox-styles + .navbox, /* category positions are wrapped in an "empty" span in Parsoid [[phab:T378906]] */ .navbox + span.mw-empty-elt + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; color:inherit; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ color:inherit; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ color:inherit; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ color:inherit; } .navbox-even { background-color: #f7f7f7; color:inherit; } .navbox-odd { background-color: transparent; color:inherit; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } /** T367463 */ body.skin--responsive .navbox-image img { max-width: none !important; } @media print { body.ns-0 .navbox { display: none !important; } } ku94g873nj9xaasowc6yies69ls74c5 Module:Side box 828 12963 116892 45678 2026-03-16T20:05:56Z en>Hike395 0 Restored revision 1335895720 by [[Special:Contributions/Nux|Nux]] ([[User talk:Nux|talk]]): Rv: see [[Template talk:Sister project]]. This isn't correct yet 116892 Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end -- private, export for testing p._makeData = makeData p._renderSidebox = renderSidebox function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p hu1w1vy5vzibls2pne08un5bivqwbcp 116893 116892 2026-07-16T10:58:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Side_box]] 116892 Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end -- private, export for testing p._makeData = makeData p._renderSidebox = renderSidebox function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p hu1w1vy5vzibls2pne08un5bivqwbcp Template:Sister project 10 12975 116894 46502 2026-04-02T03:01:25Z en>Hike395 0 use centralized logo module to ensure correct image/alt/link/class for every project 116894 wikitext text/x-wiki {{Side box | templatestyles = Sister project/styles.css | metadata=no | position = {{{position|}}} | image = {{#invoke:Sister project logo|main|image={{{image|}}}|project={{{project|}}}}} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> ros6vgf4q64bjkk4n1byp5crcwp3i8u 116895 116894 2026-07-16T10:58:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Sister_project]] 116894 wikitext text/x-wiki {{Side box | templatestyles = Sister project/styles.css | metadata=no | position = {{{position|}}} | image = {{#invoke:Sister project logo|main|image={{{image|}}}|project={{{project|}}}}} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> ros6vgf4q64bjkk4n1byp5crcwp3i8u Module:Side box/styles.css 828 13118 116912 45680 2025-10-03T02:21:50Z en>Jonesey95 0 fix text color in dark mode; this generally works but may cause problems, in which case revert or try specifying a different CSS value 116912 sanitized-css text/css /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: var(--background-color-interactive-subtle, #f8f9fa);color:inherit; display: flow-root; } /* embedded side boxes need larger font */ .infobox .side-box { font-size: 100%; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; min-width: 0; } } @media (min-width: 640px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } qq1i4w5vxwhm3bo4it30jpdvi25oyrp 116913 116912 2026-07-16T10:58:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Side_box/styles.css]] 116912 sanitized-css text/css /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: var(--background-color-interactive-subtle, #f8f9fa);color:inherit; display: flow-root; } /* embedded side boxes need larger font */ .infobox .side-box { font-size: 100%; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; min-width: 0; } } @media (min-width: 640px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } qq1i4w5vxwhm3bo4it30jpdvi25oyrp Template:Abbr 10 13382 117068 34262 2024-02-17T05:01:01Z en>Pppery 0 Changed protection settings for "[[Template:Abbr]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 34261 wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> b6zvtcrye54kh0akzk3y1jq9lxg4lm6 117069 117068 2026-07-16T11:39:36Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Abbr]] 34261 wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> b6zvtcrye54kh0akzk3y1jq9lxg4lm6 Template:Yesno 10 13386 116811 51908 2025-12-06T20:28:33Z en>Pppery 0 Copy from sandbox per request 116811 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|}}} | = {{{blank|{{{no|}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> ap97tktff18ii0muqd5f4eezydumg5v 116812 116811 2026-07-16T10:31:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Yesno]] 116811 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|}}} | = {{{blank|{{{no|}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> ap97tktff18ii0muqd5f4eezydumg5v Template:If both 10 13387 117070 34272 2025-08-05T05:07:39Z en>Theknightwho 0 Avoid issues with the empty string parameter. 117070 wikitext text/x-wiki {{safesubst:<noinclude/>#if:{{{1|}}}| {{safesubst:<noinclude/>#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}} |{{{4|}}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, THANKS --> </noinclude> nuwl84dtikaj4rfmr0nwvxnatlew8ks 117071 117070 2026-07-16T11:39:36Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:If_both]] 117070 wikitext text/x-wiki {{safesubst:<noinclude/>#if:{{{1|}}}| {{safesubst:<noinclude/>#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}} |{{{4|}}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, THANKS --> </noinclude> nuwl84dtikaj4rfmr0nwvxnatlew8ks Module:Infobox/styles.css 828 13391 117078 114757 2026-06-09T21:49:34Z en>Izno 0 spaceeeee 117078 sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* NOTE: This is maintained both here and in [[MediaWiki:Common.css]] until migration is complete. * Starting with bare minimum for the benefit of [[mw:Manual:Safemode]]. */ @media (min-width: 640px) { .infobox { /* @noflip */ margin-left: 1em; /* @noflip */ float: right; /* @noflip */ clear: right; width: 22em; } } /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; color:inherit; } .infobox-3cols-child { margin: -3px; } .infobox .navbar { font-size: 100%; } /* remove when infobox is not a table anymore */ .infobox-hiddenrow, /* we mean it, Minerva. but also Vector 2022 in the future at some point */ body.skin--responsive.skin--responsive .infobox .infobox-hiddenrow { display: none; } /* Dark theme: [[William Wragg]], [[Coral Castle]] */ @media screen { html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } /* Since infobox is a table, many infobox templates take advantage of this to * add columns and rows to the infobox itself rather than as part of a new table * inside them. This class should be discouraged and removed on the long term, * but allows us to at least identify these tables going forward * Currently in use on: [[Module:Infobox3cols]] * Fixes issue described in [[phab:F55300125]] on Vector 2022. */ @media (min-width: 640px) { body.skin--responsive .infobox-table { display: table !important; } body.skin--responsive .infobox-table > caption { display: table-caption !important; } body.skin--responsive .infobox-table > tbody { display: table-row-group; } body.skin--responsive .infobox-table th, body.skin--responsive .infobox-table td { padding-left: inherit; padding-right: inherit; } } bi1nsztkx4350a55cuzjhaotvp5h216 117079 117078 2026-07-16T11:39:37Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Infobox/styles.css]] 117078 sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* NOTE: This is maintained both here and in [[MediaWiki:Common.css]] until migration is complete. * Starting with bare minimum for the benefit of [[mw:Manual:Safemode]]. */ @media (min-width: 640px) { .infobox { /* @noflip */ margin-left: 1em; /* @noflip */ float: right; /* @noflip */ clear: right; width: 22em; } } /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; color:inherit; } .infobox-3cols-child { margin: -3px; } .infobox .navbar { font-size: 100%; } /* remove when infobox is not a table anymore */ .infobox-hiddenrow, /* we mean it, Minerva. but also Vector 2022 in the future at some point */ body.skin--responsive.skin--responsive .infobox .infobox-hiddenrow { display: none; } /* Dark theme: [[William Wragg]], [[Coral Castle]] */ @media screen { html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } /* Since infobox is a table, many infobox templates take advantage of this to * add columns and rows to the infobox itself rather than as part of a new table * inside them. This class should be discouraged and removed on the long term, * but allows us to at least identify these tables going forward * Currently in use on: [[Module:Infobox3cols]] * Fixes issue described in [[phab:F55300125]] on Vector 2022. */ @media (min-width: 640px) { body.skin--responsive .infobox-table { display: table !important; } body.skin--responsive .infobox-table > caption { display: table-caption !important; } body.skin--responsive .infobox-table > tbody { display: table-row-group; } body.skin--responsive .infobox-table th, body.skin--responsive .infobox-table td { padding-left: inherit; padding-right: inherit; } } bi1nsztkx4350a55cuzjhaotvp5h216 Module:Separated entries 828 13392 117080 114939 2025-10-13T16:33:18Z en>Ahecht 0 {frameOnly = (frame.args.frameOnly or '') ~= ''} 117080 Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local dataPlural = args.dataPlural local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) local result = mw.text.listToText(values, separator, conjunction) if dataPlural and #values > 0 and (#separator > 0 or #conjunction > 0) then -- flag to [[Module:Detect singular]] whether this is a list with >1 element result = result..'<span style="display:none" data-plural="'..(#values > 1 and '1' or '0')..'"></span>' end return result end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = (frame.args.frameOnly or '') ~= ''}) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p d3q6xup28j3xpu77wa8xwjjm6j0xizq 117081 117080 2026-07-16T11:39:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Separated_entries]] 117080 Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local dataPlural = args.dataPlural local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) local result = mw.text.listToText(values, separator, conjunction) if dataPlural and #values > 0 and (#separator > 0 or #conjunction > 0) then -- flag to [[Module:Detect singular]] whether this is a list with >1 element result = result..'<span style="display:none" data-plural="'..(#values > 1 and '1' or '0')..'"></span>' end return result end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = (frame.args.frameOnly or '') ~= ''}) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p d3q6xup28j3xpu77wa8xwjjm6j0xizq Template:Plainlist 10 13409 117086 114947 2025-12-24T21:02:16Z en>Pppery 0 Add unknown params checking 117086 wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{safesubst<noinclude />:#if:{{{style|}}}{{{indent|}}}|style="{{safesubst<noinclude />:#if:{{{indent|}}}|margin-left: {{safesubst<noinclude />:#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{safesubst<noinclude />:#if:{{{1|}}}| {{{1}}} </div>}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using plainlist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Plainlist]] with unknown parameter "_VALUE_"|ignoreblank=y| class | style | indent | 1 }}<noinclude></div> {{documentation}} </noinclude> 3dxfjhodv9m8vibb93y5xdv5zsvp5nu 117087 117086 2026-07-16T11:39:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Plainlist]] 117086 wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{safesubst<noinclude />:#if:{{{style|}}}{{{indent|}}}|style="{{safesubst<noinclude />:#if:{{{indent|}}}|margin-left: {{safesubst<noinclude />:#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{safesubst<noinclude />:#if:{{{1|}}}| {{{1}}} </div>}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using plainlist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Plainlist]] with unknown parameter "_VALUE_"|ignoreblank=y| class | style | indent | 1 }}<noinclude></div> {{documentation}} </noinclude> 3dxfjhodv9m8vibb93y5xdv5zsvp5nu Module:Wd 828 13418 116957 105254 2025-07-22T19:53:47Z en>Janhrach 0 update from sandbox 116957 Scribunto text/plain -- Original module located at [[:en:Module:Wd]] and [[:en:Module:Wd/i18n]]. require("strict") local p = {} local module_arg = ... local i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from frame title = frame:getTitle() else -- current module included by other module, get its title from ... title = module_arg end if not i18n then i18nPath = title .. "/i18n" i18n = require(i18nPath).init(aliasesP) end end p.claimCommands = { property = "property", properties = "properties", qualifier = "qualifier", qualifiers = "qualifiers", reference = "reference", references = "references" } p.generalCommands = { label = "label", title = "title", description = "description", alias = "alias", aliases = "aliases", badge = "badge", badges = "badges" } p.flags = { linked = "linked", short = "short", raw = "raw", multilanguage = "multilanguage", unit = "unit", ------------- preferred = "preferred", normal = "normal", deprecated = "deprecated", best = "best", future = "future", current = "current", former = "former", edit = "edit", editAtEnd = "edit@end", mdy = "mdy", single = "single", sourced = "sourced" } p.args = { eid = "eid", page = "page", date = "date", globalSiteId = "globalSiteId" } local aliasesP = { coord = "P625", ----------------------- image = "P18", author = "P50", authorNameString = "P2093", publisher = "P123", importedFrom = "P143", wikimediaImportURL = "P4656", statedIn = "P248", pages = "P304", language = "P407", hasPart = "P527", publicationDate = "P577", startTime = "P580", endTime = "P582", chapter = "P792", retrieved = "P813", referenceURL = "P854", sectionVerseOrParagraph = "P958", archiveURL = "P1065", title = "P1476", formatterURL = "P1630", quote = "P1683", shortName = "P1813", definingFormula = "P2534", archiveDate = "P2960", inferredFrom = "P3452", typeOfReference = "P3865", column = "P3903", subjectNamedAs = "P1810", wikidataProperty = "P1687", publishedIn = "P1433", lastUpdate = "P5017" } local aliasesQ = { percentage = "Q11229", prolepticJulianCalendar = "Q1985786", citeWeb = "Q5637226", citeQ = "Q22321052" } local parameters = { property = "%p", qualifier = "%q", reference = "%r", alias = "%a", badge = "%b", separator = "%s", general = "%x" } local formats = { property = "%p[%s][%r]", qualifier = "%q[%s][%r]", reference = "%r", propertyWithQualifier = "%p[ <span style=\"font-size:85\\%\">(%q)</span>][%s][%r]", alias = "%a[%s]", badge = "%b[%s]" } local hookNames = { -- {level_1, level_2} [parameters.property] = {"getProperty"}, [parameters.reference] = {"getReferences", "getReference"}, [parameters.qualifier] = {"getAllQualifiers"}, [parameters.qualifier.."\\d"] = {"getQualifiers", "getQualifier"}, [parameters.alias] = {"getAlias"}, [parameters.badge] = {"getBadge"} } -- default value objects, should NOT be mutated but instead copied local defaultSeparators = { ["sep"] = {" "}, ["sep%s"] = {","}, ["sep%q"] = {"; "}, ["sep%q\\d"] = {", "}, ["sep%r"] = nil, -- none ["punc"] = nil -- none } local rankTable = { ["preferred"] = 1, ["normal"] = 2, ["deprecated"] = 3 } local function replaceAlias(id) if aliasesP[id] then id = aliasesP[id] end return id end local function errorText(code, ...) local text = i18n["errors"][code] if arg then text = mw.ustring.format(text, unpack(arg)) end return text end local function throwError(errorMessage, ...) error(errorText(errorMessage, unpack(arg))) end local function replaceDecimalMark(num) return mw.ustring.gsub(num, "[.]", i18n['numeric']['decimal-mark'], 1) end local function padZeros(num, numDigits) local numZeros local negative = false if num < 0 then negative = true num = num * -1 end num = tostring(num) numZeros = numDigits - num:len() for _ = 1, numZeros do num = "0"..num end if negative then num = "-"..num end return num end local function replaceSpecialChar(chr) if chr == '_' then -- replace underscores with spaces return ' ' else return chr end end local function replaceSpecialChars(str) local chr local esc = false local strOut = "" for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then esc = true else strOut = strOut .. replaceSpecialChar(chr) end else strOut = strOut .. chr esc = false end end return strOut end local function buildWikilink(target, label) if not label or target == label then return "[[" .. target .. "]]" else return "[[" .. target .. "|" .. label .. "]]" end end -- used to make frame.args mutable, to replace #frame.args (which is always 0) -- with the actual amount and to simply copy tables local function copyTable(tIn) if not tIn then return nil end local tOut = {} for i, v in pairs(tIn) do tOut[i] = v end return tOut end -- used to merge output arrays together; -- note that it currently mutates the first input array local function mergeArrays(a1, a2) for i = 1, #a2 do a1[#a1 + 1] = a2[i] end return a1 end local function split(str, del) local out = {} local i, j = str:find(del) if i and j then out[1] = str:sub(1, i - 1) out[2] = str:sub(j + 1) else out[1] = str end return out end local function parseWikidataURL(url) local id if url:match('^http[s]?://') then id = split(url, "Q") if id[2] then return "Q" .. id[2] end end return nil end local function parseDate(dateStr, precision) precision = precision or "d" local i, j, index, ptr local parts = {nil, nil, nil} if dateStr == nil then return parts[1], parts[2], parts[3] -- year, month, day end -- 'T' for snak values, '/' for outputs with '/Julian' attached i, j = dateStr:find("[T/]") if i then dateStr = dateStr:sub(1, i-1) end local from = 1 if dateStr:sub(1,1) == "-" then -- this is a negative number, look further ahead from = 2 end index = 1 ptr = 1 i, j = dateStr:find("-", from) if i then -- year parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) -- explicitly give base 10 to prevent error if parts[index] == -0 then parts[index] = tonumber("0") -- for some reason, 'parts[index] = 0' may actually store '-0', so parse from string instead end if precision == "y" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 i, j = dateStr:find("-", ptr) if i then -- month parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) if precision == "m" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 end end if dateStr:sub(ptr) ~= "" then -- day if we have month, month if we have year, or year parts[index] = tonumber(dateStr:sub(ptr), 10) end return parts[1], parts[2], parts[3] -- year, month, day end local function datePrecedesDate(aY, aM, aD, bY, bM, bD) if aY == nil or bY == nil then return nil end aM = aM or 1 aD = aD or 1 bM = bM or 1 bD = bD or 1 if aY < bY then return true end if aY > bY then return false end if aM < bM then return true end if aM > bM then return false end if aD < bD then return true end return false end local function getHookName(param, index) if hookNames[param] then return hookNames[param][index] elseif param:len() > 2 then return hookNames[param:sub(1, 2).."\\d"][index] else return nil end end local function alwaysTrue() return true end -- The following function parses a format string. -- -- The example below shows how a parsed string is structured in memory. -- Variables other than 'str' and 'child' are left out for clarity's sake. -- -- Example: -- "A %p B [%s[%q1]] C [%r] D" -- -- Structure: -- [ -- { -- str = "A " -- }, -- { -- str = "%p" -- }, -- { -- str = " B ", -- child = -- [ -- { -- str = "%s", -- child = -- [ -- { -- str = "%q1" -- } -- ] -- } -- ] -- }, -- { -- str = " C ", -- child = -- [ -- { -- str = "%r" -- } -- ] -- }, -- { -- str = " D" -- } -- ] -- local function parseFormat(str) local chr, esc, param, root, cur, prev, new local params = {} local function newObject(array) local obj = {} -- new object obj.str = "" array[#array + 1] = obj -- array{object} obj.parent = array return obj end local function endParam() if param > 0 then if cur.str ~= "" then cur.str = "%"..cur.str cur.param = true params[cur.str] = true cur.parent.req[cur.str] = true prev = cur cur = newObject(cur.parent) end param = 0 end end root = {} -- array root.req = {} cur = newObject(root) prev = nil esc = false param = 0 for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then endParam() esc = true elseif chr == '%' then endParam() if cur.str ~= "" then cur = newObject(cur.parent) end param = 2 elseif chr == '[' then endParam() if prev and cur.str == "" then table.remove(cur.parent) cur = prev end cur.child = {} -- new array cur.child.req = {} cur.child.parent = cur cur = newObject(cur.child) elseif chr == ']' then endParam() if cur.parent.parent then new = newObject(cur.parent.parent.parent) if cur.str == "" then table.remove(cur.parent) end cur = new end else if param > 1 then param = param - 1 elseif param == 1 then if not chr:match('%d') then endParam() end end cur.str = cur.str .. replaceSpecialChar(chr) end else cur.str = cur.str .. chr esc = false end prev = nil end endParam() -- make sure that at least one required parameter has been defined if not next(root.req) then throwError("missing-required-parameter") end -- make sure that the separator parameter "%s" is not amongst the required parameters if root.req[parameters.separator] then throwError("extra-required-parameter", parameters.separator) end return root, params end local function sortOnRank(claims) local rankPos local ranks = {{}, {}, {}, {}} -- preferred, normal, deprecated, (default) local sorted = {} for _, v in ipairs(claims) do rankPos = rankTable[v.rank] or 4 ranks[rankPos][#ranks[rankPos] + 1] = v end sorted = ranks[1] sorted = mergeArrays(sorted, ranks[2]) sorted = mergeArrays(sorted, ranks[3]) return sorted end local function isValueInTable(searchedItem, inputTable) for _, item in pairs(inputTable) do if item == searchedItem then return true end end return false end local Config = {} -- allows for recursive calls function Config:new() local cfg = {} setmetatable(cfg, self) self.__index = self cfg.separators = { -- single value objects wrapped in arrays so that we can pass by reference ["sep"] = {copyTable(defaultSeparators["sep"])}, ["sep%s"] = {copyTable(defaultSeparators["sep%s"])}, ["sep%q"] = {copyTable(defaultSeparators["sep%q"])}, ["sep%r"] = {copyTable(defaultSeparators["sep%r"])}, ["punc"] = {copyTable(defaultSeparators["punc"])} } cfg.entity = nil cfg.entityID = nil cfg.propertyID = nil cfg.propertyValue = nil cfg.qualifierIDs = {} cfg.qualifierIDsAndValues = {} cfg.bestRank = true cfg.ranks = {true, true, false} -- preferred = true, normal = true, deprecated = false cfg.foundRank = #cfg.ranks cfg.flagBest = false cfg.flagRank = false cfg.periods = {true, true, true} -- future = true, current = true, former = true cfg.flagPeriod = false cfg.atDate = {parseDate(os.date('!%Y-%m-%d'))} -- today as {year, month, day} cfg.mdyDate = false cfg.singleClaim = false cfg.sourcedOnly = false cfg.editable = false cfg.editAtEnd = false cfg.inSitelinks = false cfg.langCode = mw.language.getContentLanguage().code cfg.langName = mw.language.fetchLanguageName(cfg.langCode, cfg.langCode) cfg.langObj = mw.language.new(cfg.langCode) cfg.siteID = mw.wikibase.getGlobalSiteId() cfg.states = {} cfg.states.qualifiersCount = 0 cfg.curState = nil cfg.prefetchedRefs = nil return cfg end local State = {} function State:new(cfg, type) local stt = {} setmetatable(stt, self) self.__index = self stt.conf = cfg stt.type = type stt.results = {} stt.parsedFormat = {} stt.separator = {} stt.movSeparator = {} stt.puncMark = {} stt.linked = false stt.rawValue = false stt.shortName = false stt.anyLanguage = false stt.unitOnly = false stt.singleValue = false return stt end -- if id == nil then item connected to current page is used function Config:getLabel(id, raw, link, short) local label = nil local prefix, title= "", nil if not id then id = mw.wikibase.getEntityIdForCurrentPage() if not id then return "" end end id = id:upper() -- just to be sure if raw then -- check if given id actually exists if mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id) then label = id end prefix, title = "d:Special:EntityPage/", label -- may be nil else -- try short name first if requested if short then label = p._property{aliasesP.shortName, [p.args.eid] = id} -- get short name if label == "" then label = nil end end -- get label if not label then label = mw.wikibase.getLabel(id) end end if not label then label = "" elseif link then -- build a link if requested if not title then if id:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(id) elseif id:sub(1,1) == "P" then -- properties have no sitelink, link to Wikidata instead prefix, title = "d:Special:EntityPage/", id end end label = mw.text.nowiki(label) -- escape raw label text so it cannot be wikitext markup if title then label = buildWikilink(prefix .. title, label) end end return label end function Config:getEditIcon() local value = "" local prefix = "" local front = "&nbsp;" local back = "" if self.entityID:sub(1,1) == "P" then prefix = "Property:" end if self.editAtEnd then front = '<span style="float:' if self.langObj:isRTL() then front = front .. 'left' else front = front .. 'right' end front = front .. '">' back = '</span>' end value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode if self.propertyID then value = value .. "#" .. self.propertyID elseif self.inSitelinks then value = value .. "#sitelinks-wikipedia" end value = value .. "|" .. i18n['info']['edit-on-wikidata'] .. "]]" return front .. value .. back end -- used to create the final output string when it's all done, so that for references the -- function extensionTag("ref", ...) is only called when they really ended up in the final output function Config:concatValues(valuesArray) local outString = "" local j, skip for i = 1, #valuesArray do -- check if this is a reference if valuesArray[i].refHash then j = i - 1 skip = false -- skip this reference if it is part of a continuous row of references that already contains the exact same reference while valuesArray[j] and valuesArray[j].refHash do if valuesArray[i].refHash == valuesArray[j].refHash then skip = true break end j = j - 1 end if not skip then -- add <ref> tag with the reference's hash as its name (to deduplicate references) outString = outString .. mw.getCurrentFrame():extensionTag("ref", valuesArray[i][1], {name = valuesArray[i].refHash}) end else outString = outString .. valuesArray[i][1] end end return outString end function Config:convertUnit(unit, raw, link, short, unitOnly) local space = " " local label = "" local itemID if unit == "" or unit == "1" then return nil end if unitOnly then space = "" end itemID = parseWikidataURL(unit) if itemID then if itemID == aliasesQ.percentage then return "%" else label = self:getLabel(itemID, raw, link, short) if label ~= "" then return space .. label end end end return "" end function State:getValue(snak) return self.conf:getValue(snak, self.rawValue, self.linked, self.shortName, self.anyLanguage, self.unitOnly, false, self.type:sub(1,2)) end function Config:getValue(snak, raw, link, short, anyLang, unitOnly, noSpecial, type) if snak.snaktype == 'value' then local datatype = snak.datavalue.type local subtype = snak.datatype local datavalue = snak.datavalue.value if datatype == 'string' then if subtype == 'url' and link then -- create link explicitly if raw then -- will render as a linked number like [1] return "[" .. datavalue .. "]" else return "[" .. datavalue .. " " .. datavalue .. "]" end elseif subtype == 'commonsMedia' then if link then return buildWikilink("c:File:" .. datavalue, datavalue) elseif not raw then return "[[File:" .. datavalue .. "]]" else return datavalue end elseif subtype == 'geo-shape' and link then return buildWikilink("c:" .. datavalue, datavalue) elseif subtype == 'math' and not raw then local attribute = nil if (type == parameters.property or (type == parameters.qualifier and self.propertyID == aliasesP.hasPart)) and snak.property == aliasesP.definingFormula then attribute = {qid = self.entityID} end return mw.getCurrentFrame():extensionTag("math", datavalue, attribute) elseif subtype == 'external-id' and link then local url = p._property{aliasesP.formatterURL, [p.args.eid] = snak.property} -- get formatter URL if url ~= "" then url = mw.ustring.gsub(url, "$1", datavalue) return "[" .. url .. " " .. datavalue .. "]" else return datavalue end else return datavalue end elseif datatype == 'monolingualtext' then if anyLang or datavalue['language'] == self.langCode then return datavalue['text'] else return nil end elseif datatype == 'quantity' then local value = "" local unit if not unitOnly then -- get value and strip + signs from front value = mw.ustring.gsub(datavalue['amount'], "^%+(.+)$", "%1") if raw then return value end -- replace decimal mark based on locale value = replaceDecimalMark(value) -- add delimiters for readability value = i18n.addDelimiters(value) end unit = self:convertUnit(datavalue['unit'], raw, link, short, unitOnly) if unit then value = value .. unit end return value elseif datatype == 'time' then local y, m, d, p, yDiv, yRound, yFull, value, calendarID, dateStr local yFactor = 1 local sign = 1 local prefix = "" local suffix = "" local mayAddCalendar = false local calendar = "" local precision = datavalue['precision'] if precision == 11 then p = "d" elseif precision == 10 then p = "m" else p = "y" yFactor = 10^(9-precision) end y, m, d = parseDate(datavalue['time'], p) if y < 0 then sign = -1 y = y * sign end -- if precision is tens/hundreds/thousands/millions/billions of years if precision <= 8 then yDiv = y / yFactor -- if precision is tens/hundreds/thousands of years if precision >= 6 then mayAddCalendar = true if precision <= 7 then -- round centuries/millenniums up (e.g. 20th century or 3rd millennium) yRound = math.ceil(yDiv) if not raw then if precision == 6 then suffix = i18n['datetime']['suffixes']['millennium'] else suffix = i18n['datetime']['suffixes']['century'] end suffix = i18n.getOrdinalSuffix(yRound) .. suffix else -- if not verbose, take the first year of the century/millennium -- (e.g. 1901 for 20th century or 2001 for 3rd millennium) yRound = (yRound - 1) * yFactor + 1 end else -- precision == 8 -- round decades down (e.g. 2010s) yRound = math.floor(yDiv) * yFactor if not raw then prefix = i18n['datetime']['prefixes']['decade-period'] suffix = i18n['datetime']['suffixes']['decade-period'] end end if raw and sign < 0 then -- if BCE then compensate for "counting backwards" -- (e.g. -2019 for 2010s BCE, -2000 for 20th century BCE or -3000 for 3rd millennium BCE) yRound = yRound + yFactor - 1 end else local yReFactor, yReDiv, yReRound -- round to nearest for tens of thousands of years or more yRound = math.floor(yDiv + 0.5) if yRound == 0 then if precision <= 2 and y ~= 0 then yReFactor = 1e6 yReDiv = y / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years only if we have a whole number of them precision = 3 yFactor = yReFactor yRound = yReRound end end if yRound == 0 then -- otherwise, take the unrounded (original) number of years precision = 5 yFactor = 1 yRound = y mayAddCalendar = true end end if precision >= 1 and y ~= 0 then yFull = yRound * yFactor yReFactor = 1e9 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to billions of years if we're in that range precision = 0 yFactor = yReFactor yRound = yReRound else yReFactor = 1e6 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years if we're in that range precision = 3 yFactor = yReFactor yRound = yReRound end end end if not raw then if precision == 3 then suffix = i18n['datetime']['suffixes']['million-years'] elseif precision == 0 then suffix = i18n['datetime']['suffixes']['billion-years'] else yRound = yRound * yFactor if yRound == 1 then suffix = i18n['datetime']['suffixes']['year'] else suffix = i18n['datetime']['suffixes']['years'] end end else yRound = yRound * yFactor end end else yRound = y mayAddCalendar = true end if mayAddCalendar then calendarID = parseWikidataURL(datavalue['calendarmodel']) if calendarID and calendarID == aliasesQ.prolepticJulianCalendar then if not raw then if link then calendar = " ("..buildWikilink(i18n['datetime']['julian-calendar'], i18n['datetime']['julian'])..")" else calendar = " ("..i18n['datetime']['julian']..")" end else calendar = "/"..i18n['datetime']['julian'] end end end if not raw then local ce = nil if sign < 0 then ce = i18n['datetime']['BCE'] elseif precision <= 5 then ce = i18n['datetime']['CE'] end if ce then if link then ce = buildWikilink(i18n['datetime']['common-era'], ce) end suffix = suffix .. " " .. ce end value = tostring(yRound) if m then dateStr = self.langObj:formatDate("F", "1-"..m.."-1") if d then if self.mdyDate then dateStr = dateStr .. " " .. d .. "," else dateStr = d .. " " .. dateStr end end value = dateStr .. " " .. value end value = prefix .. value .. suffix .. calendar else value = padZeros(yRound * sign, 4) if m then value = value .. "-" .. padZeros(m, 2) if d then value = value .. "-" .. padZeros(d, 2) end end value = value .. calendar end return value elseif datatype == 'globecoordinate' then -- logic from https://github.com/DataValues/Geo (v4.0.1) local precision, unitsPerDegree, numDigits, strFormat, value, globe local latitude, latConv, latValue, latLink local longitude, lonConv, lonValue, lonLink local latDirection, latDirectionN, latDirectionS, latDirectionEN local lonDirection, lonDirectionE, lonDirectionW, lonDirectionEN local degSymbol, minSymbol, secSymbol, separator local latDegrees = nil local latMinutes = nil local latSeconds = nil local lonDegrees = nil local lonMinutes = nil local lonSeconds = nil local latDegSym = "" local latMinSym = "" local latSecSym = "" local lonDegSym = "" local lonMinSym = "" local lonSecSym = "" local latDirectionEN_N = "N" local latDirectionEN_S = "S" local lonDirectionEN_E = "E" local lonDirectionEN_W = "W" if not raw then latDirectionN = i18n['coord']['latitude-north'] latDirectionS = i18n['coord']['latitude-south'] lonDirectionE = i18n['coord']['longitude-east'] lonDirectionW = i18n['coord']['longitude-west'] degSymbol = i18n['coord']['degrees'] minSymbol = i18n['coord']['minutes'] secSymbol = i18n['coord']['seconds'] separator = i18n['coord']['separator'] else latDirectionN = latDirectionEN_N latDirectionS = latDirectionEN_S lonDirectionE = lonDirectionEN_E lonDirectionW = lonDirectionEN_W degSymbol = "/" minSymbol = "/" secSymbol = "/" separator = "/" end latitude = datavalue['latitude'] longitude = datavalue['longitude'] if latitude < 0 then latDirection = latDirectionS latDirectionEN = latDirectionEN_S latitude = math.abs(latitude) else latDirection = latDirectionN latDirectionEN = latDirectionEN_N end if longitude < 0 then lonDirection = lonDirectionW lonDirectionEN = lonDirectionEN_W longitude = math.abs(longitude) else lonDirection = lonDirectionE lonDirectionEN = lonDirectionEN_E end precision = datavalue['precision'] if not precision or precision <= 0 then precision = 1 / 3600 -- precision not set (correctly), set to arcsecond end -- remove insignificant detail latitude = math.floor(latitude / precision + 0.5) * precision longitude = math.floor(longitude / precision + 0.5) * precision if precision >= 1 - (1 / 60) and precision < 1 then precision = 1 elseif precision >= (1 / 60) - (1 / 3600) and precision < (1 / 60) then precision = 1 / 60 end if precision >= 1 then unitsPerDegree = 1 elseif precision >= (1 / 60) then unitsPerDegree = 60 else unitsPerDegree = 3600 end numDigits = math.ceil(-math.log10(unitsPerDegree * precision)) if numDigits <= 0 then numDigits = tonumber("0") -- for some reason, 'numDigits = 0' may actually store '-0', so parse from string instead end strFormat = "%." .. numDigits .. "f" if precision >= 1 then latDegrees = strFormat:format(latitude) lonDegrees = strFormat:format(longitude) if not raw then latDegSym = replaceDecimalMark(latDegrees) .. degSymbol lonDegSym = replaceDecimalMark(lonDegrees) .. degSymbol else latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol end else latConv = math.floor(latitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits lonConv = math.floor(longitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits if precision >= (1 / 60) then latMinutes = latConv lonMinutes = lonConv else latSeconds = latConv lonSeconds = lonConv latMinutes = math.floor(latSeconds / 60) lonMinutes = math.floor(lonSeconds / 60) latSeconds = strFormat:format(latSeconds - (latMinutes * 60)) lonSeconds = strFormat:format(lonSeconds - (lonMinutes * 60)) if not raw then latSecSym = replaceDecimalMark(latSeconds) .. secSymbol lonSecSym = replaceDecimalMark(lonSeconds) .. secSymbol else latSecSym = latSeconds .. secSymbol lonSecSym = lonSeconds .. secSymbol end end latDegrees = math.floor(latMinutes / 60) lonDegrees = math.floor(lonMinutes / 60) latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol latMinutes = latMinutes - (latDegrees * 60) lonMinutes = lonMinutes - (lonDegrees * 60) if precision >= (1 / 60) then latMinutes = strFormat:format(latMinutes) lonMinutes = strFormat:format(lonMinutes) if not raw then latMinSym = replaceDecimalMark(latMinutes) .. minSymbol lonMinSym = replaceDecimalMark(lonMinutes) .. minSymbol else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end end latValue = latDegSym .. latMinSym .. latSecSym .. latDirection lonValue = lonDegSym .. lonMinSym .. lonSecSym .. lonDirection value = latValue .. separator .. lonValue if link then globe = parseWikidataURL(datavalue['globe']) if globe then globe = mw.wikibase.getLabelByLang(globe, "en"):lower() else globe = "earth" end latLink = table.concat({latDegrees, latMinutes, latSeconds}, "_") lonLink = table.concat({lonDegrees, lonMinutes, lonSeconds}, "_") value = "[https://geohack.toolforge.org/geohack.php?language="..self.langCode.."&params="..latLink.."_"..latDirectionEN.."_"..lonLink.."_"..lonDirectionEN.."_globe:"..globe.." "..value.."]" end return value elseif datatype == 'wikibase-entityid' then local label local itemID = datavalue['numeric-id'] if subtype == 'wikibase-item' then itemID = "Q" .. itemID elseif subtype == 'wikibase-property' then itemID = "P" .. itemID else return '<strong class="error">' .. errorText('unknown-data-type', subtype) .. '</strong>' end label = self:getLabel(itemID, raw, link, short) if label == "" then label = nil end return label else return '<strong class="error">' .. errorText('unknown-data-type', datatype) .. '</strong>' end elseif snak.snaktype == 'somevalue' and not noSpecial then if raw then return " " -- single space represents 'somevalue' else return i18n['values']['unknown'] end elseif snak.snaktype == 'novalue' and not noSpecial then if raw then return "" -- empty string represents 'novalue' else return i18n['values']['none'] end else return nil end end function Config:getSingleRawQualifier(claim, qualifierID) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[qualifierID] end if qualifiers and qualifiers[1] then return self:getValue(qualifiers[1], true) -- raw = true else return nil end end function Config:snakEqualsValue(snak, value) local snakValue = self:getValue(snak, true) -- raw = true if snakValue and snak.snaktype == 'value' and snak.datavalue.type == 'wikibase-entityid' then value = value:upper() end return snakValue == value end function Config:setRank(rank) local rankPos if rank == p.flags.best then self.bestRank = true self.flagBest = true -- mark that 'best' flag was given return end if rank:sub(1,9) == p.flags.preferred then rankPos = 1 elseif rank:sub(1,6) == p.flags.normal then rankPos = 2 elseif rank:sub(1,10) == p.flags.deprecated then rankPos = 3 else return end -- one of the rank flags was given, check if another one was given before if not self.flagRank then self.ranks = {false, false, false} -- no other rank flag given before, so unset ranks self.bestRank = self.flagBest -- unsets bestRank only if 'best' flag was not given before self.flagRank = true -- mark that a rank flag was given end if rank:sub(-1) == "+" then for i = rankPos, 1, -1 do self.ranks[i] = true end elseif rank:sub(-1) == "-" then for i = rankPos, #self.ranks do self.ranks[i] = true end else self.ranks[rankPos] = true end end function Config:setPeriod(period) local periodPos if period == p.flags.future then periodPos = 1 elseif period == p.flags.current then periodPos = 2 elseif period == p.flags.former then periodPos = 3 else return end -- one of the period flags was given, check if another one was given before if not self.flagPeriod then self.periods = {false, false, false} -- no other period flag given before, so unset periods self.flagPeriod = true -- mark that a period flag was given end self.periods[periodPos] = true end function Config:qualifierMatches(claim, id, value) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[id] end if qualifiers then for _, v in pairs(qualifiers) do if self:snakEqualsValue(v, value) then return true end end elseif value == "" then -- if the qualifier is not present then treat it the same as the special value 'novalue' return true end return false end function Config:rankMatches(rankPos) if self.bestRank then return (self.ranks[rankPos] and self.foundRank >= rankPos) else return self.ranks[rankPos] end end function Config:timeMatches(claim) local startTime = nil local startTimeY = nil local startTimeM = nil local startTimeD = nil local endTime = nil local endTimeY = nil local endTimeM = nil local endTimeD = nil if self.periods[1] and self.periods[2] and self.periods[3] then -- any time return true end startTime = self:getSingleRawQualifier(claim, aliasesP.startTime) if startTime and startTime ~= "" and startTime ~= " " then startTimeY, startTimeM, startTimeD = parseDate(startTime) end endTime = self:getSingleRawQualifier(claim, aliasesP.endTime) if endTime and endTime ~= "" and endTime ~= " " then endTimeY, endTimeM, endTimeD = parseDate(endTime) end if startTimeY ~= nil and endTimeY ~= nil and datePrecedesDate(endTimeY, endTimeM, endTimeD, startTimeY, startTimeM, startTimeD) then -- invalidate end time if it precedes start time endTimeY = nil endTimeM = nil endTimeD = nil end if self.periods[1] then -- future if startTimeY and datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD) then return true end end if self.periods[2] then -- current if (startTimeY == nil or not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD)) and (endTimeY == nil or datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD)) then return true end end if self.periods[3] then -- former if endTimeY and not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD) then return true end end return false end function Config:processFlag(flag) if not flag then return false end if flag == p.flags.linked then self.curState.linked = true return true elseif flag == p.flags.raw then self.curState.rawValue = true if self.curState == self.states[parameters.reference] then -- raw reference values end with periods and require a separator (other than none) self.separators["sep%r"][1] = {" "} end return true elseif flag == p.flags.short then self.curState.shortName = true return true elseif flag == p.flags.multilanguage then self.curState.anyLanguage = true return true elseif flag == p.flags.unit then self.curState.unitOnly = true return true elseif flag == p.flags.mdy then self.mdyDate = true return true elseif flag == p.flags.single then self.singleClaim = true return true elseif flag == p.flags.sourced then self.sourcedOnly = true return true elseif flag == p.flags.edit then self.editable = true return true elseif flag == p.flags.editAtEnd then self.editable = true self.editAtEnd = true return true elseif flag == p.flags.best or flag:match('^'..p.flags.preferred..'[+-]?$') or flag:match('^'..p.flags.normal..'[+-]?$') or flag:match('^'..p.flags.deprecated..'[+-]?$') then self:setRank(flag) return true elseif flag == p.flags.future or flag == p.flags.current or flag == p.flags.former then self:setPeriod(flag) return true elseif flag == "" then -- ignore empty flags and carry on return true else return false end end function Config:processFlagOrCommand(flag) local param = "" if not flag then return false end if flag == p.claimCommands.property or flag == p.claimCommands.properties then param = parameters.property elseif flag == p.claimCommands.qualifier or flag == p.claimCommands.qualifiers then self.states.qualifiersCount = self.states.qualifiersCount + 1 param = parameters.qualifier .. self.states.qualifiersCount self.separators["sep"..param] = {copyTable(defaultSeparators["sep%q\\d"])} elseif flag == p.claimCommands.reference or flag == p.claimCommands.references then param = parameters.reference else return self:processFlag(flag) end if self.states[param] then return false end -- create a new state for each command self.states[param] = State:new(self, param) -- use "%x" as the general parameter name self.states[param].parsedFormat = parseFormat(parameters.general) -- will be overwritten for param=="%p" -- set the separator self.states[param].separator = self.separators["sep"..param] -- will be nil for param=="%p", which will be set separately if flag == p.claimCommands.property or flag == p.claimCommands.qualifier or flag == p.claimCommands.reference then self.states[param].singleValue = true end self.curState = self.states[param] return true end function Config:processSeparators(args) local sep for i, v in pairs(self.separators) do if args[i] then sep = replaceSpecialChars(args[i]) if sep ~= "" then self.separators[i][1] = {sep} else self.separators[i][1] = nil end end end end function Config:setFormatAndSeparators(state, parsedFormat) state.parsedFormat = parsedFormat state.separator = self.separators["sep"] state.movSeparator = self.separators["sep"..parameters.separator] state.puncMark = self.separators["punc"] end -- determines if a claim has references by prefetching them from the claim using getReferences, -- which applies some filtering that determines if a reference is actually returned, -- and caches the references for later use function State:isSourced(claim) self.conf.prefetchedRefs = self:getReferences(claim) return (#self.conf.prefetchedRefs > 0) end function State:resetCaches() -- any prefetched references of the previous claim must not be used self.conf.prefetchedRefs = nil end function State:claimMatches(claim) local matches, rankPos -- first of all, reset any cached values used for the previous claim self:resetCaches() -- if a property value was given, check if it matches the claim's property value if self.conf.propertyValue then matches = self.conf:snakEqualsValue(claim.mainsnak, self.conf.propertyValue) else matches = true end -- if any qualifier values were given, check if each matches one of the claim's qualifier values for i, v in pairs(self.conf.qualifierIDsAndValues) do matches = (matches and self.conf:qualifierMatches(claim, i, v)) end -- check if the claim's rank and time period match rankPos = rankTable[claim.rank] or 4 matches = (matches and self.conf:rankMatches(rankPos) and self.conf:timeMatches(claim)) -- if only claims with references must be returned, check if this one has any if self.conf.sourcedOnly then matches = (matches and self:isSourced(claim)) -- prefetches and caches references end return matches, rankPos end function State:out() local result -- collection of arrays with value objects local valuesArray -- array with value objects local sep = nil -- value object local out = {} -- array with value objects local function walk(formatTable, result) local valuesArray = {} -- array with value objects for i, v in pairs(formatTable.req) do if not result[i] or not result[i][1] then -- we've got no result for a parameter that is required on this level, -- so skip this level (and its children) by returning an empty result return {} end end for _, v in ipairs(formatTable) do if v.param then valuesArray = mergeArrays(valuesArray, result[v.str]) elseif v.str ~= "" then valuesArray[#valuesArray + 1] = {v.str} end if v.child then valuesArray = mergeArrays(valuesArray, walk(v.child, result)) end end return valuesArray end -- iterate through the results from back to front, so that we know when to add separators for i = #self.results, 1, -1 do result = self.results[i] -- if there is already some output, then add the separators if #out > 0 then sep = self.separator[1] -- fixed separator result[parameters.separator] = {self.movSeparator[1]} -- movable separator else sep = nil result[parameters.separator] = {self.puncMark[1]} -- optional punctuation mark end valuesArray = walk(self.parsedFormat, result) if #valuesArray > 0 then if sep then valuesArray[#valuesArray + 1] = sep end out = mergeArrays(valuesArray, out) end end -- reset state before next iteration self.results = {} return out end -- level 1 hook function State:getProperty(claim) local value = {self:getValue(claim.mainsnak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getQualifiers(claim, param) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[self.conf.qualifierIDs[param]] end if qualifiers then -- iterate through claim's qualifier statements to collect their values; -- return array with multiple value objects return self.conf.states[param]:iterate(qualifiers, {[parameters.general] = hookNames[parameters.qualifier.."\\d"][2], count = 1}) -- pass qualifier state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getQualifier(snak) local value = {self:getValue(snak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getAllQualifiers(claim, param, result, hooks) local out = {} -- array with value objects local sep = self.conf.separators["sep"..parameters.qualifier][1] -- value object -- iterate through the output of the separate "qualifier(s)" commands for i = 1, self.conf.states.qualifiersCount do -- if a hook has not been called yet, call it now if not result[parameters.qualifier..i] then self:callHook(parameters.qualifier..i, hooks, claim, result) end -- if there is output for this particular "qualifier(s)" command, then add it if result[parameters.qualifier..i] and result[parameters.qualifier..i][1] then -- if there is already some output, then add the separator if #out > 0 and sep then out[#out + 1] = sep end out = mergeArrays(out, result[parameters.qualifier..i]) end end return out end -- level 1 hook function State:getReferences(claim) if self.conf.prefetchedRefs then -- return references that have been prefetched by isSourced return self.conf.prefetchedRefs end if claim.references then -- iterate through claim's reference statements to collect their values; -- return array with multiple value objects return self.conf.states[parameters.reference]:iterate(claim.references, {[parameters.general] = hookNames[parameters.reference][2], count = 1}) -- pass reference state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getReference(statement) local citeParamMapping = i18n['cite']['param-mapping'] local citeConfig = i18n['cite']['config'] local citeTypes = i18n['cite']['output-types'] -- will hold rendered properties of the reference which are not directly from statement.snaks, -- Namely, is URL generated from an external ID. local additionalProcessedProperties = {} -- for each citation type, there will be an associative array that associates lists of rendered properties -- to citation-template parameters local candidateParams = {} -- like above, but only associates one rendered property to each parameter; if the above variable -- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1") local citeParams = {} local citeErrors = {} local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved local version = 12 -- increment this each time the below logic is changed to avoid conflict errors if not statement.snaks then return {} end -- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia) if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then return {} end -- don't include "type of reference" if statement.snaks[aliasesP.typeOfReference] then statement.snaks[aliasesP.typeOfReference] = nil end -- don't include "image" to prevent littering if statement.snaks[aliasesP.image] then statement.snaks[aliasesP.image] = nil end -- don't include "language" if it is equal to the local one if self:getReferenceDetail(statement.snaks, aliasesP.language) == self.conf.langName then statement.snaks[aliasesP.language] = nil end if statement.snaks[aliasesP.statedIn] and not statement.snaks[aliasesP.referenceURL] then -- "stated in" was given but "reference URL" was not. -- get "Wikidata property" properties from the item in "stated in" -- if any of the returned properties of the external-id datatype is in statement.snaks, generate a link from it and use the link in the reference -- find the "Wikidata property" properties in the item from "stated in" local wikidataPropertiesOfSource = mw.text.split(p._properties{p.flags.raw, aliasesP.wikidataProperty, [p.args.eid] = self.conf:getValue(statement.snaks[aliasesP.statedIn][1], true, false)}, ", ", true) for i, wikidataPropertyOfSource in pairs(wikidataPropertiesOfSource) do if statement.snaks[wikidataPropertyOfSource] and statement.snaks[wikidataPropertyOfSource][1].datatype == "external-id" then local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets. -- the link is in wiki markup, so strip the square brackets and the display text -- gsub also returns another, discarted value, therefore the result is assigned to tempLink first tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1") additionalProcessedProperties[aliasesP.referenceURL] = {tempLink} statement.snaks[wikidataPropertyOfSource] = nil break end end end end -- initialize candidateParams and citeParams for _, citeType in ipairs(citeTypes) do candidateParams[citeType] = {} citeParams[citeType] = {} end -- fill candidateParams for _, citeType in ipairs(citeTypes) do -- This will contain value--priority pairs for each param name. local candidateValuesAndPriorities = {} -- fill candidateValuesAndPriorities for refProperty in pairs(statement.snaks) do if citeErrors[citeType] then break end repeat -- just a simple wrapper to emulate "continue" -- set mappingKey and prefix local mappingKey local prefix = "" if statement.snaks[refProperty][1].datatype == 'external-id' then mappingKey = "external-id" prefix = self.conf:getLabel(refProperty) if prefix ~= "" then prefix = prefix .. " " end else mappingKey = refProperty end local paramName = citeParamMapping[citeType][mappingKey] -- skip properties with empty parameter name if paramName == "" then break -- skip this property for this value of citeType end -- handle unknown properties in the reference if not paramName then referenceEmpty = false local error_message = errorText("unknown-property-in-ref", refProperty) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message break end -- set processedProperty local processedProperty local raw = false -- if the value is wanted raw if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then raw = true end if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then -- Multiple values may be given. processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true else -- If multiple values are given, all but the first suitable one are discarted. processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true end if #processedProperty == 0 then break end referenceEmpty = false -- add an empty entry to candidateValuesAndPriorities, if there isn't one already if not candidateValuesAndPriorities[paramName] then candidateValuesAndPriorities[paramName] = {} end -- find the priority of refProperty local thisPropertyPriority = -1 local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName] if thisParamPrioritization then for i_priority, i_property in ipairs(thisParamPrioritization) do if i_property == refProperty then thisPropertyPriority = i_priority end end end for _, propertyValue in pairs(processedProperty) do table.insert( candidateValuesAndPriorities[paramName], {prefix .. propertyValue, thisPropertyPriority} ) end until true end -- fill candidateParams[citeType] if not citeErrors[citeType] then local compareValuePriorities = function(pair1, pair2) if pair1[2] == -1 and pair2[2] ~= -1 then return false end if pair1[2] ~= -1 and pair2[2] == -1 then return true end return pair1[2] < pair2[2] end -- fill candidateParams[citeType][paramName] for each used param for paramName, _ in pairs(candidateValuesAndPriorities) do table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities) candidateParams[citeType][paramName] = {} for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do table.insert(candidateParams[citeType][paramName], valuePriorityPair[1]) end end end end -- handle additional properties for refProperty in pairs(additionalProcessedProperties) do for _, citeType in ipairs(citeTypes) do repeat -- skip if there already have been errors if citeErrors[citeType] then break end local paramName = citeParamMapping[citeType][refProperty] -- handle unknown properties in the reference if not paramName then -- Skip this additional property, but do not cause an error. break end if paramName == "" then break end referenceEmpty = false if not candidateParams[citeType][paramName] then candidateParams[citeType][paramName] = {} end for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do table.insert(candidateParams[citeType][paramName], propertyValue) end until true end end -- fill citeParams for _, citeType in ipairs(citeTypes) do for paramName, paramValues in pairs(candidateParams[citeType]) do if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then citeParams[citeType][paramName] = paramValues[1] else -- There is more than one value for this parameter - the values will -- go into separate numbered parameters (e.g. "author1", "author2") for paramNum, paramValue in pairs(paramValues) do citeParams[citeType][paramName .. paramNum] = paramValue end end end end -- handle missing mandatory parameters for the templates for _, citeType in ipairs(citeTypes) do for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do if not citeParams[citeType][requiredCiteParam] then -- The required param is not present. if citeErrors[citeType] then -- Do not override the previous error, if it exists. break end local error_message = errorText("missing-mandatory-param", requiredCiteParam) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message end end end local citeTypeToUse = nil -- choose the output template for _, citeType in ipairs(citeTypes) do if not citeErrors[citeType] then citeTypeToUse = citeType break end end -- set refContent local refContent = "" if citeTypeToUse then local templateToUse = citeConfig[citeTypeToUse]["template"] local paramsToUse = citeParams[citeTypeToUse] if not templateToUse or templateToUse == "" then throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse) end -- if this module is being substituted then build a regular template call, otherwise expand the template if mw.isSubsting() then for i, v in pairs(paramsToUse) do refContent = refContent .. "|" .. i .. "=" .. v end refContent = "{{" .. templateToUse .. refContent .. "}}" else xpcall( function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end, function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end ) end -- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error. elseif not referenceEmpty then refContent = errorText("malformed-reference-header") for _, citeType in ipairs(citeTypes) do refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType]) end refContent = refContent .. errorText("malformed-reference-footer") end -- wrap refContent local ref = {} if refContent ~= "" then ref = {refContent} if not self.rawValue then -- this should become a <ref> tag, so save the reference's hash for later ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version) end return {ref} else return {} end end -- gets a detail of one particular type for a reference function State:getReferenceDetail(snaks, dType, raw, link, anyLang) local switchLang = anyLang local value = nil if not snaks[dType] then return nil end -- if anyLang, first try the local language and otherwise any language repeat for _, v in ipairs(snaks[dType]) do value = self.conf:getValue(v, raw, link, false, anyLang and not switchLang, false, true) -- noSpecial = true if value then break end end if value or not anyLang then break end switchLang = not switchLang until anyLang and switchLang return value end -- gets the details of one particular type for a reference function State:getReferenceDetails(snaks, dType, raw, link, anyLang) local values = {} if not snaks[dType] then return {} end for _, v in ipairs(snaks[dType]) do -- if nil is returned then it will not be added to the table values[#values + 1] = self.conf:getValue(v, raw, link, false, anyLang, false, true) -- noSpecial = true end return values end -- level 1 hook function State:getAlias(object) local value = object.value local title = nil if value and self.linked then if self.conf.entityID:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(self.conf.entityID) elseif self.conf.entityID:sub(1,1) == "P" then title = "d:Property:" .. self.conf.entityID end if title then value = buildWikilink(title, value) end end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getBadge(value) value = self.conf:getLabel(value, self.rawValue, self.linked, self.shortName) if value == "" then value = nil end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end function State:callHook(param, hooks, statement, result) -- call a parameter's hook if it has been defined and if it has not been called before if not result[param] and hooks[param] then local valuesArray = self[hooks[param]](self, statement, param, result, hooks) -- array with value objects -- add to the result if #valuesArray > 0 then result[param] = valuesArray result.count = result.count + 1 else result[param] = {} -- an empty array to indicate that we've tried this hook already return true -- miss == true end end return false end -- iterate through claims, claim's qualifiers or claim's references to collect values function State:iterate(statements, hooks, matchHook) matchHook = matchHook or alwaysTrue local matches = false local rankPos = nil local result, gotRequired for _, v in ipairs(statements) do -- rankPos will be nil for non-claim statements (e.g. qualifiers, references, etc.) matches, rankPos = matchHook(self, v) if matches then result = {count = 0} -- collection of arrays with value objects local function walk(formatTable) local miss for i2, v2 in pairs(formatTable.req) do -- call a hook, adding its return value to the result miss = self:callHook(i2, hooks, v, result) if miss then -- we miss a required value for this level, so return false return false end if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point breaks the loop return true end end for _, v2 in ipairs(formatTable) do if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point prevents further childs from being processed return true end if v2.child then walk(v2.child) end end return true end gotRequired = walk(self.parsedFormat) -- only append the result if we got values for all required parameters on the root level if gotRequired then -- if we have a rankPos (only with matchHook() for complete claims), then update the foundRank if rankPos and self.conf.foundRank > rankPos then self.conf.foundRank = rankPos end -- append the result self.results[#self.results + 1] = result -- break if we only need a single value if self.singleValue then break end end end end return self:out() end local function getEntityId(arg, eid, page, allowOmitPropPrefix, globalSiteId) local id = nil local prop = nil if arg then if arg:sub(1,1) == ":" then page = arg eid = nil elseif arg:sub(1,1):upper() == "Q" or arg:sub(1,9):lower() == "property:" or allowOmitPropPrefix then eid = arg page = nil else prop = arg end end if eid then if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end else id = replaceAlias(eid) end elseif page then if page:sub(1,1) == ":" then page = mw.text.trim(page:sub(2)) end id = mw.wikibase.getEntityIdForTitle(page, globalSiteId) or "" end if not id then id = mw.wikibase.getEntityIdForCurrentPage() or "" end id = id:upper() if not mw.wikibase.isValidEntityId(id) then id = "" end return id, prop end local function nextArg(args) local arg = args[args.pointer] if arg then args.pointer = args.pointer + 1 return mw.text.trim(arg) else return nil end end local function claimCommand(args, funcName) local cfg = Config:new() cfg:processFlagOrCommand(funcName) -- process first command (== function name) local lastArg, parsedFormat, formatParams, claims, value local hooks = {count = 0} -- set the date if given; -- must come BEFORE processing the flags if args[p.args.date] then cfg.atDate = {parseDate(args[p.args.date])} cfg.periods = {false, true, false} -- change default time constraint to 'current' end -- process flags and commands repeat lastArg = nextArg(args) until not cfg:processFlagOrCommand(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID, cfg.propertyID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], false, args[p.args.globalSiteId]) if cfg.entityID == "" then return "" -- we cannot continue without a valid entity ID end cfg.entity = mw.wikibase.getEntity(cfg.entityID) if not cfg.propertyID then cfg.propertyID = nextArg(args) end cfg.propertyID = replaceAlias(cfg.propertyID) if not cfg.entity or not cfg.propertyID then return "" -- we cannot continue without an entity or a property ID end cfg.propertyID = cfg.propertyID:upper() if not cfg.entity.claims or not cfg.entity.claims[cfg.propertyID] then return "" -- there is no use to continue without any claims end claims = cfg.entity.claims[cfg.propertyID] if cfg.states.qualifiersCount > 0 then -- do further processing if "qualifier(s)" command was given if #args - args.pointer + 1 > cfg.states.qualifiersCount then -- claim ID or literal value has been given cfg.propertyValue = nextArg(args) end for i = 1, cfg.states.qualifiersCount do -- check if given qualifier ID is an alias and add it cfg.qualifierIDs[parameters.qualifier..i] = replaceAlias(nextArg(args) or ""):upper() end elseif cfg.states[parameters.reference] then -- do further processing if "reference(s)" command was given cfg.propertyValue = nextArg(args) end -- check for special property value 'somevalue' or 'novalue' if cfg.propertyValue then cfg.propertyValue = replaceSpecialChars(cfg.propertyValue) if cfg.propertyValue ~= "" and mw.text.trim(cfg.propertyValue) == "" then cfg.propertyValue = " " -- single space represents 'somevalue', whereas empty string represents 'novalue' else cfg.propertyValue = mw.text.trim(cfg.propertyValue) end end -- parse the desired format, or choose an appropriate format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) elseif cfg.states.qualifiersCount > 0 then -- "qualifier(s)" command given if cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.propertyWithQualifier) else parsedFormat, formatParams = parseFormat(formats.qualifier) end elseif cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.property) else -- "reference(s)" command given parsedFormat, formatParams = parseFormat(formats.reference) end -- if a "qualifier(s)" command and no "propert(y|ies)" command has been given, make the movable separator a semicolon if cfg.states.qualifiersCount > 0 and not cfg.states[parameters.property] then cfg.separators["sep"..parameters.separator][1] = {";"} end -- if only "reference(s)" has been given, set the default separator to none (except when raw) if cfg.states[parameters.reference] and not cfg.states[parameters.property] and cfg.states.qualifiersCount == 0 and not cfg.states[parameters.reference].rawValue then cfg.separators["sep"][1] = nil end -- if exactly one "qualifier(s)" command has been given, make "sep%q" point to "sep%q1" to make them equivalent if cfg.states.qualifiersCount == 1 then cfg.separators["sep"..parameters.qualifier] = cfg.separators["sep"..parameters.qualifier.."1"] end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hooks that should be called (getProperty, getQualifiers, getReferences); -- only define a hook if both its command ("propert(y|ies)", "reference(s)", "qualifier(s)") and its parameter ("%p", "%r", "%q1", "%q2", "%q3") have been given for i, v in pairs(cfg.states) do -- e.g. 'formatParams["%q1"] or formatParams["%q"]' to define hook even if "%q1" was not defined to be able to build a complete value for "%q" if formatParams[i] or formatParams[i:sub(1, 2)] then hooks[i] = getHookName(i, 1) hooks.count = hooks.count + 1 end end -- the "%q" parameter is not attached to a state, but is a collection of the results of multiple states (attached to "%q1", "%q2", "%q3", ...); -- so if this parameter is given then this hook must be defined separately, but only if at least one "qualifier(s)" command has been given if formatParams[parameters.qualifier] and cfg.states.qualifiersCount > 0 then hooks[parameters.qualifier] = getHookName(parameters.qualifier, 1) hooks.count = hooks.count + 1 end -- create a state for "properties" if it doesn't exist yet, which will be used as a base configuration for each claim iteration; -- must come AFTER defining the hooks if not cfg.states[parameters.property] then cfg.states[parameters.property] = State:new(cfg, parameters.property) -- if the "single" flag has been given then this state should be equivalent to "property" (singular) if cfg.singleClaim then cfg.states[parameters.property].singleValue = true end end -- if the "sourced" flag has been given then create a state for "reference" if it doesn't exist yet, using default values, -- which must exist in order to be able to determine if a claim has any references; -- must come AFTER defining the hooks if cfg.sourcedOnly and not cfg.states[parameters.reference] then cfg:processFlagOrCommand(p.claimCommands.reference) -- use singular "reference" to minimize overhead end -- set the parsed format and the separators (and optional punctuation mark); -- must come AFTER creating the additonal states cfg:setFormatAndSeparators(cfg.states[parameters.property], parsedFormat) -- process qualifier matching values, analogous to cfg.propertyValue for i, v in pairs(args) do i = tostring(i) if i:match('^[Pp]%d+$') or aliasesP[i] then v = replaceSpecialChars(v) -- check for special qualifier value 'somevalue' if v ~= "" and mw.text.trim(v) == "" then v = " " -- single space represents 'somevalue' end cfg.qualifierIDsAndValues[replaceAlias(i):upper()] = v end end -- first sort the claims on rank to pre-define the order of output (preferred first, then normal, then deprecated) claims = sortOnRank(claims) -- then iterate through the claims to collect values value = cfg:concatValues(cfg.states[parameters.property]:iterate(claims, hooks, State.claimMatches)) -- pass property state with level 1 hooks and matchHook -- if desired, add a clickable icon that may be used to edit the returned values on Wikidata if cfg.editable and value ~= "" then value = value .. cfg:getEditIcon() end return value end local function generalCommand(args, funcName) local cfg = Config:new() cfg.curState = State:new(cfg) local lastArg local value = nil repeat lastArg = nextArg(args) until not cfg:processFlag(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], true, args[p.args.globalSiteId]) if cfg.entityID == "" or not mw.wikibase.entityExists(cfg.entityID) then return "" -- we cannot continue without an entity end -- serve according to the given command if funcName == p.generalCommands.label then value = cfg:getLabel(cfg.entityID, cfg.curState.rawValue, cfg.curState.linked, cfg.curState.shortName) elseif funcName == p.generalCommands.title then cfg.inSitelinks = true if cfg.entityID:sub(1,1) == "Q" then value = mw.wikibase.getSitelink(cfg.entityID) end if cfg.curState.linked and value then value = buildWikilink(value) end elseif funcName == p.generalCommands.description then value = mw.wikibase.getDescription(cfg.entityID) else local parsedFormat, formatParams local hooks = {count = 0} cfg.entity = mw.wikibase.getEntity(cfg.entityID) if funcName == p.generalCommands.alias or funcName == p.generalCommands.badge then cfg.curState.singleValue = true end if funcName == p.generalCommands.alias or funcName == p.generalCommands.aliases then if not cfg.entity.aliases or not cfg.entity.aliases[cfg.langCode] then return "" -- there is no use to continue without any aliasses end local aliases = cfg.entity.aliases[cfg.langCode] -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.alias) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getAlias); -- only define the hook if the parameter ("%a") has been given if formatParams[parameters.alias] then hooks[parameters.alias] = getHookName(parameters.alias, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(aliases, hooks)) elseif funcName == p.generalCommands.badge or funcName == p.generalCommands.badges then if not cfg.entity.sitelinks or not cfg.entity.sitelinks[cfg.siteID] or not cfg.entity.sitelinks[cfg.siteID].badges then return "" -- there is no use to continue without any badges end local badges = cfg.entity.sitelinks[cfg.siteID].badges cfg.inSitelinks = true -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.badge) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getBadge); -- only define the hook if the parameter ("%b") has been given if formatParams[parameters.badge] then hooks[parameters.badge] = getHookName(parameters.badge, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(badges, hooks)) end end value = value or "" if cfg.editable and value ~= "" then -- if desired, add a clickable icon that may be used to edit the returned value on Wikidata value = value .. cfg:getEditIcon() end return value end -- modules that include this module should call the functions with an underscore prepended, e.g.: p._property(args) local function establishCommands(commandList, commandFunc) for _, commandName in pairs(commandList) do local function wikitextWrapper(frame) local args = copyTable(frame.args) args.pointer = 1 loadI18n(aliasesP, frame) return commandFunc(args, commandName) end p[commandName] = wikitextWrapper local function luaWrapper(args) args = copyTable(args) args.pointer = 1 loadI18n(aliasesP) return commandFunc(args, commandName) end p["_" .. commandName] = luaWrapper end end establishCommands(p.claimCommands, claimCommand) establishCommands(p.generalCommands, generalCommand) -- main function that is supposed to be used by wrapper templates function p.main(frame) if not mw.wikibase then return nil end local f, args loadI18n(aliasesP, frame) -- get the parent frame to take the arguments that were passed to the wrapper template frame = frame:getParent() or frame if not frame.args[1] then throwError("no-function-specified") end f = mw.text.trim(frame.args[1]) if f == "main" then throwError("main-called-twice") end assert(p["_"..f], errorText('no-such-function', f)) -- copy arguments from immutable to mutable table args = copyTable(frame.args) -- remove the function name from the list table.remove(args, 1) return p["_"..f](args) end return p j5a6l03tjwodgrvfnv3lb4x5up93wlv 116958 116649 2026-07-16T11:15:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Wd]] 116649 Scribunto text/plain -- Original module located at [[:en:Module:Wd]] and [[:en:Module:Wd/i18n]]. require("strict") local p = {} local module_arg = ... local i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from frame title = frame:getTitle() else -- current module included by other module, get its title from ... title = module_arg end if not i18n then i18nPath = title .. "/i18n" i18n = require(i18nPath).init(aliasesP) end end p.claimCommands = { property = "property", properties = "properties", qualifier = "qualifier", qualifiers = "qualifiers", reference = "reference", references = "references" } p.generalCommands = { label = "label", title = "title", description = "description", alias = "alias", aliases = "aliases", badge = "badge", badges = "badges" } p.flags = { linked = "linked", short = "short", raw = "raw", multilanguage = "multilanguage", unit = "unit", ------------- preferred = "preferred", normal = "normal", deprecated = "deprecated", best = "best", future = "future", current = "current", former = "former", edit = "edit", editAtEnd = "edit@end", mdy = "mdy", single = "single", sourced = "sourced" } p.args = { eid = "eid", page = "page", date = "date", globalSiteId = "globalSiteId" } local aliasesP = { coord = "P625", ----------------------- image = "P18", author = "P50", authorNameString = "P2093", publisher = "P123", importedFrom = "P143", wikimediaImportURL = "P4656", statedIn = "P248", pages = "P304", language = "P407", hasPart = "P527", publicationDate = "P577", startTime = "P580", endTime = "P582", chapter = "P792", retrieved = "P813", referenceURL = "P854", sectionVerseOrParagraph = "P958", archiveURL = "P1065", title = "P1476", formatterURL = "P1630", quote = "P1683", shortName = "P1813", definingFormula = "P2534", archiveDate = "P2960", inferredFrom = "P3452", typeOfReference = "P3865", column = "P3903", subjectNamedAs = "P1810", wikidataProperty = "P1687", publishedIn = "P1433", lastUpdate = "P5017" } local aliasesQ = { percentage = "Q11229", prolepticJulianCalendar = "Q1985786", citeWeb = "Q5637226", citeQ = "Q22321052" } local parameters = { property = "%p", qualifier = "%q", reference = "%r", alias = "%a", badge = "%b", separator = "%s", general = "%x" } local formats = { property = "%p[%s][%r]", qualifier = "%q[%s][%r]", reference = "%r", propertyWithQualifier = "%p[ <span style=\"font-size:85\\%\">(%q)</span>][%s][%r]", alias = "%a[%s]", badge = "%b[%s]" } local hookNames = { -- {level_1, level_2} [parameters.property] = {"getProperty"}, [parameters.reference] = {"getReferences", "getReference"}, [parameters.qualifier] = {"getAllQualifiers"}, [parameters.qualifier.."\\d"] = {"getQualifiers", "getQualifier"}, [parameters.alias] = {"getAlias"}, [parameters.badge] = {"getBadge"} } -- default value objects, should NOT be mutated but instead copied local defaultSeparators = { ["sep"] = {" "}, ["sep%s"] = {","}, ["sep%q"] = {"; "}, ["sep%q\\d"] = {", "}, ["sep%r"] = nil, -- none ["punc"] = nil -- none } local rankTable = { ["preferred"] = 1, ["normal"] = 2, ["deprecated"] = 3 } local function replaceAlias(id) if aliasesP[id] then id = aliasesP[id] end return id end local function errorText(code, ...) local text = i18n["errors"][code] if arg then text = mw.ustring.format(text, unpack(arg)) end return text end local function throwError(errorMessage, ...) error(errorText(errorMessage, unpack(arg))) end local function replaceDecimalMark(num) return mw.ustring.gsub(num, "[.]", i18n['numeric']['decimal-mark'], 1) end local function padZeros(num, numDigits) local numZeros local negative = false if num < 0 then negative = true num = num * -1 end num = tostring(num) numZeros = numDigits - num:len() for _ = 1, numZeros do num = "0"..num end if negative then num = "-"..num end return num end local function replaceSpecialChar(chr) if chr == '_' then -- replace underscores with spaces return ' ' else return chr end end local function replaceSpecialChars(str) local chr local esc = false local strOut = "" for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then esc = true else strOut = strOut .. replaceSpecialChar(chr) end else strOut = strOut .. chr esc = false end end return strOut end local function buildWikilink(target, label) if not label or target == label then return "[[" .. target .. "]]" else return "[[" .. target .. "|" .. label .. "]]" end end -- used to make frame.args mutable, to replace #frame.args (which is always 0) -- with the actual amount and to simply copy tables local function copyTable(tIn) if not tIn then return nil end local tOut = {} for i, v in pairs(tIn) do tOut[i] = v end return tOut end -- used to merge output arrays together; -- note that it currently mutates the first input array local function mergeArrays(a1, a2) for i = 1, #a2 do a1[#a1 + 1] = a2[i] end return a1 end local function split(str, del) local out = {} local i, j = str:find(del) if i and j then out[1] = str:sub(1, i - 1) out[2] = str:sub(j + 1) else out[1] = str end return out end local function parseWikidataURL(url) local id if url:match('^http[s]?://') then id = split(url, "Q") if id[2] then return "Q" .. id[2] end end return nil end local function parseDate(dateStr, precision) precision = precision or "d" local i, j, index, ptr local parts = {nil, nil, nil} if dateStr == nil then return parts[1], parts[2], parts[3] -- year, month, day end -- 'T' for snak values, '/' for outputs with '/Julian' attached i, j = dateStr:find("[T/]") if i then dateStr = dateStr:sub(1, i-1) end local from = 1 if dateStr:sub(1,1) == "-" then -- this is a negative number, look further ahead from = 2 end index = 1 ptr = 1 i, j = dateStr:find("-", from) if i then -- year parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) -- explicitly give base 10 to prevent error if parts[index] == -0 then parts[index] = tonumber("0") -- for some reason, 'parts[index] = 0' may actually store '-0', so parse from string instead end if precision == "y" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 i, j = dateStr:find("-", ptr) if i then -- month parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) if precision == "m" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 end end if dateStr:sub(ptr) ~= "" then -- day if we have month, month if we have year, or year parts[index] = tonumber(dateStr:sub(ptr), 10) end return parts[1], parts[2], parts[3] -- year, month, day end local function datePrecedesDate(aY, aM, aD, bY, bM, bD) if aY == nil or bY == nil then return nil end aM = aM or 1 aD = aD or 1 bM = bM or 1 bD = bD or 1 if aY < bY then return true end if aY > bY then return false end if aM < bM then return true end if aM > bM then return false end if aD < bD then return true end return false end local function getHookName(param, index) if hookNames[param] then return hookNames[param][index] elseif param:len() > 2 then return hookNames[param:sub(1, 2).."\\d"][index] else return nil end end local function alwaysTrue() return true end -- The following function parses a format string. -- -- The example below shows how a parsed string is structured in memory. -- Variables other than 'str' and 'child' are left out for clarity's sake. -- -- Example: -- "A %p B [%s[%q1]] C [%r] D" -- -- Structure: -- [ -- { -- str = "A " -- }, -- { -- str = "%p" -- }, -- { -- str = " B ", -- child = -- [ -- { -- str = "%s", -- child = -- [ -- { -- str = "%q1" -- } -- ] -- } -- ] -- }, -- { -- str = " C ", -- child = -- [ -- { -- str = "%r" -- } -- ] -- }, -- { -- str = " D" -- } -- ] -- local function parseFormat(str) local chr, esc, param, root, cur, prev, new local params = {} local function newObject(array) local obj = {} -- new object obj.str = "" array[#array + 1] = obj -- array{object} obj.parent = array return obj end local function endParam() if param > 0 then if cur.str ~= "" then cur.str = "%"..cur.str cur.param = true params[cur.str] = true cur.parent.req[cur.str] = true prev = cur cur = newObject(cur.parent) end param = 0 end end root = {} -- array root.req = {} cur = newObject(root) prev = nil esc = false param = 0 for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then endParam() esc = true elseif chr == '%' then endParam() if cur.str ~= "" then cur = newObject(cur.parent) end param = 2 elseif chr == '[' then endParam() if prev and cur.str == "" then table.remove(cur.parent) cur = prev end cur.child = {} -- new array cur.child.req = {} cur.child.parent = cur cur = newObject(cur.child) elseif chr == ']' then endParam() if cur.parent.parent then new = newObject(cur.parent.parent.parent) if cur.str == "" then table.remove(cur.parent) end cur = new end else if param > 1 then param = param - 1 elseif param == 1 then if not chr:match('%d') then endParam() end end cur.str = cur.str .. replaceSpecialChar(chr) end else cur.str = cur.str .. chr esc = false end prev = nil end endParam() -- make sure that at least one required parameter has been defined if not next(root.req) then throwError("missing-required-parameter") end -- make sure that the separator parameter "%s" is not amongst the required parameters if root.req[parameters.separator] then throwError("extra-required-parameter", parameters.separator) end return root, params end local function sortOnRank(claims) local rankPos local ranks = {{}, {}, {}, {}} -- preferred, normal, deprecated, (default) local sorted = {} for _, v in ipairs(claims) do rankPos = rankTable[v.rank] or 4 ranks[rankPos][#ranks[rankPos] + 1] = v end sorted = ranks[1] sorted = mergeArrays(sorted, ranks[2]) sorted = mergeArrays(sorted, ranks[3]) return sorted end local function isValueInTable(searchedItem, inputTable) for _, item in pairs(inputTable) do if item == searchedItem then return true end end return false end local Config = {} -- allows for recursive calls function Config:new() local cfg = {} setmetatable(cfg, self) self.__index = self cfg.separators = { -- single value objects wrapped in arrays so that we can pass by reference ["sep"] = {copyTable(defaultSeparators["sep"])}, ["sep%s"] = {copyTable(defaultSeparators["sep%s"])}, ["sep%q"] = {copyTable(defaultSeparators["sep%q"])}, ["sep%r"] = {copyTable(defaultSeparators["sep%r"])}, ["punc"] = {copyTable(defaultSeparators["punc"])} } cfg.entity = nil cfg.entityID = nil cfg.propertyID = nil cfg.propertyValue = nil cfg.qualifierIDs = {} cfg.qualifierIDsAndValues = {} cfg.bestRank = true cfg.ranks = {true, true, false} -- preferred = true, normal = true, deprecated = false cfg.foundRank = #cfg.ranks cfg.flagBest = false cfg.flagRank = false cfg.periods = {true, true, true} -- future = true, current = true, former = true cfg.flagPeriod = false cfg.atDate = {parseDate(os.date('!%Y-%m-%d'))} -- today as {year, month, day} cfg.mdyDate = false cfg.singleClaim = false cfg.sourcedOnly = false cfg.editable = false cfg.editAtEnd = false cfg.inSitelinks = false cfg.langCode = mw.language.getContentLanguage().code cfg.langName = mw.language.fetchLanguageName(cfg.langCode, cfg.langCode) cfg.langObj = mw.language.new(cfg.langCode) cfg.siteID = mw.wikibase.getGlobalSiteId() cfg.states = {} cfg.states.qualifiersCount = 0 cfg.curState = nil cfg.prefetchedRefs = nil return cfg end local State = {} function State:new(cfg, type) local stt = {} setmetatable(stt, self) self.__index = self stt.conf = cfg stt.type = type stt.results = {} stt.parsedFormat = {} stt.separator = {} stt.movSeparator = {} stt.puncMark = {} stt.linked = false stt.rawValue = false stt.shortName = false stt.anyLanguage = false stt.unitOnly = false stt.singleValue = false return stt end -- if id == nil then item connected to current page is used function Config:getLabel(id, raw, link, short) local label = nil local prefix, title= "", nil if not id then id = mw.wikibase.getEntityIdForCurrentPage() if not id then return "" end end id = id:upper() -- just to be sure if raw then -- check if given id actually exists if mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id) then label = id end prefix, title = "d:Special:EntityPage/", label -- may be nil else -- try short name first if requested if short then label = p._property{aliasesP.shortName, [p.args.eid] = id} -- get short name if label == "" then label = nil end end -- get label if not label then label = mw.wikibase.getLabel(id) end end if not label then label = "" elseif link then -- build a link if requested if not title then if id:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(id) elseif id:sub(1,1) == "P" then -- properties have no sitelink, link to Wikidata instead prefix, title = "d:Special:EntityPage/", id end end label = mw.text.nowiki(label) -- escape raw label text so it cannot be wikitext markup if title then label = buildWikilink(prefix .. title, label) end end return label end function Config:getEditIcon() local value = "" local prefix = "" local front = "&nbsp;" local back = "" if self.entityID:sub(1,1) == "P" then prefix = "Property:" end if self.editAtEnd then front = '<span style="float:' if self.langObj:isRTL() then front = front .. 'left' else front = front .. 'right' end front = front .. '">' back = '</span>' end value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode if self.propertyID then value = value .. "#" .. self.propertyID elseif self.inSitelinks then value = value .. "#sitelinks-wikipedia" end value = value .. "|" .. i18n['info']['edit-on-wikidata'] .. "]]" return front .. value .. back end -- used to create the final output string when it's all done, so that for references the -- function extensionTag("ref", ...) is only called when they really ended up in the final output function Config:concatValues(valuesArray) local outString = "" local j, skip for i = 1, #valuesArray do -- check if this is a reference if valuesArray[i].refHash then j = i - 1 skip = false -- skip this reference if it is part of a continuous row of references that already contains the exact same reference while valuesArray[j] and valuesArray[j].refHash do if valuesArray[i].refHash == valuesArray[j].refHash then skip = true break end j = j - 1 end if not skip then -- add <ref> tag with the reference's hash as its name (to deduplicate references) outString = outString .. mw.getCurrentFrame():extensionTag("ref", valuesArray[i][1], {name = valuesArray[i].refHash}) end else outString = outString .. valuesArray[i][1] end end return outString end function Config:convertUnit(unit, raw, link, short, unitOnly) local space = " " local label = "" local itemID if unit == "" or unit == "1" then return nil end if unitOnly then space = "" end itemID = parseWikidataURL(unit) if itemID then if itemID == aliasesQ.percentage then return "%" else label = self:getLabel(itemID, raw, link, short) if label ~= "" then return space .. label end end end return "" end function State:getValue(snak) return self.conf:getValue(snak, self.rawValue, self.linked, self.shortName, self.anyLanguage, self.unitOnly, false, self.type:sub(1,2)) end function Config:getValue(snak, raw, link, short, anyLang, unitOnly, noSpecial, type) if snak.snaktype == 'value' then local datatype = snak.datavalue.type local subtype = snak.datatype local datavalue = snak.datavalue.value if datatype == 'string' then if subtype == 'url' and link then -- create link explicitly if raw then -- will render as a linked number like [1] return "[" .. datavalue .. "]" else return "[" .. datavalue .. " " .. datavalue .. "]" end elseif subtype == 'commonsMedia' then if link then return buildWikilink("c:File:" .. datavalue, datavalue) elseif not raw then return "[[File:" .. datavalue .. "]]" else return datavalue end elseif subtype == 'geo-shape' and link then return buildWikilink("c:" .. datavalue, datavalue) elseif subtype == 'math' and not raw then local attribute = nil if (type == parameters.property or (type == parameters.qualifier and self.propertyID == aliasesP.hasPart)) and snak.property == aliasesP.definingFormula then attribute = {qid = self.entityID} end return mw.getCurrentFrame():extensionTag("math", datavalue, attribute) elseif subtype == 'external-id' and link then local url = p._property{aliasesP.formatterURL, [p.args.eid] = snak.property} -- get formatter URL if url ~= "" then url = mw.ustring.gsub(url, "$1", datavalue) return "[" .. url .. " " .. datavalue .. "]" else return datavalue end else return datavalue end elseif datatype == 'monolingualtext' then if anyLang or datavalue['language'] == self.langCode then return datavalue['text'] else return nil end elseif datatype == 'quantity' then local value = "" local unit if not unitOnly then -- get value and strip + signs from front value = mw.ustring.gsub(datavalue['amount'], "^%+(.+)$", "%1") if raw then return value end -- replace decimal mark based on locale value = replaceDecimalMark(value) -- add delimiters for readability value = i18n.addDelimiters(value) end unit = self:convertUnit(datavalue['unit'], raw, link, short, unitOnly) if unit then value = value .. unit end return value elseif datatype == 'time' then local y, m, d, p, yDiv, yRound, yFull, value, calendarID, dateStr local yFactor = 1 local sign = 1 local prefix = "" local suffix = "" local mayAddCalendar = false local calendar = "" local precision = datavalue['precision'] if precision == 11 then p = "d" elseif precision == 10 then p = "m" else p = "y" yFactor = 10^(9-precision) end y, m, d = parseDate(datavalue['time'], p) if y < 0 then sign = -1 y = y * sign end -- if precision is tens/hundreds/thousands/millions/billions of years if precision <= 8 then yDiv = y / yFactor -- if precision is tens/hundreds/thousands of years if precision >= 6 then mayAddCalendar = true if precision <= 7 then -- round centuries/millenniums up (e.g. 20th century or 3rd millennium) yRound = math.ceil(yDiv) if not raw then if precision == 6 then suffix = i18n['datetime']['suffixes']['millennium'] else suffix = i18n['datetime']['suffixes']['century'] end suffix = i18n.getOrdinalSuffix(yRound) .. suffix else -- if not verbose, take the first year of the century/millennium -- (e.g. 1901 for 20th century or 2001 for 3rd millennium) yRound = (yRound - 1) * yFactor + 1 end else -- precision == 8 -- round decades down (e.g. 2010s) yRound = math.floor(yDiv) * yFactor if not raw then prefix = i18n['datetime']['prefixes']['decade-period'] suffix = i18n['datetime']['suffixes']['decade-period'] end end if raw and sign < 0 then -- if BCE then compensate for "counting backwards" -- (e.g. -2019 for 2010s BCE, -2000 for 20th century BCE or -3000 for 3rd millennium BCE) yRound = yRound + yFactor - 1 end else local yReFactor, yReDiv, yReRound -- round to nearest for tens of thousands of years or more yRound = math.floor(yDiv + 0.5) if yRound == 0 then if precision <= 2 and y ~= 0 then yReFactor = 1e6 yReDiv = y / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years only if we have a whole number of them precision = 3 yFactor = yReFactor yRound = yReRound end end if yRound == 0 then -- otherwise, take the unrounded (original) number of years precision = 5 yFactor = 1 yRound = y mayAddCalendar = true end end if precision >= 1 and y ~= 0 then yFull = yRound * yFactor yReFactor = 1e9 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to billions of years if we're in that range precision = 0 yFactor = yReFactor yRound = yReRound else yReFactor = 1e6 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years if we're in that range precision = 3 yFactor = yReFactor yRound = yReRound end end end if not raw then if precision == 3 then suffix = i18n['datetime']['suffixes']['million-years'] elseif precision == 0 then suffix = i18n['datetime']['suffixes']['billion-years'] else yRound = yRound * yFactor if yRound == 1 then suffix = i18n['datetime']['suffixes']['year'] else suffix = i18n['datetime']['suffixes']['years'] end end else yRound = yRound * yFactor end end else yRound = y mayAddCalendar = true end if mayAddCalendar then calendarID = parseWikidataURL(datavalue['calendarmodel']) if calendarID and calendarID == aliasesQ.prolepticJulianCalendar then if not raw then if link then calendar = " ("..buildWikilink(i18n['datetime']['julian-calendar'], i18n['datetime']['julian'])..")" else calendar = " ("..i18n['datetime']['julian']..")" end else calendar = "/"..i18n['datetime']['julian'] end end end if not raw then local ce = nil if sign < 0 then ce = i18n['datetime']['BCE'] elseif precision <= 5 then ce = i18n['datetime']['CE'] end if ce then if link then ce = buildWikilink(i18n['datetime']['common-era'], ce) end suffix = suffix .. " " .. ce end value = tostring(yRound) if m then dateStr = self.langObj:formatDate("F", "1-"..m.."-1") if d then if self.mdyDate then dateStr = dateStr .. " " .. d .. "," else dateStr = d .. " " .. dateStr end end value = dateStr .. " " .. value end value = prefix .. value .. suffix .. calendar else value = padZeros(yRound * sign, 4) if m then value = value .. "-" .. padZeros(m, 2) if d then value = value .. "-" .. padZeros(d, 2) end end value = value .. calendar end return value elseif datatype == 'globecoordinate' then -- logic from https://github.com/DataValues/Geo (v4.0.1) local precision, unitsPerDegree, numDigits, strFormat, value, globe local latitude, latConv, latValue, latLink local longitude, lonConv, lonValue, lonLink local latDirection, latDirectionN, latDirectionS, latDirectionEN local lonDirection, lonDirectionE, lonDirectionW, lonDirectionEN local degSymbol, minSymbol, secSymbol, separator local latDegrees = nil local latMinutes = nil local latSeconds = nil local lonDegrees = nil local lonMinutes = nil local lonSeconds = nil local latDegSym = "" local latMinSym = "" local latSecSym = "" local lonDegSym = "" local lonMinSym = "" local lonSecSym = "" local latDirectionEN_N = "N" local latDirectionEN_S = "S" local lonDirectionEN_E = "E" local lonDirectionEN_W = "W" if not raw then latDirectionN = i18n['coord']['latitude-north'] latDirectionS = i18n['coord']['latitude-south'] lonDirectionE = i18n['coord']['longitude-east'] lonDirectionW = i18n['coord']['longitude-west'] degSymbol = i18n['coord']['degrees'] minSymbol = i18n['coord']['minutes'] secSymbol = i18n['coord']['seconds'] separator = i18n['coord']['separator'] else latDirectionN = latDirectionEN_N latDirectionS = latDirectionEN_S lonDirectionE = lonDirectionEN_E lonDirectionW = lonDirectionEN_W degSymbol = "/" minSymbol = "/" secSymbol = "/" separator = "/" end latitude = datavalue['latitude'] longitude = datavalue['longitude'] if latitude < 0 then latDirection = latDirectionS latDirectionEN = latDirectionEN_S latitude = math.abs(latitude) else latDirection = latDirectionN latDirectionEN = latDirectionEN_N end if longitude < 0 then lonDirection = lonDirectionW lonDirectionEN = lonDirectionEN_W longitude = math.abs(longitude) else lonDirection = lonDirectionE lonDirectionEN = lonDirectionEN_E end precision = datavalue['precision'] if not precision or precision <= 0 then precision = 1 / 3600 -- precision not set (correctly), set to arcsecond end -- remove insignificant detail latitude = math.floor(latitude / precision + 0.5) * precision longitude = math.floor(longitude / precision + 0.5) * precision if precision >= 1 - (1 / 60) and precision < 1 then precision = 1 elseif precision >= (1 / 60) - (1 / 3600) and precision < (1 / 60) then precision = 1 / 60 end if precision >= 1 then unitsPerDegree = 1 elseif precision >= (1 / 60) then unitsPerDegree = 60 else unitsPerDegree = 3600 end numDigits = math.ceil(-math.log10(unitsPerDegree * precision)) if numDigits <= 0 then numDigits = tonumber("0") -- for some reason, 'numDigits = 0' may actually store '-0', so parse from string instead end strFormat = "%." .. numDigits .. "f" if precision >= 1 then latDegrees = strFormat:format(latitude) lonDegrees = strFormat:format(longitude) if not raw then latDegSym = replaceDecimalMark(latDegrees) .. degSymbol lonDegSym = replaceDecimalMark(lonDegrees) .. degSymbol else latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol end else latConv = math.floor(latitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits lonConv = math.floor(longitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits if precision >= (1 / 60) then latMinutes = latConv lonMinutes = lonConv else latSeconds = latConv lonSeconds = lonConv latMinutes = math.floor(latSeconds / 60) lonMinutes = math.floor(lonSeconds / 60) latSeconds = strFormat:format(latSeconds - (latMinutes * 60)) lonSeconds = strFormat:format(lonSeconds - (lonMinutes * 60)) if not raw then latSecSym = replaceDecimalMark(latSeconds) .. secSymbol lonSecSym = replaceDecimalMark(lonSeconds) .. secSymbol else latSecSym = latSeconds .. secSymbol lonSecSym = lonSeconds .. secSymbol end end latDegrees = math.floor(latMinutes / 60) lonDegrees = math.floor(lonMinutes / 60) latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol latMinutes = latMinutes - (latDegrees * 60) lonMinutes = lonMinutes - (lonDegrees * 60) if precision >= (1 / 60) then latMinutes = strFormat:format(latMinutes) lonMinutes = strFormat:format(lonMinutes) if not raw then latMinSym = replaceDecimalMark(latMinutes) .. minSymbol lonMinSym = replaceDecimalMark(lonMinutes) .. minSymbol else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end end latValue = latDegSym .. latMinSym .. latSecSym .. latDirection lonValue = lonDegSym .. lonMinSym .. lonSecSym .. lonDirection value = latValue .. separator .. lonValue if link then globe = parseWikidataURL(datavalue['globe']) if globe then globe = mw.wikibase.getLabelByLang(globe, "en"):lower() else globe = "earth" end latLink = table.concat({latDegrees, latMinutes, latSeconds}, "_") lonLink = table.concat({lonDegrees, lonMinutes, lonSeconds}, "_") value = "[https://geohack.toolforge.org/geohack.php?language="..self.langCode.."&params="..latLink.."_"..latDirectionEN.."_"..lonLink.."_"..lonDirectionEN.."_globe:"..globe.." "..value.."]" end return value elseif datatype == 'wikibase-entityid' then local label local itemID = datavalue['numeric-id'] if subtype == 'wikibase-item' then itemID = "Q" .. itemID elseif subtype == 'wikibase-property' then itemID = "P" .. itemID else return '<strong class="error">' .. errorText('unknown-data-type', subtype) .. '</strong>' end label = self:getLabel(itemID, raw, link, short) if label == "" then label = nil end return label else return '<strong class="error">' .. errorText('unknown-data-type', datatype) .. '</strong>' end elseif snak.snaktype == 'somevalue' and not noSpecial then if raw then return " " -- single space represents 'somevalue' else return i18n['values']['unknown'] end elseif snak.snaktype == 'novalue' and not noSpecial then if raw then return "" -- empty string represents 'novalue' else return i18n['values']['none'] end else return nil end end function Config:getSingleRawQualifier(claim, qualifierID) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[qualifierID] end if qualifiers and qualifiers[1] then return self:getValue(qualifiers[1], true) -- raw = true else return nil end end function Config:snakEqualsValue(snak, value) local snakValue = self:getValue(snak, true) -- raw = true if snakValue and snak.snaktype == 'value' and snak.datavalue.type == 'wikibase-entityid' then value = value:upper() end return snakValue == value end function Config:setRank(rank) local rankPos if rank == p.flags.best then self.bestRank = true self.flagBest = true -- mark that 'best' flag was given return end if rank:sub(1,9) == p.flags.preferred then rankPos = 1 elseif rank:sub(1,6) == p.flags.normal then rankPos = 2 elseif rank:sub(1,10) == p.flags.deprecated then rankPos = 3 else return end -- one of the rank flags was given, check if another one was given before if not self.flagRank then self.ranks = {false, false, false} -- no other rank flag given before, so unset ranks self.bestRank = self.flagBest -- unsets bestRank only if 'best' flag was not given before self.flagRank = true -- mark that a rank flag was given end if rank:sub(-1) == "+" then for i = rankPos, 1, -1 do self.ranks[i] = true end elseif rank:sub(-1) == "-" then for i = rankPos, #self.ranks do self.ranks[i] = true end else self.ranks[rankPos] = true end end function Config:setPeriod(period) local periodPos if period == p.flags.future then periodPos = 1 elseif period == p.flags.current then periodPos = 2 elseif period == p.flags.former then periodPos = 3 else return end -- one of the period flags was given, check if another one was given before if not self.flagPeriod then self.periods = {false, false, false} -- no other period flag given before, so unset periods self.flagPeriod = true -- mark that a period flag was given end self.periods[periodPos] = true end function Config:qualifierMatches(claim, id, value) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[id] end if qualifiers then for _, v in pairs(qualifiers) do if self:snakEqualsValue(v, value) then return true end end elseif value == "" then -- if the qualifier is not present then treat it the same as the special value 'novalue' return true end return false end function Config:rankMatches(rankPos) if self.bestRank then return (self.ranks[rankPos] and self.foundRank >= rankPos) else return self.ranks[rankPos] end end function Config:timeMatches(claim) local startTime = nil local startTimeY = nil local startTimeM = nil local startTimeD = nil local endTime = nil local endTimeY = nil local endTimeM = nil local endTimeD = nil if self.periods[1] and self.periods[2] and self.periods[3] then -- any time return true end startTime = self:getSingleRawQualifier(claim, aliasesP.startTime) if startTime and startTime ~= "" and startTime ~= " " then startTimeY, startTimeM, startTimeD = parseDate(startTime) end endTime = self:getSingleRawQualifier(claim, aliasesP.endTime) if endTime and endTime ~= "" and endTime ~= " " then endTimeY, endTimeM, endTimeD = parseDate(endTime) end if startTimeY ~= nil and endTimeY ~= nil and datePrecedesDate(endTimeY, endTimeM, endTimeD, startTimeY, startTimeM, startTimeD) then -- invalidate end time if it precedes start time endTimeY = nil endTimeM = nil endTimeD = nil end if self.periods[1] then -- future if startTimeY and datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD) then return true end end if self.periods[2] then -- current if (startTimeY == nil or not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD)) and (endTimeY == nil or datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD)) then return true end end if self.periods[3] then -- former if endTimeY and not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD) then return true end end return false end function Config:processFlag(flag) if not flag then return false end if flag == p.flags.linked then self.curState.linked = true return true elseif flag == p.flags.raw then self.curState.rawValue = true if self.curState == self.states[parameters.reference] then -- raw reference values end with periods and require a separator (other than none) self.separators["sep%r"][1] = {" "} end return true elseif flag == p.flags.short then self.curState.shortName = true return true elseif flag == p.flags.multilanguage then self.curState.anyLanguage = true return true elseif flag == p.flags.unit then self.curState.unitOnly = true return true elseif flag == p.flags.mdy then self.mdyDate = true return true elseif flag == p.flags.single then self.singleClaim = true return true elseif flag == p.flags.sourced then self.sourcedOnly = true return true elseif flag == p.flags.edit then self.editable = true return true elseif flag == p.flags.editAtEnd then self.editable = true self.editAtEnd = true return true elseif flag == p.flags.best or flag:match('^'..p.flags.preferred..'[+-]?$') or flag:match('^'..p.flags.normal..'[+-]?$') or flag:match('^'..p.flags.deprecated..'[+-]?$') then self:setRank(flag) return true elseif flag == p.flags.future or flag == p.flags.current or flag == p.flags.former then self:setPeriod(flag) return true elseif flag == "" then -- ignore empty flags and carry on return true else return false end end function Config:processFlagOrCommand(flag) local param = "" if not flag then return false end if flag == p.claimCommands.property or flag == p.claimCommands.properties then param = parameters.property elseif flag == p.claimCommands.qualifier or flag == p.claimCommands.qualifiers then self.states.qualifiersCount = self.states.qualifiersCount + 1 param = parameters.qualifier .. self.states.qualifiersCount self.separators["sep"..param] = {copyTable(defaultSeparators["sep%q\\d"])} elseif flag == p.claimCommands.reference or flag == p.claimCommands.references then param = parameters.reference else return self:processFlag(flag) end if self.states[param] then return false end -- create a new state for each command self.states[param] = State:new(self, param) -- use "%x" as the general parameter name self.states[param].parsedFormat = parseFormat(parameters.general) -- will be overwritten for param=="%p" -- set the separator self.states[param].separator = self.separators["sep"..param] -- will be nil for param=="%p", which will be set separately if flag == p.claimCommands.property or flag == p.claimCommands.qualifier or flag == p.claimCommands.reference then self.states[param].singleValue = true end self.curState = self.states[param] return true end function Config:processSeparators(args) local sep for i, v in pairs(self.separators) do if args[i] then sep = replaceSpecialChars(args[i]) if sep ~= "" then self.separators[i][1] = {sep} else self.separators[i][1] = nil end end end end function Config:setFormatAndSeparators(state, parsedFormat) state.parsedFormat = parsedFormat state.separator = self.separators["sep"] state.movSeparator = self.separators["sep"..parameters.separator] state.puncMark = self.separators["punc"] end -- determines if a claim has references by prefetching them from the claim using getReferences, -- which applies some filtering that determines if a reference is actually returned, -- and caches the references for later use function State:isSourced(claim) self.conf.prefetchedRefs = self:getReferences(claim) return (#self.conf.prefetchedRefs > 0) end function State:resetCaches() -- any prefetched references of the previous claim must not be used self.conf.prefetchedRefs = nil end function State:claimMatches(claim) local matches, rankPos -- first of all, reset any cached values used for the previous claim self:resetCaches() -- if a property value was given, check if it matches the claim's property value if self.conf.propertyValue then matches = self.conf:snakEqualsValue(claim.mainsnak, self.conf.propertyValue) else matches = true end -- if any qualifier values were given, check if each matches one of the claim's qualifier values for i, v in pairs(self.conf.qualifierIDsAndValues) do matches = (matches and self.conf:qualifierMatches(claim, i, v)) end -- check if the claim's rank and time period match rankPos = rankTable[claim.rank] or 4 matches = (matches and self.conf:rankMatches(rankPos) and self.conf:timeMatches(claim)) -- if only claims with references must be returned, check if this one has any if self.conf.sourcedOnly then matches = (matches and self:isSourced(claim)) -- prefetches and caches references end return matches, rankPos end function State:out() local result -- collection of arrays with value objects local valuesArray -- array with value objects local sep = nil -- value object local out = {} -- array with value objects local function walk(formatTable, result) local valuesArray = {} -- array with value objects for i, v in pairs(formatTable.req) do if not result[i] or not result[i][1] then -- we've got no result for a parameter that is required on this level, -- so skip this level (and its children) by returning an empty result return {} end end for _, v in ipairs(formatTable) do if v.param then valuesArray = mergeArrays(valuesArray, result[v.str]) elseif v.str ~= "" then valuesArray[#valuesArray + 1] = {v.str} end if v.child then valuesArray = mergeArrays(valuesArray, walk(v.child, result)) end end return valuesArray end -- iterate through the results from back to front, so that we know when to add separators for i = #self.results, 1, -1 do result = self.results[i] -- if there is already some output, then add the separators if #out > 0 then sep = self.separator[1] -- fixed separator result[parameters.separator] = {self.movSeparator[1]} -- movable separator else sep = nil result[parameters.separator] = {self.puncMark[1]} -- optional punctuation mark end valuesArray = walk(self.parsedFormat, result) if #valuesArray > 0 then if sep then valuesArray[#valuesArray + 1] = sep end out = mergeArrays(valuesArray, out) end end -- reset state before next iteration self.results = {} return out end -- level 1 hook function State:getProperty(claim) local value = {self:getValue(claim.mainsnak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getQualifiers(claim, param) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[self.conf.qualifierIDs[param]] end if qualifiers then -- iterate through claim's qualifier statements to collect their values; -- return array with multiple value objects return self.conf.states[param]:iterate(qualifiers, {[parameters.general] = hookNames[parameters.qualifier.."\\d"][2], count = 1}) -- pass qualifier state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getQualifier(snak) local value = {self:getValue(snak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getAllQualifiers(claim, param, result, hooks) local out = {} -- array with value objects local sep = self.conf.separators["sep"..parameters.qualifier][1] -- value object -- iterate through the output of the separate "qualifier(s)" commands for i = 1, self.conf.states.qualifiersCount do -- if a hook has not been called yet, call it now if not result[parameters.qualifier..i] then self:callHook(parameters.qualifier..i, hooks, claim, result) end -- if there is output for this particular "qualifier(s)" command, then add it if result[parameters.qualifier..i] and result[parameters.qualifier..i][1] then -- if there is already some output, then add the separator if #out > 0 and sep then out[#out + 1] = sep end out = mergeArrays(out, result[parameters.qualifier..i]) end end return out end -- level 1 hook function State:getReferences(claim) if self.conf.prefetchedRefs then -- return references that have been prefetched by isSourced return self.conf.prefetchedRefs end if claim.references then -- iterate through claim's reference statements to collect their values; -- return array with multiple value objects return self.conf.states[parameters.reference]:iterate(claim.references, {[parameters.general] = hookNames[parameters.reference][2], count = 1}) -- pass reference state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getReference(statement) local citeParamMapping = i18n['cite']['param-mapping'] local citeConfig = i18n['cite']['config'] local citeTypes = i18n['cite']['output-types'] -- will hold rendered properties of the reference which are not directly from statement.snaks, -- Namely, is URL generated from an external ID. local additionalProcessedProperties = {} -- for each citation type, there will be an associative array that associates lists of rendered properties -- to citation-template parameters local candidateParams = {} -- like above, but only associates one rendered property to each parameter; if the above variable -- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1") local citeParams = {} local citeErrors = {} local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved local version = 12 -- increment this each time the below logic is changed to avoid conflict errors if not statement.snaks then return {} end -- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia) if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then return {} end -- don't include "type of reference" if statement.snaks[aliasesP.typeOfReference] then statement.snaks[aliasesP.typeOfReference] = nil end -- don't include "image" to prevent littering if statement.snaks[aliasesP.image] then statement.snaks[aliasesP.image] = nil end -- don't include "language" if it is equal to the local one if self:getReferenceDetail(statement.snaks, aliasesP.language) == self.conf.langName then statement.snaks[aliasesP.language] = nil end if statement.snaks[aliasesP.statedIn] and not statement.snaks[aliasesP.referenceURL] then -- "stated in" was given but "reference URL" was not. -- get "Wikidata property" properties from the item in "stated in" -- if any of the returned properties of the external-id datatype is in statement.snaks, generate a link from it and use the link in the reference -- find the "Wikidata property" properties in the item from "stated in" local wikidataPropertiesOfSource = mw.text.split(p._properties{p.flags.raw, aliasesP.wikidataProperty, [p.args.eid] = self.conf:getValue(statement.snaks[aliasesP.statedIn][1], true, false)}, ", ", true) for i, wikidataPropertyOfSource in pairs(wikidataPropertiesOfSource) do if statement.snaks[wikidataPropertyOfSource] and statement.snaks[wikidataPropertyOfSource][1].datatype == "external-id" then local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets. -- the link is in wiki markup, so strip the square brackets and the display text -- gsub also returns another, discarted value, therefore the result is assigned to tempLink first tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1") additionalProcessedProperties[aliasesP.referenceURL] = {tempLink} statement.snaks[wikidataPropertyOfSource] = nil break end end end end -- initialize candidateParams and citeParams for _, citeType in ipairs(citeTypes) do candidateParams[citeType] = {} citeParams[citeType] = {} end -- fill candidateParams for _, citeType in ipairs(citeTypes) do -- This will contain value--priority pairs for each param name. local candidateValuesAndPriorities = {} -- fill candidateValuesAndPriorities for refProperty in pairs(statement.snaks) do if citeErrors[citeType] then break end repeat -- just a simple wrapper to emulate "continue" -- set mappingKey and prefix local mappingKey local prefix = "" if statement.snaks[refProperty][1].datatype == 'external-id' then mappingKey = "external-id" prefix = self.conf:getLabel(refProperty) if prefix ~= "" then prefix = prefix .. " " end else mappingKey = refProperty end local paramName = citeParamMapping[citeType][mappingKey] -- skip properties with empty parameter name if paramName == "" then break -- skip this property for this value of citeType end -- handle unknown properties in the reference if not paramName then referenceEmpty = false local error_message = errorText("unknown-property-in-ref", refProperty) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message break end -- set processedProperty local processedProperty local raw = false -- if the value is wanted raw if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then raw = true end if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then -- Multiple values may be given. processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true else -- If multiple values are given, all but the first suitable one are discarted. processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true end if #processedProperty == 0 then break end referenceEmpty = false -- add an empty entry to candidateValuesAndPriorities, if there isn't one already if not candidateValuesAndPriorities[paramName] then candidateValuesAndPriorities[paramName] = {} end -- find the priority of refProperty local thisPropertyPriority = -1 local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName] if thisParamPrioritization then for i_priority, i_property in ipairs(thisParamPrioritization) do if i_property == refProperty then thisPropertyPriority = i_priority end end end for _, propertyValue in pairs(processedProperty) do table.insert( candidateValuesAndPriorities[paramName], {prefix .. propertyValue, thisPropertyPriority} ) end until true end -- fill candidateParams[citeType] if not citeErrors[citeType] then local compareValuePriorities = function(pair1, pair2) if pair1[2] == -1 and pair2[2] ~= -1 then return false end if pair1[2] ~= -1 and pair2[2] == -1 then return true end return pair1[2] < pair2[2] end -- fill candidateParams[citeType][paramName] for each used param for paramName, _ in pairs(candidateValuesAndPriorities) do table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities) candidateParams[citeType][paramName] = {} for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do table.insert(candidateParams[citeType][paramName], valuePriorityPair[1]) end end end end -- handle additional properties for refProperty in pairs(additionalProcessedProperties) do for _, citeType in ipairs(citeTypes) do repeat -- skip if there already have been errors if citeErrors[citeType] then break end local paramName = citeParamMapping[citeType][refProperty] -- handle unknown properties in the reference if not paramName then -- Skip this additional property, but do not cause an error. break end if paramName == "" then break end referenceEmpty = false if not candidateParams[citeType][paramName] then candidateParams[citeType][paramName] = {} end for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do table.insert(candidateParams[citeType][paramName], propertyValue) end until true end end -- fill citeParams for _, citeType in ipairs(citeTypes) do for paramName, paramValues in pairs(candidateParams[citeType]) do if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then citeParams[citeType][paramName] = paramValues[1] else -- There is more than one value for this parameter - the values will -- go into separate numbered parameters (e.g. "author1", "author2") for paramNum, paramValue in pairs(paramValues) do citeParams[citeType][paramName .. paramNum] = paramValue end end end end -- handle missing mandatory parameters for the templates for _, citeType in ipairs(citeTypes) do for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do if not citeParams[citeType][requiredCiteParam] then -- The required param is not present. if citeErrors[citeType] then -- Do not override the previous error, if it exists. break end local error_message = errorText("missing-mandatory-param", requiredCiteParam) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message end end end local citeTypeToUse = nil -- choose the output template for _, citeType in ipairs(citeTypes) do if not citeErrors[citeType] then citeTypeToUse = citeType break end end -- set refContent local refContent = "" if citeTypeToUse then local templateToUse = citeConfig[citeTypeToUse]["template"] local paramsToUse = citeParams[citeTypeToUse] if not templateToUse or templateToUse == "" then throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse) end -- if this module is being substituted then build a regular template call, otherwise expand the template if mw.isSubsting() then for i, v in pairs(paramsToUse) do refContent = refContent .. "|" .. i .. "=" .. v end refContent = "{{" .. templateToUse .. refContent .. "}}" else xpcall( function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end, function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end ) end -- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error. elseif not referenceEmpty then refContent = errorText("malformed-reference-header") for _, citeType in ipairs(citeTypes) do refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType]) end refContent = refContent .. errorText("malformed-reference-footer") end -- wrap refContent local ref = {} if refContent ~= "" then ref = {refContent} if not self.rawValue then -- this should become a <ref> tag, so save the reference's hash for later ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version) end return {ref} else return {} end end -- gets a detail of one particular type for a reference function State:getReferenceDetail(snaks, dType, raw, link, anyLang) local switchLang = anyLang local value = nil if not snaks[dType] then return nil end -- if anyLang, first try the local language and otherwise any language repeat for _, v in ipairs(snaks[dType]) do value = self.conf:getValue(v, raw, link, false, anyLang and not switchLang, false, true) -- noSpecial = true if value then break end end if value or not anyLang then break end switchLang = not switchLang until anyLang and switchLang return value end -- gets the details of one particular type for a reference function State:getReferenceDetails(snaks, dType, raw, link, anyLang) local values = {} if not snaks[dType] then return {} end for _, v in ipairs(snaks[dType]) do -- if nil is returned then it will not be added to the table values[#values + 1] = self.conf:getValue(v, raw, link, false, anyLang, false, true) -- noSpecial = true end return values end -- level 1 hook function State:getAlias(object) local value = object.value local title = nil if value and self.linked then if self.conf.entityID:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(self.conf.entityID) elseif self.conf.entityID:sub(1,1) == "P" then title = "d:Property:" .. self.conf.entityID end if title then value = buildWikilink(title, value) end end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getBadge(value) value = self.conf:getLabel(value, self.rawValue, self.linked, self.shortName) if value == "" then value = nil end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end function State:callHook(param, hooks, statement, result) -- call a parameter's hook if it has been defined and if it has not been called before if not result[param] and hooks[param] then local valuesArray = self[hooks[param]](self, statement, param, result, hooks) -- array with value objects -- add to the result if #valuesArray > 0 then result[param] = valuesArray result.count = result.count + 1 else result[param] = {} -- an empty array to indicate that we've tried this hook already return true -- miss == true end end return false end -- iterate through claims, claim's qualifiers or claim's references to collect values function State:iterate(statements, hooks, matchHook) matchHook = matchHook or alwaysTrue local matches = false local rankPos = nil local result, gotRequired for _, v in ipairs(statements) do -- rankPos will be nil for non-claim statements (e.g. qualifiers, references, etc.) matches, rankPos = matchHook(self, v) if matches then result = {count = 0} -- collection of arrays with value objects local function walk(formatTable) local miss for i2, v2 in pairs(formatTable.req) do -- call a hook, adding its return value to the result miss = self:callHook(i2, hooks, v, result) if miss then -- we miss a required value for this level, so return false return false end if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point breaks the loop return true end end for _, v2 in ipairs(formatTable) do if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point prevents further childs from being processed return true end if v2.child then walk(v2.child) end end return true end gotRequired = walk(self.parsedFormat) -- only append the result if we got values for all required parameters on the root level if gotRequired then -- if we have a rankPos (only with matchHook() for complete claims), then update the foundRank if rankPos and self.conf.foundRank > rankPos then self.conf.foundRank = rankPos end -- append the result self.results[#self.results + 1] = result -- break if we only need a single value if self.singleValue then break end end end end return self:out() end local function getEntityId(arg, eid, page, allowOmitPropPrefix, globalSiteId) local id = nil local prop = nil if arg then if arg:sub(1,1) == ":" then page = arg eid = nil elseif arg:sub(1,1):upper() == "Q" or arg:sub(1,9):lower() == "property:" or allowOmitPropPrefix then eid = arg page = nil else prop = arg end end if eid then if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end else id = replaceAlias(eid) end elseif page then if page:sub(1,1) == ":" then page = mw.text.trim(page:sub(2)) end id = mw.wikibase.getEntityIdForTitle(page, globalSiteId) or "" end if not id then id = mw.wikibase.getEntityIdForCurrentPage() or "" end id = id:upper() if not mw.wikibase.isValidEntityId(id) then id = "" end return id, prop end local function nextArg(args) local arg = args[args.pointer] if arg then args.pointer = args.pointer + 1 return mw.text.trim(arg) else return nil end end local function claimCommand(args, funcName) local cfg = Config:new() cfg:processFlagOrCommand(funcName) -- process first command (== function name) local lastArg, parsedFormat, formatParams, claims, value local hooks = {count = 0} -- set the date if given; -- must come BEFORE processing the flags if args[p.args.date] then cfg.atDate = {parseDate(args[p.args.date])} cfg.periods = {false, true, false} -- change default time constraint to 'current' end -- process flags and commands repeat lastArg = nextArg(args) until not cfg:processFlagOrCommand(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID, cfg.propertyID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], false, args[p.args.globalSiteId]) if cfg.entityID == "" then return "" -- we cannot continue without a valid entity ID end cfg.entity = mw.wikibase.getEntity(cfg.entityID) if not cfg.propertyID then cfg.propertyID = nextArg(args) end cfg.propertyID = replaceAlias(cfg.propertyID) if not cfg.entity or not cfg.propertyID then return "" -- we cannot continue without an entity or a property ID end cfg.propertyID = cfg.propertyID:upper() if not cfg.entity.claims or not cfg.entity.claims[cfg.propertyID] then return "" -- there is no use to continue without any claims end claims = cfg.entity.claims[cfg.propertyID] if cfg.states.qualifiersCount > 0 then -- do further processing if "qualifier(s)" command was given if #args - args.pointer + 1 > cfg.states.qualifiersCount then -- claim ID or literal value has been given cfg.propertyValue = nextArg(args) end for i = 1, cfg.states.qualifiersCount do -- check if given qualifier ID is an alias and add it cfg.qualifierIDs[parameters.qualifier..i] = replaceAlias(nextArg(args) or ""):upper() end elseif cfg.states[parameters.reference] then -- do further processing if "reference(s)" command was given cfg.propertyValue = nextArg(args) end -- check for special property value 'somevalue' or 'novalue' if cfg.propertyValue then cfg.propertyValue = replaceSpecialChars(cfg.propertyValue) if cfg.propertyValue ~= "" and mw.text.trim(cfg.propertyValue) == "" then cfg.propertyValue = " " -- single space represents 'somevalue', whereas empty string represents 'novalue' else cfg.propertyValue = mw.text.trim(cfg.propertyValue) end end -- parse the desired format, or choose an appropriate format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) elseif cfg.states.qualifiersCount > 0 then -- "qualifier(s)" command given if cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.propertyWithQualifier) else parsedFormat, formatParams = parseFormat(formats.qualifier) end elseif cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.property) else -- "reference(s)" command given parsedFormat, formatParams = parseFormat(formats.reference) end -- if a "qualifier(s)" command and no "propert(y|ies)" command has been given, make the movable separator a semicolon if cfg.states.qualifiersCount > 0 and not cfg.states[parameters.property] then cfg.separators["sep"..parameters.separator][1] = {";"} end -- if only "reference(s)" has been given, set the default separator to none (except when raw) if cfg.states[parameters.reference] and not cfg.states[parameters.property] and cfg.states.qualifiersCount == 0 and not cfg.states[parameters.reference].rawValue then cfg.separators["sep"][1] = nil end -- if exactly one "qualifier(s)" command has been given, make "sep%q" point to "sep%q1" to make them equivalent if cfg.states.qualifiersCount == 1 then cfg.separators["sep"..parameters.qualifier] = cfg.separators["sep"..parameters.qualifier.."1"] end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hooks that should be called (getProperty, getQualifiers, getReferences); -- only define a hook if both its command ("propert(y|ies)", "reference(s)", "qualifier(s)") and its parameter ("%p", "%r", "%q1", "%q2", "%q3") have been given for i, v in pairs(cfg.states) do -- e.g. 'formatParams["%q1"] or formatParams["%q"]' to define hook even if "%q1" was not defined to be able to build a complete value for "%q" if formatParams[i] or formatParams[i:sub(1, 2)] then hooks[i] = getHookName(i, 1) hooks.count = hooks.count + 1 end end -- the "%q" parameter is not attached to a state, but is a collection of the results of multiple states (attached to "%q1", "%q2", "%q3", ...); -- so if this parameter is given then this hook must be defined separately, but only if at least one "qualifier(s)" command has been given if formatParams[parameters.qualifier] and cfg.states.qualifiersCount > 0 then hooks[parameters.qualifier] = getHookName(parameters.qualifier, 1) hooks.count = hooks.count + 1 end -- create a state for "properties" if it doesn't exist yet, which will be used as a base configuration for each claim iteration; -- must come AFTER defining the hooks if not cfg.states[parameters.property] then cfg.states[parameters.property] = State:new(cfg, parameters.property) -- if the "single" flag has been given then this state should be equivalent to "property" (singular) if cfg.singleClaim then cfg.states[parameters.property].singleValue = true end end -- if the "sourced" flag has been given then create a state for "reference" if it doesn't exist yet, using default values, -- which must exist in order to be able to determine if a claim has any references; -- must come AFTER defining the hooks if cfg.sourcedOnly and not cfg.states[parameters.reference] then cfg:processFlagOrCommand(p.claimCommands.reference) -- use singular "reference" to minimize overhead end -- set the parsed format and the separators (and optional punctuation mark); -- must come AFTER creating the additonal states cfg:setFormatAndSeparators(cfg.states[parameters.property], parsedFormat) -- process qualifier matching values, analogous to cfg.propertyValue for i, v in pairs(args) do i = tostring(i) if i:match('^[Pp]%d+$') or aliasesP[i] then v = replaceSpecialChars(v) -- check for special qualifier value 'somevalue' if v ~= "" and mw.text.trim(v) == "" then v = " " -- single space represents 'somevalue' end cfg.qualifierIDsAndValues[replaceAlias(i):upper()] = v end end -- first sort the claims on rank to pre-define the order of output (preferred first, then normal, then deprecated) claims = sortOnRank(claims) -- then iterate through the claims to collect values value = cfg:concatValues(cfg.states[parameters.property]:iterate(claims, hooks, State.claimMatches)) -- pass property state with level 1 hooks and matchHook -- if desired, add a clickable icon that may be used to edit the returned values on Wikidata if cfg.editable and value ~= "" then value = value .. cfg:getEditIcon() end return value end local function generalCommand(args, funcName) local cfg = Config:new() cfg.curState = State:new(cfg) local lastArg local value = nil repeat lastArg = nextArg(args) until not cfg:processFlag(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], true, args[p.args.globalSiteId]) if cfg.entityID == "" or not mw.wikibase.entityExists(cfg.entityID) then return "" -- we cannot continue without an entity end -- serve according to the given command if funcName == p.generalCommands.label then value = cfg:getLabel(cfg.entityID, cfg.curState.rawValue, cfg.curState.linked, cfg.curState.shortName) elseif funcName == p.generalCommands.title then cfg.inSitelinks = true if cfg.entityID:sub(1,1) == "Q" then value = mw.wikibase.getSitelink(cfg.entityID) end if cfg.curState.linked and value then value = buildWikilink(value) end elseif funcName == p.generalCommands.description then value = mw.wikibase.getDescription(cfg.entityID) else local parsedFormat, formatParams local hooks = {count = 0} cfg.entity = mw.wikibase.getEntity(cfg.entityID) if funcName == p.generalCommands.alias or funcName == p.generalCommands.badge then cfg.curState.singleValue = true end if funcName == p.generalCommands.alias or funcName == p.generalCommands.aliases then if not cfg.entity.aliases or not cfg.entity.aliases[cfg.langCode] then return "" -- there is no use to continue without any aliasses end local aliases = cfg.entity.aliases[cfg.langCode] -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.alias) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getAlias); -- only define the hook if the parameter ("%a") has been given if formatParams[parameters.alias] then hooks[parameters.alias] = getHookName(parameters.alias, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(aliases, hooks)) elseif funcName == p.generalCommands.badge or funcName == p.generalCommands.badges then if not cfg.entity.sitelinks or not cfg.entity.sitelinks[cfg.siteID] or not cfg.entity.sitelinks[cfg.siteID].badges then return "" -- there is no use to continue without any badges end local badges = cfg.entity.sitelinks[cfg.siteID].badges cfg.inSitelinks = true -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.badge) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getBadge); -- only define the hook if the parameter ("%b") has been given if formatParams[parameters.badge] then hooks[parameters.badge] = getHookName(parameters.badge, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(badges, hooks)) end end value = value or "" if cfg.editable and value ~= "" then -- if desired, add a clickable icon that may be used to edit the returned value on Wikidata value = value .. cfg:getEditIcon() end return value end -- modules that include this module should call the functions with an underscore prepended, e.g.: p._property(args) local function establishCommands(commandList, commandFunc) for _, commandName in pairs(commandList) do local function wikitextWrapper(frame) local args = copyTable(frame.args) args.pointer = 1 loadI18n(aliasesP, frame) return commandFunc(args, commandName) end p[commandName] = wikitextWrapper local function luaWrapper(args) args = copyTable(args) args.pointer = 1 loadI18n(aliasesP) return commandFunc(args, commandName) end p["_" .. commandName] = luaWrapper end end establishCommands(p.claimCommands, claimCommand) establishCommands(p.generalCommands, generalCommand) -- main function that is supposed to be used by wrapper templates function p.main(frame) if not mw.wikibase then return nil end local f, args loadI18n(aliasesP, frame) -- get the parent frame to take the arguments that were passed to the wrapper template frame = frame:getParent() or frame if not frame.args[1] then throwError("no-function-specified") end f = mw.text.trim(frame.args[1]) if f == "main" then throwError("main-called-twice") end assert(p["_"..f], errorText('no-such-function', f)) -- copy arguments from immutable to mutable table args = copyTable(frame.args) -- remove the function name from the list table.remove(args, 1) return p["_"..f](args) end return p j5a6l03tjwodgrvfnv3lb4x5up93wlv Module:Wd/i18n 828 13419 116959 105256 2025-07-22T19:53:10Z en>Janhrach 0 update from sandbox 116959 Scribunto text/plain -- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["version"] = "8", -- increment this each time the below parameters are changed to avoid reference conflict errors ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '%s' must be defined as optional", ["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message ["main-called-twice"] = 'The function "main" cannot be called twice', ["no-such-function"] = 'The function "%s" does not exist', -- equal to the standard module error message ["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist', -- Parts of the error message signalling a malformed reference. ["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n", ["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]", ["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n", ["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.', ["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.' }, ["info"] = { ["edit-on-wikidata"] = "Edit this on Wikidata" }, ["numeric"] = { ["decimal-mark"] = ".", ["delimiter"] = "," }, ["datetime"] = { ["prefixes"] = { ["decade-period"] = "" }, ["suffixes"] = { ["decade-period"] = "s", ["millennium"] = " millennium", ["century"] = " century", ["million-years"] = " million years", ["billion-years"] = " billion years", ["year"] = " year", ["years"] = " years" }, ["julian-calendar"] = "Julian calendar", -- linked page title ["julian"] = "Julian", ["BCE"] = "BCE", ["CE"] = "CE", ["common-era"] = "Common Era" -- linked page title }, ["coord"] = { ["latitude-north"] = "N", ["latitude-south"] = "S", ["longitude-east"] = "E", ["longitude-west"] = "W", ["degrees"] = "°", ["minutes"] = "'", ["seconds"] = '"', ["separator"] = ", " }, ["values"] = { ["unknown"] = "unknown", ["none"] = "none" }, ["cite"] = { ["output-types"] = {"web", "q"}, -- In this order, the output types will be tried ["param-mapping"] = { ["web"] = { -- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "website", [aliasesP.referenceURL] = "url", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date", [aliasesP.title] = "title", [aliasesP.subjectNamedAs] = "title", [aliasesP.archiveURL] = "archive-url", [aliasesP.archiveDate] = "archive-date", [aliasesP.language] = "language", [aliasesP.author] = "author", [aliasesP.authorNameString] = "author", [aliasesP.publisher] = "publisher", [aliasesP.quote] = "quote", [aliasesP.pages] = "pages", -- extra option [aliasesP.publishedIn] = "website", [aliasesP.sectionVerseOrParagraph] = "at" }, ["q"] = { -- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "1", [aliasesP.pages] = "pages", [aliasesP.column] = "at", [aliasesP.chapter] = "chapter", [aliasesP.sectionVerseOrParagraph] = "section", ["external-id"] = "id", -- used for any type of database property ID [aliasesP.title] = "title", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date" } }, ["config"] = { -- supported fields: -- - template: name of the template used for output -- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2) -- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) -- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) -- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters; -- properties not mentioned here have the lowest priority; -- prioritization of properties handled through additionalProcessedProperties is unsupported; -- no key of this table can be from numbered-params -- Leaving out the "template" field causes the output type to be ignored. ["web"] = { ["template"] = "Cite web", ["numbered-params"] = {"author"}, ["mandatory-params"] = {"url"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}, ["title"] = {aliasesP.title, aliasesP.subjectNamedAs} } }, ["q"] = { ["template"] = "Cite Q", ["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited ["mandatory-params"] = {"1"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate} } } } } } p.getOrdinalSuffix = function(num) if tostring(num):sub(-2,-2) == '1' then return "th" -- 10th, 11th, 12th, 13th, ... 19th end num = tostring(num):sub(-1) if num == '1' then return "st" elseif num == '2' then return "nd" elseif num == '3' then return "rd" else return "th" end end p.addDelimiters = function(n) local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$") if left and num and right then return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right else return n end end return p end return p pgkxz3kqyoyu0zj2nmtkjkdr0ntnin5 116960 116648 2026-07-16T11:15:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Wd/i18n]] 116648 Scribunto text/plain -- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["version"] = "8", -- increment this each time the below parameters are changed to avoid reference conflict errors ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '%s' must be defined as optional", ["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message ["main-called-twice"] = 'The function "main" cannot be called twice', ["no-such-function"] = 'The function "%s" does not exist', -- equal to the standard module error message ["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist', -- Parts of the error message signalling a malformed reference. ["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n", ["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]", ["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n", ["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.', ["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.' }, ["info"] = { ["edit-on-wikidata"] = "Edit this on Wikidata" }, ["numeric"] = { ["decimal-mark"] = ".", ["delimiter"] = "," }, ["datetime"] = { ["prefixes"] = { ["decade-period"] = "" }, ["suffixes"] = { ["decade-period"] = "s", ["millennium"] = " millennium", ["century"] = " century", ["million-years"] = " million years", ["billion-years"] = " billion years", ["year"] = " year", ["years"] = " years" }, ["julian-calendar"] = "Julian calendar", -- linked page title ["julian"] = "Julian", ["BCE"] = "BCE", ["CE"] = "CE", ["common-era"] = "Common Era" -- linked page title }, ["coord"] = { ["latitude-north"] = "N", ["latitude-south"] = "S", ["longitude-east"] = "E", ["longitude-west"] = "W", ["degrees"] = "°", ["minutes"] = "'", ["seconds"] = '"', ["separator"] = ", " }, ["values"] = { ["unknown"] = "unknown", ["none"] = "none" }, ["cite"] = { ["output-types"] = {"web", "q"}, -- In this order, the output types will be tried ["param-mapping"] = { ["web"] = { -- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "website", [aliasesP.referenceURL] = "url", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date", [aliasesP.title] = "title", [aliasesP.subjectNamedAs] = "title", [aliasesP.archiveURL] = "archive-url", [aliasesP.archiveDate] = "archive-date", [aliasesP.language] = "language", [aliasesP.author] = "author", [aliasesP.authorNameString] = "author", [aliasesP.publisher] = "publisher", [aliasesP.quote] = "quote", [aliasesP.pages] = "pages", -- extra option [aliasesP.publishedIn] = "website", [aliasesP.sectionVerseOrParagraph] = "at" }, ["q"] = { -- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "1", [aliasesP.pages] = "pages", [aliasesP.column] = "at", [aliasesP.chapter] = "chapter", [aliasesP.sectionVerseOrParagraph] = "section", ["external-id"] = "id", -- used for any type of database property ID [aliasesP.title] = "title", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date" } }, ["config"] = { -- supported fields: -- - template: name of the template used for output -- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2) -- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) -- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) -- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters; -- properties not mentioned here have the lowest priority; -- prioritization of properties handled through additionalProcessedProperties is unsupported; -- no key of this table can be from numbered-params -- Leaving out the "template" field causes the output type to be ignored. ["web"] = { ["template"] = "Cite web", ["numbered-params"] = {"author"}, ["mandatory-params"] = {"url"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}, ["title"] = {aliasesP.title, aliasesP.subjectNamedAs} } }, ["q"] = { ["template"] = "Cite Q", ["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited ["mandatory-params"] = {"1"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate} } } } } } p.getOrdinalSuffix = function(num) if tostring(num):sub(-2,-2) == '1' then return "th" -- 10th, 11th, 12th, 13th, ... 19th end num = tostring(num):sub(-1) if num == '1' then return "st" elseif num == '2' then return "nd" elseif num == '3' then return "rd" else return "th" end end p.addDelimiters = function(n) local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$") if left and num and right then return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right else return n end end return p end return p pgkxz3kqyoyu0zj2nmtkjkdr0ntnin5 Module:Date 828 13421 117088 34342 2026-02-18T03:21:21Z en>Krinkle 0 Fix nil minute/minute. While not covered by [[Module:Date/testcases]], I probably caused a bug, as observed when running `=require('Module:Date')._Date('currentdatetime')` which works fine against sandbox and previous revisions. 117088 Scribunto text/plain -- Date functions for use by other modules. -- I18N and time zones are not supported. local MINUS = '−' -- Unicode U+2212 MINUS SIGN local floor = math.floor local Date, DateDiff, diffmt -- forward declarations local uniq = { 'unique identifier' } local function is_date(t) -- The system used to make a date read-only means there is no unique -- metatable that is conveniently accessible to check. return type(t) == 'table' and t._id == uniq end local function is_diff(t) return type(t) == 'table' and getmetatable(t) == diffmt end local function _list_join(list, sep) return table.concat(list, sep) end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, join = _list_join, } end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when Date fields are provided from -- another module which may pass a string, a number, or another type). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function is_leap_year(year, calname) -- Return true if year is a leap year. if calname == 'Julian' then return year % 4 == 0 end return (year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0 end local function days_in_month(year, month, calname) -- Return number of days (1..31) in given month (1..12). if month == 2 and is_leap_year(year, calname) then return 29 end return ({ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 })[month] end local function h_m_s(time) -- Return hour, minute, second extracted from fraction of a day. time = floor(time * 24 * 3600 + 0.5) -- number of seconds local second = time % 60 time = floor(time / 60) return floor(time / 60), time % 60, second end local function hms(date) -- Return fraction of a day from date's time, where (0 <= fraction < 1) -- if the values are valid, but could be anything if outside range. return (date.hour + (date.minute + date.second / 60) / 60) / 24 end local function julian_date(date) -- Return jd, jdz from a Julian or Gregorian calendar date where -- jd = Julian date and its fractional part is zero at noon -- jdz = same, but assume time is 00:00:00 if no time given -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- Testing shows this works for all dates from year -9999 to 9999! -- JDN 0 is the 24-hour period starting at noon UTC on Monday -- 1 January 4713 BC = (-4712, 1, 1) Julian calendar -- 24 November 4714 BC = (-4713, 11, 24) Gregorian calendar local offset local a = floor((14 - date.month)/12) local y = date.year + 4800 - a if date.calendar == 'Julian' then offset = floor(y/4) - 32083 else offset = floor(y/4) - floor(y/100) + floor(y/400) - 32045 end local m = date.month + 12*a - 3 local jd = date.day + floor((153*m + 2)/5) + 365*y + offset if date.hastime then jd = jd + hms(date) - 0.5 return jd, jd end return jd, jd - 0.5 end local function set_date_from_jd(date) -- Set the fields of table date from its Julian date field. -- Return true if date is valid. -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- This handles the proleptic Julian and Gregorian calendars. -- Negative Julian dates are not defined but they work. local calname = date.calendar local low, high -- min/max limits for date ranges −9999-01-01 to 9999-12-31 if calname == 'Gregorian' then low, high = -1930999.5, 5373484.49999 elseif calname == 'Julian' then low, high = -1931076.5, 5373557.49999 else return end local jd = date.jd if not (type(jd) == 'number' and low <= jd and jd <= high) then return end local jdn = floor(jd) if date.hastime then local time = jd - jdn -- 0 <= time < 1 if time >= 0.5 then -- if at or after midnight of next day jdn = jdn + 1 time = time - 0.5 else time = time + 0.5 end date.hour, date.minute, date.second = h_m_s(time) else date.second = 0 date.minute = 0 date.hour = 0 end local b, c if calname == 'Julian' then b = 0 c = jdn + 32082 else -- Gregorian local a = jdn + 32044 b = floor((4*a + 3)/146097) c = a - floor(146097*b/4) end local d = floor((4*c + 3)/1461) local e = c - floor(1461*d/4) local m = floor((5*e + 2)/153) date.day = e - floor((153*m + 2)/5) + 1 date.month = m + 3 - 12*floor(m/10) date.year = 100*b + d - 4800 + floor(m/10) return true end local function fix_numbers(numbers, y, m, d, H, M, S, partial, hastime, calendar) -- Put the result of normalizing the given values in table numbers. -- The result will have valid m, d values if y is valid; caller checks y. -- The logic of PHP mktime is followed where m or d can be zero to mean -- the previous unit, and -1 is the one before that, etc. -- Positive values carry forward. local date if not (1 <= m and m <= 12) then date = Date(y, 1, 1) if not date then return end date = date + ((m - 1) .. 'm') y, m = date.year, date.month end local days_hms if not partial then if hastime and H and M and S then if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then days_hms = hms({ hour = H, minute = M, second = S }) end end if days_hms or not (1 <= d and d <= days_in_month(y, m, calendar)) then date = date or Date(y, m, 1) if not date then return end date = date + (d - 1 + (days_hms or 0)) y, m, d = date.year, date.month, date.day if days_hms then H, M, S = date.hour, date.minute, date.second end end end numbers.year = y numbers.month = m numbers.day = d if days_hms then -- Don't set H unless it was valid because a valid H will set hastime. numbers.hour = H numbers.minute = M numbers.second = S end end local function set_date_from_numbers(date, numbers, options) -- Set the fields of table date from numeric values. -- Return true if date is valid. if type(numbers) ~= 'table' then return end local y = numbers.year or date.year local m = numbers.month or date.month local d = numbers.day or date.day local H = numbers.hour local M = numbers.minute or date.minute or 0 local S = numbers.second or date.second or 0 local need_fix if y and m and d then date.partial = nil if not (-9999 <= y and y <= 9999 and 1 <= m and m <= 12 and 1 <= d and d <= days_in_month(y, m, date.calendar)) then if not date.want_fix then return end need_fix = true end elseif y and date.partial then if d or not (-9999 <= y and y <= 9999) then return end if m and not (1 <= m and m <= 12) then if not date.want_fix then return end need_fix = true end else return end if date.partial then H = nil -- ignore any time M = nil S = nil else if H then -- It is not possible to set M or S without also setting H. date.hastime = true else H = 0 end if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then if date.want_fix then need_fix = true else return end end end date.want_fix = nil if need_fix then fix_numbers(numbers, y, m, d, H, M, S, date.partial, date.hastime, date.calendar) return set_date_from_numbers(date, numbers, options) end date.year = y -- -9999 to 9999 ('n BC' → year = 1 - n) date.month = m -- 1 to 12 (may be nil if partial) date.day = d -- 1 to 31 (* = nil if partial) date.hour = H -- 0 to 59 (*) date.minute = M -- 0 to 59 (*) date.second = S -- 0 to 59 (*) if type(options) == 'table' then for _, k in ipairs({ 'am', 'era', 'format' }) do if options[k] then date.options[k] = options[k] end end end return true end local function make_option_table(options1, options2) -- If options1 is a string, return a table with its settings, or -- if it is a table, use its settings. -- Missing options are set from table options2 or defaults. -- If a default is used, a flag is set so caller knows the value was not intentionally set. -- Valid option settings are: -- am: 'am', 'a.m.', 'AM', 'A.M.' -- 'pm', 'p.m.', 'PM', 'P.M.' (each has same meaning as corresponding item above) -- era: 'BCMINUS', 'BCNEGATIVE', 'BC', 'B.C.', 'BCE', 'B.C.E.', 'AD', 'A.D.', 'CE', 'C.E.' -- Option am = 'am' does not mean the hour is AM; it means 'am' or 'pm' is used, depending on the hour, -- and am = 'pm' has the same meaning. -- Similarly, era = 'BC' means 'BC' is used if year <= 0. -- BCMINUS displays a MINUS if year < 0 and the display format does not include %{era}. -- BCNEGATIVE is similar but displays a hyphen. local result = { bydefault = {} } if type(options1) == 'table' then result.am = options1.am result.era = options1.era elseif type(options1) == 'string' then -- Example: 'am:AM era:BC' or 'am=AM era=BC'. for item in options1:gmatch('%S+') do local lhs, rhs = item:match('^(%w+)[:=](.+)$') if lhs then result[lhs] = rhs end end end options2 = type(options2) == 'table' and options2 or {} local defaults = { am = 'am', era = 'BC' } for k, v in pairs(defaults) do if not result[k] then if options2[k] then result[k] = options2[k] else result[k] = v result.bydefault[k] = true end end end return result end local ampm_options = { -- lhs = input text accepted as an am/pm option -- rhs = code used internally ['am'] = 'am', ['AM'] = 'AM', ['a.m.'] = 'a.m.', ['A.M.'] = 'A.M.', ['pm'] = 'am', -- same as am ['PM'] = 'AM', ['p.m.'] = 'a.m.', ['P.M.'] = 'A.M.', } local era_text = { -- Text for displaying an era with a positive year (after adjusting -- by replacing year with 1 - year if date.year <= 0). -- options.era = { year<=0 , year>0 } ['BCMINUS'] = { 'BC' , '' , isbc = true, sign = MINUS }, ['BCNEGATIVE'] = { 'BC' , '' , isbc = true, sign = '-' }, ['BC'] = { 'BC' , '' , isbc = true }, ['B.C.'] = { 'B.C.' , '' , isbc = true }, ['BCE'] = { 'BCE' , '' , isbc = true }, ['B.C.E.'] = { 'B.C.E.', '' , isbc = true }, ['AD'] = { 'BC' , 'AD' }, ['A.D.'] = { 'B.C.' , 'A.D.' }, ['CE'] = { 'BCE' , 'CE' }, ['C.E.'] = { 'B.C.E.', 'C.E.' }, } local function get_era_for_year(era, year) return (era_text[era] or era_text['BC'])[year > 0 and 2 or 1] or '' end local function strftime(date, format, options) -- Return date formatted as a string using codes similar to those -- in the C strftime library function. local sformat = string.format local shortcuts = { ['%c'] = '%-I:%M %p %-d %B %-Y %{era}', -- date and time: 2:30 pm 1 April 2016 ['%x'] = '%-d %B %-Y %{era}', -- date: 1 April 2016 ['%X'] = '%-I:%M %p', -- time: 2:30 pm } if shortcuts[format] then format = shortcuts[format] end local codes = { a = { field = 'dayabbr' }, A = { field = 'dayname' }, b = { field = 'monthabbr' }, B = { field = 'monthname' }, u = { fmt = '%d' , field = 'dowiso' }, w = { fmt = '%d' , field = 'dow' }, d = { fmt = '%02d', fmt2 = '%d', field = 'day' }, m = { fmt = '%02d', fmt2 = '%d', field = 'month' }, Y = { fmt = '%04d', fmt2 = '%d', field = 'year' }, H = { fmt = '%02d', fmt2 = '%d', field = 'hour' }, M = { fmt = '%02d', fmt2 = '%d', field = 'minute' }, S = { fmt = '%02d', fmt2 = '%d', field = 'second' }, j = { fmt = '%03d', fmt2 = '%d', field = 'dayofyear' }, I = { fmt = '%02d', fmt2 = '%d', field = 'hour', special = 'hour12' }, p = { field = 'hour', special = 'am' }, } options = make_option_table(options, date.options) local amopt = options.am local eraopt = options.era local function replace_code(spaces, modifier, id) local code = codes[id] if code then local fmt = code.fmt if modifier == '-' and code.fmt2 then fmt = code.fmt2 end local value = date[code.field] if not value then return nil -- an undefined field in a partial date end local special = code.special if special then if special == 'hour12' then value = value % 12 value = value == 0 and 12 or value elseif special == 'am' then local ap = ({ ['a.m.'] = { 'a.m.', 'p.m.' }, ['AM'] = { 'AM', 'PM' }, ['A.M.'] = { 'A.M.', 'P.M.' }, })[ampm_options[amopt]] or { 'am', 'pm' } return (spaces == '' and '' or '&nbsp;') .. (value < 12 and ap[1] or ap[2]) end end if code.field == 'year' then local sign = (era_text[eraopt] or {}).sign if not sign or format:find('%{era}', 1, true) then sign = '' if value <= 0 then value = 1 - value end else if value >= 0 then sign = '' else value = -value end end return spaces .. sign .. sformat(fmt, value) end return spaces .. (fmt and sformat(fmt, value) or value) end end local function replace_property(spaces, id) if id == 'era' then -- Special case so can use local era option. local result = get_era_for_year(eraopt, date.year) if result == '' then return '' end return (spaces == '' and '' or '&nbsp;') .. result end local result = date[id] if type(result) == 'string' then return spaces .. result end if type(result) == 'number' then return spaces .. tostring(result) end if type(result) == 'boolean' then return spaces .. (result and '1' or '0') end -- This occurs if id is an undefined field in a partial date, or is the name of a function. return nil end local PERCENT = '\127PERCENT\127' return (format :gsub('%%%%', PERCENT) :gsub('(%s*)%%{(%w+)}', replace_property) :gsub('(%s*)%%(%-?)(%a)', replace_code) :gsub(PERCENT, '%%') ) end local function _date_text(date, fmt, options) -- Return a formatted string representing the given date. if not is_date(date) then error('date:text: need a date (use "date:text()" with a colon)', 2) end if type(fmt) == 'string' and fmt:match('%S') then if fmt:find('%', 1, true) then return strftime(date, fmt, options) end elseif date.partial then fmt = date.month and 'my' or 'y' else fmt = 'dmy' if date.hastime then fmt = (date.second > 0 and 'hms ' or 'hm ') .. fmt end end local function bad_format() -- For consistency with other format processing, return given format -- (or cleaned format if original was not a string) if invalid. return mw.text.nowiki(fmt) end if date.partial then -- Ignore days in standard formats like 'ymd'. if fmt == 'ym' or fmt == 'ymd' then fmt = date.month and '%Y-%m %{era}' or '%Y %{era}' elseif fmt == 'my' or fmt == 'dmy' or fmt == 'mdy' then fmt = date.month and '%B %-Y %{era}' or '%-Y %{era}' elseif fmt == 'y' then fmt = date.month and '%-Y %{era}' or '%-Y %{era}' else return bad_format() end return strftime(date, fmt, options) end local function hm_fmt() local plain = make_option_table(options, date.options).bydefault.am return plain and '%H:%M' or '%-I:%M %p' end local need_time = date.hastime local t = collection() for item in fmt:gmatch('%S+') do local f if item == 'hm' then f = hm_fmt() need_time = false elseif item == 'hms' then f = '%H:%M:%S' need_time = false elseif item == 'ymd' then f = '%Y-%m-%d %{era}' elseif item == 'mdy' then f = '%B %-d, %-Y %{era}' elseif item == 'dmy' then f = '%-d %B %-Y %{era}' else return bad_format() end t:add(f) end fmt = t:join(' ') if need_time then fmt = hm_fmt() .. ' ' .. fmt end return strftime(date, fmt, options) end local day_info = { -- 0=Sun to 6=Sat [0] = { 'Sun', 'Sunday' }, { 'Mon', 'Monday' }, { 'Tue', 'Tuesday' }, { 'Wed', 'Wednesday' }, { 'Thu', 'Thursday' }, { 'Fri', 'Friday' }, { 'Sat', 'Saturday' }, } local month_info = { -- 1=Jan to 12=Dec { 'Jan', 'January' }, { 'Feb', 'February' }, { 'Mar', 'March' }, { 'Apr', 'April' }, { 'May', 'May' }, { 'Jun', 'June' }, { 'Jul', 'July' }, { 'Aug', 'August' }, { 'Sep', 'September' }, { 'Oct', 'October' }, { 'Nov', 'November' }, { 'Dec', 'December' }, } local function name_to_number(text, translate) if type(text) == 'string' then return translate[text:lower()] end end local function day_number(text) return name_to_number(text, { sun = 0, sunday = 0, mon = 1, monday = 1, tue = 2, tuesday = 2, wed = 3, wednesday = 3, thu = 4, thursday = 4, fri = 5, friday = 5, sat = 6, saturday = 6, }) end local function month_number(text) return name_to_number(text:gsub('%.', ''), { jan = 1, january = 1, feb = 2, february = 2, mar = 3, march = 3, apr = 4, april = 4, may = 5, jun = 6, june = 6, jul = 7, july = 7, aug = 8, august = 8, sep = 9, september = 9, sept = 9, oct = 10, october = 10, nov = 11, november = 11, dec = 12, december = 12, }) end local function _list_text(list, fmt) -- Return a list of formatted strings from a list of dates. if not type(list) == 'table' then error('date:list:text: need "list:text()" with a colon', 2) end local result = { join = _list_join } for i, date in ipairs(list) do result[i] = date:text(fmt) end return result end local function _date_list(date, spec) -- Return a possibly empty numbered table of dates meeting the specification. -- Dates in the list are in ascending order (oldest date first). -- The spec should be a string of form "<count> <day> <op>" -- where each item is optional and -- count = number of items wanted in list -- day = abbreviation or name such as Mon or Monday -- op = >, >=, <, <= (default is > meaning after date) -- If no count is given, the list is for the specified days in date's month. -- The default day is date's day. -- The spec can also be a positive or negative number: -- -5 is equivalent to '5 <' -- 5 is equivalent to '5' which is '5 >' if not is_date(date) then error('date:list: need a date (use "date:list()" with a colon)', 2) end local list = { text = _list_text } if date.partial then return list end local count, offset, operation local ops = { ['>='] = { before = false, include = true }, ['>'] = { before = false, include = false }, ['<='] = { before = true , include = true }, ['<'] = { before = true , include = false }, } if spec then if type(spec) == 'number' then count = floor(spec + 0.5) if count < 0 then count = -count operation = ops['<'] end elseif type(spec) == 'string' then local num, day, op = spec:match('^%s*(%d*)%s*(%a*)%s*([<>=]*)%s*$') if not num then return list end if num ~= '' then count = tonumber(num) end if day ~= '' then local dow = day_number(day:gsub('[sS]$', '')) -- accept plural days if not dow then return list end offset = dow - date.dow end operation = ops[op] else return list end end offset = offset or 0 operation = operation or ops['>'] local datefrom, dayfirst, daylast if operation.before then if offset > 0 or (offset == 0 and not operation.include) then offset = offset - 7 end if count then if count > 1 then offset = offset - 7*(count - 1) end datefrom = date + offset else daylast = date.day + offset dayfirst = daylast % 7 if dayfirst == 0 then dayfirst = 7 end end else if offset < 0 or (offset == 0 and not operation.include) then offset = offset + 7 end if count then datefrom = date + offset else dayfirst = date.day + offset daylast = date.monthdays end end if not count then if daylast < dayfirst then return list end count = floor((daylast - dayfirst)/7) + 1 datefrom = Date(date, {day = dayfirst}) end for i = 1, count do if not datefrom then break end -- exceeds date limits list[i] = datefrom datefrom = datefrom + 7 end return list end -- Cache the current date/time (UTC). -- -- Note that os.date() returns an empty object with optimized lazy getters for each field. -- Avoid current.min or current.sec in articles! https://phabricator.wikimedia.org/T416616 -- -- Beware that while os.date() uses 'min' and 'sec', our Date() uses 'minute' and 'second'. local current = os.date('!*t') local function extract_date(newdate, text) -- Parse the date/time in text and return n, o where -- n = table of numbers with date/time fields -- o = table of options for AM/PM or AD/BC or format, if any -- or return nothing if date is known to be invalid. -- Caller determines if the values in n are valid. -- A year must be positive ('1' to '9999'); use 'BC' for BC. -- In a y-m-d string, the year must be four digits to avoid ambiguity -- ('0001' to '9999'). The only way to enter year <= 0 is by specifying -- the date as three numeric parameters like ymd Date(-1, 1, 1). -- Dates of form d/m/y, m/d/y, y/m/d are rejected as potentially ambiguous. local date, options = {}, {} if text:sub(-1) == 'Z' then -- Extract date/time from a Wikidata timestamp. -- The year can be 1 to 16 digits but this module handles 1 to 4 digits only. -- Examples: '+2016-06-21T14:30:00Z', '-0000000180-00-00T00:00:00Z'. local sign, y, m, d, H, M, S = text:match('^([+%-])(%d+)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)Z$') if sign then y = tonumber(y) if sign == '-' and y > 0 then y = -y end if y <= 0 then options.era = 'BCE' end date.year = y m = tonumber(m) d = tonumber(d) H = tonumber(H) M = tonumber(M) S = tonumber(S) if m == 0 then newdate.partial = true return date, options end date.month = m if d == 0 then newdate.partial = true return date, options end date.day = d if H > 0 or M > 0 or S > 0 then date.hour = H date.minute = M date.second = S end return date, options end return end local function extract_ymd(item) -- Called when no day or month has been set. local y, m, d = item:match('^(%d%d%d%d)%-(%w+)%-(%d%d?)$') if y then if date.year then return end if m:match('^%d%d?$') then m = tonumber(m) else m = month_number(m) end if m then date.year = tonumber(y) date.month = m date.day = tonumber(d) return true end end end local function extract_day_or_year(item) -- Called when a day would be valid, or -- when a year would be valid if no year has been set and partial is set. local number, suffix = item:match('^(%d%d?%d?%d?)(.*)$') if number then local n = tonumber(number) if #number <= 2 and n <= 31 then suffix = suffix:lower() if suffix == '' or suffix == 'st' or suffix == 'nd' or suffix == 'rd' or suffix == 'th' then date.day = n return true end elseif suffix == '' and newdate.partial and not date.year then date.year = n return true end end end local function extract_month(item) -- A month must be given as a name or abbreviation; a number could be ambiguous. local m = month_number(item) if m then date.month = m return true end end local function extract_time(item) local h, m, s = item:match('^(%d%d?):(%d%d)(:?%d*)$') if date.hour or not h then return end if s ~= '' then s = s:match('^:(%d%d)$') if not s then return end end date.hour = tonumber(h) date.minute = tonumber(m) date.second = tonumber(s) -- nil if empty string return true end local item_count = 0 local index_time local function set_ampm(item) local H = date.hour if H and not options.am and index_time + 1 == item_count then options.am = ampm_options[item] -- caller checked this is not nil if item:match('^[Aa]') then if not (1 <= H and H <= 12) then return end if H == 12 then date.hour = 0 end else if not (1 <= H and H <= 23) then return end if H <= 11 then date.hour = H + 12 end end return true end end for item in text:gsub(',', ' '):gsub('&nbsp;', ' '):gmatch('%S+') do item_count = item_count + 1 if era_text[item] then -- Era is accepted in peculiar places. if options.era then return end options.era = item elseif ampm_options[item] then if not set_ampm(item) then return end elseif item:find(':', 1, true) then if not extract_time(item) then return end index_time = item_count elseif date.day and date.month then if date.year then return -- should be nothing more so item is invalid end if not item:match('^(%d%d?%d?%d?)$') then return end date.year = tonumber(item) elseif date.day then if not extract_month(item) then return end elseif date.month then if not extract_day_or_year(item) then return end elseif extract_month(item) then options.format = 'mdy' elseif extract_ymd(item) then options.format = 'ymd' elseif extract_day_or_year(item) then if date.day then options.format = 'dmy' end else return end end if not date.year or date.year == 0 then return end local era = era_text[options.era] if era and era.isbc then date.year = 1 - date.year end return date, options end local function autofill(date1, date2) -- Fill any missing month or day in each date using the -- corresponding component from the other date, if present, -- or with 1 if both dates are missing the month or day. -- This gives a good result for calculating the difference -- between two partial dates when no range is wanted. -- Return filled date1, date2 (two full dates). local function filled(a, b) -- Return date a filled, if necessary, with month and/or day from date b. -- The filled day is truncated to fit the number of days in the month. local fillmonth, fillday if not a.month then fillmonth = b.month or 1 end if not a.day then fillday = b.day or 1 end if fillmonth or fillday then -- need to create a new date a = Date(a, { month = fillmonth, day = math.min(fillday or a.day, days_in_month(a.year, fillmonth or a.month, a.calendar)) }) end return a end return filled(date1, date2), filled(date2, date1) end local function date_add_sub(lhs, rhs, is_sub) -- Return a new date from calculating (lhs + rhs) or (lhs - rhs), -- or return nothing if invalid. -- The result is nil if the calculated date exceeds allowable limits. -- Caller ensures that lhs is a date; its properties are copied for the new date. if lhs.partial then -- Adding to a partial is not supported. -- Can subtract a date or partial from a partial, but this is not called for that. return end local function is_prefix(text, word, minlen) local n = #text return (minlen or 1) <= n and n <= #word and text == word:sub(1, n) end local function do_days(n) local forcetime, jd if floor(n) == n then jd = lhs.jd else forcetime = not lhs.hastime jd = lhs.jdz end jd = jd + (is_sub and -n or n) if forcetime then jd = tostring(jd) if not jd:find('.', 1, true) then jd = jd .. '.0' end end return Date(lhs, 'juliandate', jd) end if type(rhs) == 'number' then -- Add/subtract days, including fractional days. return do_days(rhs) end if type(rhs) == 'string' then -- rhs is a single component like '26m' or '26 months' (with optional sign). -- Fractions like '3.25d' are accepted for the units which are handled as days. local sign, numstr, id = rhs:match('^%s*([+-]?)([%d%.]+)%s*(%a+)$') if sign then if sign == '-' then is_sub = not (is_sub and true or false) end local y, m, days local num = tonumber(numstr) if not num then return end id = id:lower() if is_prefix(id, 'years') then y = num m = 0 elseif is_prefix(id, 'months') then y = floor(num / 12) m = num % 12 elseif is_prefix(id, 'weeks') then days = num * 7 elseif is_prefix(id, 'days') then days = num elseif is_prefix(id, 'hours') then days = num / 24 elseif is_prefix(id, 'minutes', 3) then days = num / (24 * 60) elseif is_prefix(id, 'seconds') then days = num / (24 * 3600) else return end if days then return do_days(days) end if numstr:find('.', 1, true) then return end if is_sub then y = -y m = -m end assert(-11 <= m and m <= 11) y = lhs.year + y m = lhs.month + m if m > 12 then y = y + 1 m = m - 12 elseif m < 1 then y = y - 1 m = m + 12 end local d = math.min(lhs.day, days_in_month(y, m, lhs.calendar)) return Date(lhs, y, m, d) end end if is_diff(rhs) then local days = rhs.age_days if (is_sub or false) ~= (rhs.isnegative or false) then days = -days end return lhs + days end end local full_date_only = { dayabbr = true, dayname = true, dow = true, dayofweek = true, dowiso = true, dayofweekiso = true, dayofyear = true, gsd = true, juliandate = true, jd = true, jdz = true, jdnoon = true, } -- Metatable for a date's calculated fields. local datemt = { __index = function (self, key) if rawget(self, 'partial') then if full_date_only[key] then return end if key == 'monthabbr' or key == 'monthdays' or key == 'monthname' then if not self.month then return end end end local value if key == 'dayabbr' then value = day_info[self.dow][1] elseif key == 'dayname' then value = day_info[self.dow][2] elseif key == 'dow' then value = (self.jdnoon + 1) % 7 -- day-of-week 0=Sun to 6=Sat elseif key == 'dayofweek' then value = self.dow elseif key == 'dowiso' then value = (self.jdnoon % 7) + 1 -- ISO day-of-week 1=Mon to 7=Sun elseif key == 'dayofweekiso' then value = self.dowiso elseif key == 'dayofyear' then local first = Date(self.year, 1, 1, self.calendar).jdnoon value = self.jdnoon - first + 1 -- day-of-year 1 to 366 elseif key == 'era' then -- Era text (never a negative sign) from year and options. value = get_era_for_year(self.options.era, self.year) elseif key == 'format' then value = self.options.format or 'dmy' elseif key == 'gsd' then -- GSD = 1 from 00:00:00 to 23:59:59 on 1 January 1 AD Gregorian calendar, -- which is from jd 1721425.5 to 1721426.49999. value = floor(self.jd - 1721424.5) elseif key == 'juliandate' or key == 'jd' or key == 'jdz' then local jd, jdz = julian_date(self) rawset(self, 'juliandate', jd) rawset(self, 'jd', jd) rawset(self, 'jdz', jdz) return key == 'jdz' and jdz or jd elseif key == 'jdnoon' then -- Julian date at noon (an integer) on the calendar day when jd occurs. value = floor(self.jd + 0.5) elseif key == 'isleapyear' then value = is_leap_year(self.year, self.calendar) elseif key == 'monthabbr' then value = month_info[self.month][1] elseif key == 'monthdays' then value = days_in_month(self.year, self.month, self.calendar) elseif key == 'monthname' then value = month_info[self.month][2] end if value ~= nil then rawset(self, key, value) return value end end, } -- Date operators. local function mt_date_add(lhs, rhs) if not is_date(lhs) then lhs, rhs = rhs, lhs -- put date on left (it must be a date for this to have been called) end return date_add_sub(lhs, rhs) end local function mt_date_sub(lhs, rhs) if is_date(lhs) then if is_date(rhs) then return DateDiff(lhs, rhs) end return date_add_sub(lhs, rhs, true) end end local function mt_date_concat(lhs, rhs) return tostring(lhs) .. tostring(rhs) end local function mt_date_tostring(self) return self:text() end local function mt_date_eq(lhs, rhs) -- Return true if dates identify same date/time where, for example, -- Date(-4712, 1, 1, 'Julian') == Date(-4713, 11, 24, 'Gregorian') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. -- The months may both be nil, but must be the same. return lhs.year == rhs.year and lhs.month == rhs.month and lhs.calendar == rhs.calendar end return lhs.jdz == rhs.jdz end local function mt_date_lt(lhs, rhs) -- Return true if lhs < rhs, for example, -- Date('1 Jan 2016') < Date('06:00 1 Jan 2016') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. if lhs.calendar ~= rhs.calendar then return lhs.calendar == 'Julian' end if lhs.partial then lhs = lhs.partial.first end if rhs.partial then rhs = rhs.partial.first end end return lhs.jdz < rhs.jdz end --[[ Examples of syntax to construct a date: Date(y, m, d, 'julian') default calendar is 'gregorian' Date(y, m, d, H, M, S, 'julian') Date('juliandate', jd, 'julian') if jd contains "." text output includes H:M:S Date('currentdate') Date('currentdatetime') Date('1 April 1995', 'julian') parse date from text Date('1 April 1995 AD', 'julian') using an era sets a flag to do the same for output Date('04:30:59 1 April 1995', 'julian') Date(date) copy of an existing date Date(date, t) same, updated with y,m,d,H,M,S fields from table t Date(t) date with y,m,d,H,M,S fields from table t ]] function Date(...) -- for forward declaration above -- Return a table holding a date assuming a uniform calendar always applies -- (proleptic Gregorian calendar or proleptic Julian calendar), or -- return nothing if date is invalid. -- A partial date has a valid year, however its month may be nil, and -- its day and time fields are nil. -- Field partial is set to false (if a full date) or a table (if a partial date). local calendars = { julian = 'Julian', gregorian = 'Gregorian' } local newdate = { _id = uniq, calendar = 'Gregorian', -- default is Gregorian calendar hastime = false, -- true if input sets a time hour = 0, -- always set hour/minute/second so don't have to handle nil minute = 0, second = 0, options = {}, list = _date_list, subtract = function (self, rhs, options) return DateDiff(self, rhs, options) end, text = _date_text, } local argtype, datetext, is_copy, jd_number, tnums local numindex = 0 local numfields = { 'year', 'month', 'day', 'hour', 'minute', 'second' } local numbers = {} for _, v in ipairs({...}) do v = strip_to_nil(v) local vlower = type(v) == 'string' and v:lower() or nil if v == nil then -- Ignore empty arguments after stripping so modules can directly pass template parameters. elseif calendars[vlower] then newdate.calendar = calendars[vlower] elseif vlower == 'partial' then newdate.partial = true elseif vlower == 'fix' then newdate.want_fix = true elseif is_date(v) then -- Copy existing date (items can be overridden by other arguments). if is_copy or tnums then return end is_copy = true newdate.calendar = v.calendar newdate.partial = v.partial newdate.hastime = v.hastime newdate.options = v.options newdate.year = v.year newdate.month = v.month newdate.day = v.day newdate.hour = v.hour newdate.minute = v.minute newdate.second = v.second elseif type(v) == 'table' then if tnums then return end tnums = {} local tfields = { year=1, month=1, day=1, hour=2, minute=2, second=2 } for tk, tv in pairs(v) do if tfields[tk] then tnums[tk] = tonumber(tv) end if tfields[tk] == 2 then newdate.hastime = true end end else local num = tonumber(v) if not num and argtype == 'setdate' and numindex == 1 then num = month_number(v) end if num then if not argtype then argtype = 'setdate' end if argtype == 'setdate' and numindex < 6 then numindex = numindex + 1 numbers[numfields[numindex]] = num elseif argtype == 'juliandate' and not jd_number then jd_number = num if type(v) == 'string' then if v:find('.', 1, true) then newdate.hastime = true end elseif num ~= floor(num) then -- The given value was a number. The time will be used -- if the fractional part is nonzero. newdate.hastime = true end else return end elseif argtype then return elseif type(v) == 'string' then if v == 'currentdate' or v == 'currentdatetime' or v == 'juliandate' then argtype = v else argtype = 'datetext' datetext = v end else return end end end if argtype == 'datetext' then if tnums or not set_date_from_numbers(newdate, extract_date(newdate, datetext)) then return end elseif argtype == 'juliandate' then newdate.partial = nil newdate.jd = jd_number if not set_date_from_jd(newdate) then return end elseif argtype == 'currentdate' or argtype == 'currentdatetime' then newdate.partial = nil newdate.year = current.year newdate.month = current.month newdate.day = current.day if argtype == 'currentdatetime' then newdate.hour = current.hour newdate.minute = current.min newdate.second = current.sec newdate.hastime = true end newdate.calendar = 'Gregorian' -- ignore any given calendar name elseif argtype == 'setdate' then if tnums or not set_date_from_numbers(newdate, numbers) then return end elseif not (is_copy or tnums) then return end if tnums then newdate.jd = nil -- force recalculation in case jd was set before changes from tnums if not set_date_from_numbers(newdate, tnums) then return end end if newdate.partial then local year = newdate.year local month = newdate.month local first = Date(year, month or 1, 1, newdate.calendar) month = month or 12 local last = Date(year, month, days_in_month(year, month), newdate.calendar) newdate.partial = { first = first, last = last } else newdate.partial = false -- avoid index lookup end setmetatable(newdate, datemt) local readonly = {} local mt = { __index = newdate, __newindex = function(t, k, v) error('date.' .. tostring(k) .. ' is read-only', 2) end, __add = mt_date_add, __sub = mt_date_sub, __concat = mt_date_concat, __tostring = mt_date_tostring, __eq = mt_date_eq, __lt = mt_date_lt, } return setmetatable(readonly, mt) end local function _diff_age(diff, code, options) -- Return a tuple of integer values from diff as specified by code, except that -- each integer may be a list of two integers for a diff with a partial date, or -- return nil if the code is not supported. -- If want round, the least significant unit is rounded to nearest whole unit. -- For a duration, an extra day is added. local wantround, wantduration, wantrange if type(options) == 'table' then wantround = options.round wantduration = options.duration wantrange = options.range else wantround = options end if not is_diff(diff) then local f = wantduration and 'duration' or 'age' error(f .. ': need a date difference (use "diff:' .. f .. '()" with a colon)', 2) end if diff.partial then -- Ignore wantround, wantduration. local function choose(v) if type(v) == 'table' then if not wantrange or v[1] == v[2] then -- Example: Date('partial', 2005) - Date('partial', 2001) gives -- diff.years = { 3, 4 } to show the range of possible results. -- If do not want a range, choose the second value as more expected. return v[2] end end return v end if code == 'ym' or code == 'ymd' then if not wantrange and diff.iszero then -- This avoids an unexpected result such as -- Date('partial', 2001) - Date('partial', 2001) -- giving diff = { years = 0, months = { 0, 11 } } -- which would be reported as 0 years and 11 months. return 0, 0 end return choose(diff.partial.years), choose(diff.partial.months) end if code == 'y' then return choose(diff.partial.years) end if code == 'm' or code == 'w' or code == 'd' then return choose({ diff.partial.mindiff:age(code), diff.partial.maxdiff:age(code) }) end return nil end local extra_days = wantduration and 1 or 0 if code == 'wd' or code == 'w' or code == 'd' then local offset = wantround and 0.5 or 0 local days = diff.age_days + extra_days if code == 'wd' or code == 'd' then days = floor(days + offset) if code == 'd' then return days end return floor(days/7), days % 7 end return floor(days/7 + offset) end local H, M, S = diff.hours, diff.minutes, diff.seconds if code == 'dh' or code == 'dhm' or code == 'dhms' or code == 'h' or code == 'hm' or code == 'hms' or code == 'M' or code == 's' then local days = floor(diff.age_days + extra_days) local inc_hour if wantround then if code == 'dh' or code == 'h' then if M >= 30 then inc_hour = true end elseif code == 'dhm' or code == 'hm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'M' then if S >= 30 then M = M + 1 end else -- Nothing needed because S is an integer. end if inc_hour then H = H + 1 if H >= 24 then H = 0 days = days + 1 end end end if code == 'dh' or code == 'dhm' or code == 'dhms' then if code == 'dh' then return days, H elseif code == 'dhm' then return days, H, M else return days, H, M, S end end local hours = days * 24 + H if code == 'h' then return hours elseif code == 'hm' then return hours, M elseif code == 'M' or code == 's' then M = hours * 60 + M if code == 'M' then return M end return M * 60 + S end return hours, M, S end if wantround then local inc_hour if code == 'ymdh' or code == 'ymwdh' then if M >= 30 then inc_hour = true end elseif code == 'ymdhm' or code == 'ymwdhm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'ymd' or code == 'ymwd' or code == 'yd' or code == 'md' then if H >= 12 then extra_days = extra_days + 1 end end if inc_hour then H = H + 1 if H >= 24 then H = 0 extra_days = extra_days + 1 end end end local y, m, d = diff.years, diff.months, diff.days if extra_days > 0 then d = d + extra_days if d > 28 or code == 'yd' then -- Recalculate in case have passed a month. diff = diff.date1 + extra_days - diff.date2 y, m, d = diff.years, diff.months, diff.days end end if code == 'ymd' then return y, m, d elseif code == 'yd' then if y > 0 then -- It is known that diff.date1 > diff.date2. diff = diff.date1 - (diff.date2 + (y .. 'y')) end return y, floor(diff.age_days) elseif code == 'md' then return y * 12 + m, d elseif code == 'ym' or code == 'm' then if wantround then if d >= 16 then m = m + 1 if m >= 12 then m = 0 y = y + 1 end end end if code == 'ym' then return y, m end return y * 12 + m elseif code == 'ymw' then local weeks = floor(d/7) if wantround then local days = d % 7 if days > 3 or (days == 3 and H >= 12) then weeks = weeks + 1 end end return y, m, weeks elseif code == 'ymwd' then return y, m, floor(d/7), d % 7 elseif code == 'ymdh' then return y, m, d, H elseif code == 'ymwdh' then return y, m, floor(d/7), d % 7, H elseif code == 'ymdhm' then return y, m, d, H, M elseif code == 'ymwdhm' then return y, m, floor(d/7), d % 7, H, M end if code == 'y' then if wantround and m >= 6 then y = y + 1 end return y end return nil end local function _diff_duration(diff, code, options) if type(options) ~= 'table' then options = { round = options } end options.duration = true return _diff_age(diff, code, options) end -- Metatable for some operations on date differences. diffmt = { -- for forward declaration above __concat = function (lhs, rhs) return tostring(lhs) .. tostring(rhs) end, __tostring = function (self) return tostring(self.age_days) end, __index = function (self, key) local value if key == 'age_days' then if rawget(self, 'partial') then local function jdz(date) return (date.partial and date.partial.first or date).jdz end value = jdz(self.date1) - jdz(self.date2) else value = self.date1.jdz - self.date2.jdz end end if value ~= nil then rawset(self, key, value) return value end end, } function DateDiff(date1, date2, options) -- for forward declaration above -- Return a table with the difference between two dates (date1 - date2). -- The difference is negative if date1 is older than date2. -- Return nothing if invalid. -- If d = date1 - date2 then -- date1 = date2 + d -- If date1 >= date2 and the dates have no H:M:S time specified then -- date1 = date2 + (d.years..'y') + (d.months..'m') + d.days -- where the larger time units are added first. -- The result of Date(2015,1,x) + '1m' is Date(2015,2,28) for -- x = 28, 29, 30, 31. That means, for example, -- d = Date(2015,3,3) - Date(2015,1,31) -- gives d.years, d.months, d.days = 0, 1, 3 (excluding date1). if not (is_date(date1) and is_date(date2) and date1.calendar == date2.calendar) then return end local wantfill if type(options) == 'table' then wantfill = options.fill end local isnegative = false local iszero = false if date1 < date2 then isnegative = true date1, date2 = date2, date1 elseif date1 == date2 then iszero = true end -- It is known that date1 >= date2 (period is from date2 to date1). if date1.partial or date2.partial then -- Two partial dates might have timelines: ---------------------A=================B--- date1 is from A to B inclusive --------C=======D-------------------------- date2 is from C to D inclusive -- date1 > date2 iff A > C (date1.partial.first > date2.partial.first) -- The periods can overlap ('April 2001' - '2001'): -------------A===B------------------------- A=2001-04-01 B=2001-04-30 --------C=====================D------------ C=2001-01-01 D=2001-12-31 if wantfill then date1, date2 = autofill(date1, date2) else local function zdiff(date1, date2) local diff = date1 - date2 if diff.isnegative then return date1 - date1 -- a valid diff in case we call its methods end return diff end local function getdate(date, which) return date.partial and date.partial[which] or date end local maxdiff = zdiff(getdate(date1, 'last'), getdate(date2, 'first')) local mindiff = zdiff(getdate(date1, 'first'), getdate(date2, 'last')) local years, months if maxdiff.years == mindiff.years then years = maxdiff.years if maxdiff.months == mindiff.months then months = maxdiff.months else months = { mindiff.months, maxdiff.months } end else years = { mindiff.years, maxdiff.years } end return setmetatable({ date1 = date1, date2 = date2, partial = { years = years, months = months, maxdiff = maxdiff, mindiff = mindiff, }, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end end local y1, m1 = date1.year, date1.month local y2, m2 = date2.year, date2.month local years = y1 - y2 local months = m1 - m2 local d1 = date1.day + hms(date1) local d2 = date2.day + hms(date2) local days, time if d1 >= d2 then days = d1 - d2 else months = months - 1 -- Get days in previous month (before the "to" date) given December has 31 days. local dpm = m1 > 1 and days_in_month(y1, m1 - 1, date1.calendar) or 31 if d2 >= dpm then days = d1 - hms(date2) else days = dpm - d2 + d1 end end if months < 0 then years = years - 1 months = months + 12 end days, time = math.modf(days) local H, M, S = h_m_s(time) return setmetatable({ date1 = date1, date2 = date2, partial = false, -- avoid index lookup years = years, months = months, days = days, hours = H, minutes = M, seconds = S, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end return { _current = current, _Date = Date, _days_in_month = days_in_month, } p4lffcwq8w4s1hro04tf52ddm3itw32 117089 115435 2026-07-16T11:39:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Date]] 115435 Scribunto text/plain -- Date functions for use by other modules. -- I18N and time zones are not supported. local MINUS = '−' -- Unicode U+2212 MINUS SIGN local floor = math.floor local Date, DateDiff, diffmt -- forward declarations local uniq = { 'unique identifier' } local function is_date(t) -- The system used to make a date read-only means there is no unique -- metatable that is conveniently accessible to check. return type(t) == 'table' and t._id == uniq end local function is_diff(t) return type(t) == 'table' and getmetatable(t) == diffmt end local function _list_join(list, sep) return table.concat(list, sep) end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, join = _list_join, } end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when Date fields are provided from -- another module which may pass a string, a number, or another type). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function is_leap_year(year, calname) -- Return true if year is a leap year. if calname == 'Julian' then return year % 4 == 0 end return (year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0 end local function days_in_month(year, month, calname) -- Return number of days (1..31) in given month (1..12). if month == 2 and is_leap_year(year, calname) then return 29 end return ({ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 })[month] end local function h_m_s(time) -- Return hour, minute, second extracted from fraction of a day. time = floor(time * 24 * 3600 + 0.5) -- number of seconds local second = time % 60 time = floor(time / 60) return floor(time / 60), time % 60, second end local function hms(date) -- Return fraction of a day from date's time, where (0 <= fraction < 1) -- if the values are valid, but could be anything if outside range. return (date.hour + (date.minute + date.second / 60) / 60) / 24 end local function julian_date(date) -- Return jd, jdz from a Julian or Gregorian calendar date where -- jd = Julian date and its fractional part is zero at noon -- jdz = same, but assume time is 00:00:00 if no time given -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- Testing shows this works for all dates from year -9999 to 9999! -- JDN 0 is the 24-hour period starting at noon UTC on Monday -- 1 January 4713 BC = (-4712, 1, 1) Julian calendar -- 24 November 4714 BC = (-4713, 11, 24) Gregorian calendar local offset local a = floor((14 - date.month)/12) local y = date.year + 4800 - a if date.calendar == 'Julian' then offset = floor(y/4) - 32083 else offset = floor(y/4) - floor(y/100) + floor(y/400) - 32045 end local m = date.month + 12*a - 3 local jd = date.day + floor((153*m + 2)/5) + 365*y + offset if date.hastime then jd = jd + hms(date) - 0.5 return jd, jd end return jd, jd - 0.5 end local function set_date_from_jd(date) -- Set the fields of table date from its Julian date field. -- Return true if date is valid. -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- This handles the proleptic Julian and Gregorian calendars. -- Negative Julian dates are not defined but they work. local calname = date.calendar local low, high -- min/max limits for date ranges −9999-01-01 to 9999-12-31 if calname == 'Gregorian' then low, high = -1930999.5, 5373484.49999 elseif calname == 'Julian' then low, high = -1931076.5, 5373557.49999 else return end local jd = date.jd if not (type(jd) == 'number' and low <= jd and jd <= high) then return end local jdn = floor(jd) if date.hastime then local time = jd - jdn -- 0 <= time < 1 if time >= 0.5 then -- if at or after midnight of next day jdn = jdn + 1 time = time - 0.5 else time = time + 0.5 end date.hour, date.minute, date.second = h_m_s(time) else date.second = 0 date.minute = 0 date.hour = 0 end local b, c if calname == 'Julian' then b = 0 c = jdn + 32082 else -- Gregorian local a = jdn + 32044 b = floor((4*a + 3)/146097) c = a - floor(146097*b/4) end local d = floor((4*c + 3)/1461) local e = c - floor(1461*d/4) local m = floor((5*e + 2)/153) date.day = e - floor((153*m + 2)/5) + 1 date.month = m + 3 - 12*floor(m/10) date.year = 100*b + d - 4800 + floor(m/10) return true end local function fix_numbers(numbers, y, m, d, H, M, S, partial, hastime, calendar) -- Put the result of normalizing the given values in table numbers. -- The result will have valid m, d values if y is valid; caller checks y. -- The logic of PHP mktime is followed where m or d can be zero to mean -- the previous unit, and -1 is the one before that, etc. -- Positive values carry forward. local date if not (1 <= m and m <= 12) then date = Date(y, 1, 1) if not date then return end date = date + ((m - 1) .. 'm') y, m = date.year, date.month end local days_hms if not partial then if hastime and H and M and S then if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then days_hms = hms({ hour = H, minute = M, second = S }) end end if days_hms or not (1 <= d and d <= days_in_month(y, m, calendar)) then date = date or Date(y, m, 1) if not date then return end date = date + (d - 1 + (days_hms or 0)) y, m, d = date.year, date.month, date.day if days_hms then H, M, S = date.hour, date.minute, date.second end end end numbers.year = y numbers.month = m numbers.day = d if days_hms then -- Don't set H unless it was valid because a valid H will set hastime. numbers.hour = H numbers.minute = M numbers.second = S end end local function set_date_from_numbers(date, numbers, options) -- Set the fields of table date from numeric values. -- Return true if date is valid. if type(numbers) ~= 'table' then return end local y = numbers.year or date.year local m = numbers.month or date.month local d = numbers.day or date.day local H = numbers.hour local M = numbers.minute or date.minute or 0 local S = numbers.second or date.second or 0 local need_fix if y and m and d then date.partial = nil if not (-9999 <= y and y <= 9999 and 1 <= m and m <= 12 and 1 <= d and d <= days_in_month(y, m, date.calendar)) then if not date.want_fix then return end need_fix = true end elseif y and date.partial then if d or not (-9999 <= y and y <= 9999) then return end if m and not (1 <= m and m <= 12) then if not date.want_fix then return end need_fix = true end else return end if date.partial then H = nil -- ignore any time M = nil S = nil else if H then -- It is not possible to set M or S without also setting H. date.hastime = true else H = 0 end if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then if date.want_fix then need_fix = true else return end end end date.want_fix = nil if need_fix then fix_numbers(numbers, y, m, d, H, M, S, date.partial, date.hastime, date.calendar) return set_date_from_numbers(date, numbers, options) end date.year = y -- -9999 to 9999 ('n BC' → year = 1 - n) date.month = m -- 1 to 12 (may be nil if partial) date.day = d -- 1 to 31 (* = nil if partial) date.hour = H -- 0 to 59 (*) date.minute = M -- 0 to 59 (*) date.second = S -- 0 to 59 (*) if type(options) == 'table' then for _, k in ipairs({ 'am', 'era', 'format' }) do if options[k] then date.options[k] = options[k] end end end return true end local function make_option_table(options1, options2) -- If options1 is a string, return a table with its settings, or -- if it is a table, use its settings. -- Missing options are set from table options2 or defaults. -- If a default is used, a flag is set so caller knows the value was not intentionally set. -- Valid option settings are: -- am: 'am', 'a.m.', 'AM', 'A.M.' -- 'pm', 'p.m.', 'PM', 'P.M.' (each has same meaning as corresponding item above) -- era: 'BCMINUS', 'BCNEGATIVE', 'BC', 'B.C.', 'BCE', 'B.C.E.', 'AD', 'A.D.', 'CE', 'C.E.' -- Option am = 'am' does not mean the hour is AM; it means 'am' or 'pm' is used, depending on the hour, -- and am = 'pm' has the same meaning. -- Similarly, era = 'BC' means 'BC' is used if year <= 0. -- BCMINUS displays a MINUS if year < 0 and the display format does not include %{era}. -- BCNEGATIVE is similar but displays a hyphen. local result = { bydefault = {} } if type(options1) == 'table' then result.am = options1.am result.era = options1.era elseif type(options1) == 'string' then -- Example: 'am:AM era:BC' or 'am=AM era=BC'. for item in options1:gmatch('%S+') do local lhs, rhs = item:match('^(%w+)[:=](.+)$') if lhs then result[lhs] = rhs end end end options2 = type(options2) == 'table' and options2 or {} local defaults = { am = 'am', era = 'BC' } for k, v in pairs(defaults) do if not result[k] then if options2[k] then result[k] = options2[k] else result[k] = v result.bydefault[k] = true end end end return result end local ampm_options = { -- lhs = input text accepted as an am/pm option -- rhs = code used internally ['am'] = 'am', ['AM'] = 'AM', ['a.m.'] = 'a.m.', ['A.M.'] = 'A.M.', ['pm'] = 'am', -- same as am ['PM'] = 'AM', ['p.m.'] = 'a.m.', ['P.M.'] = 'A.M.', } local era_text = { -- Text for displaying an era with a positive year (after adjusting -- by replacing year with 1 - year if date.year <= 0). -- options.era = { year<=0 , year>0 } ['BCMINUS'] = { 'BC' , '' , isbc = true, sign = MINUS }, ['BCNEGATIVE'] = { 'BC' , '' , isbc = true, sign = '-' }, ['BC'] = { 'BC' , '' , isbc = true }, ['B.C.'] = { 'B.C.' , '' , isbc = true }, ['BCE'] = { 'BCE' , '' , isbc = true }, ['B.C.E.'] = { 'B.C.E.', '' , isbc = true }, ['AD'] = { 'BC' , 'AD' }, ['A.D.'] = { 'B.C.' , 'A.D.' }, ['CE'] = { 'BCE' , 'CE' }, ['C.E.'] = { 'B.C.E.', 'C.E.' }, } local function get_era_for_year(era, year) return (era_text[era] or era_text['BC'])[year > 0 and 2 or 1] or '' end local function strftime(date, format, options) -- Return date formatted as a string using codes similar to those -- in the C strftime library function. local sformat = string.format local shortcuts = { ['%c'] = '%-I:%M %p %-d %B %-Y %{era}', -- date and time: 2:30 pm 1 April 2016 ['%x'] = '%-d %B %-Y %{era}', -- date: 1 April 2016 ['%X'] = '%-I:%M %p', -- time: 2:30 pm } if shortcuts[format] then format = shortcuts[format] end local codes = { a = { field = 'dayabbr' }, A = { field = 'dayname' }, b = { field = 'monthabbr' }, B = { field = 'monthname' }, u = { fmt = '%d' , field = 'dowiso' }, w = { fmt = '%d' , field = 'dow' }, d = { fmt = '%02d', fmt2 = '%d', field = 'day' }, m = { fmt = '%02d', fmt2 = '%d', field = 'month' }, Y = { fmt = '%04d', fmt2 = '%d', field = 'year' }, H = { fmt = '%02d', fmt2 = '%d', field = 'hour' }, M = { fmt = '%02d', fmt2 = '%d', field = 'minute' }, S = { fmt = '%02d', fmt2 = '%d', field = 'second' }, j = { fmt = '%03d', fmt2 = '%d', field = 'dayofyear' }, I = { fmt = '%02d', fmt2 = '%d', field = 'hour', special = 'hour12' }, p = { field = 'hour', special = 'am' }, } options = make_option_table(options, date.options) local amopt = options.am local eraopt = options.era local function replace_code(spaces, modifier, id) local code = codes[id] if code then local fmt = code.fmt if modifier == '-' and code.fmt2 then fmt = code.fmt2 end local value = date[code.field] if not value then return nil -- an undefined field in a partial date end local special = code.special if special then if special == 'hour12' then value = value % 12 value = value == 0 and 12 or value elseif special == 'am' then local ap = ({ ['a.m.'] = { 'a.m.', 'p.m.' }, ['AM'] = { 'AM', 'PM' }, ['A.M.'] = { 'A.M.', 'P.M.' }, })[ampm_options[amopt]] or { 'am', 'pm' } return (spaces == '' and '' or '&nbsp;') .. (value < 12 and ap[1] or ap[2]) end end if code.field == 'year' then local sign = (era_text[eraopt] or {}).sign if not sign or format:find('%{era}', 1, true) then sign = '' if value <= 0 then value = 1 - value end else if value >= 0 then sign = '' else value = -value end end return spaces .. sign .. sformat(fmt, value) end return spaces .. (fmt and sformat(fmt, value) or value) end end local function replace_property(spaces, id) if id == 'era' then -- Special case so can use local era option. local result = get_era_for_year(eraopt, date.year) if result == '' then return '' end return (spaces == '' and '' or '&nbsp;') .. result end local result = date[id] if type(result) == 'string' then return spaces .. result end if type(result) == 'number' then return spaces .. tostring(result) end if type(result) == 'boolean' then return spaces .. (result and '1' or '0') end -- This occurs if id is an undefined field in a partial date, or is the name of a function. return nil end local PERCENT = '\127PERCENT\127' return (format :gsub('%%%%', PERCENT) :gsub('(%s*)%%{(%w+)}', replace_property) :gsub('(%s*)%%(%-?)(%a)', replace_code) :gsub(PERCENT, '%%') ) end local function _date_text(date, fmt, options) -- Return a formatted string representing the given date. if not is_date(date) then error('date:text: need a date (use "date:text()" with a colon)', 2) end if type(fmt) == 'string' and fmt:match('%S') then if fmt:find('%', 1, true) then return strftime(date, fmt, options) end elseif date.partial then fmt = date.month and 'my' or 'y' else fmt = 'dmy' if date.hastime then fmt = (date.second > 0 and 'hms ' or 'hm ') .. fmt end end local function bad_format() -- For consistency with other format processing, return given format -- (or cleaned format if original was not a string) if invalid. return mw.text.nowiki(fmt) end if date.partial then -- Ignore days in standard formats like 'ymd'. if fmt == 'ym' or fmt == 'ymd' then fmt = date.month and '%Y-%m %{era}' or '%Y %{era}' elseif fmt == 'my' or fmt == 'dmy' or fmt == 'mdy' then fmt = date.month and '%B %-Y %{era}' or '%-Y %{era}' elseif fmt == 'y' then fmt = date.month and '%-Y %{era}' or '%-Y %{era}' else return bad_format() end return strftime(date, fmt, options) end local function hm_fmt() local plain = make_option_table(options, date.options).bydefault.am return plain and '%H:%M' or '%-I:%M %p' end local need_time = date.hastime local t = collection() for item in fmt:gmatch('%S+') do local f if item == 'hm' then f = hm_fmt() need_time = false elseif item == 'hms' then f = '%H:%M:%S' need_time = false elseif item == 'ymd' then f = '%Y-%m-%d %{era}' elseif item == 'mdy' then f = '%B %-d, %-Y %{era}' elseif item == 'dmy' then f = '%-d %B %-Y %{era}' else return bad_format() end t:add(f) end fmt = t:join(' ') if need_time then fmt = hm_fmt() .. ' ' .. fmt end return strftime(date, fmt, options) end local day_info = { -- 0=Sun to 6=Sat [0] = { 'Sun', 'Sunday' }, { 'Mon', 'Monday' }, { 'Tue', 'Tuesday' }, { 'Wed', 'Wednesday' }, { 'Thu', 'Thursday' }, { 'Fri', 'Friday' }, { 'Sat', 'Saturday' }, } local month_info = { -- 1=Jan to 12=Dec { 'Jan', 'January' }, { 'Feb', 'February' }, { 'Mar', 'March' }, { 'Apr', 'April' }, { 'May', 'May' }, { 'Jun', 'June' }, { 'Jul', 'July' }, { 'Aug', 'August' }, { 'Sep', 'September' }, { 'Oct', 'October' }, { 'Nov', 'November' }, { 'Dec', 'December' }, } local function name_to_number(text, translate) if type(text) == 'string' then return translate[text:lower()] end end local function day_number(text) return name_to_number(text, { sun = 0, sunday = 0, mon = 1, monday = 1, tue = 2, tuesday = 2, wed = 3, wednesday = 3, thu = 4, thursday = 4, fri = 5, friday = 5, sat = 6, saturday = 6, }) end local function month_number(text) return name_to_number(text, { jan = 1, january = 1, feb = 2, february = 2, mar = 3, march = 3, apr = 4, april = 4, may = 5, jun = 6, june = 6, jul = 7, july = 7, aug = 8, august = 8, sep = 9, september = 9, sept = 9, oct = 10, october = 10, nov = 11, november = 11, dec = 12, december = 12, }) end local function _list_text(list, fmt) -- Return a list of formatted strings from a list of dates. if not type(list) == 'table' then error('date:list:text: need "list:text()" with a colon', 2) end local result = { join = _list_join } for i, date in ipairs(list) do result[i] = date:text(fmt) end return result end local function _date_list(date, spec) -- Return a possibly empty numbered table of dates meeting the specification. -- Dates in the list are in ascending order (oldest date first). -- The spec should be a string of form "<count> <day> <op>" -- where each item is optional and -- count = number of items wanted in list -- day = abbreviation or name such as Mon or Monday -- op = >, >=, <, <= (default is > meaning after date) -- If no count is given, the list is for the specified days in date's month. -- The default day is date's day. -- The spec can also be a positive or negative number: -- -5 is equivalent to '5 <' -- 5 is equivalent to '5' which is '5 >' if not is_date(date) then error('date:list: need a date (use "date:list()" with a colon)', 2) end local list = { text = _list_text } if date.partial then return list end local count, offset, operation local ops = { ['>='] = { before = false, include = true }, ['>'] = { before = false, include = false }, ['<='] = { before = true , include = true }, ['<'] = { before = true , include = false }, } if spec then if type(spec) == 'number' then count = floor(spec + 0.5) if count < 0 then count = -count operation = ops['<'] end elseif type(spec) == 'string' then local num, day, op = spec:match('^%s*(%d*)%s*(%a*)%s*([<>=]*)%s*$') if not num then return list end if num ~= '' then count = tonumber(num) end if day ~= '' then local dow = day_number(day:gsub('[sS]$', '')) -- accept plural days if not dow then return list end offset = dow - date.dow end operation = ops[op] else return list end end offset = offset or 0 operation = operation or ops['>'] local datefrom, dayfirst, daylast if operation.before then if offset > 0 or (offset == 0 and not operation.include) then offset = offset - 7 end if count then if count > 1 then offset = offset - 7*(count - 1) end datefrom = date + offset else daylast = date.day + offset dayfirst = daylast % 7 if dayfirst == 0 then dayfirst = 7 end end else if offset < 0 or (offset == 0 and not operation.include) then offset = offset + 7 end if count then datefrom = date + offset else dayfirst = date.day + offset daylast = date.monthdays end end if not count then if daylast < dayfirst then return list end count = floor((daylast - dayfirst)/7) + 1 datefrom = Date(date, {day = dayfirst}) end for i = 1, count do if not datefrom then break end -- exceeds date limits list[i] = datefrom datefrom = datefrom + 7 end return list end -- Cache the current date/time (UTC). -- -- Note that os.date() returns an empty object with optimized lazy getters for each field. -- Avoid current.min or current.sec in articles! https://phabricator.wikimedia.org/T416616 -- -- Beware that while os.date() uses 'min' and 'sec', our Date() uses 'minute' and 'second'. local current = os.date('!*t') local function extract_date(newdate, text) -- Parse the date/time in text and return n, o where -- n = table of numbers with date/time fields -- o = table of options for AM/PM or AD/BC or format, if any -- or return nothing if date is known to be invalid. -- Caller determines if the values in n are valid. -- A year must be positive ('1' to '9999'); use 'BC' for BC. -- In a y-m-d string, the year must be four digits to avoid ambiguity -- ('0001' to '9999'). The only way to enter year <= 0 is by specifying -- the date as three numeric parameters like ymd Date(-1, 1, 1). -- Dates of form d/m/y, m/d/y, y/m/d are rejected as potentially ambiguous. local date, options = {}, {} if text:sub(-1) == 'Z' then -- Extract date/time from a Wikidata timestamp. -- The year can be 1 to 16 digits but this module handles 1 to 4 digits only. -- Examples: '+2016-06-21T14:30:00Z', '-0000000180-00-00T00:00:00Z'. local sign, y, m, d, H, M, S = text:match('^([+%-])(%d+)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)Z$') if sign then y = tonumber(y) if sign == '-' and y > 0 then y = -y end if y <= 0 then options.era = 'BCE' end date.year = y m = tonumber(m) d = tonumber(d) H = tonumber(H) M = tonumber(M) S = tonumber(S) if m == 0 then newdate.partial = true return date, options end date.month = m if d == 0 then newdate.partial = true return date, options end date.day = d if H > 0 or M > 0 or S > 0 then date.hour = H date.minute = M date.second = S end return date, options end return end local function extract_ymd(item) -- Called when no day or month has been set. local y, m, d = item:match('^(%d%d%d%d)%-(%w+)%-(%d%d?)$') if y then if date.year then return end if m:match('^%d%d?$') then m = tonumber(m) else m = month_number(m) end if m then date.year = tonumber(y) date.month = m date.day = tonumber(d) return true end end end local function extract_day_or_year(item) -- Called when a day would be valid, or -- when a year would be valid if no year has been set and partial is set. local number, suffix = item:match('^(%d%d?%d?%d?)(.*)$') if number then local n = tonumber(number) if #number <= 2 and n <= 31 then suffix = suffix:lower() if suffix == '' or suffix == 'st' or suffix == 'nd' or suffix == 'rd' or suffix == 'th' then date.day = n return true end elseif suffix == '' and newdate.partial and not date.year then date.year = n return true end end end local function extract_month(item) -- A month must be given as a name or abbreviation; a number could be ambiguous. local m = month_number(item) if m then date.month = m return true end end local function extract_time(item) local h, m, s = item:match('^(%d%d?):(%d%d)(:?%d*)$') if date.hour or not h then return end if s ~= '' then s = s:match('^:(%d%d)$') if not s then return end end date.hour = tonumber(h) date.minute = tonumber(m) date.second = tonumber(s) -- nil if empty string return true end local item_count = 0 local index_time local function set_ampm(item) local H = date.hour if H and not options.am and index_time + 1 == item_count then options.am = ampm_options[item] -- caller checked this is not nil if item:match('^[Aa]') then if not (1 <= H and H <= 12) then return end if H == 12 then date.hour = 0 end else if not (1 <= H and H <= 23) then return end if H <= 11 then date.hour = H + 12 end end return true end end for item in text:gsub(',', ' '):gsub('&nbsp;', ' '):gmatch('%S+') do item_count = item_count + 1 if era_text[item] then -- Era is accepted in peculiar places. if options.era then return end options.era = item elseif ampm_options[item] then if not set_ampm(item) then return end elseif item:find(':', 1, true) then if not extract_time(item) then return end index_time = item_count elseif date.day and date.month then if date.year then return -- should be nothing more so item is invalid end if not item:match('^(%d%d?%d?%d?)$') then return end date.year = tonumber(item) elseif date.day then if not extract_month(item) then return end elseif date.month then if not extract_day_or_year(item) then return end elseif extract_month(item) then options.format = 'mdy' elseif extract_ymd(item) then options.format = 'ymd' elseif extract_day_or_year(item) then if date.day then options.format = 'dmy' end else return end end if not date.year or date.year == 0 then return end local era = era_text[options.era] if era and era.isbc then date.year = 1 - date.year end return date, options end local function autofill(date1, date2) -- Fill any missing month or day in each date using the -- corresponding component from the other date, if present, -- or with 1 if both dates are missing the month or day. -- This gives a good result for calculating the difference -- between two partial dates when no range is wanted. -- Return filled date1, date2 (two full dates). local function filled(a, b) -- Return date a filled, if necessary, with month and/or day from date b. -- The filled day is truncated to fit the number of days in the month. local fillmonth, fillday if not a.month then fillmonth = b.month or 1 end if not a.day then fillday = b.day or 1 end if fillmonth or fillday then -- need to create a new date a = Date(a, { month = fillmonth, day = math.min(fillday or a.day, days_in_month(a.year, fillmonth or a.month, a.calendar)) }) end return a end return filled(date1, date2), filled(date2, date1) end local function date_add_sub(lhs, rhs, is_sub) -- Return a new date from calculating (lhs + rhs) or (lhs - rhs), -- or return nothing if invalid. -- The result is nil if the calculated date exceeds allowable limits. -- Caller ensures that lhs is a date; its properties are copied for the new date. if lhs.partial then -- Adding to a partial is not supported. -- Can subtract a date or partial from a partial, but this is not called for that. return end local function is_prefix(text, word, minlen) local n = #text return (minlen or 1) <= n and n <= #word and text == word:sub(1, n) end local function do_days(n) local forcetime, jd if floor(n) == n then jd = lhs.jd else forcetime = not lhs.hastime jd = lhs.jdz end jd = jd + (is_sub and -n or n) if forcetime then jd = tostring(jd) if not jd:find('.', 1, true) then jd = jd .. '.0' end end return Date(lhs, 'juliandate', jd) end if type(rhs) == 'number' then -- Add/subtract days, including fractional days. return do_days(rhs) end if type(rhs) == 'string' then -- rhs is a single component like '26m' or '26 months' (with optional sign). -- Fractions like '3.25d' are accepted for the units which are handled as days. local sign, numstr, id = rhs:match('^%s*([+-]?)([%d%.]+)%s*(%a+)$') if sign then if sign == '-' then is_sub = not (is_sub and true or false) end local y, m, days local num = tonumber(numstr) if not num then return end id = id:lower() if is_prefix(id, 'years') then y = num m = 0 elseif is_prefix(id, 'months') then y = floor(num / 12) m = num % 12 elseif is_prefix(id, 'weeks') then days = num * 7 elseif is_prefix(id, 'days') then days = num elseif is_prefix(id, 'hours') then days = num / 24 elseif is_prefix(id, 'minutes', 3) then days = num / (24 * 60) elseif is_prefix(id, 'seconds') then days = num / (24 * 3600) else return end if days then return do_days(days) end if numstr:find('.', 1, true) then return end if is_sub then y = -y m = -m end assert(-11 <= m and m <= 11) y = lhs.year + y m = lhs.month + m if m > 12 then y = y + 1 m = m - 12 elseif m < 1 then y = y - 1 m = m + 12 end local d = math.min(lhs.day, days_in_month(y, m, lhs.calendar)) return Date(lhs, y, m, d) end end if is_diff(rhs) then local days = rhs.age_days if (is_sub or false) ~= (rhs.isnegative or false) then days = -days end return lhs + days end end local full_date_only = { dayabbr = true, dayname = true, dow = true, dayofweek = true, dowiso = true, dayofweekiso = true, dayofyear = true, gsd = true, juliandate = true, jd = true, jdz = true, jdnoon = true, } -- Metatable for a date's calculated fields. local datemt = { __index = function (self, key) if rawget(self, 'partial') then if full_date_only[key] then return end if key == 'monthabbr' or key == 'monthdays' or key == 'monthname' then if not self.month then return end end end local value if key == 'dayabbr' then value = day_info[self.dow][1] elseif key == 'dayname' then value = day_info[self.dow][2] elseif key == 'dow' then value = (self.jdnoon + 1) % 7 -- day-of-week 0=Sun to 6=Sat elseif key == 'dayofweek' then value = self.dow elseif key == 'dowiso' then value = (self.jdnoon % 7) + 1 -- ISO day-of-week 1=Mon to 7=Sun elseif key == 'dayofweekiso' then value = self.dowiso elseif key == 'dayofyear' then local first = Date(self.year, 1, 1, self.calendar).jdnoon value = self.jdnoon - first + 1 -- day-of-year 1 to 366 elseif key == 'era' then -- Era text (never a negative sign) from year and options. value = get_era_for_year(self.options.era, self.year) elseif key == 'format' then value = self.options.format or 'dmy' elseif key == 'gsd' then -- GSD = 1 from 00:00:00 to 23:59:59 on 1 January 1 AD Gregorian calendar, -- which is from jd 1721425.5 to 1721426.49999. value = floor(self.jd - 1721424.5) elseif key == 'juliandate' or key == 'jd' or key == 'jdz' then local jd, jdz = julian_date(self) rawset(self, 'juliandate', jd) rawset(self, 'jd', jd) rawset(self, 'jdz', jdz) return key == 'jdz' and jdz or jd elseif key == 'jdnoon' then -- Julian date at noon (an integer) on the calendar day when jd occurs. value = floor(self.jd + 0.5) elseif key == 'isleapyear' then value = is_leap_year(self.year, self.calendar) elseif key == 'monthabbr' then value = month_info[self.month][1] elseif key == 'monthdays' then value = days_in_month(self.year, self.month, self.calendar) elseif key == 'monthname' then value = month_info[self.month][2] end if value ~= nil then rawset(self, key, value) return value end end, } -- Date operators. local function mt_date_add(lhs, rhs) if not is_date(lhs) then lhs, rhs = rhs, lhs -- put date on left (it must be a date for this to have been called) end return date_add_sub(lhs, rhs) end local function mt_date_sub(lhs, rhs) if is_date(lhs) then if is_date(rhs) then return DateDiff(lhs, rhs) end return date_add_sub(lhs, rhs, true) end end local function mt_date_concat(lhs, rhs) return tostring(lhs) .. tostring(rhs) end local function mt_date_tostring(self) return self:text() end local function mt_date_eq(lhs, rhs) -- Return true if dates identify same date/time where, for example, -- Date(-4712, 1, 1, 'Julian') == Date(-4713, 11, 24, 'Gregorian') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. -- The months may both be nil, but must be the same. return lhs.year == rhs.year and lhs.month == rhs.month and lhs.calendar == rhs.calendar end return lhs.jdz == rhs.jdz end local function mt_date_lt(lhs, rhs) -- Return true if lhs < rhs, for example, -- Date('1 Jan 2016') < Date('06:00 1 Jan 2016') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. if lhs.calendar ~= rhs.calendar then return lhs.calendar == 'Julian' end if lhs.partial then lhs = lhs.partial.first end if rhs.partial then rhs = rhs.partial.first end end return lhs.jdz < rhs.jdz end --[[ Examples of syntax to construct a date: Date(y, m, d, 'julian') default calendar is 'gregorian' Date(y, m, d, H, M, S, 'julian') Date('juliandate', jd, 'julian') if jd contains "." text output includes H:M:S Date('currentdate') Date('currentdatetime') Date('1 April 1995', 'julian') parse date from text Date('1 April 1995 AD', 'julian') using an era sets a flag to do the same for output Date('04:30:59 1 April 1995', 'julian') Date(date) copy of an existing date Date(date, t) same, updated with y,m,d,H,M,S fields from table t Date(t) date with y,m,d,H,M,S fields from table t ]] function Date(...) -- for forward declaration above -- Return a table holding a date assuming a uniform calendar always applies -- (proleptic Gregorian calendar or proleptic Julian calendar), or -- return nothing if date is invalid. -- A partial date has a valid year, however its month may be nil, and -- its day and time fields are nil. -- Field partial is set to false (if a full date) or a table (if a partial date). local calendars = { julian = 'Julian', gregorian = 'Gregorian' } local newdate = { _id = uniq, calendar = 'Gregorian', -- default is Gregorian calendar hastime = false, -- true if input sets a time hour = 0, -- always set hour/minute/second so don't have to handle nil minute = 0, second = 0, options = {}, list = _date_list, subtract = function (self, rhs, options) return DateDiff(self, rhs, options) end, text = _date_text, } local argtype, datetext, is_copy, jd_number, tnums local numindex = 0 local numfields = { 'year', 'month', 'day', 'hour', 'minute', 'second' } local numbers = {} for _, v in ipairs({...}) do v = strip_to_nil(v) local vlower = type(v) == 'string' and v:lower() or nil if v == nil then -- Ignore empty arguments after stripping so modules can directly pass template parameters. elseif calendars[vlower] then newdate.calendar = calendars[vlower] elseif vlower == 'partial' then newdate.partial = true elseif vlower == 'fix' then newdate.want_fix = true elseif is_date(v) then -- Copy existing date (items can be overridden by other arguments). if is_copy or tnums then return end is_copy = true newdate.calendar = v.calendar newdate.partial = v.partial newdate.hastime = v.hastime newdate.options = v.options newdate.year = v.year newdate.month = v.month newdate.day = v.day newdate.hour = v.hour newdate.minute = v.minute newdate.second = v.second elseif type(v) == 'table' then if tnums then return end tnums = {} local tfields = { year=1, month=1, day=1, hour=2, minute=2, second=2 } for tk, tv in pairs(v) do if tfields[tk] then tnums[tk] = tonumber(tv) end if tfields[tk] == 2 then newdate.hastime = true end end else local num = tonumber(v) if not num and argtype == 'setdate' and numindex == 1 then num = month_number(v) end if num then if not argtype then argtype = 'setdate' end if argtype == 'setdate' and numindex < 6 then numindex = numindex + 1 numbers[numfields[numindex]] = num elseif argtype == 'juliandate' and not jd_number then jd_number = num if type(v) == 'string' then if v:find('.', 1, true) then newdate.hastime = true end elseif num ~= floor(num) then -- The given value was a number. The time will be used -- if the fractional part is nonzero. newdate.hastime = true end else return end elseif argtype then return elseif type(v) == 'string' then if v == 'currentdate' or v == 'currentdatetime' or v == 'juliandate' then argtype = v else argtype = 'datetext' datetext = v end else return end end end if argtype == 'datetext' then if tnums or not set_date_from_numbers(newdate, extract_date(newdate, datetext)) then return end elseif argtype == 'juliandate' then newdate.partial = nil newdate.jd = jd_number if not set_date_from_jd(newdate) then return end elseif argtype == 'currentdate' or argtype == 'currentdatetime' then newdate.partial = nil newdate.year = current.year newdate.month = current.month newdate.day = current.day if argtype == 'currentdatetime' then newdate.hour = current.hour newdate.minute = current.min newdate.second = current.sec newdate.hastime = true end newdate.calendar = 'Gregorian' -- ignore any given calendar name elseif argtype == 'setdate' then if tnums or not set_date_from_numbers(newdate, numbers) then return end elseif not (is_copy or tnums) then return end if tnums then newdate.jd = nil -- force recalculation in case jd was set before changes from tnums if not set_date_from_numbers(newdate, tnums) then return end end if newdate.partial then local year = newdate.year local month = newdate.month local first = Date(year, month or 1, 1, newdate.calendar) month = month or 12 local last = Date(year, month, days_in_month(year, month), newdate.calendar) newdate.partial = { first = first, last = last } else newdate.partial = false -- avoid index lookup end setmetatable(newdate, datemt) local readonly = {} local mt = { __index = newdate, __newindex = function(t, k, v) error('date.' .. tostring(k) .. ' is read-only', 2) end, __add = mt_date_add, __sub = mt_date_sub, __concat = mt_date_concat, __tostring = mt_date_tostring, __eq = mt_date_eq, __lt = mt_date_lt, } return setmetatable(readonly, mt) end local function _diff_age(diff, code, options) -- Return a tuple of integer values from diff as specified by code, except that -- each integer may be a list of two integers for a diff with a partial date, or -- return nil if the code is not supported. -- If want round, the least significant unit is rounded to nearest whole unit. -- For a duration, an extra day is added. local wantround, wantduration, wantrange if type(options) == 'table' then wantround = options.round wantduration = options.duration wantrange = options.range else wantround = options end if not is_diff(diff) then local f = wantduration and 'duration' or 'age' error(f .. ': need a date difference (use "diff:' .. f .. '()" with a colon)', 2) end if diff.partial then -- Ignore wantround, wantduration. local function choose(v) if type(v) == 'table' then if not wantrange or v[1] == v[2] then -- Example: Date('partial', 2005) - Date('partial', 2001) gives -- diff.years = { 3, 4 } to show the range of possible results. -- If do not want a range, choose the second value as more expected. return v[2] end end return v end if code == 'ym' or code == 'ymd' then if not wantrange and diff.iszero then -- This avoids an unexpected result such as -- Date('partial', 2001) - Date('partial', 2001) -- giving diff = { years = 0, months = { 0, 11 } } -- which would be reported as 0 years and 11 months. return 0, 0 end return choose(diff.partial.years), choose(diff.partial.months) end if code == 'y' then return choose(diff.partial.years) end if code == 'm' or code == 'w' or code == 'd' then return choose({ diff.partial.mindiff:age(code), diff.partial.maxdiff:age(code) }) end return nil end local extra_days = wantduration and 1 or 0 if code == 'wd' or code == 'w' or code == 'd' then local offset = wantround and 0.5 or 0 local days = diff.age_days + extra_days if code == 'wd' or code == 'd' then days = floor(days + offset) if code == 'd' then return days end return floor(days/7), days % 7 end return floor(days/7 + offset) end local H, M, S = diff.hours, diff.minutes, diff.seconds if code == 'dh' or code == 'dhm' or code == 'dhms' or code == 'h' or code == 'hm' or code == 'hms' or code == 'M' or code == 's' then local days = floor(diff.age_days + extra_days) local inc_hour if wantround then if code == 'dh' or code == 'h' then if M >= 30 then inc_hour = true end elseif code == 'dhm' or code == 'hm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'M' then if S >= 30 then M = M + 1 end else -- Nothing needed because S is an integer. end if inc_hour then H = H + 1 if H >= 24 then H = 0 days = days + 1 end end end if code == 'dh' or code == 'dhm' or code == 'dhms' then if code == 'dh' then return days, H elseif code == 'dhm' then return days, H, M else return days, H, M, S end end local hours = days * 24 + H if code == 'h' then return hours elseif code == 'hm' then return hours, M elseif code == 'M' or code == 's' then M = hours * 60 + M if code == 'M' then return M end return M * 60 + S end return hours, M, S end if wantround then local inc_hour if code == 'ymdh' or code == 'ymwdh' then if M >= 30 then inc_hour = true end elseif code == 'ymdhm' or code == 'ymwdhm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'ymd' or code == 'ymwd' or code == 'yd' or code == 'md' then if H >= 12 then extra_days = extra_days + 1 end end if inc_hour then H = H + 1 if H >= 24 then H = 0 extra_days = extra_days + 1 end end end local y, m, d = diff.years, diff.months, diff.days if extra_days > 0 then d = d + extra_days if d > 28 or code == 'yd' then -- Recalculate in case have passed a month. diff = diff.date1 + extra_days - diff.date2 y, m, d = diff.years, diff.months, diff.days end end if code == 'ymd' then return y, m, d elseif code == 'yd' then if y > 0 then -- It is known that diff.date1 > diff.date2. diff = diff.date1 - (diff.date2 + (y .. 'y')) end return y, floor(diff.age_days) elseif code == 'md' then return y * 12 + m, d elseif code == 'ym' or code == 'm' then if wantround then if d >= 16 then m = m + 1 if m >= 12 then m = 0 y = y + 1 end end end if code == 'ym' then return y, m end return y * 12 + m elseif code == 'ymw' then local weeks = floor(d/7) if wantround then local days = d % 7 if days > 3 or (days == 3 and H >= 12) then weeks = weeks + 1 end end return y, m, weeks elseif code == 'ymwd' then return y, m, floor(d/7), d % 7 elseif code == 'ymdh' then return y, m, d, H elseif code == 'ymwdh' then return y, m, floor(d/7), d % 7, H elseif code == 'ymdhm' then return y, m, d, H, M elseif code == 'ymwdhm' then return y, m, floor(d/7), d % 7, H, M end if code == 'y' then if wantround and m >= 6 then y = y + 1 end return y end return nil end local function _diff_duration(diff, code, options) if type(options) ~= 'table' then options = { round = options } end options.duration = true return _diff_age(diff, code, options) end -- Metatable for some operations on date differences. diffmt = { -- for forward declaration above __concat = function (lhs, rhs) return tostring(lhs) .. tostring(rhs) end, __tostring = function (self) return tostring(self.age_days) end, __index = function (self, key) local value if key == 'age_days' then if rawget(self, 'partial') then local function jdz(date) return (date.partial and date.partial.first or date).jdz end value = jdz(self.date1) - jdz(self.date2) else value = self.date1.jdz - self.date2.jdz end end if value ~= nil then rawset(self, key, value) return value end end, } function DateDiff(date1, date2, options) -- for forward declaration above -- Return a table with the difference between two dates (date1 - date2). -- The difference is negative if date1 is older than date2. -- Return nothing if invalid. -- If d = date1 - date2 then -- date1 = date2 + d -- If date1 >= date2 and the dates have no H:M:S time specified then -- date1 = date2 + (d.years..'y') + (d.months..'m') + d.days -- where the larger time units are added first. -- The result of Date(2015,1,x) + '1m' is Date(2015,2,28) for -- x = 28, 29, 30, 31. That means, for example, -- d = Date(2015,3,3) - Date(2015,1,31) -- gives d.years, d.months, d.days = 0, 1, 3 (excluding date1). if not (is_date(date1) and is_date(date2) and date1.calendar == date2.calendar) then return end local wantfill if type(options) == 'table' then wantfill = options.fill end local isnegative = false local iszero = false if date1 < date2 then isnegative = true date1, date2 = date2, date1 elseif date1 == date2 then iszero = true end -- It is known that date1 >= date2 (period is from date2 to date1). if date1.partial or date2.partial then -- Two partial dates might have timelines: ---------------------A=================B--- date1 is from A to B inclusive --------C=======D-------------------------- date2 is from C to D inclusive -- date1 > date2 iff A > C (date1.partial.first > date2.partial.first) -- The periods can overlap ('April 2001' - '2001'): -------------A===B------------------------- A=2001-04-01 B=2001-04-30 --------C=====================D------------ C=2001-01-01 D=2001-12-31 if wantfill then date1, date2 = autofill(date1, date2) else local function zdiff(date1, date2) local diff = date1 - date2 if diff.isnegative then return date1 - date1 -- a valid diff in case we call its methods end return diff end local function getdate(date, which) return date.partial and date.partial[which] or date end local maxdiff = zdiff(getdate(date1, 'last'), getdate(date2, 'first')) local mindiff = zdiff(getdate(date1, 'first'), getdate(date2, 'last')) local years, months if maxdiff.years == mindiff.years then years = maxdiff.years if maxdiff.months == mindiff.months then months = maxdiff.months else months = { mindiff.months, maxdiff.months } end else years = { mindiff.years, maxdiff.years } end return setmetatable({ date1 = date1, date2 = date2, partial = { years = years, months = months, maxdiff = maxdiff, mindiff = mindiff, }, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end end local y1, m1 = date1.year, date1.month local y2, m2 = date2.year, date2.month local years = y1 - y2 local months = m1 - m2 local d1 = date1.day + hms(date1) local d2 = date2.day + hms(date2) local days, time if d1 >= d2 then days = d1 - d2 else months = months - 1 -- Get days in previous month (before the "to" date) given December has 31 days. local dpm = m1 > 1 and days_in_month(y1, m1 - 1, date1.calendar) or 31 if d2 >= dpm then days = d1 - hms(date2) else days = dpm - d2 + d1 end end if months < 0 then years = years - 1 months = months + 12 end days, time = math.modf(days) local H, M, S = h_m_s(time) return setmetatable({ date1 = date1, date2 = date2, partial = false, -- avoid index lookup years = years, months = months, days = days, hours = H, minutes = M, seconds = S, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end return { _current = current, _Date = Date, _days_in_month = days_in_month, } pos8xxwnwrrsc6a5m7fruvq629j035f Template:Color 10 13448 116706 38457 2026-07-06T06:00:56Z en>Izno 0 Restored revision 1240326979 by [[Special:Contributions/Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]): Revert per talk page 116706 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=<span|2=<templatestyles src="Template:Color/styles.css" /><span class="tmp-color"}} style="color:{{{1|}}}">{{{2|{{{1|}}}}}}<includeonly></span></includeonly><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> mir66vdgg1ofukylprfapm1rh3vaahk 116707 116706 2026-07-15T17:38:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Color]] 116706 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=<span|2=<templatestyles src="Template:Color/styles.css" /><span class="tmp-color"}} style="color:{{{1|}}}">{{{2|{{{1|}}}}}}<includeonly></span></includeonly><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> mir66vdgg1ofukylprfapm1rh3vaahk Template:In string 10 13450 117094 34400 2024-11-09T16:12:51Z en>Pppery 0 Set plain to true by default explicitly per request 117094 wikitext text/x-wiki {{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{#if:{{{plain|{{{4|}}}}}}|{{{plain|{{{4}}}}}}|true}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude> tr7klwr761m703pzx5qat4xi4rrtjw1 117095 117094 2026-07-16T11:39:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:In_string]] 117094 wikitext text/x-wiki {{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{#if:{{{plain|{{{4|}}}}}}|{{{plain|{{{4}}}}}}|true}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude> tr7klwr761m703pzx5qat4xi4rrtjw1 Template:Marriage 10 13451 117096 99490 2026-03-19T22:05:19Z en>Wbm1058 0 blank out "Unknown" P570 value to prevent error transclusion. see [[Template talk:Marriage#Unexplained error template transclusion]] for detailed explanation. 117096 wikitext text/x-wiki <templatestyles src="Template:Marriage/styles.css"/> {{#if:{{{1|}}}||{{#if:{{{2|}}}{{{3|}}}{{{end|{{{reason|}}}}}} |{{#ifeq:{{{1|+}}}|{{{1|-}}}|<div class="marriage-line-margin3px">&#8203;</div>|{{main other|[[Category:Marriage template errors|Z{{PAGENAME}}]]}}}}}}}} <div class="marriage-display-inline">{{#if:{{{1|}}} |{{trim|{{#if:{{{end|{{{reason|}}}}}} |<div style="display:inline-block;line-height:normal;{{#if:{{{2|}}}{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2=20|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|<div class="marriage-line-margin2px">&#8203;</div>}} |{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2=20 |3=<div class="marriage-line-margin2px">&#8203;</div>}} }}}} |<div style="display:inline-block;line-height:normal;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}} |3=<div class="marriage-line-margin2px">&#8203;</div>}}}} }}}}}}&#32;<div style="display:inline-block;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-bottom:1px;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-bottom:1px;|4={{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|margin-bottom:1px;}}}}}}}}">&#8203;</div>&#40;<!-- -->{{#if:{{{2|}}} |{{#ifeq:{{{end|{{{reason|+}}}}}}| |{{#switch:{{{3|}}} | = after&nbsp;}} |{{abbr|m.|married}}&nbsp;}}{{#ifeq:{{{2|}}}|{{YEAR|{{{2|}}}}} |{{{2|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{2|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}}|{{YEAR|{{{2|}}}}}}}|2={{{2|}}}}} }} |{{#if:{{{3|}}}{{{end|{{{reason|}}}}}}||{{#if:{{#property:P570}}||{{main other|[[Category:Marriage template errors|N{{PAGENAME}}]]}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}||{{#if:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} | {{main other|[[Category:Marriage template errors|B{{PAGENAME}}]]}}before&nbsp;{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} |{{error-small|date missing}}}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}{{{3|}}}|&#44;&#32;}}}}}} }}{{#if:{{{3|}}} |{{#ifeq:{{{end|{{{reason|}}}}}}| |{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|{{#ifeq:{{{end|+}}}|{{{end|-}}} |{{#ifeq:{{{end|+}}}|{{{end|-}}} | until | before }} |{{#ifeq:{{{reason|+}}}|{{{reason|-}}} | until | before }}}}&nbsp;}} |{{#if:{{{2|}}} |&#59;&#32; }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" --> | div | div. | divorce | divorced = {{abbr|div.|divorced}}&nbsp; | sep | sep. | separated = {{abbr|sep.|separated}}&nbsp; <!-- commonly used reason for end --> | ann | ann. | annulled | annulment = {{abbr|ann.|annulled}}&nbsp; <!-- commonly used reason for end --> | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}}&nbsp; | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}}&nbsp; }} }}{{#ifeq:{{{3|}}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{#ifeq:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}|Unknown||{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }} |{{{3|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{3|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{#ifeq:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}|Unknown||{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }}}}|2={{{3|}}}}} }} |{{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}} }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died | div | div. | divorce | divorced = divorced | sep | sep. | separated = separated | ann | ann. | annulled | annulment = annulled | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason&nbsp}} | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}} }} }}&#41;<wbr />&#8203;</div><!-- -->{{#invoke:Parameter validation|validateparams|module_options = Module:Parameter validation/default config}}<noinclude> {{documentation}} </noinclude> d8v27pumig0xzpxubzn15mbfdvxymlg 117097 117096 2026-07-16T11:39:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Marriage]] 117096 wikitext text/x-wiki <templatestyles src="Template:Marriage/styles.css"/> {{#if:{{{1|}}}||{{#if:{{{2|}}}{{{3|}}}{{{end|{{{reason|}}}}}} |{{#ifeq:{{{1|+}}}|{{{1|-}}}|<div class="marriage-line-margin3px">&#8203;</div>|{{main other|[[Category:Marriage template errors|Z{{PAGENAME}}]]}}}}}}}} <div class="marriage-display-inline">{{#if:{{{1|}}} |{{trim|{{#if:{{{end|{{{reason|}}}}}} |<div style="display:inline-block;line-height:normal;{{#if:{{{2|}}}{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2=20|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|<div class="marriage-line-margin2px">&#8203;</div>}} |{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2=20 |3=<div class="marriage-line-margin2px">&#8203;</div>}} }}}} |<div style="display:inline-block;line-height:normal;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}} |3=<div class="marriage-line-margin2px">&#8203;</div>}}}} }}}}}}&#32;<div style="display:inline-block;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-bottom:1px;|{{str ≥ len|1={{#invoke:delink|delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-bottom:1px;|4={{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|margin-bottom:1px;}}}}}}}}">&#8203;</div>&#40;<!-- -->{{#if:{{{2|}}} |{{#ifeq:{{{end|{{{reason|+}}}}}}| |{{#switch:{{{3|}}} | = after&nbsp;}} |{{abbr|m.|married}}&nbsp;}}{{#ifeq:{{{2|}}}|{{YEAR|{{{2|}}}}} |{{{2|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{2|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}}|{{YEAR|{{{2|}}}}}}}|2={{{2|}}}}} }} |{{#if:{{{3|}}}{{{end|{{{reason|}}}}}}||{{#if:{{#property:P570}}||{{main other|[[Category:Marriage template errors|N{{PAGENAME}}]]}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}||{{#if:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} | {{main other|[[Category:Marriage template errors|B{{PAGENAME}}]]}}before&nbsp;{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} |{{error-small|date missing}}}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}{{{3|}}}|&#44;&#32;}}}}}} }}{{#if:{{{3|}}} |{{#ifeq:{{{end|{{{reason|}}}}}}| |{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|{{#ifeq:{{{end|+}}}|{{{end|-}}} |{{#ifeq:{{{end|+}}}|{{{end|-}}} | until | before }} |{{#ifeq:{{{reason|+}}}|{{{reason|-}}} | until | before }}}}&nbsp;}} |{{#if:{{{2|}}} |&#59;&#32; }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" --> | div | div. | divorce | divorced = {{abbr|div.|divorced}}&nbsp; | sep | sep. | separated = {{abbr|sep.|separated}}&nbsp; <!-- commonly used reason for end --> | ann | ann. | annulled | annulment = {{abbr|ann.|annulled}}&nbsp; <!-- commonly used reason for end --> | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}}&nbsp; | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}}&nbsp; }} }}{{#ifeq:{{{3|}}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{#ifeq:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}|Unknown||{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }} |{{{3|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{3|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{#ifeq:{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}|Unknown||{{#invoke:WikidataIB|getValue|P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}}}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }}}}|2={{{3|}}}}} }} |{{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}} }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died | div | div. | divorce | divorced = divorced | sep | sep. | separated = separated | ann | ann. | annulled | annulment = annulled | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason&nbsp}} | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}} }} }}&#41;<wbr />&#8203;</div><!-- -->{{#invoke:Parameter validation|validateparams|module_options = Module:Parameter validation/default config}}<noinclude> {{documentation}} </noinclude> d8v27pumig0xzpxubzn15mbfdvxymlg Template:Infobox person 10 15022 117098 99834 2026-06-09T19:45:02Z en>Andrybak 0 add parameter "image_class", needed when a monochrome logo is used as an image for a person, including in templates that are wrappers for {{Infobox person}}, such as [[Template:Infobox social media personality]] 117098 wikitext text/x-wiki <includeonly>{{#invoke:infobox|infoboxTemplate|child={{if empty|{{{child|}}}|{{{embed|}}}}} | bodyclass = biography vcard | above = {{#if:{{{honorific_prefix|}}}|<div class="honorific-prefix" style="font-size: 80%; font-weight: normal;">{{{honorific_prefix|}}}</div>}}<div class="fn">{{if empty|{{{name|}}}|{{PAGENAMEBASE}}}}</div>{{#if:{{{honorific_suffix|}}}|<div class="honorific-suffix" style="font-size: 80%; font-weight: normal;">{{{honorific_suffix|}}}</div>}} | subheader = {{#ifeq:{{lc: {{if empty|{{{child|}}}|{{{embed|}}}}}}}|yes|{{#if:{{{embed_title|}}}|'''{{{embed_title|}}}'''}}}} | subheader2 = {{#switch:{{if empty|{{{child|}}}|{{{embed|}}}}}|yes=<!--empty when this infobox is embedded-->|#default={{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}} }} }} | subheaderstyle2 = font-size: 125% | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image_size|}}}}}|300|{{{image_size|}}}}}}}x200px|{{{image_size|}}}}}|sizedefault=frameless|upright={{if empty|{{{image_upright|}}}|1}}|alt={{if empty|{{{alt|}}}|{{{image_alt|}}}}}|class={{{image_class|}}}|suppressplaceholder=yes}} | caption = {{if empty|{{{caption|}}}|{{{image_caption|}}}}} | label2 = Pronunciation | data2 = {{{pronunciation|}}} | label10 = Born | data10 = {{br separated entries |1={{#if:{{{birth_name|}}}|<div style="display:inline" class="nickname">{{{birth_name|}}}</div>}} |2={{#invoke:person date|birth}} |3={{#if:{{{birth_place|}}}|<div style="display:inline" class="birthplace">{{{birth_place|}}}</div>}} }} | label11 = Bapti{{#if:{{{baptized|}}}|z|s}}ed | data11 = {{#if:{{{birth_date|}}}||{{if empty|{{{baptized|}}}|{{{baptised|}}}}}}} | label12 = Disappeared | data12 = {{Br separated entries|1={{{disappeared_date|}}}|2={{{disappeared_place|}}}}} | label13 = Status | data13 = {{{disappeared_status|}}} | label14 = Died | data14 = {{br separated entries |1={{#invoke:person date|death}} |2={{#if:{{{death_place|}}}|<div style="display:inline" class="deathplace">{{{death_place|}}}</div>}} }} | label15 = {{longitem|Cause&nbsp;of death}} | data15 = {{{death_cause|}}} | label16 = {{longitem|Body discovered}} | data16 = {{{body_discovered|}}} | label17 = {{longitem|{{#if:{{{burial_place|}}}|Burial place|Resting place}}}} | data17 = {{#if:{{{burial_place|}}}|{{Br separated entries|1={{{burial_place|}}}|2={{{burial_coordinates|}}}}}|{{Br separated entries|1={{{resting_place|}}}|2={{{resting_place_coordinates|}}}}}}} | class17 = label | label18 = Monuments | data18 = {{{monuments|}}} | label21 = Other&nbsp;name{{pluralize from text|{{{other_names|}}}|plural=s}} | data21 = {{{other_names|}}} | class21 = nickname | label22 = Siglum | data22 = {{{siglum|}}} | label23 = Citizenship | data23 = {{{citizenship|}}} | class23 = category | label24 = Education | data24 = {{{education|}}} | label25 = Alma&nbsp;mater | data25 = {{{alma_mater|}}} | label26 = Occupation{{Pluralize from text|{{{occupation|}}}|plural=s}} | data26 = {{{occupation|}}} | class26 = role | label27 = Years&nbsp;active | data27 = {{{years_active|}}} | label28 = Era | data28 = {{{era|}}} | class28 = category | label29 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data29 = {{{employer|}}}{{main other|{{Pluralize from text| {{{employer|}}}|likely=[[Category:Pages using infobox person with multiple employers]]}}}} | class29 = org | label30 = {{#if:{{{organisation|}}}|Organisation|Organization}}{{#if:{{{organizations|}}}|s|{{pluralize from text|{{if empty|{{{organization|}}}|{{{organisation|}}}}}|likely=(s)|plural=s}}}} | data30 = {{if empty|{{{organisation|}}}|{{{organization|}}}|{{{organizations|}}}}}{{main other|{{Pluralize from text|{{if empty|{{{organization|}}}|{{{organisation|}}}}}|likely=[[Category:Pages using infobox person with multiple organizations]]}}}} | class30 = org | label31 = Agent{{Pluralize from text|{{{agent|}}}|likely=(s)|plural=s}} | data31 = {{{agent|}}}{{main other|{{Pluralize from text|{{{agent|}}}|likely=[[Category:Pages using infobox person with multiple agents]]}}}} | class31 = agent | label32 = Known&nbsp;for | data32 = {{{known_for|}}} | label33 = Works | data33 = {{{works|}}} | label34 = Notable&nbsp;credit{{Pluralize from text|{{{credits|}}}|likely=(s)|plural=s}} | data34 = {{#if:{{{works|}}}||<!-- -->{{{credits|}}}{{main other|{{Pluralize from text|{{{credits|}}}|likely=[[Category:Pages using infobox person with multiple credits]]}}}}}} | label35 = Label{{Pluralize from text|{{{label_name|}}}|likely=(s)|plural=s}} | data35 = {{#if:{{{works|}}}{{{credits|}}}||<!-- -->{{{label_name|}}}{{main other|{{Pluralize from text|{{{label_name|}}}|likely=[[Category:Pages using infobox person with multiple labels]]}}}}}} | label36 = Notable&nbsp;work | data36 = {{#if:{{{works|}}}{{{credits|}}}{{{label_name|}}}||{{{notable_works|}}}}} | label37 = Style | data37 = {{{style|}}} | class37 = category | label40 = Television | data40 = {{{television|}}} | label41 = Height | data41 = {{#if:{{{height_m|}}}{{{height_cm|}}}{{{height_ft|}}}{{{height_in|}}} | {{convinfobox|{{if empty|{{{height_m|}}}|{{{height_cm|}}}}}|{{#if:{{{height_m|}}}|m|cm}}|{{{height_ft|}}}|ft|{{{height_in|}}}|in}}}}{{#if:{{{height|}}} | {{infobox person/height|{{{height|}}}}}}} | label42 = {{#if:{{{office|}}}|Office|Title}} | data42 = {{if empty|{{{office|}}}|{{{title|}}}}} | class42 = title | label43 = Term | data43 = {{{term|}}} | label44 = Predecessor | data44 = {{{predecessor|}}} | label45 = Successor | data45 = {{{successor|}}} | label46 = {{longitem|Political party}} | data46 = {{{political_party|}}} | class46 = org | label47 = {{longitem|Other political<br />affiliations}} | data47 = {{{other_party|}}} | class47 = org | label48 = Movement | data48 = {{{movement|}}} | class48 = category | label49 = Opponent{{Pluralize from text|{{{opponents|}}}|likely=(s)|plural=s}} | data49 = {{{opponents|}}}{{main other|{{Pluralize from text|{{{opponents|}}}|likely=[[Category:Pages using infobox person with multiple opponents]]}}}} | label50 = {{longitem|Board member&nbsp;of}} | data50 = {{{boards|}}} | label51 = {{longitem|{{#if:{{{criminal_charges|}}}|Criminal charges|Criminal charge{{pluralize from text|{{{criminal_charge|}}}|likely=(s)|plural=s}}}}}} | data51 = {{if empty|{{{criminal_charges|}}}|{{{criminal_charge|}}}}}{{main other|{{Pluralize from text|{{{criminal_charge|}}}|likely=[[Category:Pages using infobox person with multiple criminal charges]]}}}} | label52 = {{longitem|Criminal penalty}} | data52 = {{{criminal_penalty|}}} | label53 = {{longitem|{{#if:{{{judicial_status|}}}|Judicial status|Criminal status}}}} | data53 = {{if empty|{{{judicial_status|}}} | {{{criminal_status|}}}}} | class53 = category | label54 = Spouse{{#if:{{{spouses|}}}|s|{{Pluralize from text|{{{spouse|}}}|likely=(s)|plural=s}}}} | data54 = {{if empty|{{{spouse|}}}|{{{spouses|}}}}}{{main other|{{Pluralize from text| {{{spouse|}}} |likely=[[Category:Pages using infobox person with multiple spouses]]}}}} | label55 = Partner{{#if:{{{partners|}}}|s|{{Pluralize from text|{{if empty|{{{partner|}}}|{{{domesticpartner|}}}|{{{domestic_partner|}}}|{{{partner(s)|}}}}} |likely=(s)|plural=s}}}} | data55 = {{if empty|{{{partner|}}}|{{{partners|}}}}}{{main other|{{Pluralize from text| {{{partner|}}} |likely=[[Category:Pages using infobox person with multiple partners]]}}}} | label56 = Children | data56 = {{{children|}}} | label57 = {{#if:{{{parents|}}}|Parent{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|Parents|{{#if:{{{father|}}}|Father|{{#if:{{{mother|}}}|Mother}}}}}}}} | data57 = {{#if:{{{parents|}}}|{{{parents}}}|{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|{{Unbulleted list|{{{father}}} (father)|{{{mother}}} (mother)}}|{{{mother|}}}{{{father|}}}}}}}<!-- -->{{main other|{{Pluralize from text|{{{parents|}}}|likely=[[Category:Pages using infobox person with multiple parents]]}}}} | label58 = Relatives | data58 = {{{relatives|}}} | label59 = Family | data59 = {{{family|}}} | label60 = Call&nbsp;sign | data60 = {{{callsign|}}} | label61 = Awards | data61 = {{{awards|}}} | label62 = {{#if:{{{honours|}}}|Honours|Honors}} | data62 = {{if empty|{{{honours|}}}|{{{honors|}}}}} | data64 = {{{module|}}} | data65 = {{{module2|}}} | data66 = {{{module3|}}} | data67 = {{{module4|}}} | data68 = {{{module5|}}} | data69 = {{{module6|}}} | label70 = Website | data70 = {{{website|}}} | header71 = {{#if:{{{signature|}}}|{{if empty|{{{signature_type|}}}|Signature}}}} | data72 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|class=infobox-signature skin-invert|sizedefault=150px|alt={{{signature_alt|}}}}} | header73 = {{#if:{{{footnotes|}}}|Notes}} | data74 = {{#if:{{{footnotes|}}}|<div style="text-align: left;">{{{footnotes}}}</div>}} }}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using {{if empty|{{lcfirst:{{{template_name|}}}}}|infobox person}} with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=y| agent | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | boards | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | embed_title | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | honorific_prefix | honorific_suffix | honors | honours | image | image_alt | image_caption | image_class | image_size | image_upright | judicial_status | known_for | label_name | landscape | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | native_name | native_name_lang | nocat_wdimage | notable_works | occupation | office | opponents | organisation | organization | organizations | other_names | other_party | parents | partner | partner(s) | partners | political_party | predecessor | pronunciation | relatives | resting_place | resting_place_coordinates | siglum | signature | signature_alt | signature_size | signature_type | spouse | spouses | style | successor | television | template_name | term | title | website | works | years_active }}<!-- -->{{Main other|{{#if:{{{pronunciation|}}}|[[Category:Biography template using pronunciation]]}}<!-- -->{{#if:{{{signature|}}}|[[Category:Biography with signature]]}}<!-- -->[[Category:Articles with hCards]] }}<!-- -->{{#invoke:Check for conflicting parameters|check | nested = 1 | template = [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] | cat = {{main other|Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with conflicting parameters}} | child; embed | image_alt; alt | height_m; height_cm; height_ft; height | caption; image_caption | baptized; baptised | organisation; organization; organizations | {{#if:{{{works|}}}|works;}} {{#if:{{{credits|}}}|credits;}} {{#if:{{{label_name|}}}|label_name;}} notable_works | height_m; height_cm | office; title | criminal_charges; criminal_charge | spouse; spouses | partner; partners | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{father|}}}||NULL_}}father | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{mother|}}}||NULL_}}mother | honours; honors }}{{#ifeq:{{if empty|{{{child|}}}|{{{embed|}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> mguzs9omiu2y2juwi2lxehaye1kzcmd 117099 117098 2026-07-16T11:39:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Infobox_person]] 117098 wikitext text/x-wiki <includeonly>{{#invoke:infobox|infoboxTemplate|child={{if empty|{{{child|}}}|{{{embed|}}}}} | bodyclass = biography vcard | above = {{#if:{{{honorific_prefix|}}}|<div class="honorific-prefix" style="font-size: 80%; font-weight: normal;">{{{honorific_prefix|}}}</div>}}<div class="fn">{{if empty|{{{name|}}}|{{PAGENAMEBASE}}}}</div>{{#if:{{{honorific_suffix|}}}|<div class="honorific-suffix" style="font-size: 80%; font-weight: normal;">{{{honorific_suffix|}}}</div>}} | subheader = {{#ifeq:{{lc: {{if empty|{{{child|}}}|{{{embed|}}}}}}}|yes|{{#if:{{{embed_title|}}}|'''{{{embed_title|}}}'''}}}} | subheader2 = {{#switch:{{if empty|{{{child|}}}|{{{embed|}}}}}|yes=<!--empty when this infobox is embedded-->|#default={{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}} }} }} | subheaderstyle2 = font-size: 125% | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image_size|}}}}}|300|{{{image_size|}}}}}}}x200px|{{{image_size|}}}}}|sizedefault=frameless|upright={{if empty|{{{image_upright|}}}|1}}|alt={{if empty|{{{alt|}}}|{{{image_alt|}}}}}|class={{{image_class|}}}|suppressplaceholder=yes}} | caption = {{if empty|{{{caption|}}}|{{{image_caption|}}}}} | label2 = Pronunciation | data2 = {{{pronunciation|}}} | label10 = Born | data10 = {{br separated entries |1={{#if:{{{birth_name|}}}|<div style="display:inline" class="nickname">{{{birth_name|}}}</div>}} |2={{#invoke:person date|birth}} |3={{#if:{{{birth_place|}}}|<div style="display:inline" class="birthplace">{{{birth_place|}}}</div>}} }} | label11 = Bapti{{#if:{{{baptized|}}}|z|s}}ed | data11 = {{#if:{{{birth_date|}}}||{{if empty|{{{baptized|}}}|{{{baptised|}}}}}}} | label12 = Disappeared | data12 = {{Br separated entries|1={{{disappeared_date|}}}|2={{{disappeared_place|}}}}} | label13 = Status | data13 = {{{disappeared_status|}}} | label14 = Died | data14 = {{br separated entries |1={{#invoke:person date|death}} |2={{#if:{{{death_place|}}}|<div style="display:inline" class="deathplace">{{{death_place|}}}</div>}} }} | label15 = {{longitem|Cause&nbsp;of death}} | data15 = {{{death_cause|}}} | label16 = {{longitem|Body discovered}} | data16 = {{{body_discovered|}}} | label17 = {{longitem|{{#if:{{{burial_place|}}}|Burial place|Resting place}}}} | data17 = {{#if:{{{burial_place|}}}|{{Br separated entries|1={{{burial_place|}}}|2={{{burial_coordinates|}}}}}|{{Br separated entries|1={{{resting_place|}}}|2={{{resting_place_coordinates|}}}}}}} | class17 = label | label18 = Monuments | data18 = {{{monuments|}}} | label21 = Other&nbsp;name{{pluralize from text|{{{other_names|}}}|plural=s}} | data21 = {{{other_names|}}} | class21 = nickname | label22 = Siglum | data22 = {{{siglum|}}} | label23 = Citizenship | data23 = {{{citizenship|}}} | class23 = category | label24 = Education | data24 = {{{education|}}} | label25 = Alma&nbsp;mater | data25 = {{{alma_mater|}}} | label26 = Occupation{{Pluralize from text|{{{occupation|}}}|plural=s}} | data26 = {{{occupation|}}} | class26 = role | label27 = Years&nbsp;active | data27 = {{{years_active|}}} | label28 = Era | data28 = {{{era|}}} | class28 = category | label29 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data29 = {{{employer|}}}{{main other|{{Pluralize from text| {{{employer|}}}|likely=[[Category:Pages using infobox person with multiple employers]]}}}} | class29 = org | label30 = {{#if:{{{organisation|}}}|Organisation|Organization}}{{#if:{{{organizations|}}}|s|{{pluralize from text|{{if empty|{{{organization|}}}|{{{organisation|}}}}}|likely=(s)|plural=s}}}} | data30 = {{if empty|{{{organisation|}}}|{{{organization|}}}|{{{organizations|}}}}}{{main other|{{Pluralize from text|{{if empty|{{{organization|}}}|{{{organisation|}}}}}|likely=[[Category:Pages using infobox person with multiple organizations]]}}}} | class30 = org | label31 = Agent{{Pluralize from text|{{{agent|}}}|likely=(s)|plural=s}} | data31 = {{{agent|}}}{{main other|{{Pluralize from text|{{{agent|}}}|likely=[[Category:Pages using infobox person with multiple agents]]}}}} | class31 = agent | label32 = Known&nbsp;for | data32 = {{{known_for|}}} | label33 = Works | data33 = {{{works|}}} | label34 = Notable&nbsp;credit{{Pluralize from text|{{{credits|}}}|likely=(s)|plural=s}} | data34 = {{#if:{{{works|}}}||<!-- -->{{{credits|}}}{{main other|{{Pluralize from text|{{{credits|}}}|likely=[[Category:Pages using infobox person with multiple credits]]}}}}}} | label35 = Label{{Pluralize from text|{{{label_name|}}}|likely=(s)|plural=s}} | data35 = {{#if:{{{works|}}}{{{credits|}}}||<!-- -->{{{label_name|}}}{{main other|{{Pluralize from text|{{{label_name|}}}|likely=[[Category:Pages using infobox person with multiple labels]]}}}}}} | label36 = Notable&nbsp;work | data36 = {{#if:{{{works|}}}{{{credits|}}}{{{label_name|}}}||{{{notable_works|}}}}} | label37 = Style | data37 = {{{style|}}} | class37 = category | label40 = Television | data40 = {{{television|}}} | label41 = Height | data41 = {{#if:{{{height_m|}}}{{{height_cm|}}}{{{height_ft|}}}{{{height_in|}}} | {{convinfobox|{{if empty|{{{height_m|}}}|{{{height_cm|}}}}}|{{#if:{{{height_m|}}}|m|cm}}|{{{height_ft|}}}|ft|{{{height_in|}}}|in}}}}{{#if:{{{height|}}} | {{infobox person/height|{{{height|}}}}}}} | label42 = {{#if:{{{office|}}}|Office|Title}} | data42 = {{if empty|{{{office|}}}|{{{title|}}}}} | class42 = title | label43 = Term | data43 = {{{term|}}} | label44 = Predecessor | data44 = {{{predecessor|}}} | label45 = Successor | data45 = {{{successor|}}} | label46 = {{longitem|Political party}} | data46 = {{{political_party|}}} | class46 = org | label47 = {{longitem|Other political<br />affiliations}} | data47 = {{{other_party|}}} | class47 = org | label48 = Movement | data48 = {{{movement|}}} | class48 = category | label49 = Opponent{{Pluralize from text|{{{opponents|}}}|likely=(s)|plural=s}} | data49 = {{{opponents|}}}{{main other|{{Pluralize from text|{{{opponents|}}}|likely=[[Category:Pages using infobox person with multiple opponents]]}}}} | label50 = {{longitem|Board member&nbsp;of}} | data50 = {{{boards|}}} | label51 = {{longitem|{{#if:{{{criminal_charges|}}}|Criminal charges|Criminal charge{{pluralize from text|{{{criminal_charge|}}}|likely=(s)|plural=s}}}}}} | data51 = {{if empty|{{{criminal_charges|}}}|{{{criminal_charge|}}}}}{{main other|{{Pluralize from text|{{{criminal_charge|}}}|likely=[[Category:Pages using infobox person with multiple criminal charges]]}}}} | label52 = {{longitem|Criminal penalty}} | data52 = {{{criminal_penalty|}}} | label53 = {{longitem|{{#if:{{{judicial_status|}}}|Judicial status|Criminal status}}}} | data53 = {{if empty|{{{judicial_status|}}} | {{{criminal_status|}}}}} | class53 = category | label54 = Spouse{{#if:{{{spouses|}}}|s|{{Pluralize from text|{{{spouse|}}}|likely=(s)|plural=s}}}} | data54 = {{if empty|{{{spouse|}}}|{{{spouses|}}}}}{{main other|{{Pluralize from text| {{{spouse|}}} |likely=[[Category:Pages using infobox person with multiple spouses]]}}}} | label55 = Partner{{#if:{{{partners|}}}|s|{{Pluralize from text|{{if empty|{{{partner|}}}|{{{domesticpartner|}}}|{{{domestic_partner|}}}|{{{partner(s)|}}}}} |likely=(s)|plural=s}}}} | data55 = {{if empty|{{{partner|}}}|{{{partners|}}}}}{{main other|{{Pluralize from text| {{{partner|}}} |likely=[[Category:Pages using infobox person with multiple partners]]}}}} | label56 = Children | data56 = {{{children|}}} | label57 = {{#if:{{{parents|}}}|Parent{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|Parents|{{#if:{{{father|}}}|Father|{{#if:{{{mother|}}}|Mother}}}}}}}} | data57 = {{#if:{{{parents|}}}|{{{parents}}}|{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|{{Unbulleted list|{{{father}}} (father)|{{{mother}}} (mother)}}|{{{mother|}}}{{{father|}}}}}}}<!-- -->{{main other|{{Pluralize from text|{{{parents|}}}|likely=[[Category:Pages using infobox person with multiple parents]]}}}} | label58 = Relatives | data58 = {{{relatives|}}} | label59 = Family | data59 = {{{family|}}} | label60 = Call&nbsp;sign | data60 = {{{callsign|}}} | label61 = Awards | data61 = {{{awards|}}} | label62 = {{#if:{{{honours|}}}|Honours|Honors}} | data62 = {{if empty|{{{honours|}}}|{{{honors|}}}}} | data64 = {{{module|}}} | data65 = {{{module2|}}} | data66 = {{{module3|}}} | data67 = {{{module4|}}} | data68 = {{{module5|}}} | data69 = {{{module6|}}} | label70 = Website | data70 = {{{website|}}} | header71 = {{#if:{{{signature|}}}|{{if empty|{{{signature_type|}}}|Signature}}}} | data72 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|class=infobox-signature skin-invert|sizedefault=150px|alt={{{signature_alt|}}}}} | header73 = {{#if:{{{footnotes|}}}|Notes}} | data74 = {{#if:{{{footnotes|}}}|<div style="text-align: left;">{{{footnotes}}}</div>}} }}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using {{if empty|{{lcfirst:{{{template_name|}}}}}|infobox person}} with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=y| agent | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | boards | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | embed_title | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | honorific_prefix | honorific_suffix | honors | honours | image | image_alt | image_caption | image_class | image_size | image_upright | judicial_status | known_for | label_name | landscape | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | native_name | native_name_lang | nocat_wdimage | notable_works | occupation | office | opponents | organisation | organization | organizations | other_names | other_party | parents | partner | partner(s) | partners | political_party | predecessor | pronunciation | relatives | resting_place | resting_place_coordinates | siglum | signature | signature_alt | signature_size | signature_type | spouse | spouses | style | successor | television | template_name | term | title | website | works | years_active }}<!-- -->{{Main other|{{#if:{{{pronunciation|}}}|[[Category:Biography template using pronunciation]]}}<!-- -->{{#if:{{{signature|}}}|[[Category:Biography with signature]]}}<!-- -->[[Category:Articles with hCards]] }}<!-- -->{{#invoke:Check for conflicting parameters|check | nested = 1 | template = [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] | cat = {{main other|Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with conflicting parameters}} | child; embed | image_alt; alt | height_m; height_cm; height_ft; height | caption; image_caption | baptized; baptised | organisation; organization; organizations | {{#if:{{{works|}}}|works;}} {{#if:{{{credits|}}}|credits;}} {{#if:{{{label_name|}}}|label_name;}} notable_works | height_m; height_cm | office; title | criminal_charges; criminal_charge | spouse; spouses | partner; partners | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{father|}}}||NULL_}}father | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{mother|}}}||NULL_}}mother | honours; honors }}{{#ifeq:{{if empty|{{{child|}}}|{{{embed|}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> mguzs9omiu2y2juwi2lxehaye1kzcmd Template:Flatlist 10 15025 116800 42367 2025-06-04T01:04:01Z en>Pppery 0 Add unknown parameters 116800 wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using flatlist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Flatlist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | class | indent | style }}<noinclude></div><!-- Needed to prevent Linter errors here; when Flatlist without parameters is used to start a list, Endflatlist provides the closing /div tag. --> {{documentation}} </noinclude> 5yqcatj9idvtzga7oa17wwcg4nh3z2i 116801 116800 2026-07-15T19:08:02Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Flatlist]] 116800 wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using flatlist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Flatlist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | class | indent | style }}<noinclude></div><!-- Needed to prevent Linter errors here; when Flatlist without parameters is used to start a list, Endflatlist provides the closing /div tag. --> {{documentation}} </noinclude> 5yqcatj9idvtzga7oa17wwcg4nh3z2i Module:Template link general 828 15031 116838 114248 2026-02-12T11:19:37Z en>Primefac 0 fix the brace param issue 116838 Scribunto text/plain -- This implements Template:Template link general and various other templates in its family local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end -- Builds the link part local function linkTitle(args) local titleObj if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end local titlePart if _ne(args.nolink) then titlePart = textPart else titlePart = '[[' .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) .. '|' .. textPart .. ']]' end if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) local titlePart = linkTitle(args) -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;color:inherit">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then if _ne(args.nocat) then codeArguments['nocat'] = true end local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p eq1il0gmw32087nl1ce4bzyifl7zrrz 116839 116838 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Template_link_general]] 116838 Scribunto text/plain -- This implements Template:Template link general and various other templates in its family local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end -- Builds the link part local function linkTitle(args) local titleObj if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end local titlePart if _ne(args.nolink) then titlePart = textPart else titlePart = '[[' .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) .. '|' .. textPart .. ']]' end if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) local titlePart = linkTitle(args) -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;color:inherit">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then if _ne(args.nocat) then codeArguments['nocat'] = true end local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p eq1il0gmw32087nl1ce4bzyifl7zrrz Module:WikidataIB 828 15041 116961 107089 2025-12-27T11:46:46Z en>Taavi 0 implement Lucas's edit request from talk page for multilingual label support 116961 Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang, mw.language.FALLBACK_STRICT ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, "mul" ) table.insert( fbtbl, "en" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end end -- loop through fallback table if found then break end end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- parameterset 1, but usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "yes" args.noicon = "true" end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- ql7i3j6aywa93pfslfr0svyicj7ctkn 116962 116961 2026-07-16T11:15:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:WikidataIB]] 116961 Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang, mw.language.FALLBACK_STRICT ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, "mul" ) table.insert( fbtbl, "en" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end end -- loop through fallback table if found then break end end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- parameterset 1, but usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "yes" args.noicon = "true" end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- ql7i3j6aywa93pfslfr0svyicj7ctkn Module:Detect singular 828 15049 117090 46518 2025-10-16T06:01:56Z en>Hike395 0 handle ampersand the same as "and" 117090 Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') -- function to determine whether "sub" occurs in "s" local function plainFind(s, sub) return mw.ustring.find(s, sub, 1, true) end -- function to count the number of times "pattern" (a regex) occurs in "s" local function countMatches(s, pattern) local _, count = mw.ustring.gsub(s, pattern, '') return count end local singular = 1 local likelyPlural = 2 local plural = 3 -- Determine whether a string is singular or plural (i.e., it represents one -- item or many) -- Arguments: -- origArgs[1]: string to process -- origArgs.no_comma: if false, use commas to detect plural (default false) -- origArgs.parse_links: if false, treat wikilinks as opaque singular objects (default false) -- origArgs.any_comma: if true, allow any comma to cause likely plural, including ones between digits (default false) -- origArgs.no_and: if false, use existence of "and" to detect plural (default false) -- origArgs.parse_number: if true, parse number in argument: if 1, singular; if >1, plural (default false) -- Returns: -- singular, likelyPlural, or plural (see constants above), or nil for completely unknown function p._main(origArgs) origArgs = type(origArgs) == 'table' and origArgs or {} local args = {} -- canonicalize boolean arguments for key, default in pairs({no_comma=false,parse_links=false,any_comma=false, no_and=false,parse_number=false}) do if origArgs[key] == nil then args[key] = default else args[key] = yesNo(origArgs[key],default) end end local checkComma = not args.no_comma local checkAnd = not args.no_and local rewriteLinks = not args.parse_links local anyComma = args.any_comma local parseNumber = args.parse_number local s = origArgs[1] -- the input string if not s then return nil -- empty input returns nil end s = tostring(s) s = mw.text.decode(s,true) --- replace HTML entities (to avoid spurious semicolons) if plainFind(s,'data-plural="0"') then -- magic data string to return true return singular end if plainFind(s,'data-plural="1"') then -- magic data string to return false return plural end -- count number of list items local numListItems = countMatches(s,'<%s*li') -- if exactly one, then singular, if more than one, then plural if numListItems == 1 then return singular end if numListItems > 1 then return plural end -- if "list of" occurs inside of wlink, then it's plural if mw.ustring.find(s:lower(), '%[%[[^%]]*list of[^%]]+%]%]') then return plural end if parseNumber then local m = tonumber(mw.ustring.match(s,"^%s*(%d+)")) if m then return m > 1 and plural or singular end end -- fix for trailing br tags passed through [[template:marriage]] s = mw.ustring.gsub(s, '<%s*br[^>]*>%s*(</div>)', '%1') -- replace all wikilinks with fixed string if rewriteLinks then s = mw.ustring.gsub(s,'%b[]','WIKILINK') end -- Five conditions: any one of them can make the string a likely plural or plural local hasBreak = mw.ustring.find(s,'<%s*br') -- For the last 4, evaluate on string stripped of wikimarkup local getPlain = require('Module:Text').Text().getPlain s = getPlain(s) local hasBullets = countMatches(s,'%*+') > 1 local multipleQids = mw.ustring.find(s,'Q%d+[%p%s]+Q%d+') -- has multiple QIDs in a row if hasBullets or multipleQids then return plural end local commaPattern = anyComma and '[,;]' or '%D[,;]%D' -- semi-colon similar to comma local hasComma = checkComma and mw.ustring.find(s, commaPattern) local hasAnd = checkAnd and (mw.ustring.find(s,'[,%s]and%s') or mw.ustring.find(s,'&',1,true)) if hasBreak or hasComma or hasAnd then return likelyPlural end return singular end function p._pluralize(args) args = type(args) == 'table' and args or {} local singularForm = args[3] or args.singular or "" local pluralForm = args[4] or args.plural or "" local likelyForm = args.likely or pluralForm local link = args[5] or args.link if link then link = tostring(link) singularForm = '[['..link..'|'..singularForm..']]' pluralForm = '[['..link..'|'..pluralForm..']]' likelyForm = '[['..link..'|'..likelyForm..']]' end if args[2] then return pluralForm end local detect = p._main(args) if detect == nil then return "" -- return blank on complete failure end if detect == singular then return singularForm elseif detect == likelyPlural then return likelyForm else return pluralForm end end function p.main(frame) local args = getArgs(frame) -- For template, return 1 if singular, blank if plural or empty local result = p._main(args) if result == nil then return 1 end return result == singular and 1 or "" end function p.pluralize(frame) local args = getArgs(frame) return p._pluralize(args) end return p ks2mlneszbgw2vr1nl2rhac5ypdp5y2 117091 117090 2026-07-16T11:39:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Detect_singular]] 117090 Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') -- function to determine whether "sub" occurs in "s" local function plainFind(s, sub) return mw.ustring.find(s, sub, 1, true) end -- function to count the number of times "pattern" (a regex) occurs in "s" local function countMatches(s, pattern) local _, count = mw.ustring.gsub(s, pattern, '') return count end local singular = 1 local likelyPlural = 2 local plural = 3 -- Determine whether a string is singular or plural (i.e., it represents one -- item or many) -- Arguments: -- origArgs[1]: string to process -- origArgs.no_comma: if false, use commas to detect plural (default false) -- origArgs.parse_links: if false, treat wikilinks as opaque singular objects (default false) -- origArgs.any_comma: if true, allow any comma to cause likely plural, including ones between digits (default false) -- origArgs.no_and: if false, use existence of "and" to detect plural (default false) -- origArgs.parse_number: if true, parse number in argument: if 1, singular; if >1, plural (default false) -- Returns: -- singular, likelyPlural, or plural (see constants above), or nil for completely unknown function p._main(origArgs) origArgs = type(origArgs) == 'table' and origArgs or {} local args = {} -- canonicalize boolean arguments for key, default in pairs({no_comma=false,parse_links=false,any_comma=false, no_and=false,parse_number=false}) do if origArgs[key] == nil then args[key] = default else args[key] = yesNo(origArgs[key],default) end end local checkComma = not args.no_comma local checkAnd = not args.no_and local rewriteLinks = not args.parse_links local anyComma = args.any_comma local parseNumber = args.parse_number local s = origArgs[1] -- the input string if not s then return nil -- empty input returns nil end s = tostring(s) s = mw.text.decode(s,true) --- replace HTML entities (to avoid spurious semicolons) if plainFind(s,'data-plural="0"') then -- magic data string to return true return singular end if plainFind(s,'data-plural="1"') then -- magic data string to return false return plural end -- count number of list items local numListItems = countMatches(s,'<%s*li') -- if exactly one, then singular, if more than one, then plural if numListItems == 1 then return singular end if numListItems > 1 then return plural end -- if "list of" occurs inside of wlink, then it's plural if mw.ustring.find(s:lower(), '%[%[[^%]]*list of[^%]]+%]%]') then return plural end if parseNumber then local m = tonumber(mw.ustring.match(s,"^%s*(%d+)")) if m then return m > 1 and plural or singular end end -- fix for trailing br tags passed through [[template:marriage]] s = mw.ustring.gsub(s, '<%s*br[^>]*>%s*(</div>)', '%1') -- replace all wikilinks with fixed string if rewriteLinks then s = mw.ustring.gsub(s,'%b[]','WIKILINK') end -- Five conditions: any one of them can make the string a likely plural or plural local hasBreak = mw.ustring.find(s,'<%s*br') -- For the last 4, evaluate on string stripped of wikimarkup local getPlain = require('Module:Text').Text().getPlain s = getPlain(s) local hasBullets = countMatches(s,'%*+') > 1 local multipleQids = mw.ustring.find(s,'Q%d+[%p%s]+Q%d+') -- has multiple QIDs in a row if hasBullets or multipleQids then return plural end local commaPattern = anyComma and '[,;]' or '%D[,;]%D' -- semi-colon similar to comma local hasComma = checkComma and mw.ustring.find(s, commaPattern) local hasAnd = checkAnd and (mw.ustring.find(s,'[,%s]and%s') or mw.ustring.find(s,'&',1,true)) if hasBreak or hasComma or hasAnd then return likelyPlural end return singular end function p._pluralize(args) args = type(args) == 'table' and args or {} local singularForm = args[3] or args.singular or "" local pluralForm = args[4] or args.plural or "" local likelyForm = args.likely or pluralForm local link = args[5] or args.link if link then link = tostring(link) singularForm = '[['..link..'|'..singularForm..']]' pluralForm = '[['..link..'|'..pluralForm..']]' likelyForm = '[['..link..'|'..likelyForm..']]' end if args[2] then return pluralForm end local detect = p._main(args) if detect == nil then return "" -- return blank on complete failure end if detect == singular then return singularForm elseif detect == likelyPlural then return likelyForm else return pluralForm end end function p.main(frame) local args = getArgs(frame) -- For template, return 1 if singular, blank if plural or empty local result = p._main(args) if result == nil then return 1 end return result == singular and 1 or "" end function p.pluralize(frame) local args = getArgs(frame) return p._pluralize(args) end return p ks2mlneszbgw2vr1nl2rhac5ypdp5y2 Module:Text 828 15050 117092 37149 2025-04-26T12:19:49Z en>Hike395 0 update date to last edit 117092 Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2024-09-21", suite = "Text" } --[=[ Text utilities ]=] local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite local data = mw.loadData('Module:Text/data') local QuoteLang = data.QuoteLang local QuoteType = data.QuoteType local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" local patternCJK = mw.loadData('Module:Text/data').PatternCJK return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string local PatternLatin = mw.loadData('Module:Text/data').PatternLatin return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end local SeekQuote = mw.loadData('Module:Text/data').SeekQuote return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed local PatternCombined = mw.loadData('Module:Text/data').PatternCombined decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r local data = mw.loadData('Module:Text/data') local PatternLatin = data.PatternLatin local RangesLatin = data.RangesLatin local NumLatinRanges = data.NumLatinRanges if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range -- NumLatinRanges has to be precomputed because # does not work from loadData for i = 1, NumLatinRanges do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then data = mw.loadData('Module:Text/data') r = { } r.QuoteLang = data.QuoteLang r.QuoteType = data.QuoteType end return r end -- Text.test() -- Non Unicode-aware version of mw.text.split and mw.text.gsplit -- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]] -- These run up to 60 times faster than the Unicode-aware versions Text.split = function ( text, pattern, plain ) local ret = {} for m in Text.gsplit( text, pattern, plain ) do ret[#ret+1] = m end return ret end Text.gsplit = function ( text, pattern, plain ) local s, l = 1, string.len( text ) return function () if s then local e, n = string.find( text, pattern, s, plain ) local ret if not e then ret = string.sub( text, s ) s = nil elseif n < e then -- Empty separator! ret = string.sub( text, s, e ) if e < l then s = e + 1 else s = nil end else ret = e > s and string.sub( text, s, e - 1 ) or '' s = n + 1 end return ret end end, nil, nil end -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.split(frame) local text = frame.args.text or frame.args[1] or '' local pattern = frame.args.pattern or frame.args[2] or '' local plain = yesNo(frame.args.plain or frame.args[3]) local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1 local a = Text.split(text, pattern, plain) if index < 0 then index = #a + index + 1 end return a[index] end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 651uzyv6p5vsoexbfr111b6ilkxeurw 117093 117092 2026-07-16T11:39:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Text]] 117092 Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2024-09-21", suite = "Text" } --[=[ Text utilities ]=] local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite local data = mw.loadData('Module:Text/data') local QuoteLang = data.QuoteLang local QuoteType = data.QuoteType local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" local patternCJK = mw.loadData('Module:Text/data').PatternCJK return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string local PatternLatin = mw.loadData('Module:Text/data').PatternLatin return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end local SeekQuote = mw.loadData('Module:Text/data').SeekQuote return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed local PatternCombined = mw.loadData('Module:Text/data').PatternCombined decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r local data = mw.loadData('Module:Text/data') local PatternLatin = data.PatternLatin local RangesLatin = data.RangesLatin local NumLatinRanges = data.NumLatinRanges if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range -- NumLatinRanges has to be precomputed because # does not work from loadData for i = 1, NumLatinRanges do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then data = mw.loadData('Module:Text/data') r = { } r.QuoteLang = data.QuoteLang r.QuoteType = data.QuoteType end return r end -- Text.test() -- Non Unicode-aware version of mw.text.split and mw.text.gsplit -- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]] -- These run up to 60 times faster than the Unicode-aware versions Text.split = function ( text, pattern, plain ) local ret = {} for m in Text.gsplit( text, pattern, plain ) do ret[#ret+1] = m end return ret end Text.gsplit = function ( text, pattern, plain ) local s, l = 1, string.len( text ) return function () if s then local e, n = string.find( text, pattern, s, plain ) local ret if not e then ret = string.sub( text, s ) s = nil elseif n < e then -- Empty separator! ret = string.sub( text, s, e ) if e < l then s = e + 1 else s = nil end else ret = e > s and string.sub( text, s, e - 1 ) or '' s = n + 1 end return ret end end, nil, nil end -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.split(frame) local text = frame.args.text or frame.args[1] or '' local pattern = frame.args.pattern or frame.args[2] or '' local plain = yesNo(frame.args.plain or frame.args[3]) local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1 local a = Text.split(text, pattern, plain) if index < 0 then index = #a + index + 1 end return a[index] end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 651uzyv6p5vsoexbfr111b6ilkxeurw Template:Wikidata image 10 15054 117100 37157 2026-02-21T03:07:49Z en>Hike395 0 simplify template, add qid and cat parameters 117100 wikitext text/x-wiki {{#if:{{#if:{{{qid|}}}||{{NAMESPACE}}}}{{{1|}}}{{{2|}}}||{{#if:{{#property:P18|from={{{qid|}}}}}|[[Category:{{if empty|{{{cat|}}}|No local image but image on Wikidata}}]]}}}}<noinclude> {{doc}} </noinclude> j4r2yjlq7u6k84f6tg284tlgziaz4wx 117101 117100 2026-07-16T11:39:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Wikidata_image]] 117100 wikitext text/x-wiki {{#if:{{#if:{{{qid|}}}||{{NAMESPACE}}}}{{{1|}}}{{{2|}}}||{{#if:{{#property:P18|from={{{qid|}}}}}|[[Category:{{if empty|{{{cat|}}}|No local image but image on Wikidata}}]]}}}}<noinclude> {{doc}} </noinclude> j4r2yjlq7u6k84f6tg284tlgziaz4wx Template:No redirect 10 15065 117032 37179 2025-11-25T21:47:15Z en>GTrang 0 Used FULLPAGENAME again to fix the "Multi colon escape" lint error. 117032 wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span><span style="display: none">[[:{{{1}}}]]</span> | [[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2|{{{1}}}}}}]] }}<noinclude> {{documentation}} </noinclude> 5pw8ky320dln3bgzenyzuppz9t6twll 117033 117032 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:No_redirect]] 117032 wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span><span style="display: none">[[:{{{1}}}]]</span> | [[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2|{{{1}}}}}}]] }}<noinclude> {{documentation}} </noinclude> 5pw8ky320dln3bgzenyzuppz9t6twll Module:Shortcut 828 15084 117034 42532 2024-03-11T03:26:56Z en>Izno 0 Undid revision [[Special:Diff/1212853521|1212853521]] by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) no, that class is exclusive to the module in which it appears 42531 Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 0grxrt10usr45p0y9yes29aw6xnxg7j 117035 117034 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Shortcut]] 42531 Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 0grxrt10usr45p0y9yes29aw6xnxg7j Module:High-use 828 15089 116842 114819 2026-06-13T03:27:55Z en>Zackmann08 0 updating approximate number of total pages. Per [[Special:Statistics]] today's count is 65,771,384. 116842 Scribunto text/plain require('strict') local p = {} local getArgs = require('Module:Arguments').getArgs local _fetch = require('Module:Transclusion_count')._fetch -- _fetch looks at the 'demo' argument local yesno = require('Module:Yesno') local lang_obj = mw.getContentLanguage() -- this here because the language object is used multiple places in the module local large_count_cutoff = 100000 local approx_num_total_pages = 65700000 local user_subpage_info_page = 'Wikipedia:User pages#SUB' local sandbox_module_page = 'Module:Sandbox' local system_messages_cat = 'Pages used in system messages needing protection' local sandbox_word = 'sandbox' local testcases_word = 'testcases' local doc_word = 'doc' local function count_from_args(args) if tonumber(args.count) then -- check if function has already been used return tonumber(args.count) -- early exit if so end local count if yesno(args['fetch']) ~= false then count = _fetch(args) -- fetch transclusion count end -- use explicitly-provided count when fetch fails if count == nil and args[1] ~= nil and args[1] ~= '' then -- convert local language number string to a number understandable by Lua count = mw.ustring.gsub(args[1], '+$', '') count = lang_obj:parseFormattedNumber(args[1]) end -- in case someone writes a non-positive number if count and count > 0 then return count end return nil end -- Actions if there is a large (greater than or equal to 100,000) transclusion count local function risk_boolean(args) if args.risk == true or args.risk == false then return args.risk elseif args[1] == 'risk' then return true else local count = count_from_args(args) if count and count >= large_count_cutoff then return true end end return false end -- function retained for backwards compatibility function p._risk(args) return risk_boolean(args) and 'risk' or '' end -- function retained for backwards compatibility function p.risk(frame) return p._risk(getArgs(frame)) end -- count and no_percent arguments retained for backwards compatibility function p._num(args, count, no_percent) if count == nil then count = count_from_args(args) end args.count = count args.risk = risk_boolean(args) -- Build output string local return_value = '' if args.count == nil and args.risk then return 'a very large number of' elseif args.count == nil then return 'many' else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if args.count >= large_count_cutoff then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(args.count)) - sigfig + 1 -- Round and insert 'approximately' or '+' when appropriate if yesno(args[2]) == true or (type(args[1]) == 'string' and (mw.ustring.sub(args[1], -1) == '+')) then -- Round down return_value = string.format('%s+', lang_obj:formatNum(math.floor( (args.count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format('approximately&#x20;%s', lang_obj:formatNum(math.floor( (args.count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes no_percent = yesno(no_percent or args['no-percent']) if args.count and args.count >= approx_num_total_pages/100 and not no_percent then local num_total_pages = mw.getCurrentFrame():callParserFunction('NUMBEROFPAGES', 'R') local total_percent = math.floor( ( ( args.count/num_total_pages ) * 100) + 0.5) if total_percent >= 1 then return_value = string.format('%s&#x20;pages, or roughly %s%% of all', return_value, total_percent) end end end return return_value end -- used by [[Template:Stub documentation]] and other pages -- count argument retained for backwards compatibility function p.num(frame, count) return p._num(getArgs(frame), count) end -- count argument retained for backwards compatibility function p._text(args, count) --[=[ Only show the information about how this template gets updated if someone is actually editing the page and maybe trying to update the count. ]=] local bot_text = (mw.getCurrentFrame():preprocess('{{REVISIONID}}') == '') and ("\n\n----\n'''Preview message''':" .. ' Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]]).') or '' if count == nil then count = count_from_args(args) end args.count = count args.risk = risk_boolean(args) -- trim /doc, /sandbox and /testcases local title = args.title or (args.demo and args.demo ~= '' and mw.title.new(args.demo, 'Template')) or mw.title.getCurrentTitle() if title.subpageText == doc_word or title.subpageText == sandbox_word or title.subpageText == testcases_word then title = title.basePageTitle end -- use /testcases of base template local testcases_page = mw.title.new(title.prefixedText .. '/' .. testcases_word) -- exists is expensive while testcases_page.basePageTitle.isSubpage and not testcases_page.exists do testcases_page = mw.title.new(testcases_page.basePageTitle.basePageTitle.prefixedText .. '/' .. testcases_word) end local systemMessages = (args['system'] or '') ~= '' -- This retrieves the project URL automatically to simplify localization. local templateCount = ('on [https://linkcount.toolforge.org/?project=%s&page=%s#transclusions %s pages]'):format( title:fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p._num(args)) local used_on_text = "'''This " .. (title:inNamespace('Module') and 'Lua module' or 'template') .. ' is used ' if systemMessages then used_on_text = used_on_text .. args['system'] .. ((args.count and args.count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ('%s\'s [[%s/sandbox|/sandbox]] or [[%s|/testcases]] subpages, or in your own [[%s]]. '):format( title:inNamespace('Module') and 'module' or 'template', title.fullText, testcases_page.fullText, title:inNamespace('Module') and (sandbox_module_page .. '|module sandbox') or (user_subpage_info_page .. '|user subpage') ) local infoArg = args['info'] ~= '' and args['info'] if (systemMessages or args.risk) then local info = '.' if systemMessages then info = info .. '<br />Changes to it can cause immediate changes to the ' .. mw.site.namespaces.Project.name .. ' user interface.' end if infoArg then info = info .. '<br />' .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (args.count and args.count >= large_count_cutoff and ' and server load' or '') .. -- should this use args.risk? ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if args[2] ~= nil and args[2] ~= '' and yesno(args[2]) == nil then discussion_text = string.format('%sat [[%s]]', discussion_text, args[2]) else discussion_text = string.format('%son the [[%s|talk page]]', discussion_text, title.talkPageTitle.fullText) end return used_on_text .. sandbox_text .. discussion_text .. ' before implementing them.' .. bot_text end -- used by [[Template:R from high-use template]] -- count argument retained for backwards compatibility function p.text(frame, count) return p._text(getArgs(frame), count) end -- nocat argument retained for backwards compatibility function p._main(args, nocat) args.count = count_from_args(args) args.risk = risk_boolean(args) args.title = (args.demo and args.demo ~= '' and mw.title.new(args.demo, 'Template')) or mw.title.getCurrentTitle() local image = 'Ambox warning yellow.svg' local type_param = 'style' local epilogue = '' if args['system'] and args['system'] ~= '' then image = 'Ambox important.svg' type_param = 'content' if yesno(nocat or args['nocat']) ~= true and not args.title.isRedirect then local protection_action = (args.title:inNamespace('File') and 'upload') or 'edit' local protection_level = require('Module:Effective protection level')._main(protection_action, args.title.fullText) if protection_level ~= 'sysop' and protection_level ~= 'templateeditor' and protection_level ~= 'interfaceadmin' then epilogue = mw.getCurrentFrame():expandTemplate { title = 'sandbox other', args = { [2] = '[[Category:' .. system_messages_cat .. ']]' } } end end elseif args.risk then image = 'Ambox warning orange.svg' type_param = 'content' end image = '[[File:' .. image .. '|40px|alt=Warning|link=]]' if args['form'] == 'editnotice' then return mw.getCurrentFrame():expandTemplate{ title = 'editnotice', args = { ['image'] = image, ['text'] = p._text(args), ['expiry'] = (args['expiry'] or '') } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p._text(args), expiry = (args['expiry'] or '') }) .. epilogue end end function p.main(frame) return p._main(getArgs(frame)) end return p pgnzyi7fcgxxcdx8zcvenpw5okbsonv 116843 116842 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:High-use]] 116842 Scribunto text/plain require('strict') local p = {} local getArgs = require('Module:Arguments').getArgs local _fetch = require('Module:Transclusion_count')._fetch -- _fetch looks at the 'demo' argument local yesno = require('Module:Yesno') local lang_obj = mw.getContentLanguage() -- this here because the language object is used multiple places in the module local large_count_cutoff = 100000 local approx_num_total_pages = 65700000 local user_subpage_info_page = 'Wikipedia:User pages#SUB' local sandbox_module_page = 'Module:Sandbox' local system_messages_cat = 'Pages used in system messages needing protection' local sandbox_word = 'sandbox' local testcases_word = 'testcases' local doc_word = 'doc' local function count_from_args(args) if tonumber(args.count) then -- check if function has already been used return tonumber(args.count) -- early exit if so end local count if yesno(args['fetch']) ~= false then count = _fetch(args) -- fetch transclusion count end -- use explicitly-provided count when fetch fails if count == nil and args[1] ~= nil and args[1] ~= '' then -- convert local language number string to a number understandable by Lua count = mw.ustring.gsub(args[1], '+$', '') count = lang_obj:parseFormattedNumber(args[1]) end -- in case someone writes a non-positive number if count and count > 0 then return count end return nil end -- Actions if there is a large (greater than or equal to 100,000) transclusion count local function risk_boolean(args) if args.risk == true or args.risk == false then return args.risk elseif args[1] == 'risk' then return true else local count = count_from_args(args) if count and count >= large_count_cutoff then return true end end return false end -- function retained for backwards compatibility function p._risk(args) return risk_boolean(args) and 'risk' or '' end -- function retained for backwards compatibility function p.risk(frame) return p._risk(getArgs(frame)) end -- count and no_percent arguments retained for backwards compatibility function p._num(args, count, no_percent) if count == nil then count = count_from_args(args) end args.count = count args.risk = risk_boolean(args) -- Build output string local return_value = '' if args.count == nil and args.risk then return 'a very large number of' elseif args.count == nil then return 'many' else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if args.count >= large_count_cutoff then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(args.count)) - sigfig + 1 -- Round and insert 'approximately' or '+' when appropriate if yesno(args[2]) == true or (type(args[1]) == 'string' and (mw.ustring.sub(args[1], -1) == '+')) then -- Round down return_value = string.format('%s+', lang_obj:formatNum(math.floor( (args.count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format('approximately&#x20;%s', lang_obj:formatNum(math.floor( (args.count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes no_percent = yesno(no_percent or args['no-percent']) if args.count and args.count >= approx_num_total_pages/100 and not no_percent then local num_total_pages = mw.getCurrentFrame():callParserFunction('NUMBEROFPAGES', 'R') local total_percent = math.floor( ( ( args.count/num_total_pages ) * 100) + 0.5) if total_percent >= 1 then return_value = string.format('%s&#x20;pages, or roughly %s%% of all', return_value, total_percent) end end end return return_value end -- used by [[Template:Stub documentation]] and other pages -- count argument retained for backwards compatibility function p.num(frame, count) return p._num(getArgs(frame), count) end -- count argument retained for backwards compatibility function p._text(args, count) --[=[ Only show the information about how this template gets updated if someone is actually editing the page and maybe trying to update the count. ]=] local bot_text = (mw.getCurrentFrame():preprocess('{{REVISIONID}}') == '') and ("\n\n----\n'''Preview message''':" .. ' Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]]).') or '' if count == nil then count = count_from_args(args) end args.count = count args.risk = risk_boolean(args) -- trim /doc, /sandbox and /testcases local title = args.title or (args.demo and args.demo ~= '' and mw.title.new(args.demo, 'Template')) or mw.title.getCurrentTitle() if title.subpageText == doc_word or title.subpageText == sandbox_word or title.subpageText == testcases_word then title = title.basePageTitle end -- use /testcases of base template local testcases_page = mw.title.new(title.prefixedText .. '/' .. testcases_word) -- exists is expensive while testcases_page.basePageTitle.isSubpage and not testcases_page.exists do testcases_page = mw.title.new(testcases_page.basePageTitle.basePageTitle.prefixedText .. '/' .. testcases_word) end local systemMessages = (args['system'] or '') ~= '' -- This retrieves the project URL automatically to simplify localization. local templateCount = ('on [https://linkcount.toolforge.org/?project=%s&page=%s#transclusions %s pages]'):format( title:fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p._num(args)) local used_on_text = "'''This " .. (title:inNamespace('Module') and 'Lua module' or 'template') .. ' is used ' if systemMessages then used_on_text = used_on_text .. args['system'] .. ((args.count and args.count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ('%s\'s [[%s/sandbox|/sandbox]] or [[%s|/testcases]] subpages, or in your own [[%s]]. '):format( title:inNamespace('Module') and 'module' or 'template', title.fullText, testcases_page.fullText, title:inNamespace('Module') and (sandbox_module_page .. '|module sandbox') or (user_subpage_info_page .. '|user subpage') ) local infoArg = args['info'] ~= '' and args['info'] if (systemMessages or args.risk) then local info = '.' if systemMessages then info = info .. '<br />Changes to it can cause immediate changes to the ' .. mw.site.namespaces.Project.name .. ' user interface.' end if infoArg then info = info .. '<br />' .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (args.count and args.count >= large_count_cutoff and ' and server load' or '') .. -- should this use args.risk? ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if args[2] ~= nil and args[2] ~= '' and yesno(args[2]) == nil then discussion_text = string.format('%sat [[%s]]', discussion_text, args[2]) else discussion_text = string.format('%son the [[%s|talk page]]', discussion_text, title.talkPageTitle.fullText) end return used_on_text .. sandbox_text .. discussion_text .. ' before implementing them.' .. bot_text end -- used by [[Template:R from high-use template]] -- count argument retained for backwards compatibility function p.text(frame, count) return p._text(getArgs(frame), count) end -- nocat argument retained for backwards compatibility function p._main(args, nocat) args.count = count_from_args(args) args.risk = risk_boolean(args) args.title = (args.demo and args.demo ~= '' and mw.title.new(args.demo, 'Template')) or mw.title.getCurrentTitle() local image = 'Ambox warning yellow.svg' local type_param = 'style' local epilogue = '' if args['system'] and args['system'] ~= '' then image = 'Ambox important.svg' type_param = 'content' if yesno(nocat or args['nocat']) ~= true and not args.title.isRedirect then local protection_action = (args.title:inNamespace('File') and 'upload') or 'edit' local protection_level = require('Module:Effective protection level')._main(protection_action, args.title.fullText) if protection_level ~= 'sysop' and protection_level ~= 'templateeditor' and protection_level ~= 'interfaceadmin' then epilogue = mw.getCurrentFrame():expandTemplate { title = 'sandbox other', args = { [2] = '[[Category:' .. system_messages_cat .. ']]' } } end end elseif args.risk then image = 'Ambox warning orange.svg' type_param = 'content' end image = '[[File:' .. image .. '|40px|alt=Warning|link=]]' if args['form'] == 'editnotice' then return mw.getCurrentFrame():expandTemplate{ title = 'editnotice', args = { ['image'] = image, ['text'] = p._text(args), ['expiry'] = (args['expiry'] or '') } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p._text(args), expiry = (args['expiry'] or '') }) .. epilogue end end function p.main(frame) return p._main(getArgs(frame)) end return p pgnzyi7fcgxxcdx8zcvenpw5okbsonv Module:Transclusion count/data/I 828 15103 117302 114829 2026-07-12T05:10:42Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. 117302 Scribunto text/plain return { ["IAST"] = 6300, ["IA_SCOTUS_URL"] = 3300, ["IBDB_name"] = 9800, ["ICD10"] = 5000, ["ICD9"] = 4400, ["ICS"] = 3500, ["ICS_flag"] = 3500, ["IDN"] = 3800, ["IMDb_episode"] = 11000, ["IMDb_episodes"] = 4100, ["IMDb_name"] = 172000, ["IMDb_title"] = 210000, ["IMO_Number"] = 4400, ["IMSLP"] = 9100, ["INA"] = 2400, ["IND"] = 8600, ["INR"] = 6500, ["INRConvert"] = 6700, ["INRConvert/CurrentRate"] = 6600, ["INRConvert/USD"] = 6600, ["INRConvert/out"] = 6600, ["IOBDB_name"] = 2100, ["IP"] = 2800, ["IPA"] = 181000, ["IPA_audio_link"] = 5000, ["IPA_link"] = 5000, ["IPAblink"] = 2600, ["IPAc-cmn"] = 2800, ["IPAc-en"] = 55000, ["IPAc-pl"] = 51000, ["IPSummary"] = 82000, ["IP_summary"] = 83000, ["IPtalk"] = 18000, ["IPuser"] = 7600, ["IPvandal"] = 2800, ["IRC"] = 7100, ["IRI"] = 2500, ["IRL"] = 6000, ["IRN"] = 4000, ["ISBN"] = 474000, ["ISBN?"] = 2500, ["ISBNT"] = 46000, ["ISBN_missing"] = 3200, ["ISFDB_name"] = 4300, ["ISFDB_title"] = 5100, ["ISL"] = 2300, ["ISO_15924/script-example-character"] = 3100, ["ISO_15924/wp-article"] = 3100, ["ISO_15924/wp-article/format"] = 3100, ["ISO_15924/wp-article/label"] = 3000, ["ISO_3166_code"] = 240000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 28000, ["ISP"] = 3700, ["ISR"] = 5400, ["ISSN"] = 12000, ["ISSN_link"] = 32000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2300, ["ITA"] = 20000, ["ITF"] = 6800, ["ITF_profile"] = 2600, ["ITIS"] = 5800, ["ITN_talk"] = 13000, ["ITN_talk/date"] = 13000, ["IUCN_banner"] = 15000, ["I_sup"] = 4900, ["Ice_hockey_box"] = 2000, ["Ice_hockey_stats"] = 20000, ["Icehockeystats"] = 11000, ["Icelandic_name"] = 2100, ["Icon"] = 662000, ["If"] = 429000, ["If_all"] = 7700, ["If_autoconfirmed"] = 2200, ["If_between"] = 4800, ["If_both"] = 206000, ["If_dark"] = 4000, ["If_dark/styles.css"] = 4000, ["If_either"] = 41000, ["If_empty"] = 6680000, ["If_first_display_both"] = 122000, ["If_in_category"] = 163000, ["If_in_page"] = 21000, ["If_last_display_both"] = 38000, ["If_mobile"] = 2100, ["If_mobile/styles.css"] = 2300, ["If_preview"] = 65000, ["If_then_show"] = 438000, ["Ifempty"] = 938000, ["Ifeq"] = 83000, ["Iferror_then_show"] = 4000, ["Ifexist_not_redirect"] = 1880000, ["Ifnotempty"] = 18000, ["Ifnoteq_then_show"] = 2300, ["Ifnumber"] = 74000, ["Ifsubst"] = 1020000, ["Ih"] = 8100, ["Ill"] = 215000, ["Illm"] = 6000, ["Image_frame"] = 6200, ["Image_label"] = 4700, ["Image_label_begin"] = 4100, ["Image_label_end"] = 4100, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 190000, ["Image_requested"] = 137000, ["Image_requested/Category_helper"] = 126000, ["Imbox"] = 995000, ["Imdb_name"] = 5400, ["Imdb_title"] = 2900, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 618000, ["Improve_categories"] = 7700, ["Improve_documentation"] = 4200, ["Improve_plot"] = 4100, ["In_class"] = 5600, ["In_lang"] = 387000, ["In_progress"] = 3800, ["In_string"] = 304000, ["In_title"] = 29000, ["Inactive_userpage_blanked"] = 4100, ["Inaturalist_taxon"] = 3800, ["Include-USGov"] = 25000, ["Incomplete_list"] = 24000, ["Inconclusive"] = 2300, ["Increase"] = 60000, ["Incumbent_pope"] = 4700, ["Indent"] = 2300, ["Indented_plainlist"] = 2600, ["Independent_sources"] = 10000, ["IndexFungorum"] = 2100, ["Indian_English"] = 4900, ["Indian_railway_code"] = 3500, ["Indian_rupee"] = 12000, ["Inflation"] = 27000, ["Inflation-fn"] = 5800, ["Inflation-year"] = 4300, ["Inflation/IN/startyear"] = 6600, ["Inflation/UK"] = 5500, ["Inflation/UK/dataset"] = 5500, ["Inflation/UK/startyear"] = 5500, ["Inflation/US"] = 16000, ["Inflation/US-GDP"] = 3000, ["Inflation/US-GDP/dataset"] = 3000, ["Inflation/US-GDP/startyear"] = 3000, ["Inflation/US/dataset"] = 16000, ["Inflation/US/startyear"] = 16000, ["Inflation/fn"] = 7500, ["Inflation/year"] = 33000, ["Info"] = 5600, ["Infobox"] = 3420000, ["Infobox/Columns"] = 3200, ["Infobox/mobileviewfix.css"] = 173000, ["Infobox/styles-images.css"] = 20000, ["Infobox3cols"] = 28000, ["Infobox_AFL_biography"] = 15000, ["Infobox_Athletics_Championships"] = 3400, ["Infobox_Australian_place"] = 15000, ["Infobox_Australian_place/styles.css"] = 15000, ["Infobox_Australian_place/table"] = 11000, ["Infobox_COA_wide"] = 3700, ["Infobox_Canada_electoral_district"] = 2600, ["Infobox_Chinese"] = 23000, ["Infobox_Chinese/Chinese"] = 3200, ["Infobox_Chinese/Footer"] = 7200, ["Infobox_Chinese/Header"] = 7200, ["Infobox_Christian_leader"] = 22000, ["Infobox_French_commune"] = 38000, ["Infobox_French_subdivision"] = 2200, ["Infobox_Gaelic_games_biography"] = 5500, ["Infobox_Gaelic_games_player"] = 3300, ["Infobox_German_location"] = 11000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2200, ["Infobox_Greece_place"] = 3600, ["Infobox_Greek_Dimos"] = 3000, ["Infobox_Hindu_temple"] = 2900, ["Infobox_Indian_constituency"] = 5800, ["Infobox_Indian_constituency/defaultdata"] = 5800, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean"] = 2300, ["Infobox_Korean/auto"] = 14000, ["Infobox_Korean/auto/categories"] = 14000, ["Infobox_Korean/base"] = 2300, ["Infobox_Korean/base/auto"] = 17000, ["Infobox_Korean/categories"] = 2300, ["Infobox_Korean_name"] = 2300, ["Infobox_Korean_name/auto"] = 13000, ["Infobox_Korean_television_name"] = 3400, ["Infobox_NASCAR_driver"] = 2300, ["Infobox_NASCAR_race_report"] = 2700, ["Infobox_NCAA_basketball_conference_tournament"] = 2100, ["Infobox_NCAA_team_season"] = 10000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_team_season"] = 2300, ["Infobox_NRHP"] = 74000, ["Infobox_NRHP/conv"] = 19000, ["Infobox_NRHP/locmapin2region"] = 68000, ["Infobox_Olympic_event"] = 8000, ["Infobox_Olympic_event/event_link"] = 8000, ["Infobox_Olympic_event/games_text"] = 8000, ["Infobox_Pan_American_Games_event"] = 2900, ["Infobox_Paralympic_event"] = 2900, ["Infobox_Paralympic_event/games_text"] = 2900, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2100, ["Infobox_Russian_inhabited_locality"] = 4700, ["Infobox_Russian_inhabited_locality/PosMapFS"] = 4200, ["Infobox_Russian_inhabited_locality/federal_subject"] = 4600, ["Infobox_SCOTUS_case"] = 4600, ["Infobox_SSSI"] = 2000, ["Infobox_Site_of_Special_Scientific_Interest"] = 2100, ["Infobox_Slovak_place"] = 3000, ["Infobox_Swiss_town"] = 2900, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 20000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_U.S._legislation"] = 2000, ["Infobox_UK_constituency"] = 2200, ["Infobox_UK_constituency/year"] = 2200, ["Infobox_UK_legislation"] = 6300, ["Infobox_UK_place"] = 27000, ["Infobox_UK_place/NoDialCode"] = 8200, ["Infobox_UK_place/NoPostCode"] = 3600, ["Infobox_UK_place/area"] = 2700, ["Infobox_UK_place/dens"] = 2300, ["Infobox_UK_place/dist"] = 2800, ["Infobox_UK_place/local"] = 27000, ["Infobox_UK_place/styles.css"] = 27000, ["Infobox_UNESCO_World_Heritage_Site"] = 2100, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 4800, ["Infobox_US_Supreme_Court_case/courts"] = 4800, ["Infobox_United_States_legislative_district"] = 2700, ["Infobox_United_States_legislative_district/representative"] = 2700, ["Infobox_Wikipedia_user"] = 12000, ["Infobox_academic"] = 27000, ["Infobox_aircraft"] = 13000, ["Infobox_aircraft/styles.css"] = 14000, ["Infobox_aircraft_occurrence"] = 2900, ["Infobox_airline"] = 4800, ["Infobox_airline/styles.css"] = 4800, ["Infobox_airport"] = 14000, ["Infobox_airport/datatable"] = 13000, ["Infobox_airport/styles.css"] = 14000, ["Infobox_album"] = 168000, ["Infobox_album/color"] = 208000, ["Infobox_album/link"] = 168000, ["Infobox_anatomy"] = 4500, ["Infobox_animanga/Footer"] = 7800, ["Infobox_animanga/Header"] = 7800, ["Infobox_animanga/Print"] = 6600, ["Infobox_animanga/Video"] = 5100, ["Infobox_architect"] = 4400, ["Infobox_artist"] = 34000, ["Infobox_artist_discography"] = 6500, ["Infobox_artwork"] = 15000, ["Infobox_automobile"] = 9300, ["Infobox_award"] = 16000, ["Infobox_badminton_player"] = 3300, ["Infobox_baseball_biography"] = 30000, ["Infobox_baseball_biography/style"] = 30000, ["Infobox_baseball_biography/styles.css"] = 30000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3300, ["Infobox_baseball_team_season/season"] = 3300, ["Infobox_baseball_team_season/styles.css"] = 3300, ["Infobox_basketball_biography"] = 23000, ["Infobox_basketball_biography/style"] = 23000, ["Infobox_basketball_club"] = 3300, ["Infobox_basketball_club/styles.css"] = 3300, ["Infobox_beauty_pageant"] = 2200, ["Infobox_bilateral_relations"] = 5000, ["Infobox_bishop_styles"] = 2500, ["Infobox_body_of_water"] = 19000, ["Infobox_book"] = 62000, ["Infobox_book/styles.css"] = 62000, ["Infobox_boxer"] = 6500, ["Infobox_brand"] = 2200, ["Infobox_brand/styles.css"] = 2200, ["Infobox_bridge"] = 6700, ["Infobox_building"] = 34000, ["Infobox_bus_company"] = 2000, ["Infobox_cemetery"] = 2100, ["Infobox_character"] = 8400, ["Infobox_character/styles.css"] = 8400, ["Infobox_chess_biography"] = 4700, ["Infobox_chess_player"] = 3800, ["Infobox_church"] = 17000, ["Infobox_church/denomination"] = 17000, ["Infobox_church/font_color"] = 17000, ["Infobox_civil_conflict"] = 3200, ["Infobox_civilian_attack"] = 7600, ["Infobox_college_coach"] = 13000, ["Infobox_college_football_game"] = 2300, ["Infobox_college_football_player"] = 2600, ["Infobox_college_sports_team_season"] = 45000, ["Infobox_college_sports_team_season/link"] = 45000, ["Infobox_college_sports_team_season/name"] = 45000, ["Infobox_college_sports_team_season/succession"] = 45000, ["Infobox_college_sports_team_season/team"] = 45000, ["Infobox_comedian"] = 2200, ["Infobox_comic_book_title"] = 3200, ["Infobox_comics_character"] = 3500, ["Infobox_comics_creator"] = 3600, ["Infobox_comics_creator/styles.css"] = 3600, ["Infobox_company"] = 92000, ["Infobox_company/styles.css"] = 92000, ["Infobox_computing_device"] = 2600, ["Infobox_concert"] = 3900, ["Infobox_constituency"] = 7700, ["Infobox_country"] = 7100, ["Infobox_country/formernext"] = 6700, ["Infobox_country/imagetable"] = 5600, ["Infobox_country/multirow"] = 9300, ["Infobox_country/status_text"] = 3100, ["Infobox_country/styles.css"] = 7200, ["Infobox_country_at_games"] = 17000, ["Infobox_country_at_games/core"] = 17000, ["Infobox_country_at_games/see_also"] = 14000, ["Infobox_court_case"] = 5300, ["Infobox_court_case/images"] = 2900, ["Infobox_court_case/styles.css"] = 5300, ["Infobox_cricket_tournament"] = 2800, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7700, ["Infobox_criminal"] = 7700, ["Infobox_curler"] = 2800, ["Infobox_cycling_race_report"] = 5000, ["Infobox_cyclist"] = 17000, ["Infobox_dam"] = 5900, ["Infobox_deity"] = 2300, ["Infobox_deity/color"] = 2300, ["Infobox_designation_list"] = 31000, ["Infobox_designation_list/entry"] = 22000, ["Infobox_dim"] = 6400, ["Infobox_diocese"] = 4100, ["Infobox_drug"] = 12000, ["Infobox_drug/chemical_formula"] = 12000, ["Infobox_drug/data_page_link"] = 12000, ["Infobox_drug/formatATC"] = 11000, ["Infobox_drug/formatCASnumber"] = 12000, ["Infobox_drug/formatChEBI"] = 12000, ["Infobox_drug/formatChEMBL"] = 12000, ["Infobox_drug/formatChemDBNIAID"] = 12000, ["Infobox_drug/formatChemSpider"] = 12000, ["Infobox_drug/formatCompTox"] = 12000, ["Infobox_drug/formatDrugBank"] = 12000, ["Infobox_drug/formatIUPHARBPS"] = 12000, ["Infobox_drug/formatJmol"] = 12000, ["Infobox_drug/formatKEGG"] = 12000, ["Infobox_drug/formatPDBligand"] = 11000, ["Infobox_drug/formatPubChemCID"] = 12000, ["Infobox_drug/formatPubChemSID"] = 12000, ["Infobox_drug/formatUNII"] = 12000, ["Infobox_drug/legal_status"] = 12000, ["Infobox_drug/licence"] = 12000, ["Infobox_drug/maintenance_categories"] = 12000, ["Infobox_drug/non-ref-space"] = 3900, ["Infobox_drug/pregnancy_category"] = 12000, ["Infobox_drug/styles.css"] = 12000, ["Infobox_drug/title"] = 12000, ["Infobox_economist"] = 2000, ["Infobox_election"] = 40000, ["Infobox_election/shortname"] = 2500, ["Infobox_election/styles.css"] = 40000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 8100, ["Infobox_event"] = 7700, ["Infobox_family"] = 2800, ["Infobox_field_hockey_player"] = 2500, ["Infobox_figure_skater"] = 4000, ["Infobox_film"] = 170000, ["Infobox_film/short_description"] = 165000, ["Infobox_film_awards"] = 3200, ["Infobox_film_awards/link"] = 3200, ["Infobox_film_awards/style"] = 3200, ["Infobox_film_or_theatre_festival"] = 2100, ["Infobox_food"] = 7800, ["Infobox_football_biography"] = 218000, ["Infobox_football_club"] = 29000, ["Infobox_football_club_season"] = 24000, ["Infobox_football_league"] = 2800, ["Infobox_football_league_season"] = 22000, ["Infobox_football_match"] = 6700, ["Infobox_football_tournament"] = 2200, ["Infobox_football_tournament_season"] = 9300, ["Infobox_former_subdivision"] = 3700, ["Infobox_former_subdivision/styles.css"] = 3700, ["Infobox_galaxy"] = 3400, ["Infobox_game"] = 3100, ["Infobox_game_score"] = 3800, ["Infobox_games"] = 2100, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4800, ["Infobox_golfer/highest_ranking"] = 4800, ["Infobox_government_agency"] = 13000, ["Infobox_government_cabinet"] = 3500, ["Infobox_gridiron_football_biography"] = 40000, ["Infobox_gridiron_football_biography/position"] = 39000, ["Infobox_gridiron_football_team_season"] = 4100, ["Infobox_gymnast"] = 5900, ["Infobox_handball_biography"] = 5500, ["Infobox_historic_site"] = 21000, ["Infobox_holiday"] = 2200, ["Infobox_holiday/date"] = 2200, ["Infobox_horseraces"] = 2700, ["Infobox_hospital"] = 7000, ["Infobox_hospital/care_system"] = 7000, ["Infobox_hospital/lists"] = 7000, ["Infobox_hurling_championship"] = 2700, ["Infobox_ice_hockey_biography"] = 21000, ["Infobox_ice_hockey_player"] = 18000, ["Infobox_ice_hockey_team"] = 3300, ["Infobox_ice_hockey_team_season"] = 2200, ["Infobox_international_football_competition"] = 6700, ["Infobox_islands"] = 9700, ["Infobox_islands/area"] = 10000, ["Infobox_islands/density"] = 10000, ["Infobox_islands/length"] = 9700, ["Infobox_islands/styles.css"] = 9700, ["Infobox_journal"] = 10000, ["Infobox_journal/Abbreviation_search"] = 10000, ["Infobox_journal/Bluebook_check"] = 9900, ["Infobox_journal/Former_check"] = 9900, ["Infobox_journal/ISO_4_check"] = 9900, ["Infobox_journal/ISSN-eISSN"] = 9900, ["Infobox_journal/Indexing_search"] = 10000, ["Infobox_journal/MathSciNet_check"] = 9900, ["Infobox_journal/NLM_check"] = 9900, ["Infobox_journal/frequency"] = 9000, ["Infobox_journal/openaccess"] = 2700, ["Infobox_judoka"] = 2800, ["Infobox_lake"] = 3900, ["Infobox_language"] = 10000, ["Infobox_language/family-color"] = 12000, ["Infobox_language/genetic"] = 7000, ["Infobox_language/lingualist"] = 10000, ["Infobox_language/linguistlist"] = 10000, ["Infobox_language/ref"] = 7400, ["Infobox_law_enforcement_agency"] = 2200, ["Infobox_legislation"] = 2800, ["Infobox_legislative_district"] = 2300, ["Infobox_legislative_election"] = 2600, ["Infobox_legislative_election/row"] = 2500, ["Infobox_legislative_election/styles.css"] = 2600, ["Infobox_legislative_term"] = 2100, ["Infobox_legislature"] = 4400, ["Infobox_library"] = 2500, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 8300, ["Infobox_manner_of_address"] = 4200, ["Infobox_martial_artist"] = 6300, ["Infobox_martial_artist/record"] = 6300, ["Infobox_medal_templates"] = 476000, ["Infobox_medical_condition"] = 9900, ["Infobox_medical_condition_(new)"] = 6400, ["Infobox_medical_details"] = 2500, ["Infobox_medical_person"] = 2400, ["Infobox_militant_organization"] = 2200, ["Infobox_military_conflict"] = 28000, ["Infobox_military_installation"] = 11000, ["Infobox_military_person"] = 54000, ["Infobox_military_unit"] = 29000, ["Infobox_mine"] = 2300, ["Infobox_mineral"] = 2000, ["Infobox_mobile_phone"] = 2400, ["Infobox_mobile_phone/size"] = 2000, ["Infobox_mobile_phone/weight"] = 2100, ["Infobox_model"] = 2400, ["Infobox_monument"] = 2800, ["Infobox_mountain"] = 30000, ["Infobox_multi-sport_competition_event"] = 2700, ["Infobox_museum"] = 12000, ["Infobox_musical_artist"] = 131000, ["Infobox_musical_artist/hCard_class"] = 122000, ["Infobox_musical_composition"] = 3600, ["Infobox_name"] = 8800, ["Infobox_name_module"] = 9300, ["Infobox_newspaper"] = 11000, ["Infobox_newspaper/styles.css"] = 11000, ["Infobox_noble"] = 7800, ["Infobox_officeholder"] = 278000, ["Infobox_officeholder/office"] = 285000, ["Infobox_official_post"] = 9800, ["Infobox_organization"] = 43000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 9900, ["Infobox_person"] = 571000, ["Infobox_person/Wikidata"] = 4900, ["Infobox_person/height"] = 115000, ["Infobox_person/length"] = 7700, ["Infobox_person/weight"] = 74000, ["Infobox_philosopher"] = 3700, ["Infobox_planet"] = 4800, ["Infobox_play"] = 4600, ["Infobox_political_party"] = 16000, ["Infobox_power_station"] = 3300, ["Infobox_prepared_food"] = 2500, ["Infobox_professional_wrestler"] = 4800, ["Infobox_professional_wrestling_event"] = 3300, ["Infobox_protected_area"] = 15000, ["Infobox_protein_family"] = 2200, ["Infobox_publisher"] = 2600, ["Infobox_racehorse"] = 5900, ["Infobox_racing_driver"] = 5800, ["Infobox_racing_driver_series_section"] = 2900, ["Infobox_radio_station"] = 22000, ["Infobox_radio_station/styles.css"] = 22000, ["Infobox_rail"] = 3200, ["Infobox_rail_line"] = 8000, ["Infobox_rail_service"] = 3300, ["Infobox_reality_competition_season"] = 4300, ["Infobox_record_label"] = 4200, ["Infobox_recurring_event"] = 8000, ["Infobox_religious_biography"] = 7200, ["Infobox_religious_building"] = 15000, ["Infobox_religious_building/color"] = 21000, ["Infobox_restaurant"] = 4600, ["Infobox_river"] = 32000, ["Infobox_river/calcunit"] = 32000, ["Infobox_river/discharge"] = 32000, ["Infobox_river/row-style"] = 32000, ["Infobox_river/source"] = 32000, ["Infobox_road"] = 25000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 25000, ["Infobox_road/styles.css"] = 26000, ["Infobox_road_small"] = 2500, ["Infobox_rockunit"] = 6500, ["Infobox_royalty"] = 25000, ["Infobox_royalty/short_description"] = 8900, ["Infobox_rugby_biography"] = 19000, ["Infobox_rugby_biography/correct_date"] = 19000, ["Infobox_rugby_biography/depcheck"] = 19000, ["Infobox_rugby_league_biography"] = 11000, ["Infobox_rugby_league_biography/PLAYER"] = 11000, ["Infobox_rugby_team"] = 2700, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5500, ["Infobox_school"] = 40000, ["Infobox_school/short_description"] = 40000, ["Infobox_school/styles.css"] = 40000, ["Infobox_school_district"] = 6500, ["Infobox_school_district/styles.css"] = 6500, ["Infobox_scientist"] = 57000, ["Infobox_settlement"] = 597000, ["Infobox_settlement/areadisp"] = 259000, ["Infobox_settlement/columns"] = 107000, ["Infobox_settlement/columns/styles.css"] = 107000, ["Infobox_settlement/densdisp"] = 457000, ["Infobox_settlement/lengthdisp"] = 182000, ["Infobox_settlement/link"] = 107000, ["Infobox_settlement/styles.css"] = 597000, ["Infobox_ship"] = 43000, ["Infobox_ship/career"] = 39000, ["Infobox_ship/characteristics"] = 42000, ["Infobox_ship/class_overview"] = 4400, ["Infobox_ship/image"] = 42000, ["Infobox_ship/service_record"] = 2500, ["Infobox_shopping_mall"] = 3800, ["Infobox_short_story"] = 2700, ["Infobox_skier"] = 2700, ["Infobox_soap_character"] = 3100, ["Infobox_social_media_personality"] = 4400, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 15000, ["Infobox_song"] = 83000, ["Infobox_song/color"] = 83000, ["Infobox_song/link"] = 83000, ["Infobox_song_contest_national_year/Year"] = 2100, ["Infobox_spaceflight"] = 4000, ["Infobox_spaceflight/styles.css"] = 4000, ["Infobox_speed_skater"] = 2000, ["Infobox_sport_event"] = 2800, ["Infobox_sports_competition_event"] = 23000, ["Infobox_sports_competition_event/medalrow"] = 15000, ["Infobox_sports_league"] = 5600, ["Infobox_sports_season"] = 6900, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 159000, ["Infobox_stadium"] = 2600, ["Infobox_station"] = 57000, ["Infobox_station/services"] = 57000, ["Infobox_station/styles.css"] = 57000, ["Infobox_street"] = 4400, ["Infobox_swimmer"] = 11000, ["Infobox_television"] = 64000, ["Infobox_television/Short_description"] = 61000, ["Infobox_television/styles.css"] = 64000, ["Infobox_television_channel"] = 6700, ["Infobox_television_channel/styles.css"] = 6700, ["Infobox_television_episode"] = 13000, ["Infobox_television_episode/styles.css"] = 14000, ["Infobox_television_season"] = 11000, ["Infobox_television_station"] = 3200, ["Infobox_television_station/styles.css"] = 3300, ["Infobox_tennis_biography"] = 11000, ["Infobox_tennis_event"] = 3300, ["Infobox_tennis_tournament"] = 2000, ["Infobox_tennis_tournament/heading"] = 2000, ["Infobox_tennis_tournament/style"] = 2000, ["Infobox_tennis_tournament_event"] = 22000, ["Infobox_tennis_tournament_year"] = 11000, ["Infobox_tennis_tournament_year/color"] = 33000, ["Infobox_tennis_tournament_year/footer"] = 33000, ["Infobox_tournament_season"] = 13000, ["Infobox_train"] = 2600, ["Infobox_university"] = 26000, ["Infobox_user"] = 3000, ["Infobox_venue"] = 20000, ["Infobox_video_game"] = 30000, ["Infobox_video_game/styles.css"] = 30000, ["Infobox_volleyball_biography"] = 5800, ["Infobox_weapon"] = 8100, ["Infobox_weather_event"] = 3500, ["Infobox_weather_event/Effects"] = 3300, ["Infobox_weather_event/Footer"] = 3300, ["Infobox_weather_event/History"] = 3200, ["Infobox_weather_event/SSHWS"] = 2000, ["Infobox_weather_event/meteorology"] = 3200, ["Infobox_weather_event/scale"] = 2100, ["Infobox_weather_event/styles.css"] = 3500, ["Infobox_website"] = 8300, ["Infobox_writer"] = 45000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inlang"] = 2400, ["Inline"] = 3800, ["Inline_block"] = 5400, ["Inprogress"] = 2600, ["Input_link"] = 32000, ["Instagram"] = 20000, ["InterSportStats"] = 5200, ["Interlanguage_link"] = 261000, ["Interlanguage_link_multi"] = 9600, ["International_Paralympic_Committee"] = 4200, ["Internet_Archive"] = 2100, ["Internet_Archive_SCOTUS_URL"] = 3300, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2800, ["Intitle"] = 21000, ["Ip"] = 2100, ["Iptalk"] = 18000, ["IranCensus2006"] = 31000, ["IranNCSGN"] = 3100, ["Iran_Census_2006"] = 31000, ["Irish_place_name"] = 3000, ["IsIPAddress"] = 45000, ["IsValidPageName"] = 3400, ["Is_MLB_league"] = 3300, ["Is_NPB_league"] = 3300, ["Is_continent"] = 13000, ["Is_country_in_Central_America"] = 17000, ["Is_country_in_the_Caribbean"] = 17000, ["Is_interwiki_link"] = 6500, ["Is_italic_taxon"] = 651000, ["Is_redirect"] = 381000, ["Is_time"] = 6700, ["Is_valid_page_name"] = 3400, ["Isbn"] = 10000, ["Isnum"] = 3000, ["Isnumeric"] = 119000, ["Iso2continent"] = 84000, ["Iso2country"] = 25000, ["Iso2country/article"] = 25000, ["Iso2country/data"] = 25000, ["Issubst"] = 64000, ["Italic_dab2"] = 5800, ["Italic_disambiguation"] = 2300, ["Italic_title"] = 257000, ["Italic_title_prefixed"] = 8800, ["Italictitle"] = 3000, ["Ivmbox"] = 142000, ["Ivory_messagebox"] = 187000, ["Ivory_messagebox/styles.css"] = 187000, ["Module:I18n/complex_date"] = 47000, ["Module:IP"] = 148000, ["Module:IPA"] = 183000, ["Module:IPA/data"] = 166000, ["Module:IPA/styles.css"] = 151000, ["Module:IPA_symbol"] = 6800, ["Module:IPA_symbol/data"] = 6800, ["Module:IPAc-en"] = 55000, ["Module:IPAc-en/data"] = 55000, ["Module:IPAc-en/phonemes"] = 55000, ["Module:IPAc-en/pronunciation"] = 55000, ["Module:IPAddress"] = 213000, ["Module:ISO_3166"] = 909000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CH"] = 4200, ["Module:ISO_3166/data/CN"] = 2700, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3700, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 7100, ["Module:ISO_3166/data/GR"] = 3500, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 22000, ["Module:ISO_3166/data/IT"] = 2500, ["Module:ISO_3166/data/National"] = 909000, ["Module:ISO_3166/data/PL"] = 7600, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 27000, ["Module:ISO_3166/data/UA"] = 2200, ["Module:ISO_3166/data/US"] = 87000, ["Module:ISO_639_name"] = 34000, ["Module:ISO_639_name/ISO_639-1"] = 29000, ["Module:ISO_639_name/ISO_639-2"] = 21000, ["Module:ISO_639_name/ISO_639-2B"] = 20000, ["Module:ISO_639_name/ISO_639-3"] = 20000, ["Module:ISO_639_name/ISO_639-3_(dep)"] = 34000, ["Module:ISO_639_name/ISO_639-5"] = 19000, ["Module:ISO_639_name/ISO_639_deprecated"] = 34000, ["Module:ISO_639_name/ISO_639_name_to_code"] = 4500, ["Module:ISO_639_name/ISO_639_override"] = 34000, ["Module:ISOdate"] = 47000, ["Module:Ice_hockey_box"] = 2000, ["Module:Icon"] = 675000, ["Module:Icon/data"] = 675000, ["Module:Icon_box"] = 260000, ["Module:Icon_box/data"] = 260000, ["Module:If_any_equal"] = 251000, ["Module:If_empty"] = 6720000, ["Module:If_in_category"] = 163000, ["Module:If_in_page"] = 21000, ["Module:If_not_given_or_empty"] = 80000, ["Module:If_preview"] = 935000, ["Module:If_preview/configuration"] = 935000, ["Module:If_preview/styles.css"] = 935000, ["Module:In_lang"] = 387000, ["Module:Indent"] = 2300, ["Module:Infobox"] = 4670000, ["Module:Infobox/dates"] = 77000, ["Module:Infobox/styles.css"] = 4940000, ["Module:Infobox/utilities"] = 2600, ["Module:Infobox3cols"] = 320000, ["Module:InfoboxBuilder"] = 2700, ["Module:InfoboxImage"] = 5600000, ["Module:InfoboxImage/data"] = 3340000, ["Module:Infobox_body_of_water_tracking"] = 19000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_dim"] = 380000, ["Module:Infobox_dim/data"] = 234000, ["Module:Infobox_election"] = 42000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 1670000, ["Module:Infobox_military_conflict"] = 28000, ["Module:Infobox_military_conflict/styles.css"] = 28000, ["Module:Infobox_multi-lingual_name"] = 23000, ["Module:Infobox_multi-lingual_name/data"] = 23000, ["Module:Infobox_power_station"] = 3400, ["Module:Infobox_road"] = 26000, ["Module:Infobox_road/browselinks"] = 26000, ["Module:Infobox_road/errors"] = 25000, ["Module:Infobox_road/length"] = 26000, ["Module:Infobox_road/locations"] = 25000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 25000, ["Module:Infobox_ship"] = 43000, ["Module:Infobox_ship/data"] = 43000, ["Module:Infobox_ship/styles.css"] = 43000, ["Module:Infobox_television"] = 64000, ["Module:Infobox_television_disambiguation_check"] = 71000, ["Module:Infobox_television_episode"] = 13000, ["Module:Infobox_television_season_disambiguation_check"] = 10000, ["Module:Infobox_television_season_name"] = 11000, ["Module:Internet_Archive"] = 22000, ["Module:Is_article"] = 2400, ["Module:Is_infobox_in_lead"] = 461000, ["Module:Is_instance"] = 353000, ["Module:Iso2nationality"] = 95000, ["Module:Italic_title"] = 1250000, ["Module:Italic_title2"] = 5800, } c1e2nr1kfvurwrrolk0y8lrdtjzauzn 117303 117302 2026-07-16T11:51:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Transclusion_count/data/I]] 117302 Scribunto text/plain return { ["IAST"] = 6300, ["IA_SCOTUS_URL"] = 3300, ["IBDB_name"] = 9800, ["ICD10"] = 5000, ["ICD9"] = 4400, ["ICS"] = 3500, ["ICS_flag"] = 3500, ["IDN"] = 3800, ["IMDb_episode"] = 11000, ["IMDb_episodes"] = 4100, ["IMDb_name"] = 172000, ["IMDb_title"] = 210000, ["IMO_Number"] = 4400, ["IMSLP"] = 9100, ["INA"] = 2400, ["IND"] = 8600, ["INR"] = 6500, ["INRConvert"] = 6700, ["INRConvert/CurrentRate"] = 6600, ["INRConvert/USD"] = 6600, ["INRConvert/out"] = 6600, ["IOBDB_name"] = 2100, ["IP"] = 2800, ["IPA"] = 181000, ["IPA_audio_link"] = 5000, ["IPA_link"] = 5000, ["IPAblink"] = 2600, ["IPAc-cmn"] = 2800, ["IPAc-en"] = 55000, ["IPAc-pl"] = 51000, ["IPSummary"] = 82000, ["IP_summary"] = 83000, ["IPtalk"] = 18000, ["IPuser"] = 7600, ["IPvandal"] = 2800, ["IRC"] = 7100, ["IRI"] = 2500, ["IRL"] = 6000, ["IRN"] = 4000, ["ISBN"] = 474000, ["ISBN?"] = 2500, ["ISBNT"] = 46000, ["ISBN_missing"] = 3200, ["ISFDB_name"] = 4300, ["ISFDB_title"] = 5100, ["ISL"] = 2300, ["ISO_15924/script-example-character"] = 3100, ["ISO_15924/wp-article"] = 3100, ["ISO_15924/wp-article/format"] = 3100, ["ISO_15924/wp-article/label"] = 3000, ["ISO_3166_code"] = 240000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 28000, ["ISP"] = 3700, ["ISR"] = 5400, ["ISSN"] = 12000, ["ISSN_link"] = 32000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2300, ["ITA"] = 20000, ["ITF"] = 6800, ["ITF_profile"] = 2600, ["ITIS"] = 5800, ["ITN_talk"] = 13000, ["ITN_talk/date"] = 13000, ["IUCN_banner"] = 15000, ["I_sup"] = 4900, ["Ice_hockey_box"] = 2000, ["Ice_hockey_stats"] = 20000, ["Icehockeystats"] = 11000, ["Icelandic_name"] = 2100, ["Icon"] = 662000, ["If"] = 429000, ["If_all"] = 7700, ["If_autoconfirmed"] = 2200, ["If_between"] = 4800, ["If_both"] = 206000, ["If_dark"] = 4000, ["If_dark/styles.css"] = 4000, ["If_either"] = 41000, ["If_empty"] = 6680000, ["If_first_display_both"] = 122000, ["If_in_category"] = 163000, ["If_in_page"] = 21000, ["If_last_display_both"] = 38000, ["If_mobile"] = 2100, ["If_mobile/styles.css"] = 2300, ["If_preview"] = 65000, ["If_then_show"] = 438000, ["Ifempty"] = 938000, ["Ifeq"] = 83000, ["Iferror_then_show"] = 4000, ["Ifexist_not_redirect"] = 1880000, ["Ifnotempty"] = 18000, ["Ifnoteq_then_show"] = 2300, ["Ifnumber"] = 74000, ["Ifsubst"] = 1020000, ["Ih"] = 8100, ["Ill"] = 215000, ["Illm"] = 6000, ["Image_frame"] = 6200, ["Image_label"] = 4700, ["Image_label_begin"] = 4100, ["Image_label_end"] = 4100, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 190000, ["Image_requested"] = 137000, ["Image_requested/Category_helper"] = 126000, ["Imbox"] = 995000, ["Imdb_name"] = 5400, ["Imdb_title"] = 2900, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 618000, ["Improve_categories"] = 7700, ["Improve_documentation"] = 4200, ["Improve_plot"] = 4100, ["In_class"] = 5600, ["In_lang"] = 387000, ["In_progress"] = 3800, ["In_string"] = 304000, ["In_title"] = 29000, ["Inactive_userpage_blanked"] = 4100, ["Inaturalist_taxon"] = 3800, ["Include-USGov"] = 25000, ["Incomplete_list"] = 24000, ["Inconclusive"] = 2300, ["Increase"] = 60000, ["Incumbent_pope"] = 4700, ["Indent"] = 2300, ["Indented_plainlist"] = 2600, ["Independent_sources"] = 10000, ["IndexFungorum"] = 2100, ["Indian_English"] = 4900, ["Indian_railway_code"] = 3500, ["Indian_rupee"] = 12000, ["Inflation"] = 27000, ["Inflation-fn"] = 5800, ["Inflation-year"] = 4300, ["Inflation/IN/startyear"] = 6600, ["Inflation/UK"] = 5500, ["Inflation/UK/dataset"] = 5500, ["Inflation/UK/startyear"] = 5500, ["Inflation/US"] = 16000, ["Inflation/US-GDP"] = 3000, ["Inflation/US-GDP/dataset"] = 3000, ["Inflation/US-GDP/startyear"] = 3000, ["Inflation/US/dataset"] = 16000, ["Inflation/US/startyear"] = 16000, ["Inflation/fn"] = 7500, ["Inflation/year"] = 33000, ["Info"] = 5600, ["Infobox"] = 3420000, ["Infobox/Columns"] = 3200, ["Infobox/mobileviewfix.css"] = 173000, ["Infobox/styles-images.css"] = 20000, ["Infobox3cols"] = 28000, ["Infobox_AFL_biography"] = 15000, ["Infobox_Athletics_Championships"] = 3400, ["Infobox_Australian_place"] = 15000, ["Infobox_Australian_place/styles.css"] = 15000, ["Infobox_Australian_place/table"] = 11000, ["Infobox_COA_wide"] = 3700, ["Infobox_Canada_electoral_district"] = 2600, ["Infobox_Chinese"] = 23000, ["Infobox_Chinese/Chinese"] = 3200, ["Infobox_Chinese/Footer"] = 7200, ["Infobox_Chinese/Header"] = 7200, ["Infobox_Christian_leader"] = 22000, ["Infobox_French_commune"] = 38000, ["Infobox_French_subdivision"] = 2200, ["Infobox_Gaelic_games_biography"] = 5500, ["Infobox_Gaelic_games_player"] = 3300, ["Infobox_German_location"] = 11000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2200, ["Infobox_Greece_place"] = 3600, ["Infobox_Greek_Dimos"] = 3000, ["Infobox_Hindu_temple"] = 2900, ["Infobox_Indian_constituency"] = 5800, ["Infobox_Indian_constituency/defaultdata"] = 5800, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean"] = 2300, ["Infobox_Korean/auto"] = 14000, ["Infobox_Korean/auto/categories"] = 14000, ["Infobox_Korean/base"] = 2300, ["Infobox_Korean/base/auto"] = 17000, ["Infobox_Korean/categories"] = 2300, ["Infobox_Korean_name"] = 2300, ["Infobox_Korean_name/auto"] = 13000, ["Infobox_Korean_television_name"] = 3400, ["Infobox_NASCAR_driver"] = 2300, ["Infobox_NASCAR_race_report"] = 2700, ["Infobox_NCAA_basketball_conference_tournament"] = 2100, ["Infobox_NCAA_team_season"] = 10000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_team_season"] = 2300, ["Infobox_NRHP"] = 74000, ["Infobox_NRHP/conv"] = 19000, ["Infobox_NRHP/locmapin2region"] = 68000, ["Infobox_Olympic_event"] = 8000, ["Infobox_Olympic_event/event_link"] = 8000, ["Infobox_Olympic_event/games_text"] = 8000, ["Infobox_Pan_American_Games_event"] = 2900, ["Infobox_Paralympic_event"] = 2900, ["Infobox_Paralympic_event/games_text"] = 2900, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2100, ["Infobox_Russian_inhabited_locality"] = 4700, ["Infobox_Russian_inhabited_locality/PosMapFS"] = 4200, ["Infobox_Russian_inhabited_locality/federal_subject"] = 4600, ["Infobox_SCOTUS_case"] = 4600, ["Infobox_SSSI"] = 2000, ["Infobox_Site_of_Special_Scientific_Interest"] = 2100, ["Infobox_Slovak_place"] = 3000, ["Infobox_Swiss_town"] = 2900, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 20000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_U.S._legislation"] = 2000, ["Infobox_UK_constituency"] = 2200, ["Infobox_UK_constituency/year"] = 2200, ["Infobox_UK_legislation"] = 6300, ["Infobox_UK_place"] = 27000, ["Infobox_UK_place/NoDialCode"] = 8200, ["Infobox_UK_place/NoPostCode"] = 3600, ["Infobox_UK_place/area"] = 2700, ["Infobox_UK_place/dens"] = 2300, ["Infobox_UK_place/dist"] = 2800, ["Infobox_UK_place/local"] = 27000, ["Infobox_UK_place/styles.css"] = 27000, ["Infobox_UNESCO_World_Heritage_Site"] = 2100, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 4800, ["Infobox_US_Supreme_Court_case/courts"] = 4800, ["Infobox_United_States_legislative_district"] = 2700, ["Infobox_United_States_legislative_district/representative"] = 2700, ["Infobox_Wikipedia_user"] = 12000, ["Infobox_academic"] = 27000, ["Infobox_aircraft"] = 13000, ["Infobox_aircraft/styles.css"] = 14000, ["Infobox_aircraft_occurrence"] = 2900, ["Infobox_airline"] = 4800, ["Infobox_airline/styles.css"] = 4800, ["Infobox_airport"] = 14000, ["Infobox_airport/datatable"] = 13000, ["Infobox_airport/styles.css"] = 14000, ["Infobox_album"] = 168000, ["Infobox_album/color"] = 208000, ["Infobox_album/link"] = 168000, ["Infobox_anatomy"] = 4500, ["Infobox_animanga/Footer"] = 7800, ["Infobox_animanga/Header"] = 7800, ["Infobox_animanga/Print"] = 6600, ["Infobox_animanga/Video"] = 5100, ["Infobox_architect"] = 4400, ["Infobox_artist"] = 34000, ["Infobox_artist_discography"] = 6500, ["Infobox_artwork"] = 15000, ["Infobox_automobile"] = 9300, ["Infobox_award"] = 16000, ["Infobox_badminton_player"] = 3300, ["Infobox_baseball_biography"] = 30000, ["Infobox_baseball_biography/style"] = 30000, ["Infobox_baseball_biography/styles.css"] = 30000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3300, ["Infobox_baseball_team_season/season"] = 3300, ["Infobox_baseball_team_season/styles.css"] = 3300, ["Infobox_basketball_biography"] = 23000, ["Infobox_basketball_biography/style"] = 23000, ["Infobox_basketball_club"] = 3300, ["Infobox_basketball_club/styles.css"] = 3300, ["Infobox_beauty_pageant"] = 2200, ["Infobox_bilateral_relations"] = 5000, ["Infobox_bishop_styles"] = 2500, ["Infobox_body_of_water"] = 19000, ["Infobox_book"] = 62000, ["Infobox_book/styles.css"] = 62000, ["Infobox_boxer"] = 6500, ["Infobox_brand"] = 2200, ["Infobox_brand/styles.css"] = 2200, ["Infobox_bridge"] = 6700, ["Infobox_building"] = 34000, ["Infobox_bus_company"] = 2000, ["Infobox_cemetery"] = 2100, ["Infobox_character"] = 8400, ["Infobox_character/styles.css"] = 8400, ["Infobox_chess_biography"] = 4700, ["Infobox_chess_player"] = 3800, ["Infobox_church"] = 17000, ["Infobox_church/denomination"] = 17000, ["Infobox_church/font_color"] = 17000, ["Infobox_civil_conflict"] = 3200, ["Infobox_civilian_attack"] = 7600, ["Infobox_college_coach"] = 13000, ["Infobox_college_football_game"] = 2300, ["Infobox_college_football_player"] = 2600, ["Infobox_college_sports_team_season"] = 45000, ["Infobox_college_sports_team_season/link"] = 45000, ["Infobox_college_sports_team_season/name"] = 45000, ["Infobox_college_sports_team_season/succession"] = 45000, ["Infobox_college_sports_team_season/team"] = 45000, ["Infobox_comedian"] = 2200, ["Infobox_comic_book_title"] = 3200, ["Infobox_comics_character"] = 3500, ["Infobox_comics_creator"] = 3600, ["Infobox_comics_creator/styles.css"] = 3600, ["Infobox_company"] = 92000, ["Infobox_company/styles.css"] = 92000, ["Infobox_computing_device"] = 2600, ["Infobox_concert"] = 3900, ["Infobox_constituency"] = 7700, ["Infobox_country"] = 7100, ["Infobox_country/formernext"] = 6700, ["Infobox_country/imagetable"] = 5600, ["Infobox_country/multirow"] = 9300, ["Infobox_country/status_text"] = 3100, ["Infobox_country/styles.css"] = 7200, ["Infobox_country_at_games"] = 17000, ["Infobox_country_at_games/core"] = 17000, ["Infobox_country_at_games/see_also"] = 14000, ["Infobox_court_case"] = 5300, ["Infobox_court_case/images"] = 2900, ["Infobox_court_case/styles.css"] = 5300, ["Infobox_cricket_tournament"] = 2800, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7700, ["Infobox_criminal"] = 7700, ["Infobox_curler"] = 2800, ["Infobox_cycling_race_report"] = 5000, ["Infobox_cyclist"] = 17000, ["Infobox_dam"] = 5900, ["Infobox_deity"] = 2300, ["Infobox_deity/color"] = 2300, ["Infobox_designation_list"] = 31000, ["Infobox_designation_list/entry"] = 22000, ["Infobox_dim"] = 6400, ["Infobox_diocese"] = 4100, ["Infobox_drug"] = 12000, ["Infobox_drug/chemical_formula"] = 12000, ["Infobox_drug/data_page_link"] = 12000, ["Infobox_drug/formatATC"] = 11000, ["Infobox_drug/formatCASnumber"] = 12000, ["Infobox_drug/formatChEBI"] = 12000, ["Infobox_drug/formatChEMBL"] = 12000, ["Infobox_drug/formatChemDBNIAID"] = 12000, ["Infobox_drug/formatChemSpider"] = 12000, ["Infobox_drug/formatCompTox"] = 12000, ["Infobox_drug/formatDrugBank"] = 12000, ["Infobox_drug/formatIUPHARBPS"] = 12000, ["Infobox_drug/formatJmol"] = 12000, ["Infobox_drug/formatKEGG"] = 12000, ["Infobox_drug/formatPDBligand"] = 11000, ["Infobox_drug/formatPubChemCID"] = 12000, ["Infobox_drug/formatPubChemSID"] = 12000, ["Infobox_drug/formatUNII"] = 12000, ["Infobox_drug/legal_status"] = 12000, ["Infobox_drug/licence"] = 12000, ["Infobox_drug/maintenance_categories"] = 12000, ["Infobox_drug/non-ref-space"] = 3900, ["Infobox_drug/pregnancy_category"] = 12000, ["Infobox_drug/styles.css"] = 12000, ["Infobox_drug/title"] = 12000, ["Infobox_economist"] = 2000, ["Infobox_election"] = 40000, ["Infobox_election/shortname"] = 2500, ["Infobox_election/styles.css"] = 40000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 8100, ["Infobox_event"] = 7700, ["Infobox_family"] = 2800, ["Infobox_field_hockey_player"] = 2500, ["Infobox_figure_skater"] = 4000, ["Infobox_film"] = 170000, ["Infobox_film/short_description"] = 165000, ["Infobox_film_awards"] = 3200, ["Infobox_film_awards/link"] = 3200, ["Infobox_film_awards/style"] = 3200, ["Infobox_film_or_theatre_festival"] = 2100, ["Infobox_food"] = 7800, ["Infobox_football_biography"] = 218000, ["Infobox_football_club"] = 29000, ["Infobox_football_club_season"] = 24000, ["Infobox_football_league"] = 2800, ["Infobox_football_league_season"] = 22000, ["Infobox_football_match"] = 6700, ["Infobox_football_tournament"] = 2200, ["Infobox_football_tournament_season"] = 9300, ["Infobox_former_subdivision"] = 3700, ["Infobox_former_subdivision/styles.css"] = 3700, ["Infobox_galaxy"] = 3400, ["Infobox_game"] = 3100, ["Infobox_game_score"] = 3800, ["Infobox_games"] = 2100, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4800, ["Infobox_golfer/highest_ranking"] = 4800, ["Infobox_government_agency"] = 13000, ["Infobox_government_cabinet"] = 3500, ["Infobox_gridiron_football_biography"] = 40000, ["Infobox_gridiron_football_biography/position"] = 39000, ["Infobox_gridiron_football_team_season"] = 4100, ["Infobox_gymnast"] = 5900, ["Infobox_handball_biography"] = 5500, ["Infobox_historic_site"] = 21000, ["Infobox_holiday"] = 2200, ["Infobox_holiday/date"] = 2200, ["Infobox_horseraces"] = 2700, ["Infobox_hospital"] = 7000, ["Infobox_hospital/care_system"] = 7000, ["Infobox_hospital/lists"] = 7000, ["Infobox_hurling_championship"] = 2700, ["Infobox_ice_hockey_biography"] = 21000, ["Infobox_ice_hockey_player"] = 18000, ["Infobox_ice_hockey_team"] = 3300, ["Infobox_ice_hockey_team_season"] = 2200, ["Infobox_international_football_competition"] = 6700, ["Infobox_islands"] = 9700, ["Infobox_islands/area"] = 10000, ["Infobox_islands/density"] = 10000, ["Infobox_islands/length"] = 9700, ["Infobox_islands/styles.css"] = 9700, ["Infobox_journal"] = 10000, ["Infobox_journal/Abbreviation_search"] = 10000, ["Infobox_journal/Bluebook_check"] = 9900, ["Infobox_journal/Former_check"] = 9900, ["Infobox_journal/ISO_4_check"] = 9900, ["Infobox_journal/ISSN-eISSN"] = 9900, ["Infobox_journal/Indexing_search"] = 10000, ["Infobox_journal/MathSciNet_check"] = 9900, ["Infobox_journal/NLM_check"] = 9900, ["Infobox_journal/frequency"] = 9000, ["Infobox_journal/openaccess"] = 2700, ["Infobox_judoka"] = 2800, ["Infobox_lake"] = 3900, ["Infobox_language"] = 10000, ["Infobox_language/family-color"] = 12000, ["Infobox_language/genetic"] = 7000, ["Infobox_language/lingualist"] = 10000, ["Infobox_language/linguistlist"] = 10000, ["Infobox_language/ref"] = 7400, ["Infobox_law_enforcement_agency"] = 2200, ["Infobox_legislation"] = 2800, ["Infobox_legislative_district"] = 2300, ["Infobox_legislative_election"] = 2600, ["Infobox_legislative_election/row"] = 2500, ["Infobox_legislative_election/styles.css"] = 2600, ["Infobox_legislative_term"] = 2100, ["Infobox_legislature"] = 4400, ["Infobox_library"] = 2500, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 8300, ["Infobox_manner_of_address"] = 4200, ["Infobox_martial_artist"] = 6300, ["Infobox_martial_artist/record"] = 6300, ["Infobox_medal_templates"] = 476000, ["Infobox_medical_condition"] = 9900, ["Infobox_medical_condition_(new)"] = 6400, ["Infobox_medical_details"] = 2500, ["Infobox_medical_person"] = 2400, ["Infobox_militant_organization"] = 2200, ["Infobox_military_conflict"] = 28000, ["Infobox_military_installation"] = 11000, ["Infobox_military_person"] = 54000, ["Infobox_military_unit"] = 29000, ["Infobox_mine"] = 2300, ["Infobox_mineral"] = 2000, ["Infobox_mobile_phone"] = 2400, ["Infobox_mobile_phone/size"] = 2000, ["Infobox_mobile_phone/weight"] = 2100, ["Infobox_model"] = 2400, ["Infobox_monument"] = 2800, ["Infobox_mountain"] = 30000, ["Infobox_multi-sport_competition_event"] = 2700, ["Infobox_museum"] = 12000, ["Infobox_musical_artist"] = 131000, ["Infobox_musical_artist/hCard_class"] = 122000, ["Infobox_musical_composition"] = 3600, ["Infobox_name"] = 8800, ["Infobox_name_module"] = 9300, ["Infobox_newspaper"] = 11000, ["Infobox_newspaper/styles.css"] = 11000, ["Infobox_noble"] = 7800, ["Infobox_officeholder"] = 278000, ["Infobox_officeholder/office"] = 285000, ["Infobox_official_post"] = 9800, ["Infobox_organization"] = 43000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 9900, ["Infobox_person"] = 571000, ["Infobox_person/Wikidata"] = 4900, ["Infobox_person/height"] = 115000, ["Infobox_person/length"] = 7700, ["Infobox_person/weight"] = 74000, ["Infobox_philosopher"] = 3700, ["Infobox_planet"] = 4800, ["Infobox_play"] = 4600, ["Infobox_political_party"] = 16000, ["Infobox_power_station"] = 3300, ["Infobox_prepared_food"] = 2500, ["Infobox_professional_wrestler"] = 4800, ["Infobox_professional_wrestling_event"] = 3300, ["Infobox_protected_area"] = 15000, ["Infobox_protein_family"] = 2200, ["Infobox_publisher"] = 2600, ["Infobox_racehorse"] = 5900, ["Infobox_racing_driver"] = 5800, ["Infobox_racing_driver_series_section"] = 2900, ["Infobox_radio_station"] = 22000, ["Infobox_radio_station/styles.css"] = 22000, ["Infobox_rail"] = 3200, ["Infobox_rail_line"] = 8000, ["Infobox_rail_service"] = 3300, ["Infobox_reality_competition_season"] = 4300, ["Infobox_record_label"] = 4200, ["Infobox_recurring_event"] = 8000, ["Infobox_religious_biography"] = 7200, ["Infobox_religious_building"] = 15000, ["Infobox_religious_building/color"] = 21000, ["Infobox_restaurant"] = 4600, ["Infobox_river"] = 32000, ["Infobox_river/calcunit"] = 32000, ["Infobox_river/discharge"] = 32000, ["Infobox_river/row-style"] = 32000, ["Infobox_river/source"] = 32000, ["Infobox_road"] = 25000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 25000, ["Infobox_road/styles.css"] = 26000, ["Infobox_road_small"] = 2500, ["Infobox_rockunit"] = 6500, ["Infobox_royalty"] = 25000, ["Infobox_royalty/short_description"] = 8900, ["Infobox_rugby_biography"] = 19000, ["Infobox_rugby_biography/correct_date"] = 19000, ["Infobox_rugby_biography/depcheck"] = 19000, ["Infobox_rugby_league_biography"] = 11000, ["Infobox_rugby_league_biography/PLAYER"] = 11000, ["Infobox_rugby_team"] = 2700, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5500, ["Infobox_school"] = 40000, ["Infobox_school/short_description"] = 40000, ["Infobox_school/styles.css"] = 40000, ["Infobox_school_district"] = 6500, ["Infobox_school_district/styles.css"] = 6500, ["Infobox_scientist"] = 57000, ["Infobox_settlement"] = 597000, ["Infobox_settlement/areadisp"] = 259000, ["Infobox_settlement/columns"] = 107000, ["Infobox_settlement/columns/styles.css"] = 107000, ["Infobox_settlement/densdisp"] = 457000, ["Infobox_settlement/lengthdisp"] = 182000, ["Infobox_settlement/link"] = 107000, ["Infobox_settlement/styles.css"] = 597000, ["Infobox_ship"] = 43000, ["Infobox_ship/career"] = 39000, ["Infobox_ship/characteristics"] = 42000, ["Infobox_ship/class_overview"] = 4400, ["Infobox_ship/image"] = 42000, ["Infobox_ship/service_record"] = 2500, ["Infobox_shopping_mall"] = 3800, ["Infobox_short_story"] = 2700, ["Infobox_skier"] = 2700, ["Infobox_soap_character"] = 3100, ["Infobox_social_media_personality"] = 4400, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 15000, ["Infobox_song"] = 83000, ["Infobox_song/color"] = 83000, ["Infobox_song/link"] = 83000, ["Infobox_song_contest_national_year/Year"] = 2100, ["Infobox_spaceflight"] = 4000, ["Infobox_spaceflight/styles.css"] = 4000, ["Infobox_speed_skater"] = 2000, ["Infobox_sport_event"] = 2800, ["Infobox_sports_competition_event"] = 23000, ["Infobox_sports_competition_event/medalrow"] = 15000, ["Infobox_sports_league"] = 5600, ["Infobox_sports_season"] = 6900, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 159000, ["Infobox_stadium"] = 2600, ["Infobox_station"] = 57000, ["Infobox_station/services"] = 57000, ["Infobox_station/styles.css"] = 57000, ["Infobox_street"] = 4400, ["Infobox_swimmer"] = 11000, ["Infobox_television"] = 64000, ["Infobox_television/Short_description"] = 61000, ["Infobox_television/styles.css"] = 64000, ["Infobox_television_channel"] = 6700, ["Infobox_television_channel/styles.css"] = 6700, ["Infobox_television_episode"] = 13000, ["Infobox_television_episode/styles.css"] = 14000, ["Infobox_television_season"] = 11000, ["Infobox_television_station"] = 3200, ["Infobox_television_station/styles.css"] = 3300, ["Infobox_tennis_biography"] = 11000, ["Infobox_tennis_event"] = 3300, ["Infobox_tennis_tournament"] = 2000, ["Infobox_tennis_tournament/heading"] = 2000, ["Infobox_tennis_tournament/style"] = 2000, ["Infobox_tennis_tournament_event"] = 22000, ["Infobox_tennis_tournament_year"] = 11000, ["Infobox_tennis_tournament_year/color"] = 33000, ["Infobox_tennis_tournament_year/footer"] = 33000, ["Infobox_tournament_season"] = 13000, ["Infobox_train"] = 2600, ["Infobox_university"] = 26000, ["Infobox_user"] = 3000, ["Infobox_venue"] = 20000, ["Infobox_video_game"] = 30000, ["Infobox_video_game/styles.css"] = 30000, ["Infobox_volleyball_biography"] = 5800, ["Infobox_weapon"] = 8100, ["Infobox_weather_event"] = 3500, ["Infobox_weather_event/Effects"] = 3300, ["Infobox_weather_event/Footer"] = 3300, ["Infobox_weather_event/History"] = 3200, ["Infobox_weather_event/SSHWS"] = 2000, ["Infobox_weather_event/meteorology"] = 3200, ["Infobox_weather_event/scale"] = 2100, ["Infobox_weather_event/styles.css"] = 3500, ["Infobox_website"] = 8300, ["Infobox_writer"] = 45000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inlang"] = 2400, ["Inline"] = 3800, ["Inline_block"] = 5400, ["Inprogress"] = 2600, ["Input_link"] = 32000, ["Instagram"] = 20000, ["InterSportStats"] = 5200, ["Interlanguage_link"] = 261000, ["Interlanguage_link_multi"] = 9600, ["International_Paralympic_Committee"] = 4200, ["Internet_Archive"] = 2100, ["Internet_Archive_SCOTUS_URL"] = 3300, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2800, ["Intitle"] = 21000, ["Ip"] = 2100, ["Iptalk"] = 18000, ["IranCensus2006"] = 31000, ["IranNCSGN"] = 3100, ["Iran_Census_2006"] = 31000, ["Irish_place_name"] = 3000, ["IsIPAddress"] = 45000, ["IsValidPageName"] = 3400, ["Is_MLB_league"] = 3300, ["Is_NPB_league"] = 3300, ["Is_continent"] = 13000, ["Is_country_in_Central_America"] = 17000, ["Is_country_in_the_Caribbean"] = 17000, ["Is_interwiki_link"] = 6500, ["Is_italic_taxon"] = 651000, ["Is_redirect"] = 381000, ["Is_time"] = 6700, ["Is_valid_page_name"] = 3400, ["Isbn"] = 10000, ["Isnum"] = 3000, ["Isnumeric"] = 119000, ["Iso2continent"] = 84000, ["Iso2country"] = 25000, ["Iso2country/article"] = 25000, ["Iso2country/data"] = 25000, ["Issubst"] = 64000, ["Italic_dab2"] = 5800, ["Italic_disambiguation"] = 2300, ["Italic_title"] = 257000, ["Italic_title_prefixed"] = 8800, ["Italictitle"] = 3000, ["Ivmbox"] = 142000, ["Ivory_messagebox"] = 187000, ["Ivory_messagebox/styles.css"] = 187000, ["Module:I18n/complex_date"] = 47000, ["Module:IP"] = 148000, ["Module:IPA"] = 183000, ["Module:IPA/data"] = 166000, ["Module:IPA/styles.css"] = 151000, ["Module:IPA_symbol"] = 6800, ["Module:IPA_symbol/data"] = 6800, ["Module:IPAc-en"] = 55000, ["Module:IPAc-en/data"] = 55000, ["Module:IPAc-en/phonemes"] = 55000, ["Module:IPAc-en/pronunciation"] = 55000, ["Module:IPAddress"] = 213000, ["Module:ISO_3166"] = 909000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CH"] = 4200, ["Module:ISO_3166/data/CN"] = 2700, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3700, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 7100, ["Module:ISO_3166/data/GR"] = 3500, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 22000, ["Module:ISO_3166/data/IT"] = 2500, ["Module:ISO_3166/data/National"] = 909000, ["Module:ISO_3166/data/PL"] = 7600, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 27000, ["Module:ISO_3166/data/UA"] = 2200, ["Module:ISO_3166/data/US"] = 87000, ["Module:ISO_639_name"] = 34000, ["Module:ISO_639_name/ISO_639-1"] = 29000, ["Module:ISO_639_name/ISO_639-2"] = 21000, ["Module:ISO_639_name/ISO_639-2B"] = 20000, ["Module:ISO_639_name/ISO_639-3"] = 20000, ["Module:ISO_639_name/ISO_639-3_(dep)"] = 34000, ["Module:ISO_639_name/ISO_639-5"] = 19000, ["Module:ISO_639_name/ISO_639_deprecated"] = 34000, ["Module:ISO_639_name/ISO_639_name_to_code"] = 4500, ["Module:ISO_639_name/ISO_639_override"] = 34000, ["Module:ISOdate"] = 47000, ["Module:Ice_hockey_box"] = 2000, ["Module:Icon"] = 675000, ["Module:Icon/data"] = 675000, ["Module:Icon_box"] = 260000, ["Module:Icon_box/data"] = 260000, ["Module:If_any_equal"] = 251000, ["Module:If_empty"] = 6720000, ["Module:If_in_category"] = 163000, ["Module:If_in_page"] = 21000, ["Module:If_not_given_or_empty"] = 80000, ["Module:If_preview"] = 935000, ["Module:If_preview/configuration"] = 935000, ["Module:If_preview/styles.css"] = 935000, ["Module:In_lang"] = 387000, ["Module:Indent"] = 2300, ["Module:Infobox"] = 4670000, ["Module:Infobox/dates"] = 77000, ["Module:Infobox/styles.css"] = 4940000, ["Module:Infobox/utilities"] = 2600, ["Module:Infobox3cols"] = 320000, ["Module:InfoboxBuilder"] = 2700, ["Module:InfoboxImage"] = 5600000, ["Module:InfoboxImage/data"] = 3340000, ["Module:Infobox_body_of_water_tracking"] = 19000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_dim"] = 380000, ["Module:Infobox_dim/data"] = 234000, ["Module:Infobox_election"] = 42000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 1670000, ["Module:Infobox_military_conflict"] = 28000, ["Module:Infobox_military_conflict/styles.css"] = 28000, ["Module:Infobox_multi-lingual_name"] = 23000, ["Module:Infobox_multi-lingual_name/data"] = 23000, ["Module:Infobox_power_station"] = 3400, ["Module:Infobox_road"] = 26000, ["Module:Infobox_road/browselinks"] = 26000, ["Module:Infobox_road/errors"] = 25000, ["Module:Infobox_road/length"] = 26000, ["Module:Infobox_road/locations"] = 25000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 25000, ["Module:Infobox_ship"] = 43000, ["Module:Infobox_ship/data"] = 43000, ["Module:Infobox_ship/styles.css"] = 43000, ["Module:Infobox_television"] = 64000, ["Module:Infobox_television_disambiguation_check"] = 71000, ["Module:Infobox_television_episode"] = 13000, ["Module:Infobox_television_season_disambiguation_check"] = 10000, ["Module:Infobox_television_season_name"] = 11000, ["Module:Internet_Archive"] = 22000, ["Module:Is_article"] = 2400, ["Module:Is_infobox_in_lead"] = 461000, ["Module:Is_instance"] = 353000, ["Module:Iso2nationality"] = 95000, ["Module:Italic_title"] = 1250000, ["Module:Italic_title2"] = 5800, } c1e2nr1kfvurwrrolk0y8lrdtjzauzn Template:Category link 10 15208 116967 114983 2026-03-28T17:08:14Z en>HouseBlaster 0 handle different namespace prefixes correctly 116967 wikitext text/x-wiki {{Category link/core|1={{#ifeq:{{NAMESPACE:{{{1}}} }}|Category|{{PAGENAME:{{{1}}} }}|{{{1}}} }}|2={{{2|Category:{{#ifeq:{{NAMESPACE:{{{1}}} }}|Category|{{PAGENAME:{{{1}}} }}|{{{1}}} }}}}}|count={{{count|no}}}|page_count={{PAGESINCAT:{{PAGENAME:{{{1}}}}}|{{UC:{{{count_type|ALL}}}}}|R}}|backlog={{{backlog|{{formatnum:{{NUMBEROFPAGES}}|R}}}}}}}<noinclude> {{Documentation}} </noinclude> shagm99jmb6xamiwd9dlpct8cch8cvp 116968 116967 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Category_link]] 116967 wikitext text/x-wiki {{Category link/core|1={{#ifeq:{{NAMESPACE:{{{1}}} }}|Category|{{PAGENAME:{{{1}}} }}|{{{1}}} }}|2={{{2|Category:{{#ifeq:{{NAMESPACE:{{{1}}} }}|Category|{{PAGENAME:{{{1}}} }}|{{{1}}} }}}}}|count={{{count|no}}}|page_count={{PAGESINCAT:{{PAGENAME:{{{1}}}}}|{{UC:{{{count_type|ALL}}}}}|R}}|backlog={{{backlog|{{formatnum:{{NUMBEROFPAGES}}|R}}}}}}}<noinclude> {{Documentation}} </noinclude> shagm99jmb6xamiwd9dlpct8cch8cvp Template:Used in system 10 15216 117300 37646 2026-07-13T13:27:25Z en>Jonesey95 0 Undid revision [[Special:Diff/1363604175|1363604175]] by [[Special:Contributions/2600 etc|2600 etc]] ([[User talk:2600 etc|talk]]). no discussion, no edit summary. The 1= is a useful placeholder to show that the empty first parameter is intentional 37645 wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 196bkrax8m9r9spo90sxgyczdyxm0j6 117301 117300 2026-07-16T11:51:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Used_in_system]] 37645 wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 196bkrax8m9r9spo90sxgyczdyxm0j6 Template:Endflatlist 10 15627 116804 38144 2024-02-17T05:16:02Z en>Pppery 0 Changed protection settings for "[[Template:Endflatlist]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 38143 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Flatlist/doc}} </noinclude> 0p78pkby8s7e1o474p48twvpgtfs9ul 116805 116804 2026-07-15T19:08:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Endflatlist]] 38143 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Flatlist/doc}} </noinclude> 0p78pkby8s7e1o474p48twvpgtfs9ul Module:Transclusion count/data/S 828 15653 116971 107007 2026-07-12T05:12:22Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. 116971 Scribunto text/plain return { ["S"] = 4200, ["S-aca"] = 6700, ["S-ach"] = 17000, ["S-aft"] = 230000, ["S-aft/check"] = 230000, ["S-aft/filter"] = 230000, ["S-bef"] = 235000, ["S-bef/check"] = 235000, ["S-bef/filter"] = 235000, ["S-break"] = 6500, ["S-bus"] = 2000, ["S-civ"] = 2900, ["S-dip"] = 6000, ["S-end"] = 261000, ["S-gov"] = 8600, ["S-hon"] = 4000, ["S-hou"] = 9800, ["S-inc"] = 13000, ["S-legal"] = 9900, ["S-line_label"] = 2000, ["S-mil"] = 13000, ["S-new"] = 17000, ["S-non"] = 11000, ["S-npo"] = 4200, ["S-off"] = 43000, ["S-par"] = 52000, ["S-par/en"] = 3300, ["S-par/gb"] = 3300, ["S-par/uk"] = 12000, ["S-par/us-hs"] = 12000, ["S-par/us-sen"] = 2100, ["S-ppo"] = 15000, ["S-prec"] = 3200, ["S-reg"] = 22000, ["S-rel"] = 19000, ["S-roy"] = 2800, ["S-sports"] = 12000, ["S-start"] = 253000, ["S-ttl"] = 242000, ["S-ttl/check"] = 242000, ["S-vac"] = 7800, ["SAU"] = 2100, ["SCO"] = 3800, ["SDcat"] = 6770000, ["SECOND"] = 2300, ["SGP"] = 2900, ["SIA"] = 2700, ["SLL"] = 2000, ["SLO"] = 4800, ["SMS"] = 6800, ["SMU"] = 2400, ["SPI_archive_notice"] = 84000, ["SPIarchive_notice"] = 82000, ["SPIcat"] = 3800, ["SPIclose"] = 3300, ["SPIpriorcases"] = 77000, ["SR/Olympics_profile"] = 2200, ["SRB"] = 4300, ["SS"] = 22000, ["SSPa"] = 2600, ["STN"] = 11000, ["SUBJECTSPACE_formatted"] = 45000, ["SUI"] = 9500, ["SVG"] = 2700, ["SVG-Logo"] = 26000, ["SVG-Res"] = 24000, ["SVG-logo"] = 14000, ["SVK"] = 8700, ["SVN"] = 5800, ["SWE"] = 13000, ["Salts_by_element"] = 2200, ["Sandbox_other"] = 465000, ["Saturday"] = 2800, ["Saved_book"] = 52000, ["Sc"] = 2900, ["Scholia"] = 3700, ["School_block"] = 13000, ["School_disambiguation"] = 3400, ["Schoolblock"] = 6900, ["Schooldis"] = 2700, ["Schoolip"] = 12000, ["Scientist_icon"] = 16000, ["Scientist_icon2"] = 16000, ["Sclass"] = 34000, ["Sclass2"] = 11000, ["Screen_reader-only"] = 106000, ["Screen_reader-only/styles.css"] = 146000, ["Script"] = 7500, ["Script/Arabic"] = 4000, ["Script/Hebrew"] = 4900, ["Script/Nastaliq"] = 15000, ["Script/doc/id-unk"] = 3200, ["Script/doc/id-unk/core"] = 3200, ["Script/doc/id-unk/is-iso-alpha4"] = 3200, ["Script/doc/id-unk/name-to-alpha4"] = 3200, ["Script/styles.css"] = 3300, ["Script/styles_arabic.css"] = 4000, ["Script/styles_hebrew.css"] = 4900, ["Sdash"] = 3900, ["Search_box"] = 73000, ["Search_link"] = 25000, ["Section_link"] = 165000, ["Section_sizes"] = 4200, ["See"] = 8900, ["See_also"] = 216000, ["Seealso"] = 7700, ["Seiner_Majestät_Schiff"] = 6800, ["Seiner_Majestät_Unterseeboot"] = 2400, ["Select_skin"] = 5500, ["Selected"] = 2000, ["Selected_article"] = 2500, ["Selected_picture"] = 2400, ["Self"] = 45000, ["Self-published_inline"] = 4700, ["Self-published_source"] = 6100, ["Self-reference"] = 2200, ["Self-reference_tool"] = 7800, ["Sent_off"] = 17000, ["Sentoff"] = 6100, ["Sequence"] = 4100, ["Series_overview"] = 9800, ["Serif"] = 4900, ["Set_category"] = 38000, ["Set_index_article"] = 7700, ["Sets_taxobox_colour"] = 3700, ["Sfn"] = 207000, ["SfnRef"] = 163000, ["Sfn_whitelist"] = 2500, ["Sfnm"] = 5800, ["Sfnp"] = 23000, ["Sfnref"] = 18000, ["Sfrac"] = 5100, ["Sfrac/styles.css"] = 5200, ["SharedIPEDU"] = 3300, ["Shared_IP"] = 10000, ["Shared_IP_corp"] = 4100, ["Shared_IP_edu"] = 186000, ["Shared_IP_gov"] = 2300, ["Sharedip"] = 3000, ["Sharedipedu"] = 3800, ["Sherdog"] = 2700, ["Ship"] = 42000, ["Ship_index"] = 7600, ["Shipboxflag"] = 21000, ["Shipboxflag/core"] = 21000, ["Shipwrecks_navbox_footer"] = 11000, ["Shipwrecks_navbox_footer/link"] = 11000, ["Short_description"] = 6910000, ["Short_description/lowercasecheck"] = 6910000, ["Short_pages_monitor"] = 15000, ["Short_pages_monitor/maximum_length"] = 15000, ["Shortcut"] = 22000, ["Should_be_SVG"] = 8200, ["Shy"] = 2200, ["Sic"] = 38000, ["Side_box"] = 1250000, ["Sidebar"] = 317000, ["Sidebar_games_events"] = 42000, ["Sidebar_person"] = 4900, ["Sidebar_person/styles.css"] = 6300, ["Sidebar_with_collapsible_lists"] = 83000, ["Sigfig"] = 4100, ["Significant_figures"] = 5600, ["Significant_figures/rnd"] = 5300, ["Signpost-subscription"] = 2100, ["Signpost-subscription/styles.css"] = 2100, ["Signpost/item"] = 49000, ["Signpost/item/core"] = 49000, ["Signpost/snippet-nopic"] = 3400, ["Signpost/snippet/styles.css"] = 3700, ["Sildb_prim"] = 2200, ["Silver02"] = 18000, ["Silver2"] = 58000, ["Silver_medal"] = 6600, ["Similar_names"] = 3400, ["Single+double"] = 11000, ["Single+space"] = 17000, ["Single-innings_cricket_match"] = 4000, ["Single_chart"] = 43000, ["Single_namespace"] = 330000, ["Single_source"] = 3000, ["Singlechart"] = 12000, ["Singles"] = 49000, ["Sister-inline"] = 222000, ["Sister-inline/styles.css"] = 222000, ["Sister_project"] = 1120000, ["Sister_project/styles.css"] = 1120000, ["Sister_project_links"] = 14000, ["Skip_to_talk"] = 12000, ["Skip_to_talk/styles.css"] = 12000, ["Sky"] = 3300, ["Sky/styles.css"] = 3300, ["Slink"] = 68000, ["Slovak_municipality"] = 3000, ["Slovak_municipality/geo"] = 2800, ["Small"] = 649000, ["Small_Solar_System_bodies"] = 3600, ["Smallcaps"] = 22000, ["Smallcaps/styles.css"] = 22000, ["Smalldiv"] = 42000, ["Smaller"] = 79000, ["Smiley"] = 53000, ["Snd"] = 608000, ["Snds"] = 6500, ["Soccer_icon"] = 124000, ["Soccer_icon2"] = 124000, ["Soccer_icon4"] = 3400, ["Soccerbase"] = 13000, ["Soccerbase_season"] = 8000, ["Soccerway"] = 83000, ["Sock"] = 54000, ["Sock_list"] = 11000, ["Sockcat"] = 2000, ["Sockmaster"] = 10000, ["Sockpuppet"] = 282000, ["Sockpuppet/altmaster"] = 3600, ["Sockpuppet/categorise"] = 282000, ["SockpuppetCheckuser"] = 5500, ["Sockpuppet_category"] = 51000, ["Sockpuppet_category/confirmed"] = 27000, ["Sockpuppet_category/suspected"] = 24000, ["Sockpuppetcheckuser"] = 3600, ["Sockpuppeteer"] = 29000, ["Soft_hyphen"] = 2300, ["Soft_redirect"] = 6500, ["Soft_redirect_protection"] = 10000, ["Softredirect"] = 3300, ["Solar_luminosity"] = 5100, ["Solar_mass"] = 6400, ["Solar_radius"] = 5200, ["Soldier_icon"] = 3900, ["Soldier_icon2"] = 3900, ["Songs_category"] = 9600, ["Songs_category/core"] = 9600, ["Sort"] = 119000, ["Sort_under"] = 2100, ["Sort_under/styles.css"] = 2100, ["Sortname"] = 63000, ["Source-attribution"] = 9000, ["Source_assess"] = 2700, ["Source_assess_table"] = 2700, ["Source_attribution"] = 39000, ["Source_check"] = 928000, ["Sourcecheck"] = 928000, ["Sources"] = 3600, ["Sources_exist"] = 4100, ["South_America_topic"] = 2700, ["Sp"] = 194000, ["Space"] = 131000, ["Space+double"] = 7200, ["Space+single"] = 15000, ["Spaced_en_dash"] = 642000, ["Spaced_en_dash_space"] = 6600, ["Spaced_ndash"] = 22000, ["Spaces"] = 732000, ["Spain_metadata_Wikidata"] = 7400, ["Spamlink"] = 14000, ["Species_Latin_name_abbreviation_disambiguation"] = 2400, ["Species_list"] = 25000, ["Speciesbox"] = 392000, ["Speciesbox/checkgenus"] = 390000, ["Speciesbox/getGenus"] = 392000, ["Speciesbox/getSpecies"] = 392000, ["Speciesbox/name"] = 392000, ["Speciesbox/parameterCheck"] = 392000, ["Speciesbox/trim"] = 392000, ["Specieslist"] = 9200, ["Split_article"] = 4200, ["Spnd"] = 4800, ["Spoken_Wikipedia"] = 2200, ["Sport_icon"] = 16000, ["Sport_icon2"] = 16000, ["SportsYearCatUSstate"] = 6600, ["Sports_club_or_team_people_category_header"] = 14000, ["Sports_club_or_team_people_category_header/category1"] = 14000, ["Sports_links"] = 80000, ["Sports_reference"] = 5200, ["Squad_maintenance"] = 3800, ["Sronly"] = 49000, ["Srt"] = 7200, ["Stack"] = 30000, ["Stack/styles.css"] = 41000, ["Stack_begin"] = 11000, ["Stack_end"] = 11000, ["StaleIP"] = 3600, ["StandardEbooks"] = 2400, ["Standings_table_end"] = 64000, ["Standings_table_entry"] = 25000, ["Standings_table_entry/record"] = 64000, ["Standings_table_start"] = 64000, ["Standings_table_start/colheader"] = 64000, ["Standings_table_start/colspan"] = 64000, ["Standings_table_start/styles.css"] = 64000, ["Starbox_astrometry"] = 5700, ["Starbox_begin"] = 5800, ["Starbox_catalog"] = 5700, ["Starbox_character"] = 5700, ["Starbox_detail"] = 5600, ["Starbox_end"] = 5800, ["Starbox_image"] = 4000, ["Starbox_observe"] = 5800, ["Starbox_reference"] = 5700, ["Start-Class"] = 18000, ["Start-date"] = 2300, ["Start_and_end_dates"] = 3700, ["Start_box"] = 5600, ["Start_date"] = 545000, ["Start_date_and_age"] = 186000, ["Start_date_and_years_ago"] = 4100, ["Start_date_text"] = 3900, ["Start_of_course_timeline"] = 5800, ["Start_of_course_week"] = 6000, ["Start_tab"] = 6700, ["Startflatlist"] = 162000, ["Startplainlist"] = 2100, ["Static_IP"] = 5000, ["Static_row_numbers"] = 2800, ["Static_row_numbers/styles.css"] = 2800, ["Station"] = 22000, ["Station_link"] = 19000, ["Stdinchicite"] = 10000, ["Steady"] = 19000, ["Sticky_header"] = 9300, ["Sticky_header/styles.css"] = 26000, ["Stl"] = 17000, ["Stn"] = 11000, ["Stn_art_lnk"] = 2200, ["Stnlnk"] = 35000, ["Stop"] = 2000, ["Store_norske_leksikon"] = 2400, ["Storm_colour"] = 5700, ["Storm_name"] = 2400, ["Storm_path"] = 2200, ["Stortingetbio"] = 2100, ["StoryTeleplay"] = 3400, ["Str_count"] = 165000, ["Str_endswith"] = 235000, ["Str_find"] = 282000, ["Str_index"] = 15000, ["Str_left"] = 347000, ["Str_len"] = 166000, ["Str_letter"] = 184000, ["Str_letter/trim"] = 21000, ["Str_number"] = 7200, ["Str_number/trim"] = 215000, ["Str_rep"] = 296000, ["Str_right"] = 7100, ["Str_startswith"] = 2800, ["Str_trim"] = 4200, ["Str_≠_len"] = 48000, ["Str_≤_len"] = 2800, ["Str_≥_len"] = 103000, ["Strfind_short"] = 5300, ["Strike"] = 2300, ["Strikethrough"] = 20000, ["String_split"] = 5300, ["Strip_tags"] = 41000, ["Strong"] = 210000, ["Structurae"] = 2100, ["Stub-Class"] = 18000, ["Stub_Category"] = 14000, ["Stub_category"] = 20000, ["Stub_documentation"] = 42000, ["Student_editor"] = 27000, ["Student_sandbox"] = 4500, ["Student_table_row"] = 7000, ["Students_table"] = 7000, ["Su"] = 4800, ["Su-census1989"] = 4600, ["Sub"] = 4500, ["Subinfobox_bodystyle"] = 74000, ["Subject_bar"] = 20000, ["Suboff"] = 7400, ["Subon"] = 7600, ["Subpage_other"] = 403000, ["Subscription_required"] = 35000, ["Subsidebar_bodystyle"] = 5600, ["Subst_only"] = 5500, ["Substituted_comment"] = 19000, ["Succession_box"] = 119000, ["Succession_box/check"] = 119000, ["Succession_links"] = 217000, ["Summer_Olympics_by_year_category_navigation"] = 2500, ["Summer_Olympics_by_year_category_navigation/core"] = 2500, ["Sunday"] = 2800, ["Sup"] = 95000, ["Suppress_categories"] = 6500, ["Surname"] = 80000, ["Swiss_metadata_Wikidata"] = 2900, ["Swiss_populations"] = 2400, ["Swiss_populations_NC"] = 3000, ["Swiss_populations_YM"] = 2300, ["Swiss_populations_ref"] = 2400, ["Switcher"] = 8300, ["Sz"] = 2600, ["Module:SDcat"] = 6770000, ["Module:SPI_archive_notice"] = 38000, ["Module:SST"] = 13000, ["Module:SST/hosts"] = 13000, ["Module:SST/registry"] = 271000, ["Module:SST/shards/sets/COLLEDGE_SHIPS_RN"] = 3000, ["Module:SST/shards/sets/TALBERT_BARRINGTON_ATLAS"] = 2100, ["Module:Science_redirect"] = 321000, ["Module:Science_redirect/conf"] = 321000, ["Module:Section_link"] = 165000, ["Module:Section_sizes"] = 5800, ["Module:See_also_if_exists"] = 94000, ["Module:Self"] = 45000, ["Module:Self/license_migration_data.json"] = 23000, ["Module:Self/styles.css"] = 45000, ["Module:Separated_entries"] = 2710000, ["Module:Series_overview"] = 9800, ["Module:Settlement_Wikidata"] = 52000, ["Module:Settlement_short_description"] = 730000, ["Module:Shortcut"] = 29000, ["Module:Shortcut/config"] = 29000, ["Module:Shortcut/styles.css"] = 29000, ["Module:Side_box"] = 1280000, ["Module:Side_box/styles.css"] = 1280000, ["Module:Sidebar"] = 431000, ["Module:Sidebar/configuration"] = 431000, ["Module:Sidebar/styles.css"] = 437000, ["Module:Sidebar_games_events"] = 42000, ["Module:Sidebar_games_events/styles.css"] = 42000, ["Module:Singles"] = 49000, ["Module:Sister_project_links"] = 21000, ["Module:Sister_project_links/bar/styles.css"] = 7100, ["Module:Sister_project_links/config"] = 21000, ["Module:Sister_project_links/styles.css"] = 14000, ["Module:Sister_project_logo"] = 1350000, ["Module:Sister_project_logo/data"] = 1350000, ["Module:Slovak_municipality"] = 3000, ["Module:Sock_list"] = 11000, ["Module:Sort"] = 152000, ["Module:Sort_title"] = 40000, ["Module:Sortkey"] = 105000, ["Module:Split_article"] = 4200, ["Module:Spoken_Wikipedia"] = 2200, ["Module:Spoken_Wikipedia/configuration"] = 2200, ["Module:Spoken_Wikipedia/styles.css"] = 2200, ["Module:Sports_career"] = 21000, ["Module:Sports_color"] = 75000, ["Module:Sports_color/baseball"] = 36000, ["Module:Sports_color/basketball"] = 19000, ["Module:Sports_color/ice_hockey"] = 3400, ["Module:Sports_rbr_table"] = 15000, ["Module:Sports_rbr_table/styles.css"] = 15000, ["Module:Sports_reference"] = 5200, ["Module:Sports_results"] = 19000, ["Module:Sports_results/styles.css"] = 11000, ["Module:Sports_table"] = 73000, ["Module:Sports_table/Volleyball"] = 2400, ["Module:Sports_table/WDL"] = 63000, ["Module:Sports_table/WDL_OT"] = 4000, ["Module:Sports_table/WL"] = 5400, ["Module:Sports_table/WL_OT"] = 3100, ["Module:Sports_table/argcheck"] = 73000, ["Module:Sports_table/styles.css"] = 73000, ["Module:Sports_table/sub"] = 73000, ["Module:Sports_table/totalscheck"] = 52000, ["Module:Stock_tickers/NYSE"] = 2000, ["Module:Storm_categories"] = 5800, ["Module:Storm_categories/categories"] = 5900, ["Module:Storm_categories/colors"] = 5900, ["Module:Storm_categories/icons"] = 5900, ["Module:String"] = 14300000, ["Module:String2"] = 2080000, ["Module:Su"] = 14000, ["Module:Subject_bar"] = 20000, ["Module:Suppress_categories"] = 6500, ["Module:Switcher"] = 8300, } pq5bt0y5qs3u7kg4ncg0zb6uxaxbew8 116972 116971 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Transclusion_count/data/S]] 116971 Scribunto text/plain return { ["S"] = 4200, ["S-aca"] = 6700, ["S-ach"] = 17000, ["S-aft"] = 230000, ["S-aft/check"] = 230000, ["S-aft/filter"] = 230000, ["S-bef"] = 235000, ["S-bef/check"] = 235000, ["S-bef/filter"] = 235000, ["S-break"] = 6500, ["S-bus"] = 2000, ["S-civ"] = 2900, ["S-dip"] = 6000, ["S-end"] = 261000, ["S-gov"] = 8600, ["S-hon"] = 4000, ["S-hou"] = 9800, ["S-inc"] = 13000, ["S-legal"] = 9900, ["S-line_label"] = 2000, ["S-mil"] = 13000, ["S-new"] = 17000, ["S-non"] = 11000, ["S-npo"] = 4200, ["S-off"] = 43000, ["S-par"] = 52000, ["S-par/en"] = 3300, ["S-par/gb"] = 3300, ["S-par/uk"] = 12000, ["S-par/us-hs"] = 12000, ["S-par/us-sen"] = 2100, ["S-ppo"] = 15000, ["S-prec"] = 3200, ["S-reg"] = 22000, ["S-rel"] = 19000, ["S-roy"] = 2800, ["S-sports"] = 12000, ["S-start"] = 253000, ["S-ttl"] = 242000, ["S-ttl/check"] = 242000, ["S-vac"] = 7800, ["SAU"] = 2100, ["SCO"] = 3800, ["SDcat"] = 6770000, ["SECOND"] = 2300, ["SGP"] = 2900, ["SIA"] = 2700, ["SLL"] = 2000, ["SLO"] = 4800, ["SMS"] = 6800, ["SMU"] = 2400, ["SPI_archive_notice"] = 84000, ["SPIarchive_notice"] = 82000, ["SPIcat"] = 3800, ["SPIclose"] = 3300, ["SPIpriorcases"] = 77000, ["SR/Olympics_profile"] = 2200, ["SRB"] = 4300, ["SS"] = 22000, ["SSPa"] = 2600, ["STN"] = 11000, ["SUBJECTSPACE_formatted"] = 45000, ["SUI"] = 9500, ["SVG"] = 2700, ["SVG-Logo"] = 26000, ["SVG-Res"] = 24000, ["SVG-logo"] = 14000, ["SVK"] = 8700, ["SVN"] = 5800, ["SWE"] = 13000, ["Salts_by_element"] = 2200, ["Sandbox_other"] = 465000, ["Saturday"] = 2800, ["Saved_book"] = 52000, ["Sc"] = 2900, ["Scholia"] = 3700, ["School_block"] = 13000, ["School_disambiguation"] = 3400, ["Schoolblock"] = 6900, ["Schooldis"] = 2700, ["Schoolip"] = 12000, ["Scientist_icon"] = 16000, ["Scientist_icon2"] = 16000, ["Sclass"] = 34000, ["Sclass2"] = 11000, ["Screen_reader-only"] = 106000, ["Screen_reader-only/styles.css"] = 146000, ["Script"] = 7500, ["Script/Arabic"] = 4000, ["Script/Hebrew"] = 4900, ["Script/Nastaliq"] = 15000, ["Script/doc/id-unk"] = 3200, ["Script/doc/id-unk/core"] = 3200, ["Script/doc/id-unk/is-iso-alpha4"] = 3200, ["Script/doc/id-unk/name-to-alpha4"] = 3200, ["Script/styles.css"] = 3300, ["Script/styles_arabic.css"] = 4000, ["Script/styles_hebrew.css"] = 4900, ["Sdash"] = 3900, ["Search_box"] = 73000, ["Search_link"] = 25000, ["Section_link"] = 165000, ["Section_sizes"] = 4200, ["See"] = 8900, ["See_also"] = 216000, ["Seealso"] = 7700, ["Seiner_Majestät_Schiff"] = 6800, ["Seiner_Majestät_Unterseeboot"] = 2400, ["Select_skin"] = 5500, ["Selected"] = 2000, ["Selected_article"] = 2500, ["Selected_picture"] = 2400, ["Self"] = 45000, ["Self-published_inline"] = 4700, ["Self-published_source"] = 6100, ["Self-reference"] = 2200, ["Self-reference_tool"] = 7800, ["Sent_off"] = 17000, ["Sentoff"] = 6100, ["Sequence"] = 4100, ["Series_overview"] = 9800, ["Serif"] = 4900, ["Set_category"] = 38000, ["Set_index_article"] = 7700, ["Sets_taxobox_colour"] = 3700, ["Sfn"] = 207000, ["SfnRef"] = 163000, ["Sfn_whitelist"] = 2500, ["Sfnm"] = 5800, ["Sfnp"] = 23000, ["Sfnref"] = 18000, ["Sfrac"] = 5100, ["Sfrac/styles.css"] = 5200, ["SharedIPEDU"] = 3300, ["Shared_IP"] = 10000, ["Shared_IP_corp"] = 4100, ["Shared_IP_edu"] = 186000, ["Shared_IP_gov"] = 2300, ["Sharedip"] = 3000, ["Sharedipedu"] = 3800, ["Sherdog"] = 2700, ["Ship"] = 42000, ["Ship_index"] = 7600, ["Shipboxflag"] = 21000, ["Shipboxflag/core"] = 21000, ["Shipwrecks_navbox_footer"] = 11000, ["Shipwrecks_navbox_footer/link"] = 11000, ["Short_description"] = 6910000, ["Short_description/lowercasecheck"] = 6910000, ["Short_pages_monitor"] = 15000, ["Short_pages_monitor/maximum_length"] = 15000, ["Shortcut"] = 22000, ["Should_be_SVG"] = 8200, ["Shy"] = 2200, ["Sic"] = 38000, ["Side_box"] = 1250000, ["Sidebar"] = 317000, ["Sidebar_games_events"] = 42000, ["Sidebar_person"] = 4900, ["Sidebar_person/styles.css"] = 6300, ["Sidebar_with_collapsible_lists"] = 83000, ["Sigfig"] = 4100, ["Significant_figures"] = 5600, ["Significant_figures/rnd"] = 5300, ["Signpost-subscription"] = 2100, ["Signpost-subscription/styles.css"] = 2100, ["Signpost/item"] = 49000, ["Signpost/item/core"] = 49000, ["Signpost/snippet-nopic"] = 3400, ["Signpost/snippet/styles.css"] = 3700, ["Sildb_prim"] = 2200, ["Silver02"] = 18000, ["Silver2"] = 58000, ["Silver_medal"] = 6600, ["Similar_names"] = 3400, ["Single+double"] = 11000, ["Single+space"] = 17000, ["Single-innings_cricket_match"] = 4000, ["Single_chart"] = 43000, ["Single_namespace"] = 330000, ["Single_source"] = 3000, ["Singlechart"] = 12000, ["Singles"] = 49000, ["Sister-inline"] = 222000, ["Sister-inline/styles.css"] = 222000, ["Sister_project"] = 1120000, ["Sister_project/styles.css"] = 1120000, ["Sister_project_links"] = 14000, ["Skip_to_talk"] = 12000, ["Skip_to_talk/styles.css"] = 12000, ["Sky"] = 3300, ["Sky/styles.css"] = 3300, ["Slink"] = 68000, ["Slovak_municipality"] = 3000, ["Slovak_municipality/geo"] = 2800, ["Small"] = 649000, ["Small_Solar_System_bodies"] = 3600, ["Smallcaps"] = 22000, ["Smallcaps/styles.css"] = 22000, ["Smalldiv"] = 42000, ["Smaller"] = 79000, ["Smiley"] = 53000, ["Snd"] = 608000, ["Snds"] = 6500, ["Soccer_icon"] = 124000, ["Soccer_icon2"] = 124000, ["Soccer_icon4"] = 3400, ["Soccerbase"] = 13000, ["Soccerbase_season"] = 8000, ["Soccerway"] = 83000, ["Sock"] = 54000, ["Sock_list"] = 11000, ["Sockcat"] = 2000, ["Sockmaster"] = 10000, ["Sockpuppet"] = 282000, ["Sockpuppet/altmaster"] = 3600, ["Sockpuppet/categorise"] = 282000, ["SockpuppetCheckuser"] = 5500, ["Sockpuppet_category"] = 51000, ["Sockpuppet_category/confirmed"] = 27000, ["Sockpuppet_category/suspected"] = 24000, ["Sockpuppetcheckuser"] = 3600, ["Sockpuppeteer"] = 29000, ["Soft_hyphen"] = 2300, ["Soft_redirect"] = 6500, ["Soft_redirect_protection"] = 10000, ["Softredirect"] = 3300, ["Solar_luminosity"] = 5100, ["Solar_mass"] = 6400, ["Solar_radius"] = 5200, ["Soldier_icon"] = 3900, ["Soldier_icon2"] = 3900, ["Songs_category"] = 9600, ["Songs_category/core"] = 9600, ["Sort"] = 119000, ["Sort_under"] = 2100, ["Sort_under/styles.css"] = 2100, ["Sortname"] = 63000, ["Source-attribution"] = 9000, ["Source_assess"] = 2700, ["Source_assess_table"] = 2700, ["Source_attribution"] = 39000, ["Source_check"] = 928000, ["Sourcecheck"] = 928000, ["Sources"] = 3600, ["Sources_exist"] = 4100, ["South_America_topic"] = 2700, ["Sp"] = 194000, ["Space"] = 131000, ["Space+double"] = 7200, ["Space+single"] = 15000, ["Spaced_en_dash"] = 642000, ["Spaced_en_dash_space"] = 6600, ["Spaced_ndash"] = 22000, ["Spaces"] = 732000, ["Spain_metadata_Wikidata"] = 7400, ["Spamlink"] = 14000, ["Species_Latin_name_abbreviation_disambiguation"] = 2400, ["Species_list"] = 25000, ["Speciesbox"] = 392000, ["Speciesbox/checkgenus"] = 390000, ["Speciesbox/getGenus"] = 392000, ["Speciesbox/getSpecies"] = 392000, ["Speciesbox/name"] = 392000, ["Speciesbox/parameterCheck"] = 392000, ["Speciesbox/trim"] = 392000, ["Specieslist"] = 9200, ["Split_article"] = 4200, ["Spnd"] = 4800, ["Spoken_Wikipedia"] = 2200, ["Sport_icon"] = 16000, ["Sport_icon2"] = 16000, ["SportsYearCatUSstate"] = 6600, ["Sports_club_or_team_people_category_header"] = 14000, ["Sports_club_or_team_people_category_header/category1"] = 14000, ["Sports_links"] = 80000, ["Sports_reference"] = 5200, ["Squad_maintenance"] = 3800, ["Sronly"] = 49000, ["Srt"] = 7200, ["Stack"] = 30000, ["Stack/styles.css"] = 41000, ["Stack_begin"] = 11000, ["Stack_end"] = 11000, ["StaleIP"] = 3600, ["StandardEbooks"] = 2400, ["Standings_table_end"] = 64000, ["Standings_table_entry"] = 25000, ["Standings_table_entry/record"] = 64000, ["Standings_table_start"] = 64000, ["Standings_table_start/colheader"] = 64000, ["Standings_table_start/colspan"] = 64000, ["Standings_table_start/styles.css"] = 64000, ["Starbox_astrometry"] = 5700, ["Starbox_begin"] = 5800, ["Starbox_catalog"] = 5700, ["Starbox_character"] = 5700, ["Starbox_detail"] = 5600, ["Starbox_end"] = 5800, ["Starbox_image"] = 4000, ["Starbox_observe"] = 5800, ["Starbox_reference"] = 5700, ["Start-Class"] = 18000, ["Start-date"] = 2300, ["Start_and_end_dates"] = 3700, ["Start_box"] = 5600, ["Start_date"] = 545000, ["Start_date_and_age"] = 186000, ["Start_date_and_years_ago"] = 4100, ["Start_date_text"] = 3900, ["Start_of_course_timeline"] = 5800, ["Start_of_course_week"] = 6000, ["Start_tab"] = 6700, ["Startflatlist"] = 162000, ["Startplainlist"] = 2100, ["Static_IP"] = 5000, ["Static_row_numbers"] = 2800, ["Static_row_numbers/styles.css"] = 2800, ["Station"] = 22000, ["Station_link"] = 19000, ["Stdinchicite"] = 10000, ["Steady"] = 19000, ["Sticky_header"] = 9300, ["Sticky_header/styles.css"] = 26000, ["Stl"] = 17000, ["Stn"] = 11000, ["Stn_art_lnk"] = 2200, ["Stnlnk"] = 35000, ["Stop"] = 2000, ["Store_norske_leksikon"] = 2400, ["Storm_colour"] = 5700, ["Storm_name"] = 2400, ["Storm_path"] = 2200, ["Stortingetbio"] = 2100, ["StoryTeleplay"] = 3400, ["Str_count"] = 165000, ["Str_endswith"] = 235000, ["Str_find"] = 282000, ["Str_index"] = 15000, ["Str_left"] = 347000, ["Str_len"] = 166000, ["Str_letter"] = 184000, ["Str_letter/trim"] = 21000, ["Str_number"] = 7200, ["Str_number/trim"] = 215000, ["Str_rep"] = 296000, ["Str_right"] = 7100, ["Str_startswith"] = 2800, ["Str_trim"] = 4200, ["Str_≠_len"] = 48000, ["Str_≤_len"] = 2800, ["Str_≥_len"] = 103000, ["Strfind_short"] = 5300, ["Strike"] = 2300, ["Strikethrough"] = 20000, ["String_split"] = 5300, ["Strip_tags"] = 41000, ["Strong"] = 210000, ["Structurae"] = 2100, ["Stub-Class"] = 18000, ["Stub_Category"] = 14000, ["Stub_category"] = 20000, ["Stub_documentation"] = 42000, ["Student_editor"] = 27000, ["Student_sandbox"] = 4500, ["Student_table_row"] = 7000, ["Students_table"] = 7000, ["Su"] = 4800, ["Su-census1989"] = 4600, ["Sub"] = 4500, ["Subinfobox_bodystyle"] = 74000, ["Subject_bar"] = 20000, ["Suboff"] = 7400, ["Subon"] = 7600, ["Subpage_other"] = 403000, ["Subscription_required"] = 35000, ["Subsidebar_bodystyle"] = 5600, ["Subst_only"] = 5500, ["Substituted_comment"] = 19000, ["Succession_box"] = 119000, ["Succession_box/check"] = 119000, ["Succession_links"] = 217000, ["Summer_Olympics_by_year_category_navigation"] = 2500, ["Summer_Olympics_by_year_category_navigation/core"] = 2500, ["Sunday"] = 2800, ["Sup"] = 95000, ["Suppress_categories"] = 6500, ["Surname"] = 80000, ["Swiss_metadata_Wikidata"] = 2900, ["Swiss_populations"] = 2400, ["Swiss_populations_NC"] = 3000, ["Swiss_populations_YM"] = 2300, ["Swiss_populations_ref"] = 2400, ["Switcher"] = 8300, ["Sz"] = 2600, ["Module:SDcat"] = 6770000, ["Module:SPI_archive_notice"] = 38000, ["Module:SST"] = 13000, ["Module:SST/hosts"] = 13000, ["Module:SST/registry"] = 271000, ["Module:SST/shards/sets/COLLEDGE_SHIPS_RN"] = 3000, ["Module:SST/shards/sets/TALBERT_BARRINGTON_ATLAS"] = 2100, ["Module:Science_redirect"] = 321000, ["Module:Science_redirect/conf"] = 321000, ["Module:Section_link"] = 165000, ["Module:Section_sizes"] = 5800, ["Module:See_also_if_exists"] = 94000, ["Module:Self"] = 45000, ["Module:Self/license_migration_data.json"] = 23000, ["Module:Self/styles.css"] = 45000, ["Module:Separated_entries"] = 2710000, ["Module:Series_overview"] = 9800, ["Module:Settlement_Wikidata"] = 52000, ["Module:Settlement_short_description"] = 730000, ["Module:Shortcut"] = 29000, ["Module:Shortcut/config"] = 29000, ["Module:Shortcut/styles.css"] = 29000, ["Module:Side_box"] = 1280000, ["Module:Side_box/styles.css"] = 1280000, ["Module:Sidebar"] = 431000, ["Module:Sidebar/configuration"] = 431000, ["Module:Sidebar/styles.css"] = 437000, ["Module:Sidebar_games_events"] = 42000, ["Module:Sidebar_games_events/styles.css"] = 42000, ["Module:Singles"] = 49000, ["Module:Sister_project_links"] = 21000, ["Module:Sister_project_links/bar/styles.css"] = 7100, ["Module:Sister_project_links/config"] = 21000, ["Module:Sister_project_links/styles.css"] = 14000, ["Module:Sister_project_logo"] = 1350000, ["Module:Sister_project_logo/data"] = 1350000, ["Module:Slovak_municipality"] = 3000, ["Module:Sock_list"] = 11000, ["Module:Sort"] = 152000, ["Module:Sort_title"] = 40000, ["Module:Sortkey"] = 105000, ["Module:Split_article"] = 4200, ["Module:Spoken_Wikipedia"] = 2200, ["Module:Spoken_Wikipedia/configuration"] = 2200, ["Module:Spoken_Wikipedia/styles.css"] = 2200, ["Module:Sports_career"] = 21000, ["Module:Sports_color"] = 75000, ["Module:Sports_color/baseball"] = 36000, ["Module:Sports_color/basketball"] = 19000, ["Module:Sports_color/ice_hockey"] = 3400, ["Module:Sports_rbr_table"] = 15000, ["Module:Sports_rbr_table/styles.css"] = 15000, ["Module:Sports_reference"] = 5200, ["Module:Sports_results"] = 19000, ["Module:Sports_results/styles.css"] = 11000, ["Module:Sports_table"] = 73000, ["Module:Sports_table/Volleyball"] = 2400, ["Module:Sports_table/WDL"] = 63000, ["Module:Sports_table/WDL_OT"] = 4000, ["Module:Sports_table/WL"] = 5400, ["Module:Sports_table/WL_OT"] = 3100, ["Module:Sports_table/argcheck"] = 73000, ["Module:Sports_table/styles.css"] = 73000, ["Module:Sports_table/sub"] = 73000, ["Module:Sports_table/totalscheck"] = 52000, ["Module:Stock_tickers/NYSE"] = 2000, ["Module:Storm_categories"] = 5800, ["Module:Storm_categories/categories"] = 5900, ["Module:Storm_categories/colors"] = 5900, ["Module:Storm_categories/icons"] = 5900, ["Module:String"] = 14300000, ["Module:String2"] = 2080000, ["Module:Su"] = 14000, ["Module:Subject_bar"] = 20000, ["Module:Suppress_categories"] = 6500, ["Module:Switcher"] = 8300, } pq5bt0y5qs3u7kg4ncg0zb6uxaxbew8 Template:Category other 10 15659 117014 38218 2025-08-04T22:30:25Z en>Theknightwho 0 Make substable. 117014 wikitext text/x-wiki {{safesubst:<noinclude/>#switch: <noinclude><!-- If no or empty "demospace" parameter then detect namespace --></noinclude> {{safesubst:<noinclude/>#if:{{{demospace|}}} | {{safesubst:<noinclude/>lc: {{{demospace}}} }} <noinclude><!-- Use lower case "demospace" --></noinclude> | {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>ns:Category}} | category | other }} }} | category = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude><!-- End switch --> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> t67v4qbh02ab0u9w0tb11xsliusi23k 117015 117014 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Category_other]] 117014 wikitext text/x-wiki {{safesubst:<noinclude/>#switch: <noinclude><!-- If no or empty "demospace" parameter then detect namespace --></noinclude> {{safesubst:<noinclude/>#if:{{{demospace|}}} | {{safesubst:<noinclude/>lc: {{{demospace}}} }} <noinclude><!-- Use lower case "demospace" --></noinclude> | {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>ns:Category}} | category | other }} }} | category = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude><!-- End switch --> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> t67v4qbh02ab0u9w0tb11xsliusi23k Module:Message box/cmbox.css 828 15662 117026 38224 2025-10-17T00:55:14Z en>Izno 0 bump paddings per [[Module talk:Message box#cmbox migration]] 117026 sanitized-css text/css /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; overflow-x: hidden; /* necessary when embedded in other templates like [[:Category:Pending_AfC_submissions]] */ color: var(--color-base, #202122); } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { padding: 0.35em 1em; flex: 1 1 100%; } .cmbox .mbox-image, .cmbox .mbox-imageright { padding: 4px 2px; text-align: center; flex: none; } /* keep synced with each other type of message box as this isn't qualified */ .mbox-invalid-type { text-align: center; } @media (min-width: 480px) { .cmbox { display: flex; align-items: center; } .cmbox .mbox-image { /* @noflip */ padding-left: 1em; } .cmbox .mbox-imageright { /* @noflip */ padding-right: 1em; } } @media (min-width: 640px) { .cmbox { margin: 3px 10%; } } /* flipped lightness in hsl space except the main cmbox is the main page blue */ @media screen { html.skin-theme-clientpref-night .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-night .cmbox-speedy, html.skin-theme-clientpref-night .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-night .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-night .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-night .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-night .cmbox-protection { background-color: #212112; /* Gray-gold */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-os .cmbox-speedy, html.skin-theme-clientpref-os .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-os .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-os .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-os .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-os .cmbox-protection { background-color: #212112; /* Gray-gold */ } } oqldcp715v0ajpe9d9mypufc7binn1n 117027 117026 2026-07-16T11:37:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Message_box/cmbox.css]] 117026 sanitized-css text/css /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; overflow-x: hidden; /* necessary when embedded in other templates like [[:Category:Pending_AfC_submissions]] */ color: var(--color-base, #202122); } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { padding: 0.35em 1em; flex: 1 1 100%; } .cmbox .mbox-image, .cmbox .mbox-imageright { padding: 4px 2px; text-align: center; flex: none; } /* keep synced with each other type of message box as this isn't qualified */ .mbox-invalid-type { text-align: center; } @media (min-width: 480px) { .cmbox { display: flex; align-items: center; } .cmbox .mbox-image { /* @noflip */ padding-left: 1em; } .cmbox .mbox-imageright { /* @noflip */ padding-right: 1em; } } @media (min-width: 640px) { .cmbox { margin: 3px 10%; } } /* flipped lightness in hsl space except the main cmbox is the main page blue */ @media screen { html.skin-theme-clientpref-night .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-night .cmbox-speedy, html.skin-theme-clientpref-night .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-night .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-night .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-night .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-night .cmbox-protection { background-color: #212112; /* Gray-gold */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-os .cmbox-speedy, html.skin-theme-clientpref-os .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-os .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-os .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-os .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-os .cmbox-protection { background-color: #212112; /* Gray-gold */ } } oqldcp715v0ajpe9d9mypufc7binn1n Template:Br separated entries 10 15683 117072 38694 2025-10-30T02:03:42Z en>Zackmann08 0 Adding dataPlural flag so that [[Module:Detect singular]] will function properly. Should have no VISIBLE effect 117072 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br|dataPlural=1}}<noinclude> {{documentation}} </noinclude> 8xv8u5m4k3e3a02h7dtrmmoeszevcr0 117073 117072 2026-07-16T11:39:36Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Br_separated_entries]] 117072 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br|dataPlural=1}}<noinclude> {{documentation}} </noinclude> 8xv8u5m4k3e3a02h7dtrmmoeszevcr0 Template:Shortcut 10 15684 117182 81360 2025-02-20T14:12:16Z en>RMCD bot 0 Removing notice of move discussion 117182 wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 5idoxkkbt62sniipoe18t8iorl88qpo 117183 117182 2026-07-16T11:40:26Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Shortcut]] 117182 wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 5idoxkkbt62sniipoe18t8iorl88qpo Module:Documentation/styles.css 828 15686 116716 114499 2026-06-19T03:19:17Z en>Izno 0 add margins 116716 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: #ecfcf4; color:inherit; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid var( --border-color-base, #a2a9b1 ); margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } body.skin-minerva .documentation-startbox .mw-editsection-like a, body.skin-timeless .documentation-startbox .mw-editsection-like a { display: inline-block; margin-left: 0.3em; margin-right: 0.3em; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: #0b1e1c; } } @media screen and ( prefers-color-scheme: dark ) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: #0b1e1c; } } ohekqp4ao232tow40gho8bknn5qdpvd 116717 116716 2026-07-15T17:38:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Documentation/styles.css]] 116716 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: #ecfcf4; color:inherit; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid var( --border-color-base, #a2a9b1 ); margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } body.skin-minerva .documentation-startbox .mw-editsection-like a, body.skin-timeless .documentation-startbox .mw-editsection-like a { display: inline-block; margin-left: 0.3em; margin-right: 0.3em; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: #0b1e1c; } } @media screen and ( prefers-color-scheme: dark ) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: #0b1e1c; } } ohekqp4ao232tow40gho8bknn5qdpvd Template:Para 10 15707 116710 38489 2026-04-20T13:31:32Z en>Paine Ellsworth 0 follow up to page move - retarget and add [[WP:RCAT|rcat template]]s 116710 wikitext text/x-wiki #REDIRECT [[Template:Parameter]] {{Rcat shell| {{R from move}} {{R from template shortcut}} }} 7s8mokgsoussxh3gkyodvsagezu2kca 116711 116710 2026-07-15T17:38:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Para]] 116710 wikitext text/x-wiki #REDIRECT [[Template:Parameter]] {{Rcat shell| {{R from move}} {{R from template shortcut}} }} 7s8mokgsoussxh3gkyodvsagezu2kca Module:Documentation/config 828 15709 116714 114465 2025-10-13T18:10:40Z en>Paine Ellsworth 0 per edit request at [[Template talk:Documentation#Update sandbox icon to match all other templates]] - update sandbox notice image 116714 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Edit In Sandbox Icon - Color.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 2z4v6f5nkabra0nulgb7sxch1cktfsn 116715 116714 2026-07-15T17:38:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Documentation/config]] 116714 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Edit In Sandbox Icon - Color.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 2z4v6f5nkabra0nulgb7sxch1cktfsn Template:Documentation subpage 10 15712 116722 72204 2025-12-20T16:57:59Z en>Pppery 0 Fix link 116722 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=icon]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{nocat|}}}{{{inhibit|}}}|<!--(don't categorize)--> |<includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> ngbz78vpmpnny1xbfvkmebdalzs512j 116723 116722 2026-07-15T17:38:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Documentation_subpage]] 116722 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=icon]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{nocat|}}}{{{inhibit|}}}|<!--(don't categorize)--> |<includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> ngbz78vpmpnny1xbfvkmebdalzs512j Module:Message box 828 15730 116741 113725 2025-10-19T18:19:52Z en>Izno 0 below in div mbox 116741 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Set the below row. self.below = cfg.below and args.below -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end if self.below then self:addClass('mbox-with-below') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Set image classes. self.imageRightClass = args.imagerightclass or args.imageclass self.imageLeftClass = args.imageleftclass or args.imageclass -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:exportDiv() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box. local mbox = root:tag('div') mbox:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do mbox:addClass(class or nil) end mbox :cssText(self.style or nil) if self.attrs then mbox:attr(self.attrs) end local flex_container if self.below then -- we need to wrap the flex components (`image(right)` and `text`) in their -- own container div to support the `below` parameter flex_container = mw.html.create('div') flex_container:addClass('mbox-flex') else -- the mbox itself is the parent, so we need no HTML flex_container flex_container = mw.html.create() end -- Add the left-hand image. if self.imageLeft then local imageLeftCell = flex_container:tag('div'):addClass('mbox-image') imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) end -- Add the text. local textCell = flex_container:tag('div'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = flex_container:tag('div'):addClass('mbox-imageright') imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end mbox:node(flex_container) -- Add the below row. if self.below then mbox:tag('div') :addClass('mbox-text mbox-below') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() -- DIV MIGRATION CONDITIONAL if box.cfg.div_structure then return box:exportDiv() end -- END DIV MIGRATION CONDITIONAL return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) ocboyo877qnpqum2b9fyiquh72vukqa 116742 116741 2026-07-15T18:13:31Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Message_box]] 116741 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Set the below row. self.below = cfg.below and args.below -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end if self.below then self:addClass('mbox-with-below') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Set image classes. self.imageRightClass = args.imagerightclass or args.imageclass self.imageLeftClass = args.imageleftclass or args.imageclass -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:exportDiv() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box. local mbox = root:tag('div') mbox:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do mbox:addClass(class or nil) end mbox :cssText(self.style or nil) if self.attrs then mbox:attr(self.attrs) end local flex_container if self.below then -- we need to wrap the flex components (`image(right)` and `text`) in their -- own container div to support the `below` parameter flex_container = mw.html.create('div') flex_container:addClass('mbox-flex') else -- the mbox itself is the parent, so we need no HTML flex_container flex_container = mw.html.create() end -- Add the left-hand image. if self.imageLeft then local imageLeftCell = flex_container:tag('div'):addClass('mbox-image') imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) end -- Add the text. local textCell = flex_container:tag('div'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = flex_container:tag('div'):addClass('mbox-imageright') imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end mbox:node(flex_container) -- Add the below row. if self.below then mbox:tag('div') :addClass('mbox-text mbox-below') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() -- DIV MIGRATION CONDITIONAL if box.cfg.div_structure then return box:exportDiv() end -- END DIV MIGRATION CONDITIONAL return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) ocboyo877qnpqum2b9fyiquh72vukqa Module:Message box/configuration 828 15734 116743 113757 2025-10-19T18:19:49Z en>Izno 0 div imbox 116743 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css', div_structure = true, }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css', div_structure = true, }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css', div_structure = true, }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } p36hrbxjy99m7clj64lhlint2en3bo0 116744 116743 2026-07-15T18:13:31Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Message_box/configuration]] 116743 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css', div_structure = true, }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css', div_structure = true, }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css', div_structure = true, }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } p36hrbxjy99m7clj64lhlint2en3bo0 Template:Module rating 10 15744 117270 111058 2025-09-10T15:49:37Z en>Waddie96 0 Modifying [[WP:RCAT|redirect categories]] using [[User:Wugapodes/Capricorn|Capricorn ♑]] 117270 wikitext text/x-wiki #REDIRECT [[Template:Template rating]] {{Redirect category shell| {{R from merge}} {{R mentioned in hatnote}} }} 1foept7zoaam5vjrfz3pyntp5xbpjv4 117271 117270 2026-07-16T11:45:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Module_rating]] 117270 wikitext text/x-wiki #REDIRECT [[Template:Template rating]] {{Redirect category shell| {{R from merge}} {{R mentioned in hatnote}} }} 1foept7zoaam5vjrfz3pyntp5xbpjv4 Template:Module other 10 15746 116908 68456 2026-04-18T03:45:36Z en>Pppery 0 Changed protection settings for "[[Template:Module other]]" ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 116908 wikitext text/x-wiki {{safesubst:<noinclude/>#switch: <noinclude><!-- If no or empty "demospace" parameter then detect namespace --></noinclude> {{safesubst:<noinclude/>#if:{{{demospace|}}} | {{safesubst:<noinclude/>lc: {{{demospace}}} }} <noinclude><!-- Use lower case "demospace" --></noinclude> | {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>ns:Module}} | module | other }} }} | module = {{{module|{{{1|}}}}}} | other | #default = {{{other|{{{2|}}}}}} }}<noinclude><!--End switch--> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6mo4qg9nwfuq6vj2r8irxnjnd71296k 116909 116908 2026-07-16T10:58:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Module_other]] 116908 wikitext text/x-wiki {{safesubst:<noinclude/>#switch: <noinclude><!-- If no or empty "demospace" parameter then detect namespace --></noinclude> {{safesubst:<noinclude/>#if:{{{demospace|}}} | {{safesubst:<noinclude/>lc: {{{demospace}}} }} <noinclude><!-- Use lower case "demospace" --></noinclude> | {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>ns:Module}} | module | other }} }} | module = {{{module|{{{1|}}}}}} | other | #default = {{{other|{{{2|}}}}}} }}<noinclude><!--End switch--> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6mo4qg9nwfuq6vj2r8irxnjnd71296k Template:Icon 10 15787 116997 40333 2024-03-09T15:06:32Z en>Plastikspork 0 Closing TfD as merge 38428 wikitext text/x-wiki {{#invoke:Icon|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> m4ab9noabl8v4ki5cx6t5ksjcjh5u8o 116998 116997 2026-07-16T11:32:30Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Icon]] 38428 wikitext text/x-wiki {{#invoke:Icon|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> m4ab9noabl8v4ki5cx6t5ksjcjh5u8o Template:Slink 10 15800 116840 53602 2026-04-18T03:12:32Z en>Pppery 0 Changed protection settings for "[[Template:Slink]]" ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 53601 wikitext text/x-wiki #REDIRECT [[Template:Section link]] {{Redirect category shell| {{R from template shortcut}} }} 1sxyuuncu84nr3mbw9y0qugq4sd8yaa 116841 116840 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Slink]] 53601 wikitext text/x-wiki #REDIRECT [[Template:Section link]] {{Redirect category shell| {{R from template shortcut}} }} 1sxyuuncu84nr3mbw9y0qugq4sd8yaa Template:Hidden begin 10 15813 116708 42631 2025-10-04T17:15:00Z en>Jonesey95 0 fix text color in dark mode; this generally works but may cause problems, in which case revert or try specifying a different CSS value 116708 wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};color:inherit;}} {{{style|}}}"><!-- --><div class="hidden-title skin-nightmode-reset-color" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};color:inherit;}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};color:inherit;}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> 3fk8uj9th66zvww6bd58rbapuyb6ij4 116709 116708 2026-07-15T17:38:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hidden_begin]] 116708 wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};color:inherit;}} {{{style|}}}"><!-- --><div class="hidden-title skin-nightmode-reset-color" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};color:inherit;}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};color:inherit;}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> 3fk8uj9th66zvww6bd58rbapuyb6ij4 Module:Sidebar/configuration 828 15844 116704 53988 2026-06-11T07:56:35Z en>Chaotic Enby 0 +class 116704 Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = { sidebar = 'Module:Sidebar/styles.css', hlist = 'Hlist/styles.css', plainlist = 'Plainlist/styles.css', subinfobox = 'Subinfobox bodystyle/styles.css', }, category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', subinfobox = 'subinfobox', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content', noviewer = 'noviewer' } } } drxjlbc57zd2jzh3sg979stjjqjencw 116705 116704 2026-07-15T17:38:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Sidebar/configuration]] 116704 Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = { sidebar = 'Module:Sidebar/styles.css', hlist = 'Hlist/styles.css', plainlist = 'Plainlist/styles.css', subinfobox = 'Subinfobox bodystyle/styles.css', }, category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', subinfobox = 'subinfobox', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content', noviewer = 'noviewer' } } } drxjlbc57zd2jzh3sg979stjjqjencw Template:R from shortcut 10 15906 116854 38714 2026-04-12T03:56:42Z en>MikeVitale 0 /* top */ Per edit request, and per [[MOS:EMPHASIS]] 116854 wikitext text/x-wiki <noinclude>{{Template:This is a redirect/rcat|from shortcut}} </noinclude>{{#switch:{{#invoke:RedirectData|getRedirectToNamespace}} |Template= {{Redirect template |id=R from template shortcut |name=From a template shortcut |from=a [[Wikipedia:Shortcut|shortcut]] page name '''in <em>any</em> [[WP:namespace|namespace]]''' |to=a page in [[WP:template namespace|template namespace]] |info=**Shortcuts are [[wikilink]]ed on community pages, talk pages, and edit summaries, but not in [[wp:mainspace|mainspace]] articles. [[WP:Transclusion|Transclusions]] in mainspace are common and do not need to be "[[WP:NOTBROKEN|fixed]]". |all category=Redirects from template shortcuts |printworthy=no }} |#default= {{Redirect template |id=R from shortcut |name=From a shortcut |from=a [[Wikipedia:Shortcut|shortcut]] in any namespace |to=a page in any namespace{{#if:{{{of|}}}{{{for|}}}|. The referent of this shortcut is: {{{of|{{{for}}}}}}}} |info=**Shortcuts are [[wikilink]]ed on community pages, talk pages, and edit summaries, but not in [[wp:mainspace|mainspace]] articles. |all category=Redirects from shortcuts |printworthy=no }} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> 0cz9qpewaztkasw3x2ruu88ro8m7dd5 116855 116854 2026-07-16T10:41:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_from_shortcut]] 116854 wikitext text/x-wiki <noinclude>{{Template:This is a redirect/rcat|from shortcut}} </noinclude>{{#switch:{{#invoke:RedirectData|getRedirectToNamespace}} |Template= {{Redirect template |id=R from template shortcut |name=From a template shortcut |from=a [[Wikipedia:Shortcut|shortcut]] page name '''in <em>any</em> [[WP:namespace|namespace]]''' |to=a page in [[WP:template namespace|template namespace]] |info=**Shortcuts are [[wikilink]]ed on community pages, talk pages, and edit summaries, but not in [[wp:mainspace|mainspace]] articles. [[WP:Transclusion|Transclusions]] in mainspace are common and do not need to be "[[WP:NOTBROKEN|fixed]]". |all category=Redirects from template shortcuts |printworthy=no }} |#default= {{Redirect template |id=R from shortcut |name=From a shortcut |from=a [[Wikipedia:Shortcut|shortcut]] in any namespace |to=a page in any namespace{{#if:{{{of|}}}{{{for|}}}|. The referent of this shortcut is: {{{of|{{{for}}}}}}}} |info=**Shortcuts are [[wikilink]]ed on community pages, talk pages, and edit summaries, but not in [[wp:mainspace|mainspace]] articles. |all category=Redirects from shortcuts |printworthy=no }} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> 0cz9qpewaztkasw3x2ruu88ro8m7dd5 Module:Transclusion count/data/F 828 15939 116910 108602 2026-07-12T05:10:12Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. 116910 Scribunto text/plain return { ["F1"] = 5300, ["FA-Class"] = 16000, ["FAA-airport"] = 3800, ["FACClosed"] = 6400, ["FAC_link"] = 118000, ["FAR_link"] = 118000, ["FCC-LMS-Facility"] = 5800, ["FCC_Licensing_and_Management_System_facility"] = 16000, ["FCCdata"] = 2600, ["FFU"] = 2000, ["FIDE"] = 2500, ["FIFA_player"] = 10000, ["FIG_country_code"] = 2600, ["FIN"] = 9900, ["FIPS"] = 2400, ["FJC_Bio"] = 4000, ["FL-Class"] = 13000, ["FLCClosed"] = 3700, ["FLC_link"] = 118000, ["FM-Class"] = 4300, ["FMA"] = 3400, ["FMARB"] = 8900, ["FM_station_data"] = 8500, ["FPCnom/VotingEnds"] = 12000, ["FPCresult"] = 18000, ["FRA"] = 21000, ["FRG"] = 3800, ["FTE"] = 3200, ["FULLBASEPAGENAME"] = 358000, ["FULLROOTPAGENAME"] = 3780000, ["FXL"] = 2200, ["Fa_bottom"] = 3500, ["Fa_top"] = 3500, ["Facebook"] = 14000, ["Facepalm"] = 2900, ["Facl"] = 118000, ["Fact"] = 38000, ["FadedPage"] = 2700, ["FailedGA"] = 3800, ["Failed_verification"] = 18000, ["Fake_heading"] = 2300, ["Fake_heading/styles.css"] = 2300, ["Fake_link/styles.css"] = 2000, ["Family_name_explanation"] = 98000, ["Family_name_explanation/core"] = 98000, ["Family_name_footnote"] = 2300, ["Family_name_hatnote"] = 96000, ["Farl"] = 118000, ["Fb"] = 31000, ["Fb-rt"] = 6300, ["Fb_cs_footer"] = 3300, ["Fb_gd"] = 11000, ["Fb_overview"] = 6300, ["Fb_overview2"] = 5500, ["Fb_rs"] = 11000, ["Fb_rs_footer"] = 11000, ["Fba/core"] = 9100, ["Fba/list"] = 11000, ["Fbaicon"] = 11000, ["Fbaicon/core"] = 11000, ["Fbicon"] = 3600, ["Fbu"] = 4000, ["Fbu-rt"] = 2600, ["Fbw"] = 6100, ["Fdacite"] = 15000, ["Fdate"] = 2900, ["FeaturedPicture"] = 7400, ["Featured_article"] = 7300, ["Featured_article_tools"] = 12000, ["Featured_list"] = 4900, ["Featured_picture"] = 8800, ["Featured_topic_box"] = 3700, ["Featured_topic_box/styles.css"] = 3700, ["Feedback_link"] = 4600, ["Fiction-based_redirects_to_list_entries_category_handler"] = 3300, ["Fictional_character_redirect"] = 3900, ["File-Class"] = 13000, ["File_other"] = 996000, ["Filipino_name"] = 4400, ["Film_date"] = 166000, ["Filter_category_by_topic"] = 2800, ["Find"] = 8500, ["FindYDCportal"] = 223000, ["Find_a_Grave"] = 24000, ["Find_country"] = 45000, ["Find_demonym"] = 38000, ["Find_general_sources"] = 918000, ["Find_medical_sources"] = 8300, ["Find_page_text"] = 2800000, ["Find_sources"] = 623000, ["Find_sources/proj/is_biography"] = 608000, ["Find_sources/proj/is_med"] = 623000, ["Find_sources/proj/is_video"] = 615000, ["Find_sources/top_proj"] = 623000, ["Find_sources_AFD"] = 261000, ["Find_sources_mainspace"] = 714000, ["Find_video_game_sources"] = 6900, ["Find_video_game_sources_short"] = 3100, ["Findsources"] = 42000, ["First_word"] = 680000, ["FishBase"] = 20000, ["FishBase_genus"] = 4200, ["Fix"] = 1050000, ["Fix-span"] = 64000, ["Fix/category"] = 1020000, ["Fix_comma_category"] = 597000, ["Fixed"] = 10000, ["Fl."] = 3800, ["Flag"] = 345000, ["Flag/core"] = 345000, ["FlagCGFathlete"] = 2200, ["FlagIOC"] = 10000, ["FlagIOC2"] = 4700, ["FlagIOC2athlete"] = 6800, ["FlagIOC2team"] = 2900, ["FlagIOCathlete"] = 11000, ["FlagIPC"] = 3300, ["FlagPASO"] = 2100, ["FlagPASOathlete"] = 3300, ["Flag_CGF_athlete"] = 2400, ["Flag_IOC"] = 13000, ["Flag_IOC_2"] = 18000, ["Flag_IOC_2_athlete"] = 15000, ["Flag_IOC_2_medalist"] = 5000, ["Flag_IOC_2_team"] = 4400, ["Flag_IOC_athlete"] = 13000, ["Flag_IPC"] = 4000, ["Flag_PASO"] = 3000, ["Flag_PASO_athlete"] = 3500, ["Flag_athlete"] = 39000, ["Flag_country"] = 41000, ["Flag_country/core"] = 41000, ["Flag_data"] = 12000, ["Flag_decoration"] = 95000, ["Flag_decoration/core"] = 95000, ["Flag_icon"] = 616000, ["Flag_icon/core"] = 616000, ["Flag_icon/nt"] = 9700, ["Flag_link"] = 2100, ["Flag_link/core"] = 87000, ["Flag_medalist"] = 2800, ["Flag_medalist/core"] = 2800, ["Flag_team"] = 2900, ["Flagathlete"] = 31000, ["Flagbig"] = 5100, ["Flagbig/core"] = 8900, ["Flagcountry"] = 26000, ["Flagdeco"] = 61000, ["Flagg"] = 23000, ["Flagicon"] = 460000, ["Flagicon_image"] = 51000, ["Flagmedalist"] = 2800, ["Flagright/core"] = 26000, ["Flagteam"] = 2500, ["Flagu"] = 32000, ["Flagu/core"] = 32000, ["Flat_list"] = 7700, ["Flatlist"] = 2660000, ["Flcl"] = 118000, ["FloraBase"] = 6100, ["Floruit"] = 7800, ["Fmbox"] = 25000, ["FoP-USonly"] = 5200, ["Font"] = 12000, ["Font_color"] = 53000, ["Fontcolor"] = 6900, ["Fooian_companies_established_in_the_year"] = 5500, ["Fooian_expatriate_sportspeople_in_Bar_cat"] = 11000, ["Fooian_expatriate_sportspeople_in_Bar_cat/core"] = 11000, ["Fooian_expatriate_sportspeople_in_Bar_cat/sortname"] = 11000, ["Fooian_fooers"] = 14000, ["FootballFacts.ru"] = 6000, ["Football_box"] = 29000, ["Football_box_collapsible"] = 31000, ["Football_box_collapsible/styles.css"] = 31000, ["Football_kit"] = 54000, ["Football_manager_history"] = 23000, ["Football_squad"] = 45000, ["Football_squad2_player"] = 48000, ["Football_squad_end"] = 22000, ["Football_squad_manager"] = 46000, ["Football_squad_mid"] = 19000, ["Football_squad_player"] = 22000, ["Football_squad_player/role"] = 8200, ["Football_squad_player/styles.css"] = 22000, ["Football_squad_start"] = 22000, ["Footballbox"] = 5800, ["Footballbox_collapsible"] = 9100, ["Footballstats"] = 4100, ["Foo–Bar_relations_category"] = 6200, ["Foo–Bar_relations_category/core"] = 6200, ["Foo–Bar_relations_category/countrynamesortfix"] = 6200, ["Foo–Bar_relations_category/fixcountryname"] = 6200, ["Foo–Bar_relations_category/inner_core"] = 6200, ["Foo–Bar_relations_category/mapname"] = 6200, ["For"] = 210000, ["For-multi"] = 13000, ["For_loop"] = 1170000, ["For_multi"] = 7100, ["For_nowiki"] = 9500, ["For_your_information"] = 2100, ["ForaDeJogo"] = 4100, ["Force_plural"] = 17000, ["Force_singular"] = 2800, ["Format_link"] = 13000, ["Format_linkr"] = 7400, ["Format_numeric_span"] = 3700, ["Format_price"] = 8900, ["Format_price/digits"] = 8600, ["Formatprice"] = 4000, ["Fossil_range"] = 14000, ["Fossil_range/bar"] = 25000, ["Fossilrange"] = 6700, ["Foundational_Model_of_Anatomy"] = 3400, ["Frac"] = 35000, ["Fraction"] = 41000, ["Fraction/styles.css"] = 107000, ["France_metadata_Wikidata"] = 36000, ["Free_access"] = 5300, ["Free_in_US_media"] = 23000, ["Free_media"] = 138000, ["Freedom_of_panorama_(US_only)"] = 5300, ["Frequency"] = 7700, ["Friday"] = 2800, ["Front-facing_other"] = 16000, ["Fs_end"] = 20000, ["Fs_mid"] = 18000, ["Fs_player"] = 20000, ["Fs_start"] = 20000, ["Full-time_equivalent"] = 3200, ["Full_citation_needed"] = 10000, ["Full_party_name_with_color"] = 6200, ["Fullurl"] = 7000, ["Fullurl:"] = 6800, ["Further"] = 76000, ["Further_information"] = 2500, ["Fussballdaten"] = 4200, ["Module:Fb_overview"] = 6400, ["Module:Fba"] = 18000, ["Module:Fba/list"] = 36000, ["Module:FeaturedTopicSum"] = 6900, ["Module:Fedi-share"] = 3900, ["Module:Fiction-based_redirects_to_list_entries_category_handler"] = 3300, ["Module:Fiction-based_redirects_to_list_entries_category_handler/RedirectType"] = 3300, ["Module:Fiction_redirect_category_handler"] = 5200, ["Module:File_link"] = 89000, ["Module:FindYDCportal"] = 399000, ["Module:Find_country"] = 45000, ["Module:Find_demonym"] = 38000, ["Module:Find_sources"] = 1650000, ["Module:Find_sources/config"] = 1650000, ["Module:Find_sources/links"] = 1650000, ["Module:Find_sources/templates/Find_general_sources"] = 918000, ["Module:Find_sources/templates/Find_sources_mainspace"] = 714000, ["Module:Find_sources/templates/Find_sources_medical"] = 8300, ["Module:Find_sources/templates/Find_sources_video_games"] = 6900, ["Module:Flag"] = 373000, ["Module:Flag_list"] = 11000, ["Module:Flagg"] = 455000, ["Module:Flagg/Altvar_data"] = 33000, ["Module:Football_box"] = 30000, ["Module:Football_box/styles.css"] = 30000, ["Module:Football_box_collapsible"] = 31000, ["Module:Football_event"] = 55000, ["Module:Football_manager_history"] = 24000, ["Module:Football_squad"] = 45000, ["Module:Footballer_positions"] = 218000, ["Module:Footnotes"] = 365000, ["Module:Footnotes/anchor_id_list"] = 271000, ["Module:Footnotes/anchor_id_list/data"] = 271000, ["Module:Footnotes/whitelist"] = 271000, ["Module:For"] = 211000, ["Module:For_loop"] = 1170000, ["Module:For_nowiki"] = 11000, ["Module:Format_link"] = 1510000, ["Module:Formatted_appearance"] = 6000, } djintkrh70qkf239x4e14moj0iywwcg 116911 116910 2026-07-16T10:58:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Transclusion_count/data/F]] 116910 Scribunto text/plain return { ["F1"] = 5300, ["FA-Class"] = 16000, ["FAA-airport"] = 3800, ["FACClosed"] = 6400, ["FAC_link"] = 118000, ["FAR_link"] = 118000, ["FCC-LMS-Facility"] = 5800, ["FCC_Licensing_and_Management_System_facility"] = 16000, ["FCCdata"] = 2600, ["FFU"] = 2000, ["FIDE"] = 2500, ["FIFA_player"] = 10000, ["FIG_country_code"] = 2600, ["FIN"] = 9900, ["FIPS"] = 2400, ["FJC_Bio"] = 4000, ["FL-Class"] = 13000, ["FLCClosed"] = 3700, ["FLC_link"] = 118000, ["FM-Class"] = 4300, ["FMA"] = 3400, ["FMARB"] = 8900, ["FM_station_data"] = 8500, ["FPCnom/VotingEnds"] = 12000, ["FPCresult"] = 18000, ["FRA"] = 21000, ["FRG"] = 3800, ["FTE"] = 3200, ["FULLBASEPAGENAME"] = 358000, ["FULLROOTPAGENAME"] = 3780000, ["FXL"] = 2200, ["Fa_bottom"] = 3500, ["Fa_top"] = 3500, ["Facebook"] = 14000, ["Facepalm"] = 2900, ["Facl"] = 118000, ["Fact"] = 38000, ["FadedPage"] = 2700, ["FailedGA"] = 3800, ["Failed_verification"] = 18000, ["Fake_heading"] = 2300, ["Fake_heading/styles.css"] = 2300, ["Fake_link/styles.css"] = 2000, ["Family_name_explanation"] = 98000, ["Family_name_explanation/core"] = 98000, ["Family_name_footnote"] = 2300, ["Family_name_hatnote"] = 96000, ["Farl"] = 118000, ["Fb"] = 31000, ["Fb-rt"] = 6300, ["Fb_cs_footer"] = 3300, ["Fb_gd"] = 11000, ["Fb_overview"] = 6300, ["Fb_overview2"] = 5500, ["Fb_rs"] = 11000, ["Fb_rs_footer"] = 11000, ["Fba/core"] = 9100, ["Fba/list"] = 11000, ["Fbaicon"] = 11000, ["Fbaicon/core"] = 11000, ["Fbicon"] = 3600, ["Fbu"] = 4000, ["Fbu-rt"] = 2600, ["Fbw"] = 6100, ["Fdacite"] = 15000, ["Fdate"] = 2900, ["FeaturedPicture"] = 7400, ["Featured_article"] = 7300, ["Featured_article_tools"] = 12000, ["Featured_list"] = 4900, ["Featured_picture"] = 8800, ["Featured_topic_box"] = 3700, ["Featured_topic_box/styles.css"] = 3700, ["Feedback_link"] = 4600, ["Fiction-based_redirects_to_list_entries_category_handler"] = 3300, ["Fictional_character_redirect"] = 3900, ["File-Class"] = 13000, ["File_other"] = 996000, ["Filipino_name"] = 4400, ["Film_date"] = 166000, ["Filter_category_by_topic"] = 2800, ["Find"] = 8500, ["FindYDCportal"] = 223000, ["Find_a_Grave"] = 24000, ["Find_country"] = 45000, ["Find_demonym"] = 38000, ["Find_general_sources"] = 918000, ["Find_medical_sources"] = 8300, ["Find_page_text"] = 2800000, ["Find_sources"] = 623000, ["Find_sources/proj/is_biography"] = 608000, ["Find_sources/proj/is_med"] = 623000, ["Find_sources/proj/is_video"] = 615000, ["Find_sources/top_proj"] = 623000, ["Find_sources_AFD"] = 261000, ["Find_sources_mainspace"] = 714000, ["Find_video_game_sources"] = 6900, ["Find_video_game_sources_short"] = 3100, ["Findsources"] = 42000, ["First_word"] = 680000, ["FishBase"] = 20000, ["FishBase_genus"] = 4200, ["Fix"] = 1050000, ["Fix-span"] = 64000, ["Fix/category"] = 1020000, ["Fix_comma_category"] = 597000, ["Fixed"] = 10000, ["Fl."] = 3800, ["Flag"] = 345000, ["Flag/core"] = 345000, ["FlagCGFathlete"] = 2200, ["FlagIOC"] = 10000, ["FlagIOC2"] = 4700, ["FlagIOC2athlete"] = 6800, ["FlagIOC2team"] = 2900, ["FlagIOCathlete"] = 11000, ["FlagIPC"] = 3300, ["FlagPASO"] = 2100, ["FlagPASOathlete"] = 3300, ["Flag_CGF_athlete"] = 2400, ["Flag_IOC"] = 13000, ["Flag_IOC_2"] = 18000, ["Flag_IOC_2_athlete"] = 15000, ["Flag_IOC_2_medalist"] = 5000, ["Flag_IOC_2_team"] = 4400, ["Flag_IOC_athlete"] = 13000, ["Flag_IPC"] = 4000, ["Flag_PASO"] = 3000, ["Flag_PASO_athlete"] = 3500, ["Flag_athlete"] = 39000, ["Flag_country"] = 41000, ["Flag_country/core"] = 41000, ["Flag_data"] = 12000, ["Flag_decoration"] = 95000, ["Flag_decoration/core"] = 95000, ["Flag_icon"] = 616000, ["Flag_icon/core"] = 616000, ["Flag_icon/nt"] = 9700, ["Flag_link"] = 2100, ["Flag_link/core"] = 87000, ["Flag_medalist"] = 2800, ["Flag_medalist/core"] = 2800, ["Flag_team"] = 2900, ["Flagathlete"] = 31000, ["Flagbig"] = 5100, ["Flagbig/core"] = 8900, ["Flagcountry"] = 26000, ["Flagdeco"] = 61000, ["Flagg"] = 23000, ["Flagicon"] = 460000, ["Flagicon_image"] = 51000, ["Flagmedalist"] = 2800, ["Flagright/core"] = 26000, ["Flagteam"] = 2500, ["Flagu"] = 32000, ["Flagu/core"] = 32000, ["Flat_list"] = 7700, ["Flatlist"] = 2660000, ["Flcl"] = 118000, ["FloraBase"] = 6100, ["Floruit"] = 7800, ["Fmbox"] = 25000, ["FoP-USonly"] = 5200, ["Font"] = 12000, ["Font_color"] = 53000, ["Fontcolor"] = 6900, ["Fooian_companies_established_in_the_year"] = 5500, ["Fooian_expatriate_sportspeople_in_Bar_cat"] = 11000, ["Fooian_expatriate_sportspeople_in_Bar_cat/core"] = 11000, ["Fooian_expatriate_sportspeople_in_Bar_cat/sortname"] = 11000, ["Fooian_fooers"] = 14000, ["FootballFacts.ru"] = 6000, ["Football_box"] = 29000, ["Football_box_collapsible"] = 31000, ["Football_box_collapsible/styles.css"] = 31000, ["Football_kit"] = 54000, ["Football_manager_history"] = 23000, ["Football_squad"] = 45000, ["Football_squad2_player"] = 48000, ["Football_squad_end"] = 22000, ["Football_squad_manager"] = 46000, ["Football_squad_mid"] = 19000, ["Football_squad_player"] = 22000, ["Football_squad_player/role"] = 8200, ["Football_squad_player/styles.css"] = 22000, ["Football_squad_start"] = 22000, ["Footballbox"] = 5800, ["Footballbox_collapsible"] = 9100, ["Footballstats"] = 4100, ["Foo–Bar_relations_category"] = 6200, ["Foo–Bar_relations_category/core"] = 6200, ["Foo–Bar_relations_category/countrynamesortfix"] = 6200, ["Foo–Bar_relations_category/fixcountryname"] = 6200, ["Foo–Bar_relations_category/inner_core"] = 6200, ["Foo–Bar_relations_category/mapname"] = 6200, ["For"] = 210000, ["For-multi"] = 13000, ["For_loop"] = 1170000, ["For_multi"] = 7100, ["For_nowiki"] = 9500, ["For_your_information"] = 2100, ["ForaDeJogo"] = 4100, ["Force_plural"] = 17000, ["Force_singular"] = 2800, ["Format_link"] = 13000, ["Format_linkr"] = 7400, ["Format_numeric_span"] = 3700, ["Format_price"] = 8900, ["Format_price/digits"] = 8600, ["Formatprice"] = 4000, ["Fossil_range"] = 14000, ["Fossil_range/bar"] = 25000, ["Fossilrange"] = 6700, ["Foundational_Model_of_Anatomy"] = 3400, ["Frac"] = 35000, ["Fraction"] = 41000, ["Fraction/styles.css"] = 107000, ["France_metadata_Wikidata"] = 36000, ["Free_access"] = 5300, ["Free_in_US_media"] = 23000, ["Free_media"] = 138000, ["Freedom_of_panorama_(US_only)"] = 5300, ["Frequency"] = 7700, ["Friday"] = 2800, ["Front-facing_other"] = 16000, ["Fs_end"] = 20000, ["Fs_mid"] = 18000, ["Fs_player"] = 20000, ["Fs_start"] = 20000, ["Full-time_equivalent"] = 3200, ["Full_citation_needed"] = 10000, ["Full_party_name_with_color"] = 6200, ["Fullurl"] = 7000, ["Fullurl:"] = 6800, ["Further"] = 76000, ["Further_information"] = 2500, ["Fussballdaten"] = 4200, ["Module:Fb_overview"] = 6400, ["Module:Fba"] = 18000, ["Module:Fba/list"] = 36000, ["Module:FeaturedTopicSum"] = 6900, ["Module:Fedi-share"] = 3900, ["Module:Fiction-based_redirects_to_list_entries_category_handler"] = 3300, ["Module:Fiction-based_redirects_to_list_entries_category_handler/RedirectType"] = 3300, ["Module:Fiction_redirect_category_handler"] = 5200, ["Module:File_link"] = 89000, ["Module:FindYDCportal"] = 399000, ["Module:Find_country"] = 45000, ["Module:Find_demonym"] = 38000, ["Module:Find_sources"] = 1650000, ["Module:Find_sources/config"] = 1650000, ["Module:Find_sources/links"] = 1650000, ["Module:Find_sources/templates/Find_general_sources"] = 918000, ["Module:Find_sources/templates/Find_sources_mainspace"] = 714000, ["Module:Find_sources/templates/Find_sources_medical"] = 8300, ["Module:Find_sources/templates/Find_sources_video_games"] = 6900, ["Module:Flag"] = 373000, ["Module:Flag_list"] = 11000, ["Module:Flagg"] = 455000, ["Module:Flagg/Altvar_data"] = 33000, ["Module:Football_box"] = 30000, ["Module:Football_box/styles.css"] = 30000, ["Module:Football_box_collapsible"] = 31000, ["Module:Football_event"] = 55000, ["Module:Football_manager_history"] = 24000, ["Module:Football_squad"] = 45000, ["Module:Footballer_positions"] = 218000, ["Module:Footnotes"] = 365000, ["Module:Footnotes/anchor_id_list"] = 271000, ["Module:Footnotes/anchor_id_list/data"] = 271000, ["Module:Footnotes/whitelist"] = 271000, ["Module:For"] = 211000, ["Module:For_loop"] = 1170000, ["Module:For_nowiki"] = 11000, ["Module:Format_link"] = 1510000, ["Module:Formatted_appearance"] = 6000, } djintkrh70qkf239x4e14moj0iywwcg Template:CatAutoTOC 10 15942 117012 98721 2024-11-07T17:52:28Z en>HouseBlaster 0 add rcat per request from [[User:Paine Ellsworth]] 117012 wikitext text/x-wiki #REDIRECT [[Template:Automatic category TOC]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 5y40fwbr2y092n8xq62zli2kobocvnl 117013 117012 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:CatAutoTOC]] 117012 wikitext text/x-wiki #REDIRECT [[Template:Automatic category TOC]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 5y40fwbr2y092n8xq62zli2kobocvnl Module:HTMLDecode 828 15944 117016 38797 2023-12-07T16:57:24Z en>Xaosflux 0 Changed protection settings for "[[Module:HTMLDecode]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 38796 Scribunto text/plain local i = {}; function i.HTMLDecode(frame) return mw.text.decode(frame.args["text"]); end return i; 1pb4wohcw9zqxuifnyt70g6czahlqv8 117017 117016 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:HTMLDecode]] 38796 Scribunto text/plain local i = {}; function i.HTMLDecode(frame) return mw.text.decode(frame.args["text"]); end return i; 1pb4wohcw9zqxuifnyt70g6czahlqv8 Template:Category TOC/tracking 10 15949 117022 38807 2024-05-25T19:00:14Z en>Paine Ellsworth 0 convert to /doc page for protected template 117022 wikitext text/x-wiki <!-- ############################################################################ # NOTE: The sort key {{PAGENAME}} is used on all these tracking categories # # to override any {{DEFAULTSORT}} used in the category # ############################################################################ --><includeonly><!-- -->{{#ifexpr: {{{pagecount|}}} <= 0<!-- -->|[[Category:Template Category TOC on pages where PAGESINCATEGORY returns zero]]<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 100<!-- -->|[[Category:Template Category TOC on category with up to 100 pages]]<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 200<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 101–200 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 300<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 201–300 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 600<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 301–600 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 900<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 601–900 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 1200<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 901–1200 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|<!-- #pagecount is > 1200 -->[[Category:Template Category TOC on category with over 1200 pages|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->{{#switch: {{{align|}}}<!-- -->|center|right=[[Category:Template Category TOC with non-left alignment|{{PAGENAME}}]]<!-- -->}}<!-- --></includeonly><!-- --><noinclude><!-- -->{{documentation}}<!-- --></noinclude> 480wio3pc4npnh5ievjc5gxssoo0508 117023 117022 2026-07-16T11:37:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Category_TOC/tracking]] 117022 wikitext text/x-wiki <!-- ############################################################################ # NOTE: The sort key {{PAGENAME}} is used on all these tracking categories # # to override any {{DEFAULTSORT}} used in the category # ############################################################################ --><includeonly><!-- -->{{#ifexpr: {{{pagecount|}}} <= 0<!-- -->|[[Category:Template Category TOC on pages where PAGESINCATEGORY returns zero]]<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 100<!-- -->|[[Category:Template Category TOC on category with up to 100 pages]]<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 200<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 101–200 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 300<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 201–300 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 600<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 301–600 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 900<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 601–900 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 1200<!-- -->|{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Category TOC via Automatic category TOC on category with 901–1200 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->|<!-- #pagecount is > 1200 -->[[Category:Template Category TOC on category with over 1200 pages|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->{{#switch: {{{align|}}}<!-- -->|center|right=[[Category:Template Category TOC with non-left alignment|{{PAGENAME}}]]<!-- -->}}<!-- --></includeonly><!-- --><noinclude><!-- -->{{documentation}}<!-- --></noinclude> 480wio3pc4npnh5ievjc5gxssoo0508 Template:Notelist 10 15975 116817 114961 2025-11-23T04:31:33Z en>Izno 0 revert two substed things: templatestyles in reflist, and probably shouldn't be substing the invoke leaving random categories around potentially either 116817 wikitext text/x-wiki {{reflist|{{{1|{{{colwidth|}}}}}}|refs={{{refs|{{{notes|}}}}}}|group={{safesubst<noinclude />:#switch: {{{group|}}} | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group|}}} | #default = lower-alpha }}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using notelist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Notelist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | notes | refs }}<noinclude> {{documentation}}</noinclude> 6ii7352zi9tm5h672xr91uhk5vdr488 116818 116817 2026-07-16T10:31:06Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Notelist]] 116817 wikitext text/x-wiki {{reflist|{{{1|{{{colwidth|}}}}}}|refs={{{refs|{{{notes|}}}}}}|group={{safesubst<noinclude />:#switch: {{{group|}}} | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group|}}} | #default = lower-alpha }}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using notelist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Notelist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | notes | refs }}<noinclude> {{documentation}}</noinclude> 6ii7352zi9tm5h672xr91uhk5vdr488 Module:Transclusion count/data/P 828 15994 117038 110010 2026-07-12T05:11:52Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. 117038 Scribunto text/plain return { ["P"] = 6400, ["P-1"] = 4800, ["P-phrases"] = 4200, ["P."] = 4000, ["P1"] = 232000, ["P2"] = 508000, ["PAGENAMEBASE"] = 1890000, ["PAGENAMEU"] = 55000, ["PAK"] = 3400, ["PD-US"] = 8600, ["PD-US-1923-abroad"] = 5400, ["PD-US-expired"] = 5000, ["PD-US-expired-abroad"] = 8700, ["PD-US-no_notice"] = 2300, ["PD-art"] = 3200, ["PD-ineligible-USonly"] = 7600, ["PD-notice"] = 26000, ["PD-old-100"] = 3300, ["PD-self"] = 31000, ["PD-textlogo"] = 6100, ["PDB_Gallery"] = 2900, ["PDanube"] = 3300, ["PER"] = 3500, ["PHI"] = 2700, ["PHL"] = 3700, ["PH_census"] = 2000, ["PLANTS"] = 4300, ["PM20"] = 3300, ["PMID"] = 6500, ["PNsign"] = 2000, ["POL"] = 68000, ["POR"] = 5500, ["POTD/Day"] = 2800, ["POTD_archive"] = 2500, ["POTD_archive/footer"] = 2500, ["POTD_default"] = 12000, ["POTD_image"] = 3800, ["POTD_image1"] = 2500, ["POTD_image2"] = 2500, ["POTD_navigation"] = 7800, ["POTD_texttitle"] = 2500, ["POTDlink"] = 8200, ["POV"] = 3100, ["POW"] = 2500, ["PR/header"] = 3100, ["PR/heading"] = 7200, ["PRI"] = 2200, ["PRT"] = 6300, ["PR_link"] = 118000, ["PS"] = 3100, ["Pad"] = 50000, ["Paddle_Steamer"] = 3100, ["Page"] = 4300, ["Page_name_sub"] = 51000, ["Page_needed"] = 23000, ["Page_tabs"] = 4100, ["Page_tabs/styles.css"] = 4100, ["Pagelinks"] = 74000, ["Pagelist"] = 15000, ["Pagetype"] = 11200000, ["Paid"] = 16000, ["Pakistani_English"] = 3900, ["Para"] = 2820000, ["Parabr"] = 3800, ["Paragraph_break"] = 2140000, ["Param_value"] = 151000, ["Param_value/styles.css"] = 151000, ["Parameter"] = 2820000, ["Parameter_names_example"] = 2700, ["ParmPart"] = 15000, ["Partial"] = 5700, ["Partial_minor_planet_designation"] = 5700, ["Partly_done"] = 4300, ["Party_color"] = 81000, ["Party_color_cell"] = 6500, ["Party_index_link"] = 3300, ["Party_name_with_color"] = 7100, ["Party_name_with_colour"] = 4100, ["Party_shading/Democratic"] = 19000, ["Party_shading/Independent"] = 3400, ["Party_shading/Republican"] = 18000, ["Party_stripe"] = 17000, ["Pass"] = 3300, ["Pb"] = 2100000, ["Pd-notice"] = 2200, ["Pedigree"] = 4300, ["Peer_review/heading"] = 10000, ["Peer_review_links"] = 3100, ["Peer_review_tools"] = 9600, ["Penalty_shoot-out"] = 5900, ["Pending"] = 6100, ["Pending_DYK_American_hooks"] = 4900, ["Pending_DYK_biographies"] = 11000, ["Pending_film"] = 2700, ["Pending_films_key"] = 2500, ["Pengoal"] = 12000, ["Penmiss"] = 14000, ["Percentage"] = 18000, ["Performance_key"] = 2800, ["Performance_key/styles.css"] = 2800, ["Period_color"] = 28000, ["Period_end"] = 26000, ["Period_id"] = 29000, ["Period_start"] = 28000, ["Personal_attack_removed"] = 2100, ["PeruTasks"] = 19000, ["Phab"] = 8100, ["Phabricator"] = 8300, ["Phanerozoic_250px"] = 25000, ["PharmNavFootnote"] = 5600, ["Philippine_census_reference"] = 2000, ["Philippine_name"] = 4200, ["Photo"] = 2200, ["Photo_montage"] = 4900, ["Photo_requested"] = 108000, ["Photograph_requested"] = 4600, ["Photomontage"] = 4400, ["Photoreq"] = 2900, ["Picture_of_the_day"] = 8200, ["Pie_chart"] = 8100, ["Pie_chart/styles.css"] = 8100, ["Ping"] = 283000, ["Pipe"] = 96000, ["Place_name_disambiguation"] = 40000, ["Plain_link"] = 119000, ["Plain_list"] = 15000, ["Plain_text"] = 108000, ["Plainlink"] = 30000, ["Plainlist"] = 388000, ["Plainlist/styles.css"] = 3100000, ["Player"] = 3800, ["Player2"] = 2900, ["Please_check_ISSN"] = 16000, ["Plural"] = 107000, ["Pluralize_from_text"] = 2600000, ["Pn"] = 2800, ["Poem_quote"] = 3900, ["Poemquote"] = 2700, ["Politician_icon"] = 34000, ["Politician_icon2"] = 34000, ["Politics_sidebar_below"] = 19000, ["Politics_sidebar_title"] = 19000, ["Polluted_category"] = 2500, ["Polparty"] = 31000, ["Pop_density"] = 10000, ["Population_Germany"] = 14000, ["Portal"] = 10700000, ["Portal-Class"] = 8000, ["Portal-inline"] = 243000, ["Portal_and_project"] = 259000, ["Portal_bar"] = 184000, ["Portal_box"] = 2300, ["Portalbar"] = 10000, ["Portuguese_name"] = 10000, ["Possible"] = 4000, ["Possibly_empty_category"] = 71000, ["Post-nominals"] = 63000, ["Post-nominals/AUS"] = 8500, ["Post-nominals/CAN"] = 10000, ["Post-nominals/GBR"] = 32000, ["Post-nominals/NZL"] = 4400, ["Postnominals"] = 11000, ["Pp"] = 8900, ["Pp-book-cover"] = 52000, ["Pp-extended"] = 9800, ["Pp-move"] = 11000, ["Pp-pc"] = 4400, ["Pp-protected"] = 13000, ["Pp-semi"] = 6800, ["Pp-semi-indef"] = 4900, ["Pp-template"] = 4300, ["Pp-vandalism"] = 2900, ["Precision"] = 6000, ["Preferences"] = 17000, ["Preferences/section"] = 2600, ["PresFoot"] = 3300, ["PresHead"] = 3900, ["PresRow"] = 3900, ["Press"] = 5700, ["Preview_warning"] = 399000, ["Primary_source_inline"] = 8000, ["Primary_sources"] = 33000, ["Principal_rank"] = 650000, ["Prl"] = 118000, ["ProCyclingStats"] = 2400, ["ProQuest"] = 35000, ["Professional_wrestling_profiles"] = 3100, ["Professional_wrestling_results_table"] = 3200, ["Profit"] = 3600, ["Progress_box"] = 19000, ["Project-Class"] = 13000, ["Project_other"] = 18000, ["Promotional"] = 18000, ["Proper_name"] = 2800, ["Prose"] = 3400, ["Protected_page_maintenance_message"] = 42000, ["Protection_padlock"] = 25000, ["Proxy_block"] = 2200, ["Pso"] = 4900, ["Purge"] = 562000, ["Purge_button"] = 19000, ["Purge_button/styles.css"] = 19000, ["Module:POTD_titletext"] = 2500, ["Module:Page"] = 122000, ["Module:PageLinks"] = 74000, ["Module:Page_tabs"] = 4100, ["Module:Pagelist"] = 15000, ["Module:Pagetype"] = 18900000, ["Module:Pagetype/config"] = 18900000, ["Module:Pagetype/disambiguation"] = 13200000, ["Module:Pagetype/rfd"] = 17100000, ["Module:Pagetype/setindex"] = 13500000, ["Module:Pagetype/softredirect"] = 17700000, ["Module:ParameterCount"] = 1650000, ["Module:Parameter_names_example"] = 2700, ["Module:Parameter_validation"] = 164000, ["Module:Parameter_validation/default_config"] = 164000, ["Module:Party_name_with_color"] = 13000, ["Module:Percentage"] = 18000, ["Module:Person_date"] = 1770000, ["Module:Person_height"] = 282000, ["Module:Person_length"] = 7700, ["Module:Person_weight"] = 85000, ["Module:Phone_size"] = 2000, ["Module:Photo_montage"] = 4900, ["Module:Piechart"] = 8100, ["Module:Piechart/cuts.json"] = 8100, ["Module:Plain_text"] = 1870000, ["Module:Pn"] = 4800, ["Module:Political_party"] = 149000, ["Module:Political_party/A"] = 26000, ["Module:Political_party/B"] = 20000, ["Module:Political_party/C"] = 49000, ["Module:Political_party/D"] = 58000, ["Module:Political_party/E"] = 6900, ["Module:Political_party/F"] = 15000, ["Module:Political_party/G"] = 22000, ["Module:Political_party/H"] = 7400, ["Module:Political_party/I"] = 62000, ["Module:Political_party/J"] = 10000, ["Module:Political_party/K"] = 6100, ["Module:Political_party/L"] = 47000, ["Module:Political_party/M"] = 15000, ["Module:Political_party/N"] = 38000, ["Module:Political_party/O"] = 7000, ["Module:Political_party/P"] = 34000, ["Module:Political_party/R"] = 57000, ["Module:Political_party/S"] = 37000, ["Module:Political_party/T"] = 14000, ["Module:Political_party/U"] = 22000, ["Module:Political_party/V"] = 8000, ["Module:Political_party/W"] = 15000, ["Module:Political_party/Y"] = 2400, ["Module:Pop_density"] = 10000, ["Module:PopulationFromWikidata"] = 15000, ["Module:Portal"] = 11200000, ["Module:Portal-inline"] = 248000, ["Module:Portal/images/a"] = 2030000, ["Module:Portal/images/aliases"] = 340000, ["Module:Portal/images/b"] = 3540000, ["Module:Portal/images/c"] = 2210000, ["Module:Portal/images/d"] = 120000, ["Module:Portal/images/e"] = 584000, ["Module:Portal/images/f"] = 1010000, ["Module:Portal/images/g"] = 694000, ["Module:Portal/images/h"] = 545000, ["Module:Portal/images/i"] = 1290000, ["Module:Portal/images/j"] = 341000, ["Module:Portal/images/k"] = 88000, ["Module:Portal/images/l"] = 518000, ["Module:Portal/images/m"] = 760000, ["Module:Portal/images/n"] = 837000, ["Module:Portal/images/o"] = 458000, ["Module:Portal/images/other"] = 269000, ["Module:Portal/images/p"] = 970000, ["Module:Portal/images/q"] = 3300, ["Module:Portal/images/r"] = 436000, ["Module:Portal/images/s"] = 1990000, ["Module:Portal/images/t"] = 845000, ["Module:Portal/images/u"] = 1360000, ["Module:Portal/images/v"] = 343000, ["Module:Portal/images/w"] = 212000, ["Module:Portal/images/y"] = 38000, ["Module:Portal/images/z"] = 6300, ["Module:Portal/styles.css"] = 10700000, ["Module:Portal_bar"] = 204000, ["Module:Portal_bar/styles.css"] = 204000, ["Module:PrevalenceData"] = 8300, ["Module:Professional_wrestling_profiles"] = 3100, ["Module:Professional_wrestling_results_table"] = 3200, ["Module:Progress_box"] = 19000, ["Module:Progress_box/config"] = 19000, ["Module:Progress_box/styles.css"] = 19000, ["Module:Protect"] = 125000, ["Module:Protected_edit_request"] = 59000, ["Module:Protection_banner"] = 73000, ["Module:Protection_banner/config"] = 73000, ["Module:Purge"] = 585000, } n4a964dxgegkf7kf5r7p2uif0q56xz9 117039 117038 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Transclusion_count/data/P]] 117038 Scribunto text/plain return { ["P"] = 6400, ["P-1"] = 4800, ["P-phrases"] = 4200, ["P."] = 4000, ["P1"] = 232000, ["P2"] = 508000, ["PAGENAMEBASE"] = 1890000, ["PAGENAMEU"] = 55000, ["PAK"] = 3400, ["PD-US"] = 8600, ["PD-US-1923-abroad"] = 5400, ["PD-US-expired"] = 5000, ["PD-US-expired-abroad"] = 8700, ["PD-US-no_notice"] = 2300, ["PD-art"] = 3200, ["PD-ineligible-USonly"] = 7600, ["PD-notice"] = 26000, ["PD-old-100"] = 3300, ["PD-self"] = 31000, ["PD-textlogo"] = 6100, ["PDB_Gallery"] = 2900, ["PDanube"] = 3300, ["PER"] = 3500, ["PHI"] = 2700, ["PHL"] = 3700, ["PH_census"] = 2000, ["PLANTS"] = 4300, ["PM20"] = 3300, ["PMID"] = 6500, ["PNsign"] = 2000, ["POL"] = 68000, ["POR"] = 5500, ["POTD/Day"] = 2800, ["POTD_archive"] = 2500, ["POTD_archive/footer"] = 2500, ["POTD_default"] = 12000, ["POTD_image"] = 3800, ["POTD_image1"] = 2500, ["POTD_image2"] = 2500, ["POTD_navigation"] = 7800, ["POTD_texttitle"] = 2500, ["POTDlink"] = 8200, ["POV"] = 3100, ["POW"] = 2500, ["PR/header"] = 3100, ["PR/heading"] = 7200, ["PRI"] = 2200, ["PRT"] = 6300, ["PR_link"] = 118000, ["PS"] = 3100, ["Pad"] = 50000, ["Paddle_Steamer"] = 3100, ["Page"] = 4300, ["Page_name_sub"] = 51000, ["Page_needed"] = 23000, ["Page_tabs"] = 4100, ["Page_tabs/styles.css"] = 4100, ["Pagelinks"] = 74000, ["Pagelist"] = 15000, ["Pagetype"] = 11200000, ["Paid"] = 16000, ["Pakistani_English"] = 3900, ["Para"] = 2820000, ["Parabr"] = 3800, ["Paragraph_break"] = 2140000, ["Param_value"] = 151000, ["Param_value/styles.css"] = 151000, ["Parameter"] = 2820000, ["Parameter_names_example"] = 2700, ["ParmPart"] = 15000, ["Partial"] = 5700, ["Partial_minor_planet_designation"] = 5700, ["Partly_done"] = 4300, ["Party_color"] = 81000, ["Party_color_cell"] = 6500, ["Party_index_link"] = 3300, ["Party_name_with_color"] = 7100, ["Party_name_with_colour"] = 4100, ["Party_shading/Democratic"] = 19000, ["Party_shading/Independent"] = 3400, ["Party_shading/Republican"] = 18000, ["Party_stripe"] = 17000, ["Pass"] = 3300, ["Pb"] = 2100000, ["Pd-notice"] = 2200, ["Pedigree"] = 4300, ["Peer_review/heading"] = 10000, ["Peer_review_links"] = 3100, ["Peer_review_tools"] = 9600, ["Penalty_shoot-out"] = 5900, ["Pending"] = 6100, ["Pending_DYK_American_hooks"] = 4900, ["Pending_DYK_biographies"] = 11000, ["Pending_film"] = 2700, ["Pending_films_key"] = 2500, ["Pengoal"] = 12000, ["Penmiss"] = 14000, ["Percentage"] = 18000, ["Performance_key"] = 2800, ["Performance_key/styles.css"] = 2800, ["Period_color"] = 28000, ["Period_end"] = 26000, ["Period_id"] = 29000, ["Period_start"] = 28000, ["Personal_attack_removed"] = 2100, ["PeruTasks"] = 19000, ["Phab"] = 8100, ["Phabricator"] = 8300, ["Phanerozoic_250px"] = 25000, ["PharmNavFootnote"] = 5600, ["Philippine_census_reference"] = 2000, ["Philippine_name"] = 4200, ["Photo"] = 2200, ["Photo_montage"] = 4900, ["Photo_requested"] = 108000, ["Photograph_requested"] = 4600, ["Photomontage"] = 4400, ["Photoreq"] = 2900, ["Picture_of_the_day"] = 8200, ["Pie_chart"] = 8100, ["Pie_chart/styles.css"] = 8100, ["Ping"] = 283000, ["Pipe"] = 96000, ["Place_name_disambiguation"] = 40000, ["Plain_link"] = 119000, ["Plain_list"] = 15000, ["Plain_text"] = 108000, ["Plainlink"] = 30000, ["Plainlist"] = 388000, ["Plainlist/styles.css"] = 3100000, ["Player"] = 3800, ["Player2"] = 2900, ["Please_check_ISSN"] = 16000, ["Plural"] = 107000, ["Pluralize_from_text"] = 2600000, ["Pn"] = 2800, ["Poem_quote"] = 3900, ["Poemquote"] = 2700, ["Politician_icon"] = 34000, ["Politician_icon2"] = 34000, ["Politics_sidebar_below"] = 19000, ["Politics_sidebar_title"] = 19000, ["Polluted_category"] = 2500, ["Polparty"] = 31000, ["Pop_density"] = 10000, ["Population_Germany"] = 14000, ["Portal"] = 10700000, ["Portal-Class"] = 8000, ["Portal-inline"] = 243000, ["Portal_and_project"] = 259000, ["Portal_bar"] = 184000, ["Portal_box"] = 2300, ["Portalbar"] = 10000, ["Portuguese_name"] = 10000, ["Possible"] = 4000, ["Possibly_empty_category"] = 71000, ["Post-nominals"] = 63000, ["Post-nominals/AUS"] = 8500, ["Post-nominals/CAN"] = 10000, ["Post-nominals/GBR"] = 32000, ["Post-nominals/NZL"] = 4400, ["Postnominals"] = 11000, ["Pp"] = 8900, ["Pp-book-cover"] = 52000, ["Pp-extended"] = 9800, ["Pp-move"] = 11000, ["Pp-pc"] = 4400, ["Pp-protected"] = 13000, ["Pp-semi"] = 6800, ["Pp-semi-indef"] = 4900, ["Pp-template"] = 4300, ["Pp-vandalism"] = 2900, ["Precision"] = 6000, ["Preferences"] = 17000, ["Preferences/section"] = 2600, ["PresFoot"] = 3300, ["PresHead"] = 3900, ["PresRow"] = 3900, ["Press"] = 5700, ["Preview_warning"] = 399000, ["Primary_source_inline"] = 8000, ["Primary_sources"] = 33000, ["Principal_rank"] = 650000, ["Prl"] = 118000, ["ProCyclingStats"] = 2400, ["ProQuest"] = 35000, ["Professional_wrestling_profiles"] = 3100, ["Professional_wrestling_results_table"] = 3200, ["Profit"] = 3600, ["Progress_box"] = 19000, ["Project-Class"] = 13000, ["Project_other"] = 18000, ["Promotional"] = 18000, ["Proper_name"] = 2800, ["Prose"] = 3400, ["Protected_page_maintenance_message"] = 42000, ["Protection_padlock"] = 25000, ["Proxy_block"] = 2200, ["Pso"] = 4900, ["Purge"] = 562000, ["Purge_button"] = 19000, ["Purge_button/styles.css"] = 19000, ["Module:POTD_titletext"] = 2500, ["Module:Page"] = 122000, ["Module:PageLinks"] = 74000, ["Module:Page_tabs"] = 4100, ["Module:Pagelist"] = 15000, ["Module:Pagetype"] = 18900000, ["Module:Pagetype/config"] = 18900000, ["Module:Pagetype/disambiguation"] = 13200000, ["Module:Pagetype/rfd"] = 17100000, ["Module:Pagetype/setindex"] = 13500000, ["Module:Pagetype/softredirect"] = 17700000, ["Module:ParameterCount"] = 1650000, ["Module:Parameter_names_example"] = 2700, ["Module:Parameter_validation"] = 164000, ["Module:Parameter_validation/default_config"] = 164000, ["Module:Party_name_with_color"] = 13000, ["Module:Percentage"] = 18000, ["Module:Person_date"] = 1770000, ["Module:Person_height"] = 282000, ["Module:Person_length"] = 7700, ["Module:Person_weight"] = 85000, ["Module:Phone_size"] = 2000, ["Module:Photo_montage"] = 4900, ["Module:Piechart"] = 8100, ["Module:Piechart/cuts.json"] = 8100, ["Module:Plain_text"] = 1870000, ["Module:Pn"] = 4800, ["Module:Political_party"] = 149000, ["Module:Political_party/A"] = 26000, ["Module:Political_party/B"] = 20000, ["Module:Political_party/C"] = 49000, ["Module:Political_party/D"] = 58000, ["Module:Political_party/E"] = 6900, ["Module:Political_party/F"] = 15000, ["Module:Political_party/G"] = 22000, ["Module:Political_party/H"] = 7400, ["Module:Political_party/I"] = 62000, ["Module:Political_party/J"] = 10000, ["Module:Political_party/K"] = 6100, ["Module:Political_party/L"] = 47000, ["Module:Political_party/M"] = 15000, ["Module:Political_party/N"] = 38000, ["Module:Political_party/O"] = 7000, ["Module:Political_party/P"] = 34000, ["Module:Political_party/R"] = 57000, ["Module:Political_party/S"] = 37000, ["Module:Political_party/T"] = 14000, ["Module:Political_party/U"] = 22000, ["Module:Political_party/V"] = 8000, ["Module:Political_party/W"] = 15000, ["Module:Political_party/Y"] = 2400, ["Module:Pop_density"] = 10000, ["Module:PopulationFromWikidata"] = 15000, ["Module:Portal"] = 11200000, ["Module:Portal-inline"] = 248000, ["Module:Portal/images/a"] = 2030000, ["Module:Portal/images/aliases"] = 340000, ["Module:Portal/images/b"] = 3540000, ["Module:Portal/images/c"] = 2210000, ["Module:Portal/images/d"] = 120000, ["Module:Portal/images/e"] = 584000, ["Module:Portal/images/f"] = 1010000, ["Module:Portal/images/g"] = 694000, ["Module:Portal/images/h"] = 545000, ["Module:Portal/images/i"] = 1290000, ["Module:Portal/images/j"] = 341000, ["Module:Portal/images/k"] = 88000, ["Module:Portal/images/l"] = 518000, ["Module:Portal/images/m"] = 760000, ["Module:Portal/images/n"] = 837000, ["Module:Portal/images/o"] = 458000, ["Module:Portal/images/other"] = 269000, ["Module:Portal/images/p"] = 970000, ["Module:Portal/images/q"] = 3300, ["Module:Portal/images/r"] = 436000, ["Module:Portal/images/s"] = 1990000, ["Module:Portal/images/t"] = 845000, ["Module:Portal/images/u"] = 1360000, ["Module:Portal/images/v"] = 343000, ["Module:Portal/images/w"] = 212000, ["Module:Portal/images/y"] = 38000, ["Module:Portal/images/z"] = 6300, ["Module:Portal/styles.css"] = 10700000, ["Module:Portal_bar"] = 204000, ["Module:Portal_bar/styles.css"] = 204000, ["Module:PrevalenceData"] = 8300, ["Module:Professional_wrestling_profiles"] = 3100, ["Module:Professional_wrestling_results_table"] = 3200, ["Module:Progress_box"] = 19000, ["Module:Progress_box/config"] = 19000, ["Module:Progress_box/styles.css"] = 19000, ["Module:Protect"] = 125000, ["Module:Protected_edit_request"] = 59000, ["Module:Protection_banner"] = 73000, ["Module:Protection_banner/config"] = 73000, ["Module:Purge"] = 585000, } n4a964dxgegkf7kf5r7p2uif0q56xz9 Template:R from move/except 10 16009 116861 38948 2024-05-08T00:57:29Z en>SilverLocust 0 Have that R2 tracking category also show a message 116861 wikitext text/x-wiki <noinclude>This is the exception page for {{tl|R from move}}. This page makes exceptions that include certain pages that should not inhabit either {{cat|Unsynchronized talk page redirects}} or {{cat|Redirects from moves}}. If necessary, new exceptions may be added with no need to edit the main template, {{tl|R from move}}. </noinclude>{{#switch: {{FULLPAGENAME}} |MediaWiki:Move-redirect-text= |Template:R from move/except= |#default=[[Category:Redirects from moves]] }}{{#switch: {{NAMESPACENUMBER}} |1={{#ifeq: {{#invoke:redirect|isRedirect|{{FULLPAGENAME}}}}|yes| {{#ifeq: {{#invoke:redirect|isRedirect|{{SUBJECTPAGENAME}}}}|yes| {{#ifeq: {{PAGENAME:{{#invoke:redirect|main|{{TALKPAGENAME}}}}}}|{{PAGENAME:{{#invoke:redirect|main|{{SUBJECTPAGENAME}}}}}}|| {{#ifeq: {{FULLPAGENAME}}|{{SUBJECTPAGENAME}}|| {{#ifeq: {{Str left|{{PAGENAME}}|16}}|List of ships of||[[Category:Unsynchronized talk page redirects]] }} }} }} |{{#ifexist:{{SUBJECTPAGENAME}}| {{#ifeq: {{SUBJECTPAGENAME}}|{{Target of|{{SUBJECTPAGENAME:{{Target of|{{FULLPAGENAME}}}}}}}}|[[Category:Articles with unsynchronized talk page redirects]]| {{#ifexpr: {{#invoke:string|find|{{#invoke:page|getContent|{{SUBJECTPAGENAME}}|as=raw}}|:Rfd}}|[[Category:Redirects for discussion with talk page redirects]]|[[Category:Articles with talk page redirects]]}}}} }} }} |{{error|Page is not a redirect, misplaced [[Template:R from move]]}} }} |0={{#switch:{{NAMESPACENUMBER:{{#invoke:redirect|main|{{FULLPAGENAME}}}}}}|0|4|10|12|14|100=|#default={{R from move/Cross-namespace}}}} }}<noinclude> {{Documentation|Template:R from move/doc}} </noinclude> 2a82jzb8kp50itnyti0qkq1qte99dnn 116862 116861 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_from_move/except]] 116861 wikitext text/x-wiki <noinclude>This is the exception page for {{tl|R from move}}. This page makes exceptions that include certain pages that should not inhabit either {{cat|Unsynchronized talk page redirects}} or {{cat|Redirects from moves}}. If necessary, new exceptions may be added with no need to edit the main template, {{tl|R from move}}. </noinclude>{{#switch: {{FULLPAGENAME}} |MediaWiki:Move-redirect-text= |Template:R from move/except= |#default=[[Category:Redirects from moves]] }}{{#switch: {{NAMESPACENUMBER}} |1={{#ifeq: {{#invoke:redirect|isRedirect|{{FULLPAGENAME}}}}|yes| {{#ifeq: {{#invoke:redirect|isRedirect|{{SUBJECTPAGENAME}}}}|yes| {{#ifeq: {{PAGENAME:{{#invoke:redirect|main|{{TALKPAGENAME}}}}}}|{{PAGENAME:{{#invoke:redirect|main|{{SUBJECTPAGENAME}}}}}}|| {{#ifeq: {{FULLPAGENAME}}|{{SUBJECTPAGENAME}}|| {{#ifeq: {{Str left|{{PAGENAME}}|16}}|List of ships of||[[Category:Unsynchronized talk page redirects]] }} }} }} |{{#ifexist:{{SUBJECTPAGENAME}}| {{#ifeq: {{SUBJECTPAGENAME}}|{{Target of|{{SUBJECTPAGENAME:{{Target of|{{FULLPAGENAME}}}}}}}}|[[Category:Articles with unsynchronized talk page redirects]]| {{#ifexpr: {{#invoke:string|find|{{#invoke:page|getContent|{{SUBJECTPAGENAME}}|as=raw}}|:Rfd}}|[[Category:Redirects for discussion with talk page redirects]]|[[Category:Articles with talk page redirects]]}}}} }} }} |{{error|Page is not a redirect, misplaced [[Template:R from move]]}} }} |0={{#switch:{{NAMESPACENUMBER:{{#invoke:redirect|main|{{FULLPAGENAME}}}}}}|0|4|10|12|14|100=|#default={{R from move/Cross-namespace}}}} }}<noinclude> {{Documentation|Template:R from move/doc}} </noinclude> 2a82jzb8kp50itnyti0qkq1qte99dnn Template:Pp-protected 10 16018 116863 38968 2024-10-31T22:49:43Z en>Primefac 0 /* top */ avoid double redir 116863 wikitext text/x-wiki #REDIRECT [[Template:Protection padlock]] {{Rcat shell| {{R from move}} {{R from long name}} {{R with history}} }} [[Category:Top icon protection templates]] fggdzzf86ur8bq36yd27gkfxl333uwg 116864 116863 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Pp-protected]] 116863 wikitext text/x-wiki #REDIRECT [[Template:Protection padlock]] {{Rcat shell| {{R from move}} {{R from long name}} {{R with history}} }} [[Category:Top icon protection templates]] fggdzzf86ur8bq36yd27gkfxl333uwg Template:Mwl 10 16057 116914 39046 2025-12-30T18:07:43Z en>MusikBot II 0 Protected "[[Template:Mwl]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 284 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) 116914 wikitext text/x-wiki #REDIRECT [[Template:Magic word link]] {{Redirect category shell| {{R from move}} }} a3np5gfkw18adam00bsg6nliv8cfip3 116915 116914 2026-07-16T10:58:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Mwl]] 116914 wikitext text/x-wiki #REDIRECT [[Template:Magic word link]] {{Redirect category shell| {{R from move}} }} a3np5gfkw18adam00bsg6nliv8cfip3 Module:Protection banner 828 16076 116698 114767 2026-02-18T08:46:08Z en>Krinkle 0 116698 Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() if not self:shouldHaveProtectionCategory() then return true end if type(self.expiry) ~= 'number' then return false end local expiry = os.date('*t', self.expiry) -- Avoid checking today.day or os.time(), unless close. https://phabricator.wikimedia.org/T416616 local today = os.date('*t') return (expiry.year < today.year) or (expiry.year == today.year and expiry.month < today.month) or (expiry.year == today.year and expiry.month == today.month and expiry.day < today.day) or (expiry.year == today.year and expiry.month == today.month and expiry.day == today.day and self.expiry < os.time()) end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end -- For arbitration enforcement, flagging [[WP:PIA]] pages to enable [[Special:AbuseFilter/1339]] to flag edits to them if protectionObj.level == "extendedconfirmed" then if require("Module:TableTools").inArray(protectionObj.title.talkPageTitle.categories, "Wikipedia pages subject to the extended confirmed restriction related to the Arab-Israeli conflict") then ret[#ret + 1] = "<p class='PIA-flag' style='display:none; visibility:hidden;' title='This page is subject to the extended confirmed restriction related to the Arab-Israeli conflict.'></p>" end end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p o3ocs8c50hagthmsuho5s6y44o0rimz 116699 116698 2026-07-15T17:38:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Protection_banner]] 116698 Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() if not self:shouldHaveProtectionCategory() then return true end if type(self.expiry) ~= 'number' then return false end local expiry = os.date('*t', self.expiry) -- Avoid checking today.day or os.time(), unless close. https://phabricator.wikimedia.org/T416616 local today = os.date('*t') return (expiry.year < today.year) or (expiry.year == today.year and expiry.month < today.month) or (expiry.year == today.year and expiry.month == today.month and expiry.day < today.day) or (expiry.year == today.year and expiry.month == today.month and expiry.day == today.day and self.expiry < os.time()) end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end -- For arbitration enforcement, flagging [[WP:PIA]] pages to enable [[Special:AbuseFilter/1339]] to flag edits to them if protectionObj.level == "extendedconfirmed" then if require("Module:TableTools").inArray(protectionObj.title.talkPageTitle.categories, "Wikipedia pages subject to the extended confirmed restriction related to the Arab-Israeli conflict") then ret[#ret + 1] = "<p class='PIA-flag' style='display:none; visibility:hidden;' title='This page is subject to the extended confirmed restriction related to the Arab-Israeli conflict.'></p>" end end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p o3ocs8c50hagthmsuho5s6y44o0rimz Module:Protection banner/config 828 16077 116700 114769 2026-04-18T02:24:50Z en>Santiago Claudio 0 Sync with sandbox per edit request 116700 Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, deceased = { description = 'For user pages of Wikipedia users who are deceased', text = '${INTROFRAGMENT} to prevent vandalism of a deceased' .. ' Wikipedian\'s user page.' .. ' A family member who wishes to edit this user page can use this' .. ' user\'s ${TALKPAGE} or submit a request to [[Wikipedia:VRT|the' .. ' Volunteer Response Team]].', tooltip = '${TOOLTIPFRAGMENT} because this Wikipedian is deceased' }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Wikipedia:Protection policy|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#full|' .. 'protected]] from editing', templateeditor = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#template' .. '|protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Wikipedia:Protection' .. ' policy#semi|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under [[Wikipedia:Protection' .. ' policy#extended|extended confirmed protection]]', }, move = { default = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#Move' .. ' protection|protected]] from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-confirmed-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|extendedconfirmed|move'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Protection padlock'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } g4f6dkimoikv05ulbf832zu7omkf2fc 116701 116700 2026-07-15T17:38:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Protection_banner/config]] 116700 Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, deceased = { description = 'For user pages of Wikipedia users who are deceased', text = '${INTROFRAGMENT} to prevent vandalism of a deceased' .. ' Wikipedian\'s user page.' .. ' A family member who wishes to edit this user page can use this' .. ' user\'s ${TALKPAGE} or submit a request to [[Wikipedia:VRT|the' .. ' Volunteer Response Team]].', tooltip = '${TOOLTIPFRAGMENT} because this Wikipedian is deceased' }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', link = 'Wikipedia:Protection policy#office', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Wikipedia:Protection policy|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#full|' .. 'protected]] from editing', templateeditor = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#template' .. '|protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Wikipedia:Protection' .. ' policy#semi|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under [[Wikipedia:Protection' .. ' policy#extended|extended confirmed protection]]', }, move = { default = 'This ${PAGETYPE} is currently [[Wikipedia:Protection policy#Move' .. ' protection|protected]] from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-confirmed-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|extendedconfirmed|move'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Protection padlock'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } g4f6dkimoikv05ulbf832zu7omkf2fc Template:Pp 10 16079 116942 41107 2025-03-23T07:40:52Z en>Paine Ellsworth 0 add [[WP:RCAT|rcat template]] 116942 wikitext text/x-wiki #REDIRECT [[Template:Protection padlock]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} dx0kgethp6nhl40w8n9za1d3oi6qn4n 116943 116942 2026-07-16T11:00:20Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Pp]] 116942 wikitext text/x-wiki #REDIRECT [[Template:Protection padlock]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} dx0kgethp6nhl40w8n9za1d3oi6qn4n Template:Endplainlist 10 16085 117206 39126 2024-02-17T04:52:14Z en>Pppery 0 Protected "[[Template:Endplainlist]]": Oops ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 39125 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> owuqpy73m48jricqo7bykll5w0j3c2o 117207 117206 2026-07-16T11:41:53Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Endplainlist]] 39125 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> owuqpy73m48jricqo7bykll5w0j3c2o Template:Navbox visibility 10 16092 116794 107005 2026-03-09T22:12:11Z en>Izno 0 useformat=mobile 116794 wikitext text/x-wiki Templates using the classes <code>class=navbox</code> ({{Template link|navbox}}) or <code>class=nomobile</code> ({{Template link|sidebar}}) are not displayed in article space on the [https://en.wikipedia.org/?useformat=mobile mobile web site] of English Wikipedia. Mobile page views accounted for 60% to 70% of all page views from 2020 through 2025. Briefly, these templates are not included in articles because 1) they are not well designed for mobile, and 2) they significantly increase page sizes&mdash;bad for mobile downloads&mdash;in a way that is not useful for the mobile use case. You can review/watch [[phab:T124168]] for further discussion.<noinclude> {{documentation}} </noinclude> 77id5neuep3ydyn5grroo8zp33rs1gn 116795 116794 2026-07-15T19:07:02Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Navbox_visibility]] 116794 wikitext text/x-wiki Templates using the classes <code>class=navbox</code> ({{Template link|navbox}}) or <code>class=nomobile</code> ({{Template link|sidebar}}) are not displayed in article space on the [https://en.wikipedia.org/?useformat=mobile mobile web site] of English Wikipedia. Mobile page views accounted for 60% to 70% of all page views from 2020 through 2025. Briefly, these templates are not included in articles because 1) they are not well designed for mobile, and 2) they significantly increase page sizes&mdash;bad for mobile downloads&mdash;in a way that is not useful for the mobile use case. You can review/watch [[phab:T124168]] for further discussion.<noinclude> {{documentation}} </noinclude> 77id5neuep3ydyn5grroo8zp33rs1gn Module:Transclusion count/data/N 828 16095 116846 106933 2026-07-12T05:11:32Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. 116846 Scribunto text/plain return { ["N"] = 3100, ["N.b."] = 2900, ["N/A"] = 23000, ["N/a"] = 65000, ["NA"] = 2400, ["NA-Class"] = 15000, ["NASCAR_next_race"] = 2400, ["NASTRO_comment"] = 33000, ["NBA_Draft_template_list"] = 3600, ["NBA_Year"] = 6100, ["NBA_color"] = 3800, ["NBA_color_cell"] = 4600, ["NBA_color_cell2"] = 3600, ["NBA_player_statistics_legend"] = 5900, ["NBA_player_statistics_start"] = 5000, ["NBA_roster_footer"] = 2300, ["NBA_roster_header"] = 2200, ["NCAA_color_cell"] = 12000, ["NCAA_secondary_color_cell"] = 5000, ["NCES_District_ID"] = 3500, ["NED"] = 11000, ["NEXTYEAR"] = 9900, ["NFLAltPrimaryStyle"] = 2600, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 16000, ["NFL_Year"] = 30000, ["NFL_predraft"] = 10000, ["NFL_predraft/check"] = 10000, ["NFL_predraft/ftin"] = 10000, ["NFLplayer"] = 2300, ["NFPA_704_diamond"] = 2000, ["NFPA_704_diamond/styles.css"] = 2000, ["NFPA_704_diamond/text"] = 2000, ["NFT"] = 7800, ["NFT_player"] = 33000, ["NGA"] = 3500, ["NGR"] = 2700, ["NHLE"] = 23000, ["NHLS_url"] = 2100, ["NLD"] = 13000, ["NLM_content"] = 2800, ["NOINDEX"] = 510000, ["NOMIS2011"] = 2200, ["NOR"] = 10000, ["NPG_name"] = 2200, ["NRDB_species"] = 7200, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 74000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3400, ["NRHP_navigation_box"] = 17000, ["NRHP_row"] = 3400, ["NRHP_style"] = 72000, ["NRHP_url"] = 30000, ["NRHP_url/core"] = 32000, ["NRISref"] = 74000, ["NRT"] = 2300, ["NSWcity"] = 2000, ["NSWcity/core"] = 2000, ["NUMBEROFSECTIONS"] = 5100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3200, ["NZL"] = 7300, ["NZ_electorate_link"] = 2500, ["Na"] = 4400, ["Nac"] = 4000, ["Namespace_detect"] = 476000, ["Namespace_detect_showall"] = 12000, ["Nastaliq"] = 11000, ["Nat_fs_end"] = 2900, ["NationalArchivesNote"] = 8100, ["National_Film_Awards/style"] = 2100, ["National_Heritage_List_for_England"] = 27000, ["National_Register_of_Historic_Places"] = 22000, ["National_Register_of_Historic_Places_in_New_York"] = 4800, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3300, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3200, ["National_field_hockey_squad"] = 4500, ["National_football_squad_start/styles.css"] = 2600, ["National_men's_basketball_team"] = 4200, ["National_men's_cricket_team"] = 5000, ["National_men's_cricket_team_right"] = 2400, ["National_men's_ice_hockey_team"] = 8100, ["National_men's_volleyball_team"] = 2500, ["National_rugby_union_team"] = 6600, ["National_squad"] = 45000, ["National_squad_no_numbers"] = 16000, ["National_women's_volleyball_team"] = 2100, ["Native_name"] = 37000, ["Native_name_checker"] = 86000, ["Native_name_list"] = 5400, ["Nav_year_links"] = 2500, ["Naval"] = 5500, ["Naval/core"] = 5500, ["Navbar"] = 42000, ["Navbar-collapsible"] = 2900, ["Navbar-header"] = 17000, ["Navbar-header/styles.css"] = 17000, ["Navbox"] = 3060000, ["Navbox_GR_munic"] = 3700, ["Navbox_Musical_artist"] = 9700, ["Navbox_Ukraine_district"] = 2500, ["Navbox_bottom"] = 17000, ["Navbox_decade_list"] = 12000, ["Navbox_documentation"] = 56000, ["Navbox_ice_hockey"] = 3400, ["Navbox_musical_artist"] = 246000, ["Navbox_musical_artist/styles.css"] = 246000, ["Navbox_rugby_league_squad"] = 5100, ["Navbox_season_by_team"] = 3300, ["Navbox_top"] = 17000, ["Navbox_visibility"] = 56000, ["Navbox_with_collapsible_groups"] = 151000, ["Navbox_with_collapsible_sections"] = 3000, ["Navbox_with_columns"] = 26000, ["Navboxes"] = 68000, ["Navboxes_colour"] = 2200, ["Navseasoncats"] = 124000, ["Navseasoncats_with_centuries_below_decade"] = 6600, ["Navseasoncats_with_decades_below_year"] = 16000, ["Navsource"] = 5400, ["Navy"] = 20000, ["Navy/core"] = 20000, ["Nay"] = 6900, ["Nbay"] = 6100, ["Nbh"] = 2100, ["Nbnd"] = 2700, ["Nbs"] = 19000, ["Nbsp"] = 548000, ["Nbsp_to_space"] = 25000, ["Ndash"] = 30000, ["Nee"] = 17000, ["NeilBrownPlayers"] = 3100, ["Net_register_tonnage"] = 2300, ["Netflix_title"] = 2300, ["New_user_bar"] = 57000, ["Newbot"] = 4500, ["Next_period"] = 26000, ["Nfly"] = 2500, ["Nihongo"] = 108000, ["Nihongo2"] = 13000, ["Nihongo_foot"] = 4000, ["No"] = 12000, ["No."] = 15000, ["No2"] = 13000, ["NoSpam"] = 4000, ["NoSpamEmail"] = 17000, ["No_bold"] = 3000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_documentation"] = 3800, ["No_footnotes"] = 55000, ["No_ping"] = 415000, ["No_ping2"] = 2300, ["No_plot"] = 12000, ["No_redirect"] = 723000, ["No_significant_coverage_(sports)"] = 5200, ["No_spam"] = 330000, ["No_wrap"] = 8500, ["Nobold"] = 476000, ["Nobold/styles.css"] = 476000, ["Nobr"] = 7200, ["Nobreak"] = 974000, ["Nochange"] = 3000, ["Noindex"] = 4900, ["Noitalic"] = 5600, ["Noitalic/styles.css"] = 5600, ["Nom"] = 47000, ["Nominated"] = 54000, ["Non-English-language_text_category"] = 3800, ["Non-admin_closure"] = 4200, ["Non-admin_closure_(requested_moves)"] = 4600, ["Non-admin_comment"] = 3600, ["Non-album_single"] = 4200, ["Non-album_singles"] = 3100, ["Non-diffusing"] = 4600, ["Non-diffusing_parent_category"] = 4400, ["Non-diffusing_subcategory"] = 36000, ["Non-free_2D_art"] = 7800, ["Non-free_3D_art"] = 2700, ["Non-free_album_cover"] = 222000, ["Non-free_audio_sample"] = 9000, ["Non-free_biog-pic"] = 37000, ["Non-free_book_cover"] = 64000, ["Non-free_character"] = 3200, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 15000, ["Non-free_fair_use_in"] = 12000, ["Non-free_file_with_no_commercial_use_license"] = 2500, ["Non-free_film_poster"] = 104000, ["Non-free_film_screenshot"] = 4800, ["Non-free_game_cover"] = 8600, ["Non-free_game_screenshot"] = 5500, ["Non-free_historic_image"] = 18000, ["Non-free_image_data"] = 8100, ["Non-free_image_rationale"] = 9000, ["Non-free_logo"] = 161000, ["Non-free_magazine_cover"] = 9800, ["Non-free_media"] = 819000, ["Non-free_media_data"] = 9500, ["Non-free_media_rationale"] = 11000, ["Non-free_music_video_screenshot"] = 2100, ["Non-free_newspaper_image"] = 2200, ["Non-free_poster"] = 23000, ["Non-free_promotional"] = 6000, ["Non-free_school_logo"] = 11000, ["Non-free_seal"] = 9200, ["Non-free_symbol"] = 5800, ["Non-free_television_screenshot"] = 12000, ["Non-free_title-card"] = 12000, ["Non-free_use_rationale"] = 765000, ["Non-free_use_rationale/styles.css"] = 775000, ["Non-free_use_rationale_2"] = 241000, ["Non-free_use_rationale_album_cover"] = 151000, ["Non-free_use_rationale_biog"] = 2700, ["Non-free_use_rationale_book_cover"] = 20000, ["Non-free_use_rationale_logo"] = 127000, ["Non-free_use_rationale_poster"] = 62000, ["Non-free_use_rationale_title-card"] = 4500, ["Non-free_use_rationale_video_cover"] = 6500, ["Non-free_use_rationale_video_game_cover"] = 11000, ["Non-free_video_cover"] = 17000, ["Non-free_video_game_cover"] = 23000, ["Non-free_video_game_cover/platform"] = 23000, ["Non-free_video_game_screenshot"] = 12000, ["Non-free_video_game_screenshot/platform"] = 11000, ["Non-free_with_NC"] = 2300, ["Non_breaking_en_dash"] = 2800, ["Non_breaking_hyphen"] = 3100, ["Nonumtoc"] = 3200, ["Nonumtoc/styles.css"] = 3200, ["Noping"] = 388000, ["Noprint"] = 2400, ["Noredirect"] = 8800, ["Normal"] = 9700, ["Normalwraplink"] = 7100, ["North_America_topic"] = 3800, ["Nospam"] = 5400, ["Not-PD-US-expired-min-year"] = 64000, ["Not_a_ballot"] = 8500, ["Not_a_typo"] = 14000, ["Not_around"] = 11000, ["Not_done"] = 29000, ["Notability"] = 59000, ["Notavote"] = 2300, ["Notdone"] = 6200, ["Note"] = 27000, ["NoteFoot"] = 5600, ["NoteTag"] = 6000, ["Note_label"] = 9500, ["Notelist"] = 329000, ["Notelist-lr"] = 5100, ["Notelist-talk"] = 2000, ["Notelist-ua"] = 9300, ["Notes"] = 4200, ["Noteslist"] = 4800, ["Notice"] = 120000, ["Nowiki_="] = 2300, ["Nowrap"] = 1910000, ["Np"] = 5700, ["Npby"] = 2900, ["Nq"] = 4700, ["Nrut"] = 6600, ["Ns"] = 3200, ["Ns0"] = 86000, ["Ns_has_subpages"] = 3800000, ["Nsmdns"] = 3000, ["Nts"] = 22000, ["Ntsh"] = 3700, ["Number_table_sorting"] = 41000, ["Number_table_sorting_hidden"] = 3700, ["Numero"] = 4600, ["Nutshell"] = 5000, ["Nw="] = 2300, ["Née"] = 4100, ["Module:NUMBEROFSECTIONS"] = 5100, ["Module:Namespace_detect"] = 541000, ["Module:Namespace_detect/config"] = 5190000, ["Module:Namespace_detect/data"] = 5190000, ["Module:National_squad"] = 59000, ["Module:Native_name"] = 121000, ["Module:Navbar"] = 5180000, ["Module:Navbar/configuration"] = 5180000, ["Module:Navbar/styles.css"] = 5180000, ["Module:Navbox"] = 4850000, ["Module:Navbox/configuration"] = 4850000, ["Module:Navbox/styles.css"] = 4850000, ["Module:Navbox_ice_hockey"] = 3400, ["Module:Navbox_top_and_bottom"] = 17000, ["Module:Navbox_with_collapsible_groups"] = 15000, ["Module:Navboxes"] = 70000, ["Module:Nihongo"] = 112000, ["Module:No_ping"] = 499000, ["Module:Noinclude"] = 458000, ["Module:Normalize_volume_and_edition"] = 3600, ["Module:Ns_has_subpages"] = 3800000, ["Module:Number_table_sorting"] = 43000, } mbmeffvvn7fyajm9ik5xalb1awfhbsl 116847 116846 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Transclusion_count/data/N]] 116846 Scribunto text/plain return { ["N"] = 3100, ["N.b."] = 2900, ["N/A"] = 23000, ["N/a"] = 65000, ["NA"] = 2400, ["NA-Class"] = 15000, ["NASCAR_next_race"] = 2400, ["NASTRO_comment"] = 33000, ["NBA_Draft_template_list"] = 3600, ["NBA_Year"] = 6100, ["NBA_color"] = 3800, ["NBA_color_cell"] = 4600, ["NBA_color_cell2"] = 3600, ["NBA_player_statistics_legend"] = 5900, ["NBA_player_statistics_start"] = 5000, ["NBA_roster_footer"] = 2300, ["NBA_roster_header"] = 2200, ["NCAA_color_cell"] = 12000, ["NCAA_secondary_color_cell"] = 5000, ["NCES_District_ID"] = 3500, ["NED"] = 11000, ["NEXTYEAR"] = 9900, ["NFLAltPrimaryStyle"] = 2600, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 16000, ["NFL_Year"] = 30000, ["NFL_predraft"] = 10000, ["NFL_predraft/check"] = 10000, ["NFL_predraft/ftin"] = 10000, ["NFLplayer"] = 2300, ["NFPA_704_diamond"] = 2000, ["NFPA_704_diamond/styles.css"] = 2000, ["NFPA_704_diamond/text"] = 2000, ["NFT"] = 7800, ["NFT_player"] = 33000, ["NGA"] = 3500, ["NGR"] = 2700, ["NHLE"] = 23000, ["NHLS_url"] = 2100, ["NLD"] = 13000, ["NLM_content"] = 2800, ["NOINDEX"] = 510000, ["NOMIS2011"] = 2200, ["NOR"] = 10000, ["NPG_name"] = 2200, ["NRDB_species"] = 7200, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 74000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3400, ["NRHP_navigation_box"] = 17000, ["NRHP_row"] = 3400, ["NRHP_style"] = 72000, ["NRHP_url"] = 30000, ["NRHP_url/core"] = 32000, ["NRISref"] = 74000, ["NRT"] = 2300, ["NSWcity"] = 2000, ["NSWcity/core"] = 2000, ["NUMBEROFSECTIONS"] = 5100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3200, ["NZL"] = 7300, ["NZ_electorate_link"] = 2500, ["Na"] = 4400, ["Nac"] = 4000, ["Namespace_detect"] = 476000, ["Namespace_detect_showall"] = 12000, ["Nastaliq"] = 11000, ["Nat_fs_end"] = 2900, ["NationalArchivesNote"] = 8100, ["National_Film_Awards/style"] = 2100, ["National_Heritage_List_for_England"] = 27000, ["National_Register_of_Historic_Places"] = 22000, ["National_Register_of_Historic_Places_in_New_York"] = 4800, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3300, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3200, ["National_field_hockey_squad"] = 4500, ["National_football_squad_start/styles.css"] = 2600, ["National_men's_basketball_team"] = 4200, ["National_men's_cricket_team"] = 5000, ["National_men's_cricket_team_right"] = 2400, ["National_men's_ice_hockey_team"] = 8100, ["National_men's_volleyball_team"] = 2500, ["National_rugby_union_team"] = 6600, ["National_squad"] = 45000, ["National_squad_no_numbers"] = 16000, ["National_women's_volleyball_team"] = 2100, ["Native_name"] = 37000, ["Native_name_checker"] = 86000, ["Native_name_list"] = 5400, ["Nav_year_links"] = 2500, ["Naval"] = 5500, ["Naval/core"] = 5500, ["Navbar"] = 42000, ["Navbar-collapsible"] = 2900, ["Navbar-header"] = 17000, ["Navbar-header/styles.css"] = 17000, ["Navbox"] = 3060000, ["Navbox_GR_munic"] = 3700, ["Navbox_Musical_artist"] = 9700, ["Navbox_Ukraine_district"] = 2500, ["Navbox_bottom"] = 17000, ["Navbox_decade_list"] = 12000, ["Navbox_documentation"] = 56000, ["Navbox_ice_hockey"] = 3400, ["Navbox_musical_artist"] = 246000, ["Navbox_musical_artist/styles.css"] = 246000, ["Navbox_rugby_league_squad"] = 5100, ["Navbox_season_by_team"] = 3300, ["Navbox_top"] = 17000, ["Navbox_visibility"] = 56000, ["Navbox_with_collapsible_groups"] = 151000, ["Navbox_with_collapsible_sections"] = 3000, ["Navbox_with_columns"] = 26000, ["Navboxes"] = 68000, ["Navboxes_colour"] = 2200, ["Navseasoncats"] = 124000, ["Navseasoncats_with_centuries_below_decade"] = 6600, ["Navseasoncats_with_decades_below_year"] = 16000, ["Navsource"] = 5400, ["Navy"] = 20000, ["Navy/core"] = 20000, ["Nay"] = 6900, ["Nbay"] = 6100, ["Nbh"] = 2100, ["Nbnd"] = 2700, ["Nbs"] = 19000, ["Nbsp"] = 548000, ["Nbsp_to_space"] = 25000, ["Ndash"] = 30000, ["Nee"] = 17000, ["NeilBrownPlayers"] = 3100, ["Net_register_tonnage"] = 2300, ["Netflix_title"] = 2300, ["New_user_bar"] = 57000, ["Newbot"] = 4500, ["Next_period"] = 26000, ["Nfly"] = 2500, ["Nihongo"] = 108000, ["Nihongo2"] = 13000, ["Nihongo_foot"] = 4000, ["No"] = 12000, ["No."] = 15000, ["No2"] = 13000, ["NoSpam"] = 4000, ["NoSpamEmail"] = 17000, ["No_bold"] = 3000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_documentation"] = 3800, ["No_footnotes"] = 55000, ["No_ping"] = 415000, ["No_ping2"] = 2300, ["No_plot"] = 12000, ["No_redirect"] = 723000, ["No_significant_coverage_(sports)"] = 5200, ["No_spam"] = 330000, ["No_wrap"] = 8500, ["Nobold"] = 476000, ["Nobold/styles.css"] = 476000, ["Nobr"] = 7200, ["Nobreak"] = 974000, ["Nochange"] = 3000, ["Noindex"] = 4900, ["Noitalic"] = 5600, ["Noitalic/styles.css"] = 5600, ["Nom"] = 47000, ["Nominated"] = 54000, ["Non-English-language_text_category"] = 3800, ["Non-admin_closure"] = 4200, ["Non-admin_closure_(requested_moves)"] = 4600, ["Non-admin_comment"] = 3600, ["Non-album_single"] = 4200, ["Non-album_singles"] = 3100, ["Non-diffusing"] = 4600, ["Non-diffusing_parent_category"] = 4400, ["Non-diffusing_subcategory"] = 36000, ["Non-free_2D_art"] = 7800, ["Non-free_3D_art"] = 2700, ["Non-free_album_cover"] = 222000, ["Non-free_audio_sample"] = 9000, ["Non-free_biog-pic"] = 37000, ["Non-free_book_cover"] = 64000, ["Non-free_character"] = 3200, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 15000, ["Non-free_fair_use_in"] = 12000, ["Non-free_file_with_no_commercial_use_license"] = 2500, ["Non-free_film_poster"] = 104000, ["Non-free_film_screenshot"] = 4800, ["Non-free_game_cover"] = 8600, ["Non-free_game_screenshot"] = 5500, ["Non-free_historic_image"] = 18000, ["Non-free_image_data"] = 8100, ["Non-free_image_rationale"] = 9000, ["Non-free_logo"] = 161000, ["Non-free_magazine_cover"] = 9800, ["Non-free_media"] = 819000, ["Non-free_media_data"] = 9500, ["Non-free_media_rationale"] = 11000, ["Non-free_music_video_screenshot"] = 2100, ["Non-free_newspaper_image"] = 2200, ["Non-free_poster"] = 23000, ["Non-free_promotional"] = 6000, ["Non-free_school_logo"] = 11000, ["Non-free_seal"] = 9200, ["Non-free_symbol"] = 5800, ["Non-free_television_screenshot"] = 12000, ["Non-free_title-card"] = 12000, ["Non-free_use_rationale"] = 765000, ["Non-free_use_rationale/styles.css"] = 775000, ["Non-free_use_rationale_2"] = 241000, ["Non-free_use_rationale_album_cover"] = 151000, ["Non-free_use_rationale_biog"] = 2700, ["Non-free_use_rationale_book_cover"] = 20000, ["Non-free_use_rationale_logo"] = 127000, ["Non-free_use_rationale_poster"] = 62000, ["Non-free_use_rationale_title-card"] = 4500, ["Non-free_use_rationale_video_cover"] = 6500, ["Non-free_use_rationale_video_game_cover"] = 11000, ["Non-free_video_cover"] = 17000, ["Non-free_video_game_cover"] = 23000, ["Non-free_video_game_cover/platform"] = 23000, ["Non-free_video_game_screenshot"] = 12000, ["Non-free_video_game_screenshot/platform"] = 11000, ["Non-free_with_NC"] = 2300, ["Non_breaking_en_dash"] = 2800, ["Non_breaking_hyphen"] = 3100, ["Nonumtoc"] = 3200, ["Nonumtoc/styles.css"] = 3200, ["Noping"] = 388000, ["Noprint"] = 2400, ["Noredirect"] = 8800, ["Normal"] = 9700, ["Normalwraplink"] = 7100, ["North_America_topic"] = 3800, ["Nospam"] = 5400, ["Not-PD-US-expired-min-year"] = 64000, ["Not_a_ballot"] = 8500, ["Not_a_typo"] = 14000, ["Not_around"] = 11000, ["Not_done"] = 29000, ["Notability"] = 59000, ["Notavote"] = 2300, ["Notdone"] = 6200, ["Note"] = 27000, ["NoteFoot"] = 5600, ["NoteTag"] = 6000, ["Note_label"] = 9500, ["Notelist"] = 329000, ["Notelist-lr"] = 5100, ["Notelist-talk"] = 2000, ["Notelist-ua"] = 9300, ["Notes"] = 4200, ["Noteslist"] = 4800, ["Notice"] = 120000, ["Nowiki_="] = 2300, ["Nowrap"] = 1910000, ["Np"] = 5700, ["Npby"] = 2900, ["Nq"] = 4700, ["Nrut"] = 6600, ["Ns"] = 3200, ["Ns0"] = 86000, ["Ns_has_subpages"] = 3800000, ["Nsmdns"] = 3000, ["Nts"] = 22000, ["Ntsh"] = 3700, ["Number_table_sorting"] = 41000, ["Number_table_sorting_hidden"] = 3700, ["Numero"] = 4600, ["Nutshell"] = 5000, ["Nw="] = 2300, ["Née"] = 4100, ["Module:NUMBEROFSECTIONS"] = 5100, ["Module:Namespace_detect"] = 541000, ["Module:Namespace_detect/config"] = 5190000, ["Module:Namespace_detect/data"] = 5190000, ["Module:National_squad"] = 59000, ["Module:Native_name"] = 121000, ["Module:Navbar"] = 5180000, ["Module:Navbar/configuration"] = 5180000, ["Module:Navbar/styles.css"] = 5180000, ["Module:Navbox"] = 4850000, ["Module:Navbox/configuration"] = 4850000, ["Module:Navbox/styles.css"] = 4850000, ["Module:Navbox_ice_hockey"] = 3400, ["Module:Navbox_top_and_bottom"] = 17000, ["Module:Navbox_with_collapsible_groups"] = 15000, ["Module:Navboxes"] = 70000, ["Module:Nihongo"] = 112000, ["Module:No_ping"] = 499000, ["Module:Noinclude"] = 458000, ["Module:Normalize_volume_and_edition"] = 3600, ["Module:Ns_has_subpages"] = 3800000, ["Module:Number_table_sorting"] = 43000, } mbmeffvvn7fyajm9ik5xalb1awfhbsl Template:Collapse top 10 16474 116898 68879 2026-04-01T12:40:03Z en>GoldRingChip 0 Reverted edits by [[Special:Contribs/GoldRingChip|GoldRingChip]] ([[User talk:GoldRingChip|talk]]) to last version by Explicit 116898 wikitext text/x-wiki {{ safesubst:<noinclude/>ifsubst||<templatestyles src="Template:Collapse_top/styles.css"/>}} <div style="margin-left:{{{indent|0}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section --> {| role="presentation" <!-- Template:Collapse top --> class="mw-collapsible mw-archivedtalk {{<includeonly>safesubst:</includeonly>#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="color:inherit; background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{<includeonly>safesubst:</includeonly>#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;" |- ! class="{{main other|cot-header-mainspace|cot-header-other}}" style="{{<includeonly>safesubst:</includeonly>#if:{{{bg|}}}|background:{{{bg}}}|{{ safesubst:<noinclude/>ifsubst|{{main other|background:#F0F2F5|background:#CCFFCC}}|}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}|left|{{<includeonly>safesubst:</includeonly>#if:{{{align|}}}|left|center}}}}; {{<includeonly>safesubst:</includeonly>#if:{{{fc|}}}|color: {{{fc}}};|{{<includeonly>safesubst:</includeonly>#if:{{{bg|}}}|color:#202122|{{ safesubst:<noinclude/>ifsubst|color:black;|}}}}}}" | <div style="font-size:115%;{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}||margin:0 4em}}">{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> {{<includeonly>safesubst:</includeonly>#if:{{{warning|{{{2|}}}}}} |{{<includeonly>safesubst:</includeonly>!}}- {{<includeonly>safesubst:</includeonly>!}} style="text-align:center; font-style:italic;" {{<includeonly>safesubst:</includeonly>!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }} |- | style="color:inherit; border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|var(--background-color-base, #fff)}}};" {{<includeonly>safesubst:</includeonly>!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} </noinclude> 81u93un6q58tt6om5l86tbem971xsxy 116899 116898 2026-07-16T10:58:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Collapse_top]] 116898 wikitext text/x-wiki {{ safesubst:<noinclude/>ifsubst||<templatestyles src="Template:Collapse_top/styles.css"/>}} <div style="margin-left:{{{indent|0}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section --> {| role="presentation" <!-- Template:Collapse top --> class="mw-collapsible mw-archivedtalk {{<includeonly>safesubst:</includeonly>#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="color:inherit; background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{<includeonly>safesubst:</includeonly>#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;" |- ! class="{{main other|cot-header-mainspace|cot-header-other}}" style="{{<includeonly>safesubst:</includeonly>#if:{{{bg|}}}|background:{{{bg}}}|{{ safesubst:<noinclude/>ifsubst|{{main other|background:#F0F2F5|background:#CCFFCC}}|}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}|left|{{<includeonly>safesubst:</includeonly>#if:{{{align|}}}|left|center}}}}; {{<includeonly>safesubst:</includeonly>#if:{{{fc|}}}|color: {{{fc}}};|{{<includeonly>safesubst:</includeonly>#if:{{{bg|}}}|color:#202122|{{ safesubst:<noinclude/>ifsubst|color:black;|}}}}}}" | <div style="font-size:115%;{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}||margin:0 4em}}">{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> {{<includeonly>safesubst:</includeonly>#if:{{{warning|{{{2|}}}}}} |{{<includeonly>safesubst:</includeonly>!}}- {{<includeonly>safesubst:</includeonly>!}} style="text-align:center; font-style:italic;" {{<includeonly>safesubst:</includeonly>!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }} |- | style="color:inherit; border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|var(--background-color-base, #fff)}}};" {{<includeonly>safesubst:</includeonly>!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} </noinclude> 81u93un6q58tt6om5l86tbem971xsxy Template:Warning 10 16475 116900 41127 2026-01-08T01:42:46Z en>HouseBlaster 0 +{{[[TM:Editnotice EXPECTUNUSEDTEMPLATE|Editnotice EXPECTUNUSEDTEMPLATE]]}} 116900 wikitext text/x-wiki {{Mbox | name = Warning | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | image = {{#if:{{{image|}}}| [[File:{{{image}}}|{{{imagesize|40px}}}|Warning]] }} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Warning]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}{{Editnotice EXPECTUNUSEDTEMPLATE}}<noinclude> <!-- Add categories to the /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> qlfgcdm78oom27fkyum3vvodkp2mpjk 116901 116900 2026-07-16T10:58:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Warning]] 116900 wikitext text/x-wiki {{Mbox | name = Warning | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | image = {{#if:{{{image|}}}| [[File:{{{image}}}|{{{imagesize|40px}}}|Warning]] }} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Warning]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}{{Editnotice EXPECTUNUSEDTEMPLATE}}<noinclude> <!-- Add categories to the /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> qlfgcdm78oom27fkyum3vvodkp2mpjk Module:Icon 828 16563 116786 40335 2026-01-30T06:27:05Z en>Hike395 0 rm unneeded caching 116786 Scribunto text/plain -- This module implements [[Template:Icon]]. require("strict") local yesNo = require("Module:Yesno") local getArgs = require("Module:Arguments").getArgs local p = {} -- Determine whether we're being called from a sandbox local sandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) and '/sandbox' or '' -- Implements [[Template:Icon]] -- Returns the icon image corresponding to a string (like 'B') function p._main(args, data) local data_module = 'Module:Icon/data'..sandbox data = data or mw.loadData(data_module) local code = args.class or args[1] local iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData then iconData = data._DEFAULT end return string.format( '[[File:%s%s%s|%s|class=noviewer|alt=%s]]', iconData.image, iconData.tooltip and '|' .. iconData.tooltip or '', iconData.link == false and '|link=' or '', args.size or '16x16px', iconData.alt or '' ) end -- Implements [[Template:Icon link]], a superset of [[Template:Icon]] -- Returns an icon, plus a suitably formatted wikilink function p._link(args, data) args.size = args.size or args.iconsize local icon = p._main(args, data) -- If no link given in args[2], default back to [[Template:Icon]] if not args[2] then return icon end -- Strip wiki markup out of link local getPlain = require("Module:Text").Text().getPlain local link = getPlain(args[2]) local display = args[3] or args[2] -- italicize display string, if requested if yesNo(args.i) or yesNo(args.italic) or yesNo(args.italics) then display = '<i>'..display..'</i>' end -- if display is link, just use standard wlink if link == display then return '<span class="nowrap">'..icon..' </span>[['..link..']]' end return '<span class="nowrap">'..icon..' </span>[['..link..'|'..display..']]' end function p.main(frame) local args = getArgs(frame,{parentFirst=true}) return p._main(args) end function p.link(frame) local args = getArgs(frame,{parentFirst=true}) return p._link(args) end p[''] = function (frame) return p._main(frame.args) end return p 7i1qzcjn891dcsvokxm98rcqxwkasz0 116787 116786 2026-07-15T19:07:00Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Icon]] 116786 Scribunto text/plain -- This module implements [[Template:Icon]]. require("strict") local yesNo = require("Module:Yesno") local getArgs = require("Module:Arguments").getArgs local p = {} -- Determine whether we're being called from a sandbox local sandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) and '/sandbox' or '' -- Implements [[Template:Icon]] -- Returns the icon image corresponding to a string (like 'B') function p._main(args, data) local data_module = 'Module:Icon/data'..sandbox data = data or mw.loadData(data_module) local code = args.class or args[1] local iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData then iconData = data._DEFAULT end return string.format( '[[File:%s%s%s|%s|class=noviewer|alt=%s]]', iconData.image, iconData.tooltip and '|' .. iconData.tooltip or '', iconData.link == false and '|link=' or '', args.size or '16x16px', iconData.alt or '' ) end -- Implements [[Template:Icon link]], a superset of [[Template:Icon]] -- Returns an icon, plus a suitably formatted wikilink function p._link(args, data) args.size = args.size or args.iconsize local icon = p._main(args, data) -- If no link given in args[2], default back to [[Template:Icon]] if not args[2] then return icon end -- Strip wiki markup out of link local getPlain = require("Module:Text").Text().getPlain local link = getPlain(args[2]) local display = args[3] or args[2] -- italicize display string, if requested if yesNo(args.i) or yesNo(args.italic) or yesNo(args.italics) then display = '<i>'..display..'</i>' end -- if display is link, just use standard wlink if link == display then return '<span class="nowrap">'..icon..' </span>[['..link..']]' end return '<span class="nowrap">'..icon..' </span>[['..link..'|'..display..']]' end function p.main(frame) local args = getArgs(frame,{parentFirst=true}) return p._main(args) end function p.link(frame) local args = getArgs(frame,{parentFirst=true}) return p._link(args) end p[''] = function (frame) return p._main(frame.args) end return p 7i1qzcjn891dcsvokxm98rcqxwkasz0 Module:Icon/data 828 16564 116788 45069 2026-07-12T17:40:40Z en>Reconrabbit 0 Replaced former featured list icon to match former featured article, also reflecting change to [[Module:Article history/config]] 116788 Scribunto text/plain -- This module stores icon data for [[Module:Icon]]. -------------------------------------------------------------------------------- -- Icon data -------------------------------------------------------------------------------- local data = { fa = { image = "Featured article star.svg", tooltip = "Featured article", link = true, }, far = { image = "Cscr-star piece.png", tooltip = "Featured article review", link = true, }, farc = { image = "Cscr-star piece.png", tooltip = "Featured article removal candidate", link = true, }, ffa = { aliases = {"dfa"}, image = "Featured article star - cross.svg", tooltip = "Former featured article", link = true, }, fac = { aliases = {"fan"}, image = "Cscr-candidate.svg", tooltip = "Featured article candidate", link = true, }, ffac = { aliases = {"nofa"}, image = "Cscr-former.svg", tooltip = "Former featured article candidate", link = true, }, fl = { image = "Featured article star.svg", tooltip = "Featured list", link = true, }, flrc = { aliases = {"flr"}, image = "Cscr-star piece.png", tooltip = "Featured list removal candidate", link = true, }, ffl = { aliases = {"dfl"}, image = "Featured article star - cross.svg", tooltip = "Former featured list", link = true, }, flc = { aliases = {"fln"}, image = "Cscr-candidate.svg", tooltip = "Featured list candidate", link = true, }, fflc = { aliases = {"nofl"}, image = "Cscr-former.svg", tooltip = "Former featured list candidate", link = true, }, a = { image = "Symbol a class.svg", tooltip = "A-Class article", link = true, }, admin = { aliases = {"mop"}, image = "Wikipedia Administrator.svg", tooltip = "Administrator", link = true, }, dac = { aliases = {"daa"}, image = "Symbol unsupport A vote.svg", tooltip = "Demoted A-Class article", link = true, }, acc = { aliases = {"acn", "aac"}, image = "A candidate.svg", tooltip = "A-Class article candidate", link = true, }, noac = { aliases = {"faac"}, image = "Symbol unsupport A vote.svg", tooltip = "Failed A-Class article candidate", link = true, }, ga = { image = "Symbol support vote.svg", tooltip = "Good article", link = false, }, gar = { image = "GA Candidate Neutral vote(ChaosNil).svg", tooltip = "Good article reassessment", link = false, }, dga = { image = "Symbol unsupport vote.svg", tooltip = "Delisted good article", link = false, }, gan = { aliases = {"gac"}, image = "GA candidate.svg", tooltip = "Good article nominee", link = false, }, ga2 = { image = "Symbol neutral vote.svg", tooltip = "Good article, 2nd opinion", link = false, }, gah = { image = "Symbol wait.svg", tooltip = "Good article on hold", link = false, }, fgan = { aliases = {"noga", "gaf", "gf"}, image = "Symbol oppose vote.svg", tooltip = "Former good article nominee", link = false, }, fp = { image = "Cscr-featured.svg", tooltip = "Featured picture", link = true, }, fpc = { aliases = {"fpn"}, image = "Cscr-candidate.svg", tooltip = "Featured picture candidate", link = true, }, ffp = { image = "Cscr-former.svg", tooltip = "Former featured picture", link = true, }, vp = { image = "ENWP VP Logo.svg", tooltip = "Valued picture", link = true, }, vpc = { image = "Valued pics 1.svg", tooltip = "Valued picture candidate", link = true, }, fs = { image = "Cscr-featured.svg", tooltip = "Featured sound", link = true, }, ffs = { image = "Cscr-former.svg", tooltip = "Former featured sound", link = true, }, fsc = { image = "Cscr-candidate.svg", tooltip = "Featured sound candidate", link = true, }, fpo = { image = "Linecons big-star.svg", tooltip = "Before the featured portal process ceased in 2017, this had been designated as a featured portal.", link = true, }, fpor = { image = "Cscr-star piece.png", tooltip = "Featured portal review", link = true, }, ffpo = { image = "Featured article star - cross.svg", tooltip = "Former featured portal", link = true, }, fpoc = { image = "Cscr-candidate.svg", tooltip = "Featured portal candidate", link = true, }, ft = { image = "Cscr-featuredtopic.svg", tooltip = "Featured topic", link = true, }, ftrc = { image = "Cscr-star piece.png", tooltip = "Featured topic removal candidate", link = true, }, fft = { aliases = {"dft"}, image = "DFT candidate_cluster.svg", tooltip = "Former featured topic", link = true, }, ftc = { aliases = {"ftn"}, image = "FT candidate cluster.svg", tooltip = "Featured topic candidate", link = false, }, gt = { image = "Support cluster.svg", tooltip = "Good topic", link = false, }, gtrc = { image = "Symbol unsupport vote.svg", tooltip = "Good topic removal candidate", link = false, }, gtc = { aliases = {"gtn"}, image = "GA candidate cluster.svg", tooltip = "Good topic candidate", link = false, }, bplus = { aliases = {"b+"}, image = "Symbol bplus class.svg", tooltip = "Bplus-Class article", link = true, }, b = { image = "Symbol b class.svg", tooltip = "B-Class article", link = true, }, br = { aliases = {"bcr"}, image = "Bclass-checklist.svg", tooltip = "B-Class review", link = true, }, c = { image = "Symbol c class.svg", tooltip = "C-Class article", link = true, }, start = { image = "Symbol start class.svg", tooltip = "Start-Class article", link = true, }, stub = { image = "Symbol stub class.svg", tooltip = "Stub-Class article", link = true, }, list = { aliases = {"comparison"}, image = "Symbol list class.svg", tooltip = "List-Class article", link = false, }, no = { image = "Crystal button cancel.svg", tooltip = "Unknown-Class article", link = true, }, book = { image = "Symbol book class2.svg", tooltip = "Wikipedia book", link = true, }, category = { aliases = {"cat", "categ"}, image = "Symbol category class.svg", tooltip = "Category", link = false, }, disambiguation = { aliases = {"dab", "disamb", "disambig"}, image = "Symbol dab class.svg", tooltip = "Disambiguation page", link = true, }, image = { aliases = {"file"}, image = "Symbol file class.svg", tooltip = "File", link = true, }, needed = { image = "Symbol needed class.svg", tooltip = "Needed article", link = false, }, outline = { image = "Global thinking.svg", tooltip = "Outline", link = false, }, portal = { image = "Symbol portal class.svg", tooltip = "Portal", link = true, }, project = { image = "Symbol project class.svg", tooltip = "Project page", link = false, }, redirect = { aliases = {"red", "redir"}, image = "Symbol redirect vote2.svg", tooltip = "Redirect", link = true, }, template = { aliases = {"temp", "templ"}, image = "Symbol template class pink.svg", tooltip = "Template", link = false, }, essay = { image = "Essay.svg", tooltip = "Essay", link = false, }, na = { image = "Symbol na class.svg", tooltip = "Non-article page", link = true, }, aa = { image = "Yes check.svg", tooltip = "Audited article of limited subject matter", link = false, }, da = { image = "Symbol oppose vote.svg", tooltip = "Demoted article", link = false, }, dyk = { image = "Symbol question.svg", tooltip = "Did You Know?", link = false, }, dyk2 = { image = "DYK questionmark icon.svg", tooltip = "Did You Know?", link = false, }, pr = { image = "Nuvola apps kedit.png", tooltip = "Peer review", link = true, }, ppr = { image = "Nuvola apps kedit.png", tooltip = "Portal peer review", link = true, }, q = { aliases = {"question"}, image = "Symbol question.svg", tooltip = "Question", link = false, }, cleanup = { image = "Edit-clear.svg", tooltip = "Cleanup work", link = false, }, qi = { image = "Quality images logo.svg", tooltip = "Quality image on Wikimedia Commons", link = false, }, vi = { image = "Valued image seal.svg", tooltip = "Valued image on Wikimedia Commons", link = false, }, tfa = { image = "Wikipedia-logo.svg", tooltip = "Today's Featured Article", link = true, }, tfl = { image = "Wikipedia-logo.svg", tooltip = "Today's Featured List", link = true, }, itn = { image = "Globe current.svg", tooltip = "In The News", link = true, }, otd = { image = "Nuvola apps date.svg", tooltip = "On This Day", link = true, }, wikiproject = { image = "People icon.svg", tooltip = "WikiProject", link = false, }, goce = { image = "Writing Magnifying.PNG", tooltip = "Guild of Copy Editors", link = true, }, wikipedia = { image = "Wikipedia-logo.svg", tooltip = "Wikipedia page", link = true, }, commons = { image = "Commons-logo.svg", tooltip = "Commons page", link = true, }, wikiquote = { image = "Wikiquote-logo.svg", tooltip = "Wikiquote page", link = false, }, wikiversity = { image = "Wikiversity logo 2017.svg", tooltip = "Wikiversity page", link = true, }, wikibooks = { image = "Wikibooks-logo.svg", tooltip = "Wikibooks page", link = true, }, wikisource = { image = "Wikisource-logo.svg", tooltip = "Wikisource page", link = true, }, wiktionary = { image = "Wiktionary-logo.svg", tooltip = "Wiktionary page", link = true, }, wikinews = { image = "Wikinews-logo.svg", tooltip = "Wikinews page", link = true, }, wikispecies = { image = "Wikispecies-logo.svg", tooltip = "Wikispecies page", link = true, }, wikidata = { image = "Wikidata-logo.svg", tooltip = "Wikidata page", link = false, }, wikivoyage = { image = "Wikivoyage-logo.svg", tooltip = "Wikivoyage page", link = true, }, mediawiki = { image = "MediaWiki-2020-icon.svg", tooltip = "MediaWiki", link = true, }, phabricator = { aliases = {"phab"}, image = "Favicon-Phabricator-WM.svg", tooltip = "Phabricator", link = false, }, wikitech = { image = "Wikitech-2021-blue-icon.svg", tooltip = "Wikitech", link = true, }, meta = { image = "Wikimedia Community Logo.svg", tooltip = "Meta-wiki page", link = false, }, four = { aliases = {"4a"}, image = "Four Award with draft icon.svg", tooltip = "Four Award", link = false, }, million = { image = "Million award logo.svg", tooltip = "Million Award", link = true, }, module = { image = "Lua-logo-nolabel.svg", tooltip = "Module", link = false, }, vital = { image = "Círculos_Concéntricos.svg", tooltip = "Vital article", link = false, }, potd = { image = "Wikipedia-logo.svg", tooltip = "Picture of the Day", link = true, }, draft = { image = "Symbol draft class.svg", tooltip = "Draft-Class article", link = true, }, user = { image = "Symbol user class.svg", tooltip = "User-Class article", link = true, }, info = { image = "Information icon.svg", tooltip = "Information", link = false, }, discussionnotificaion = { image = "Echo edit-user-talk icon.svg", tooltip = "Discussion", link = true, }, alert = { image = "OOjs UI icon alert.svg", tooltip = "Black alert", link = true, }, ['alert-imagewarning'] = { image = "OOjs UI icon alert image warning.svg", tooltip = "Alert", link = true, }, ['alert-constructive'] = { image = "OOjs UI icon alert-constructive.svg", tooltip = "Green alert", link = true, }, ['alert-blackred'] = { image = "OOjs UI icon alert destructive black-darkred.svg", tooltip = "Black, white, and red alert", link = true, }, barnstar2 = { image = "Original Barnstar Hires.svg", tooltip = "Original barnstar hires", link = false, }, barnstar = { image = "Original Barnstar.png", tooltip = "Original barnstar", link = false, }, gareview = { aliases = {"ganrv"}, image = "Good article review icon.svg", tooltip = "Good article review", link = false, }, new = { aliases = {"stork"}, image = "Symbol Stork.svg", tooltip = "New", link = true }, _DEFAULT = { image = "Symbol question.svg", link = false, } } -------------------------------------------------------------------------------- -- End icon data -------------------------------------------------------------------------------- -- Make aliases work the same as normal keys, and remove the "aliases" subtables. local ret= {} for code, iconData in pairs(data) do iconData.canonicalCode = code if iconData.aliases then for _, alias in ipairs(iconData.aliases) do ret[alias] = iconData end iconData.aliases = nil end ret[code] = iconData end return ret orhqy6iez91aq2a26989x2hpsd451lm 116789 116788 2026-07-15T19:07:00Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Icon/data]] 116788 Scribunto text/plain -- This module stores icon data for [[Module:Icon]]. -------------------------------------------------------------------------------- -- Icon data -------------------------------------------------------------------------------- local data = { fa = { image = "Featured article star.svg", tooltip = "Featured article", link = true, }, far = { image = "Cscr-star piece.png", tooltip = "Featured article review", link = true, }, farc = { image = "Cscr-star piece.png", tooltip = "Featured article removal candidate", link = true, }, ffa = { aliases = {"dfa"}, image = "Featured article star - cross.svg", tooltip = "Former featured article", link = true, }, fac = { aliases = {"fan"}, image = "Cscr-candidate.svg", tooltip = "Featured article candidate", link = true, }, ffac = { aliases = {"nofa"}, image = "Cscr-former.svg", tooltip = "Former featured article candidate", link = true, }, fl = { image = "Featured article star.svg", tooltip = "Featured list", link = true, }, flrc = { aliases = {"flr"}, image = "Cscr-star piece.png", tooltip = "Featured list removal candidate", link = true, }, ffl = { aliases = {"dfl"}, image = "Featured article star - cross.svg", tooltip = "Former featured list", link = true, }, flc = { aliases = {"fln"}, image = "Cscr-candidate.svg", tooltip = "Featured list candidate", link = true, }, fflc = { aliases = {"nofl"}, image = "Cscr-former.svg", tooltip = "Former featured list candidate", link = true, }, a = { image = "Symbol a class.svg", tooltip = "A-Class article", link = true, }, admin = { aliases = {"mop"}, image = "Wikipedia Administrator.svg", tooltip = "Administrator", link = true, }, dac = { aliases = {"daa"}, image = "Symbol unsupport A vote.svg", tooltip = "Demoted A-Class article", link = true, }, acc = { aliases = {"acn", "aac"}, image = "A candidate.svg", tooltip = "A-Class article candidate", link = true, }, noac = { aliases = {"faac"}, image = "Symbol unsupport A vote.svg", tooltip = "Failed A-Class article candidate", link = true, }, ga = { image = "Symbol support vote.svg", tooltip = "Good article", link = false, }, gar = { image = "GA Candidate Neutral vote(ChaosNil).svg", tooltip = "Good article reassessment", link = false, }, dga = { image = "Symbol unsupport vote.svg", tooltip = "Delisted good article", link = false, }, gan = { aliases = {"gac"}, image = "GA candidate.svg", tooltip = "Good article nominee", link = false, }, ga2 = { image = "Symbol neutral vote.svg", tooltip = "Good article, 2nd opinion", link = false, }, gah = { image = "Symbol wait.svg", tooltip = "Good article on hold", link = false, }, fgan = { aliases = {"noga", "gaf", "gf"}, image = "Symbol oppose vote.svg", tooltip = "Former good article nominee", link = false, }, fp = { image = "Cscr-featured.svg", tooltip = "Featured picture", link = true, }, fpc = { aliases = {"fpn"}, image = "Cscr-candidate.svg", tooltip = "Featured picture candidate", link = true, }, ffp = { image = "Cscr-former.svg", tooltip = "Former featured picture", link = true, }, vp = { image = "ENWP VP Logo.svg", tooltip = "Valued picture", link = true, }, vpc = { image = "Valued pics 1.svg", tooltip = "Valued picture candidate", link = true, }, fs = { image = "Cscr-featured.svg", tooltip = "Featured sound", link = true, }, ffs = { image = "Cscr-former.svg", tooltip = "Former featured sound", link = true, }, fsc = { image = "Cscr-candidate.svg", tooltip = "Featured sound candidate", link = true, }, fpo = { image = "Linecons big-star.svg", tooltip = "Before the featured portal process ceased in 2017, this had been designated as a featured portal.", link = true, }, fpor = { image = "Cscr-star piece.png", tooltip = "Featured portal review", link = true, }, ffpo = { image = "Featured article star - cross.svg", tooltip = "Former featured portal", link = true, }, fpoc = { image = "Cscr-candidate.svg", tooltip = "Featured portal candidate", link = true, }, ft = { image = "Cscr-featuredtopic.svg", tooltip = "Featured topic", link = true, }, ftrc = { image = "Cscr-star piece.png", tooltip = "Featured topic removal candidate", link = true, }, fft = { aliases = {"dft"}, image = "DFT candidate_cluster.svg", tooltip = "Former featured topic", link = true, }, ftc = { aliases = {"ftn"}, image = "FT candidate cluster.svg", tooltip = "Featured topic candidate", link = false, }, gt = { image = "Support cluster.svg", tooltip = "Good topic", link = false, }, gtrc = { image = "Symbol unsupport vote.svg", tooltip = "Good topic removal candidate", link = false, }, gtc = { aliases = {"gtn"}, image = "GA candidate cluster.svg", tooltip = "Good topic candidate", link = false, }, bplus = { aliases = {"b+"}, image = "Symbol bplus class.svg", tooltip = "Bplus-Class article", link = true, }, b = { image = "Symbol b class.svg", tooltip = "B-Class article", link = true, }, br = { aliases = {"bcr"}, image = "Bclass-checklist.svg", tooltip = "B-Class review", link = true, }, c = { image = "Symbol c class.svg", tooltip = "C-Class article", link = true, }, start = { image = "Symbol start class.svg", tooltip = "Start-Class article", link = true, }, stub = { image = "Symbol stub class.svg", tooltip = "Stub-Class article", link = true, }, list = { aliases = {"comparison"}, image = "Symbol list class.svg", tooltip = "List-Class article", link = false, }, no = { image = "Crystal button cancel.svg", tooltip = "Unknown-Class article", link = true, }, book = { image = "Symbol book class2.svg", tooltip = "Wikipedia book", link = true, }, category = { aliases = {"cat", "categ"}, image = "Symbol category class.svg", tooltip = "Category", link = false, }, disambiguation = { aliases = {"dab", "disamb", "disambig"}, image = "Symbol dab class.svg", tooltip = "Disambiguation page", link = true, }, image = { aliases = {"file"}, image = "Symbol file class.svg", tooltip = "File", link = true, }, needed = { image = "Symbol needed class.svg", tooltip = "Needed article", link = false, }, outline = { image = "Global thinking.svg", tooltip = "Outline", link = false, }, portal = { image = "Symbol portal class.svg", tooltip = "Portal", link = true, }, project = { image = "Symbol project class.svg", tooltip = "Project page", link = false, }, redirect = { aliases = {"red", "redir"}, image = "Symbol redirect vote2.svg", tooltip = "Redirect", link = true, }, template = { aliases = {"temp", "templ"}, image = "Symbol template class pink.svg", tooltip = "Template", link = false, }, essay = { image = "Essay.svg", tooltip = "Essay", link = false, }, na = { image = "Symbol na class.svg", tooltip = "Non-article page", link = true, }, aa = { image = "Yes check.svg", tooltip = "Audited article of limited subject matter", link = false, }, da = { image = "Symbol oppose vote.svg", tooltip = "Demoted article", link = false, }, dyk = { image = "Symbol question.svg", tooltip = "Did You Know?", link = false, }, dyk2 = { image = "DYK questionmark icon.svg", tooltip = "Did You Know?", link = false, }, pr = { image = "Nuvola apps kedit.png", tooltip = "Peer review", link = true, }, ppr = { image = "Nuvola apps kedit.png", tooltip = "Portal peer review", link = true, }, q = { aliases = {"question"}, image = "Symbol question.svg", tooltip = "Question", link = false, }, cleanup = { image = "Edit-clear.svg", tooltip = "Cleanup work", link = false, }, qi = { image = "Quality images logo.svg", tooltip = "Quality image on Wikimedia Commons", link = false, }, vi = { image = "Valued image seal.svg", tooltip = "Valued image on Wikimedia Commons", link = false, }, tfa = { image = "Wikipedia-logo.svg", tooltip = "Today's Featured Article", link = true, }, tfl = { image = "Wikipedia-logo.svg", tooltip = "Today's Featured List", link = true, }, itn = { image = "Globe current.svg", tooltip = "In The News", link = true, }, otd = { image = "Nuvola apps date.svg", tooltip = "On This Day", link = true, }, wikiproject = { image = "People icon.svg", tooltip = "WikiProject", link = false, }, goce = { image = "Writing Magnifying.PNG", tooltip = "Guild of Copy Editors", link = true, }, wikipedia = { image = "Wikipedia-logo.svg", tooltip = "Wikipedia page", link = true, }, commons = { image = "Commons-logo.svg", tooltip = "Commons page", link = true, }, wikiquote = { image = "Wikiquote-logo.svg", tooltip = "Wikiquote page", link = false, }, wikiversity = { image = "Wikiversity logo 2017.svg", tooltip = "Wikiversity page", link = true, }, wikibooks = { image = "Wikibooks-logo.svg", tooltip = "Wikibooks page", link = true, }, wikisource = { image = "Wikisource-logo.svg", tooltip = "Wikisource page", link = true, }, wiktionary = { image = "Wiktionary-logo.svg", tooltip = "Wiktionary page", link = true, }, wikinews = { image = "Wikinews-logo.svg", tooltip = "Wikinews page", link = true, }, wikispecies = { image = "Wikispecies-logo.svg", tooltip = "Wikispecies page", link = true, }, wikidata = { image = "Wikidata-logo.svg", tooltip = "Wikidata page", link = false, }, wikivoyage = { image = "Wikivoyage-logo.svg", tooltip = "Wikivoyage page", link = true, }, mediawiki = { image = "MediaWiki-2020-icon.svg", tooltip = "MediaWiki", link = true, }, phabricator = { aliases = {"phab"}, image = "Favicon-Phabricator-WM.svg", tooltip = "Phabricator", link = false, }, wikitech = { image = "Wikitech-2021-blue-icon.svg", tooltip = "Wikitech", link = true, }, meta = { image = "Wikimedia Community Logo.svg", tooltip = "Meta-wiki page", link = false, }, four = { aliases = {"4a"}, image = "Four Award with draft icon.svg", tooltip = "Four Award", link = false, }, million = { image = "Million award logo.svg", tooltip = "Million Award", link = true, }, module = { image = "Lua-logo-nolabel.svg", tooltip = "Module", link = false, }, vital = { image = "Círculos_Concéntricos.svg", tooltip = "Vital article", link = false, }, potd = { image = "Wikipedia-logo.svg", tooltip = "Picture of the Day", link = true, }, draft = { image = "Symbol draft class.svg", tooltip = "Draft-Class article", link = true, }, user = { image = "Symbol user class.svg", tooltip = "User-Class article", link = true, }, info = { image = "Information icon.svg", tooltip = "Information", link = false, }, discussionnotificaion = { image = "Echo edit-user-talk icon.svg", tooltip = "Discussion", link = true, }, alert = { image = "OOjs UI icon alert.svg", tooltip = "Black alert", link = true, }, ['alert-imagewarning'] = { image = "OOjs UI icon alert image warning.svg", tooltip = "Alert", link = true, }, ['alert-constructive'] = { image = "OOjs UI icon alert-constructive.svg", tooltip = "Green alert", link = true, }, ['alert-blackred'] = { image = "OOjs UI icon alert destructive black-darkred.svg", tooltip = "Black, white, and red alert", link = true, }, barnstar2 = { image = "Original Barnstar Hires.svg", tooltip = "Original barnstar hires", link = false, }, barnstar = { image = "Original Barnstar.png", tooltip = "Original barnstar", link = false, }, gareview = { aliases = {"ganrv"}, image = "Good article review icon.svg", tooltip = "Good article review", link = false, }, new = { aliases = {"stork"}, image = "Symbol Stork.svg", tooltip = "New", link = true }, _DEFAULT = { image = "Symbol question.svg", link = false, } } -------------------------------------------------------------------------------- -- End icon data -------------------------------------------------------------------------------- -- Make aliases work the same as normal keys, and remove the "aliases" subtables. local ret= {} for code, iconData in pairs(data) do iconData.canonicalCode = code if iconData.aliases then for _, alias in ipairs(iconData.aliases) do ret[alias] = iconData end iconData.aliases = nil end ret[code] = iconData end return ret orhqy6iez91aq2a26989x2hpsd451lm Template:Xmark 10 16571 117260 49737 2026-07-03T02:54:07Z en>Paine Ellsworth 0 per edit request on talk page - improve alt text 117260 wikitext text/x-wiki [[{{ {{{|safesubst:}}}#switch:{{ {{{|safesubst:}}}lc:{{{color|{{{colour|}}}}}} }} |red |rd |r =File:X mark.svg |darkred |dkred |drd |dr =File:Dark red x.svg |orange |or |o =File:Orange x.svg |yellow |yel |y =File:Dark yellow x.svg |black |blk |k =File:Black x.svg |grey |gray |gry |gy =File:SemiTransBlack x.svg <!--default--> |File:X mark.svg }}|{{Str number/trim|{{ {{{|safesubst:}}}#if:{{{1|}}}|{{{1}}}|20}}}}px|link=|alt=X mark]]<span style="display:none">N</span><!--template:Xmark--><noinclude> {{documentation}} </noinclude> sd3aqqs8gt0qmczkrbxij4ncdecopcr 117261 117260 2026-07-16T11:45:17Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Xmark]] 117260 wikitext text/x-wiki [[{{ {{{|safesubst:}}}#switch:{{ {{{|safesubst:}}}lc:{{{color|{{{colour|}}}}}} }} |red |rd |r =File:X mark.svg |darkred |dkred |drd |dr =File:Dark red x.svg |orange |or |o =File:Orange x.svg |yellow |yel |y =File:Dark yellow x.svg |black |blk |k =File:Black x.svg |grey |gray |gry |gy =File:SemiTransBlack x.svg <!--default--> |File:X mark.svg }}|{{Str number/trim|{{ {{{|safesubst:}}}#if:{{{1|}}}|{{{1}}}|20}}}}px|link=|alt=X mark]]<span style="display:none">N</span><!--template:Xmark--><noinclude> {{documentation}} </noinclude> sd3aqqs8gt0qmczkrbxij4ncdecopcr Template:Align 10 16578 117128 40369 2023-12-21T21:57:41Z en>Ahecht 0 safesubst<noinclude/>: 117128 wikitext text/x-wiki {{safesubst<noinclude/>:#switch: {{safesubst<noinclude/>:lc:{{{1|center}}}}} |left = <div style="float: left;{{safesubst<noinclude/>:#if: {{{style|}}} | {{{style}}};}}">{{{2}}}</div> |right = <div style="float: right;{{safesubst<noinclude/>:#if: {{{style|}}} | {{{style}}};}}">{{{2}}}</div> |center = {{safesubst<noinclude/>:center|{{{2}}}|style={{{style|}}} }} |#default = Error in [[Template:Align]]: the alignment setting "{{{1}}}" is invalid. }}<noinclude> {{documentation}} </noinclude> cqf3vnkc00jstgkpc0lzi697rd1zwut 117129 117128 2026-07-16T11:40:10Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Align]] 117128 wikitext text/x-wiki {{safesubst<noinclude/>:#switch: {{safesubst<noinclude/>:lc:{{{1|center}}}}} |left = <div style="float: left;{{safesubst<noinclude/>:#if: {{{style|}}} | {{{style}}};}}">{{{2}}}</div> |right = <div style="float: right;{{safesubst<noinclude/>:#if: {{{style|}}} | {{{style}}};}}">{{{2}}}</div> |center = {{safesubst<noinclude/>:center|{{{2}}}|style={{{style|}}} }} |#default = Error in [[Template:Align]]: the alignment setting "{{{1}}}" is invalid. }}<noinclude> {{documentation}} </noinclude> cqf3vnkc00jstgkpc0lzi697rd1zwut Template:Param 10 16851 116969 41041 2026-04-12T13:41:20Z en>FaviFake 0 FaviFake moved page [[Template:Param]] to [[Template:Source parameter]]: "Param" is ambiguous and not immediately clear, especially when compared to [[TM:Para]]. "Source parameter" is explicit, distinct from the other template name, and aligns with standard technical terminology, making it easier to understand and use correctly. 116969 wikitext text/x-wiki #REDIRECT [[Template:Source parameter]] {{Redirect category shell| {{R from move}} }} nvhj3e84i8mvgqpd4vp6kgc68uo6d0e 116970 116969 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Param]] 116969 wikitext text/x-wiki #REDIRECT [[Template:Source parameter]] {{Redirect category shell| {{R from move}} }} nvhj3e84i8mvgqpd4vp6kgc68uo6d0e Module:Uses TemplateStyles 828 16869 116765 114823 2026-02-16T01:11:16Z en>JPxG 0 copy slopped edit from sandbox to provide a link to Special:EditPage for the linked pages; looks great to me on all the testcases, i dont think this will bust anything but yolo [[User:Pppery]] feel free to shoot me if i break anything 116765 Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function makeEditSup(pageName) return string.format('<sup>&lbrack;[[Special:Edit/%s|e]]&rbrack;</sup>', pageName) end -- Build just the "(sandbox)" suffix using the i18n message, without duplicating the main link. local function makeSandboxSuffix(tsSandboxPrefixed) -- i18n message is: "$1 ([[$2|sandbox]])" -- Passing empty $1 yields " ([[:...|sandbox]])" -> trim leading whitespace to get "(sandbox)" portion. local s = format('sandboxlink', '', ':' .. tsSandboxPrefixed) return (s:gsub('^%s+', '')) end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local viewLink = string.format('[[:%s]]', ts) local editSup = makeEditSup(ts) local out = viewLink .. editSup -- Optional sandbox link + sandbox edit link local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText )) if tsSandboxTitle and tsSandboxTitle.exists then local sandboxSuffix = makeSandboxSuffix(tsSandboxTitle.prefixedText) local sandboxEditSup = makeEditSup(tsSandboxTitle.prefixedText) out = out .. ' ' .. sandboxSuffix .. ' ' .. sandboxEditSup end end tStylesLinks[i] = out end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828, 829) and 'header-module' or 'header-template' ) .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for _, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args) local cfg = getConfig() if #args == 0 then local prefixed = mw.title.getCurrentTitle().prefixedText prefixed = prefixed:gsub("/doc", "") args[1] = prefixed .. "/" .. cfg["default_subpage_name"] end local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p fzxzfes95mnfacwuhc6k9zeaixdtemr 116766 116765 2026-07-15T18:13:34Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Uses_TemplateStyles]] 116765 Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function makeEditSup(pageName) return string.format('<sup>&lbrack;[[Special:Edit/%s|e]]&rbrack;</sup>', pageName) end -- Build just the "(sandbox)" suffix using the i18n message, without duplicating the main link. local function makeSandboxSuffix(tsSandboxPrefixed) -- i18n message is: "$1 ([[$2|sandbox]])" -- Passing empty $1 yields " ([[:...|sandbox]])" -> trim leading whitespace to get "(sandbox)" portion. local s = format('sandboxlink', '', ':' .. tsSandboxPrefixed) return (s:gsub('^%s+', '')) end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local viewLink = string.format('[[:%s]]', ts) local editSup = makeEditSup(ts) local out = viewLink .. editSup -- Optional sandbox link + sandbox edit link local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText )) if tsSandboxTitle and tsSandboxTitle.exists then local sandboxSuffix = makeSandboxSuffix(tsSandboxTitle.prefixedText) local sandboxEditSup = makeEditSup(tsSandboxTitle.prefixedText) out = out .. ' ' .. sandboxSuffix .. ' ' .. sandboxEditSup end end tStylesLinks[i] = out end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828, 829) and 'header-module' or 'header-template' ) .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for _, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args) local cfg = getConfig() if #args == 0 then local prefixed = mw.title.getCurrentTitle().prefixedText prefixed = prefixed:gsub("/doc", "") args[1] = prefixed .. "/" .. cfg["default_subpage_name"] end local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p fzxzfes95mnfacwuhc6k9zeaixdtemr Template:Cascade-protected template 10 16926 116973 82383 2026-01-15T13:09:33Z en>Anomie 0 Undid 3 revisions from [[Special:Diff/1330133841|1330133841]] until [[Special:Diff/1331352231|1331352231]] - Revert recent inaccurate edits and excess verbosity. Most templates are not directly cascade-protected, only transcluded into cascade-protected pages, because direct cascade-protection will have unwanted side effects. 116973 wikitext text/x-wiki {{mbox | type = protection | image = [[File:Cascade-protection-shackle.svg|40x40px|link=|alt=]] | text = This {{{page|template}}} can only be edited by [[Wikipedia:Administrators|administrators]] because it is [[Help:Transclusion|transcluded]] onto one or more [[Wikipedia:Protection policy#Cascading protection|cascade-protected]] pages. }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> mr3z6jtx488tvpg265fnq0gt90c2811 116974 116973 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Cascade-protected_template]] 116973 wikitext text/x-wiki {{mbox | type = protection | image = [[File:Cascade-protection-shackle.svg|40x40px|link=|alt=]] | text = This {{{page|template}}} can only be edited by [[Wikipedia:Administrators|administrators]] because it is [[Help:Transclusion|transcluded]] onto one or more [[Wikipedia:Protection policy#Cascading protection|cascade-protected]] pages. }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> mr3z6jtx488tvpg265fnq0gt90c2811 Module:Demo 828 16983 116850 110014 2024-08-14T02:31:11Z en>BrandonXLF 0 Undid revision [[Special:Diff/1240199590|1240199590]] by [[Special:Contributions/BrandonXLF|BrandonXLF]] ([[User talk:BrandonXLF|talk]]) 110013 Scribunto text/plain local p = {} --creates a frame object that cannot access any of the parent's args --unless a table containing a list keys of not to inherit is provided function disinherit(frame, onlyTheseKeys) local parent = frame:getParent() or frame local orphan = parent:newChild{} orphan.getParent = parent.getParent --returns nil orphan.args = {} if onlyTheseKeys then local family = {parent, frame} for f = 1, 2 do for k, v in pairs(family[f] and family[f].args or {}) do orphan.args[k] = orphan.args[k] or v end end parent.args = mw.clone(orphan.args) setmetatable(orphan.args, nil) for _, k in ipairs(onlyTheseKeys) do rawset(orphan.args, k, nil) end end return orphan, parent end function getSeparator(args, default) local br = tonumber(args.br) and ('<br>'):rep(args.br) or args.br local sep = args.sep or br or default return #sep > 0 and ' ' .. sep .. ' ' or sep end function p.get(frame, arg, passArgs) local orphan, frame = disinherit(frame, passArgs and {arg or 1}) local code = frame.args[arg or 1] or '' if code:match'UNIQ%-%-nowiki' then code = mw.text.unstripNoWiki(code) :gsub('&lt;', '<') :gsub('&gt;', '>') :gsub('&quot;', '"') -- Replace `&#125;%-` with `}-` because of some server quirk leading to -- =mw.text.unstripNoWiki(mw.getCurrentFrame():preprocess('<nowiki>}-</nowiki>')) -- outputting `&#125;-` instead of `}-`, while it's ok with `<nowiki>} -</nowiki>` :gsub('&#125;%-', '}-') -- The same with `-&#123;` :gsub('%-&#123;', '-{') end local kill_categories = frame.args.demo_kill_categories or frame.args.nocat return { source = code, output = orphan:preprocess(code):gsub(kill_categories and '%[%[Category.-%]%]' or '', ''), frame = frame } end function p.main(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, '') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end -- Alternate function to return an inline result function p.inline(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, args.reverse and '←' or '→') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', inline = true, style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end --passing of args into other module without preprocessing function p.module(frame) local orphan, frame = disinherit(frame, { 'demo_template', 'demo_module', 'demo_module_func', 'demo_main', 'demo_sep', 'demo_br', 'demo_result_arg', 'demo_kill_categories', 'nocat' }) local template = frame.args.demo_template and 'Template:'..frame.args.demo_template local demoFunc = frame.args.demo_module_func or 'main\n' local demoModule = require('Module:' .. frame.args.demo_module)[demoFunc:match('^%s*(.-)%s*$')] frame.args.br, frame.args.result_arg = frame.args.demo_sep or frame.args.demo_br, frame.args.demo_result_arg local kill_categories = frame.args.demo_kill_categories or frame.args.nocat if demoModule then local named = {insert = function(self, ...) table.insert(self, ...) return self end} local source = {insert = named.insert, '{{', frame.args.demo_template or frame.args.demo_module, '\n'} if not template then source:insert(2, '#invoke:'):insert(4, '|'):insert(5, demoFunc) end local insertNamed = #source + 1 for k, v in pairs(orphan.args) do local nan, insert = type(k) ~= 'number', {v} local target = nan and named or source target:insert'|' if nan then target:insert(k):insert'=':insert'\n' table.insert(insert, 1, #target) end target:insert(unpack(insert)) local nowiki = v:match('nowiki') if nowiki or v:match('{{.-}}') then orphan.args[k] = frame:preprocess(nowiki and mw.text.unstripNoWiki(v) or v) end end source:insert'}}' table.insert(source, insertNamed, table.concat(named)) return p.main(orphan, { source = table.concat(source), "<>'|=~", output = tostring(demoModule(orphan)):gsub(kill_categories and '%[%[Category.-%]%]' or '', ''), frame = frame }) else return "ERROR: Invalid module function: "..demoFunc end end return p nmruxy9m5q85bu8c8t5ietclrq4fqm3 116851 116850 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Demo]] 110013 Scribunto text/plain local p = {} --creates a frame object that cannot access any of the parent's args --unless a table containing a list keys of not to inherit is provided function disinherit(frame, onlyTheseKeys) local parent = frame:getParent() or frame local orphan = parent:newChild{} orphan.getParent = parent.getParent --returns nil orphan.args = {} if onlyTheseKeys then local family = {parent, frame} for f = 1, 2 do for k, v in pairs(family[f] and family[f].args or {}) do orphan.args[k] = orphan.args[k] or v end end parent.args = mw.clone(orphan.args) setmetatable(orphan.args, nil) for _, k in ipairs(onlyTheseKeys) do rawset(orphan.args, k, nil) end end return orphan, parent end function getSeparator(args, default) local br = tonumber(args.br) and ('<br>'):rep(args.br) or args.br local sep = args.sep or br or default return #sep > 0 and ' ' .. sep .. ' ' or sep end function p.get(frame, arg, passArgs) local orphan, frame = disinherit(frame, passArgs and {arg or 1}) local code = frame.args[arg or 1] or '' if code:match'UNIQ%-%-nowiki' then code = mw.text.unstripNoWiki(code) :gsub('&lt;', '<') :gsub('&gt;', '>') :gsub('&quot;', '"') -- Replace `&#125;%-` with `}-` because of some server quirk leading to -- =mw.text.unstripNoWiki(mw.getCurrentFrame():preprocess('<nowiki>}-</nowiki>')) -- outputting `&#125;-` instead of `}-`, while it's ok with `<nowiki>} -</nowiki>` :gsub('&#125;%-', '}-') -- The same with `-&#123;` :gsub('%-&#123;', '-{') end local kill_categories = frame.args.demo_kill_categories or frame.args.nocat return { source = code, output = orphan:preprocess(code):gsub(kill_categories and '%[%[Category.-%]%]' or '', ''), frame = frame } end function p.main(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, '') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end -- Alternate function to return an inline result function p.inline(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, args.reverse and '←' or '→') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', inline = true, style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end --passing of args into other module without preprocessing function p.module(frame) local orphan, frame = disinherit(frame, { 'demo_template', 'demo_module', 'demo_module_func', 'demo_main', 'demo_sep', 'demo_br', 'demo_result_arg', 'demo_kill_categories', 'nocat' }) local template = frame.args.demo_template and 'Template:'..frame.args.demo_template local demoFunc = frame.args.demo_module_func or 'main\n' local demoModule = require('Module:' .. frame.args.demo_module)[demoFunc:match('^%s*(.-)%s*$')] frame.args.br, frame.args.result_arg = frame.args.demo_sep or frame.args.demo_br, frame.args.demo_result_arg local kill_categories = frame.args.demo_kill_categories or frame.args.nocat if demoModule then local named = {insert = function(self, ...) table.insert(self, ...) return self end} local source = {insert = named.insert, '{{', frame.args.demo_template or frame.args.demo_module, '\n'} if not template then source:insert(2, '#invoke:'):insert(4, '|'):insert(5, demoFunc) end local insertNamed = #source + 1 for k, v in pairs(orphan.args) do local nan, insert = type(k) ~= 'number', {v} local target = nan and named or source target:insert'|' if nan then target:insert(k):insert'=':insert'\n' table.insert(insert, 1, #target) end target:insert(unpack(insert)) local nowiki = v:match('nowiki') if nowiki or v:match('{{.-}}') then orphan.args[k] = frame:preprocess(nowiki and mw.text.unstripNoWiki(v) or v) end end source:insert'}}' table.insert(source, insertNamed, table.concat(named)) return p.main(orphan, { source = table.concat(source), "<>'|=~", output = tostring(demoModule(orphan)):gsub(kill_categories and '%[%[Category.-%]%]' or '', ''), frame = frame }) else return "ERROR: Invalid module function: "..demoFunc end end return p nmruxy9m5q85bu8c8t5ietclrq4fqm3 Template:Param value 10 17055 116724 115034 2025-12-08T18:41:13Z en>Pigsonthewing 0 sync from sandbox per request 116724 wikitext text/x-wiki <templatestyles src="Template:Param value/styles.css"/><span class="tpl-pval__wrapper"><code class="tpl-pval__code" style="{{#if:{{{border|{{{b|}}}}}}|border:{{{border|{{{b|}}}}}};}} {{#if:{{{bg-color|}}}|background-color: {{{bg-color}}}; color: {{Greater color contrast ratio|{{{bg-color}}}}};}} {{#if:{{{bg|}}}|color: {{Greater color contrast ratio|{{{bg}}}}};}} {{#ifexpr:{{str len|{{{1|}}}}} > 25|white-space: wrap;|}} {{{style|}}}">{{replace|{{replace|{{replace|{{replace|{{replace|<includeonly>⊗ϑ{{{1|}}}⊗ϑ</includeonly><noinclude>value</noinclude>| |{{{space|{{{sp|&nbsp;}}}}}}}}|#|&#35;}}|*|&#42;}}|:|&#58;}}|⊗ϑ|}}</code></span><noinclude> {{Documentation}} </noinclude> oyd3jpyy59x812wn9xbrqm63nh7f7d7 116725 116724 2026-07-15T17:38:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Param_value]] 116724 wikitext text/x-wiki <templatestyles src="Template:Param value/styles.css"/><span class="tpl-pval__wrapper"><code class="tpl-pval__code" style="{{#if:{{{border|{{{b|}}}}}}|border:{{{border|{{{b|}}}}}};}} {{#if:{{{bg-color|}}}|background-color: {{{bg-color}}}; color: {{Greater color contrast ratio|{{{bg-color}}}}};}} {{#if:{{{bg|}}}|color: {{Greater color contrast ratio|{{{bg}}}}};}} {{#ifexpr:{{str len|{{{1|}}}}} > 25|white-space: wrap;|}} {{{style|}}}">{{replace|{{replace|{{replace|{{replace|{{replace|<includeonly>⊗ϑ{{{1|}}}⊗ϑ</includeonly><noinclude>value</noinclude>| |{{{space|{{{sp|&nbsp;}}}}}}}}|#|&#35;}}|*|&#42;}}|:|&#58;}}|⊗ϑ|}}</code></span><noinclude> {{Documentation}} </noinclude> oyd3jpyy59x812wn9xbrqm63nh7f7d7 Template:Str number/trim 10 17104 117256 42375 2024-01-16T16:33:34Z en>Xaosflux 0 Changed protection settings for "[[Template:Str number/trim]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 41961 wikitext text/x-wiki {{#invoke:String|match|s={{{1}}}|^%d*|ignore_errors=true}}<noinclude> {{Documentation}}</noinclude> 6uvyf0id6y3oxzmtxrw3akau6ajubki 117257 117256 2026-07-16T11:45:16Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Str_number/trim]] 41961 wikitext text/x-wiki {{#invoke:String|match|s={{{1}}}|^%d*|ignore_errors=true}}<noinclude> {{Documentation}}</noinclude> 6uvyf0id6y3oxzmtxrw3akau6ajubki Template:R from modification 10 17106 116944 73402 2026-03-02T18:46:25Z en>Paine Ellsworth 0 specify "mainspace" + link to first instance 116944 wikitext text/x-wiki <noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from modification |name=From a modification |from=a modification of the target's title or a closely related title. For example, the words may be rearranged{{#if: {{{1|{{{reason|{{{of|}}}}}}}}}|. This redirect is a modification of: {{#ifexpr:{{#invoke:String|find|{{{1|{{{reason|{{{of|}}}}}}}}}|"plainlinks"}} + {{#invoke:String|find|{{{1|{{{reason|{{{of|}}}}}}}}}|{{!((}}}} = 0|{{no redirect|{{{1|{{{reason|{{{of|}}}}}}}}}}}|{{{1|{{{reason|{{{of|}}}}}}}}}}}}} |info= ** Please note that there are many {{em|more specific templates}}. Please use {{tl|R from alternative spelling}}, {{tl|R from alternative hyphenation}}, {{tl|R from alternative punctuation}}, {{tl|R from alternative spacing}} and {{tl|R from misquotation}} where relevant; see subcategories of [[:Category:Redirects from modifications]] for other options (capitals, abbreviations, diacritics, plurals, stylizations, transliteration, ligatures, different parts of speech, etc.). If you are unsure which to use, this template is fine; someone will make it more specific later if necessary. ** In cases of modification from distinctly longer or shorter names, please use {{tl|R from long name}} or {{tl|R from short name}}, respectively. In [[WP:mainspace|mainspace]], an abbreviation should be tagged with {{tl|R from initialism}} or, if it can be spoken like a word such as NASA and RADAR, use {{tl|R from acronym}}. ** Use this [[WP:rcat|rcat]] instead of {{tl|R from other capitalisation}} and {{tl|R from plural}} in namespaces other than mainspace for those types of modification. This may also apply to several other subcategories of modification; please check those templates' output before saving if using outside of mainspace. |all category={{#ifeq:{{{demo}}}|yes||Redirects from modifications}} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> kk9vcfcitjziijz1gpilp7p53l493n6 116945 116944 2026-07-16T11:00:20Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_from_modification]] 116944 wikitext text/x-wiki <noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from modification |name=From a modification |from=a modification of the target's title or a closely related title. For example, the words may be rearranged{{#if: {{{1|{{{reason|{{{of|}}}}}}}}}|. This redirect is a modification of: {{#ifexpr:{{#invoke:String|find|{{{1|{{{reason|{{{of|}}}}}}}}}|"plainlinks"}} + {{#invoke:String|find|{{{1|{{{reason|{{{of|}}}}}}}}}|{{!((}}}} = 0|{{no redirect|{{{1|{{{reason|{{{of|}}}}}}}}}}}|{{{1|{{{reason|{{{of|}}}}}}}}}}}}} |info= ** Please note that there are many {{em|more specific templates}}. Please use {{tl|R from alternative spelling}}, {{tl|R from alternative hyphenation}}, {{tl|R from alternative punctuation}}, {{tl|R from alternative spacing}} and {{tl|R from misquotation}} where relevant; see subcategories of [[:Category:Redirects from modifications]] for other options (capitals, abbreviations, diacritics, plurals, stylizations, transliteration, ligatures, different parts of speech, etc.). If you are unsure which to use, this template is fine; someone will make it more specific later if necessary. ** In cases of modification from distinctly longer or shorter names, please use {{tl|R from long name}} or {{tl|R from short name}}, respectively. In [[WP:mainspace|mainspace]], an abbreviation should be tagged with {{tl|R from initialism}} or, if it can be spoken like a word such as NASA and RADAR, use {{tl|R from acronym}}. ** Use this [[WP:rcat|rcat]] instead of {{tl|R from other capitalisation}} and {{tl|R from plural}} in namespaces other than mainspace for those types of modification. This may also apply to several other subcategories of modification; please check those templates' output before saving if using outside of mainspace. |all category={{#ifeq:{{{demo}}}|yes||Redirects from modifications}} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> kk9vcfcitjziijz1gpilp7p53l493n6 Module:Shortcut/styles.css 828 17321 117042 54049 2025-10-03T21:27:48Z en>Izno 0 shorterhand padding 117042 sanitized-css text/css /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-base, #fff); padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid var(--border-color-base, #a2a9b1); margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em; line-height: 1.3; margin: 0; float: initial; } iy0abv0s7wkq06bjcild5vh6fo8vjrr 117043 117042 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Shortcut/styles.css]] 117042 sanitized-css text/css /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-base, #fff); padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid var(--border-color-base, #a2a9b1); margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em; line-height: 1.3; margin: 0; float: initial; } iy0abv0s7wkq06bjcild5vh6fo8vjrr Template:Hidden begin/styles.css 10 17345 116730 42641 2024-03-21T15:54:44Z en>Jdlrobson 0 [[phab:T360582]] 116730 sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } /* [[phab:T360582]] */ @media all and ( max-width: 500px ) { .hidden-begin { width: auto !important; clear: none !important; float: none !important; } } b1nhedn00o082mlrogut2z7909uozkh 116731 116730 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hidden_begin/styles.css]] 116730 sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } /* [[phab:T360582]] */ @media all and ( max-width: 500px ) { .hidden-begin { width: auto !important; clear: none !important; float: none !important; } } b1nhedn00o082mlrogut2z7909uozkh Template:Q 10 17521 116963 43105 2025-08-30T11:34:00Z en>Paine Ellsworth 0 per edit request on talk page - add [[WP:RCAT|rcat template]] 116963 wikitext text/x-wiki #REDIRECT [[Template:Wikidata entity link]] {{Redirect category shell| {{R from move}} {{R mentioned in hatnote}} {{R from template shortcut}} }} [[Category:Wikidata templates]] pjowgct37yrpgryiaw2acnzw8auqr5w 116964 116963 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Q]] 116963 wikitext text/x-wiki #REDIRECT [[Template:Wikidata entity link]] {{Redirect category shell| {{R from move}} {{R mentioned in hatnote}} {{R from template shortcut}} }} [[Category:Wikidata templates]] pjowgct37yrpgryiaw2acnzw8auqr5w Template:Wikidata entity link 10 17522 116965 43107 2025-08-31T13:22:58Z en>Jonesey95 0 slight improvement when multiple ' characters are used in a label; more may be needed for other markup 116965 wikitext text/x-wiki <includeonly>{{#if:{{{1|}}} | {{#switch:{{padleft:|1|{{uc:{{{1}}}}}}} | Q | P = [[d:Special:EntityPage/{{uc:{{{1}}}}}|{{replace|{{#invoke:wd|label|{{uc:{{{1}}}}}}}|'|&#39;}} <small>({{uc:{{{1}}}}})</small>]] | #default = [[d:Special:EntityPage/Q{{uc:{{{1}}}}}|{{replace|{{#invoke:wd|label|Q{{uc:{{{1}}}}}}}|'|&#39;}} <small>(Q{{uc:{{{1|}}}}})</small>]] }} | {{#if:{{#invoke:wd|label|raw}} | [[d:Special:EntityPage/{{#invoke:wd|label|raw}}|{{#invoke:wd|label}} <small>({{#invoke:wd|label|raw}})</small>]] | <small>(no entity)</small> }} }}</includeonly><noinclude>{{Documentation}}</noinclude> npxjrdgcgdl6eaxswj000ifruiuxxmj 116966 116965 2026-07-16T11:15:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Wikidata_entity_link]] 116965 wikitext text/x-wiki <includeonly>{{#if:{{{1|}}} | {{#switch:{{padleft:|1|{{uc:{{{1}}}}}}} | Q | P = [[d:Special:EntityPage/{{uc:{{{1}}}}}|{{replace|{{#invoke:wd|label|{{uc:{{{1}}}}}}}|'|&#39;}} <small>({{uc:{{{1}}}}})</small>]] | #default = [[d:Special:EntityPage/Q{{uc:{{{1}}}}}|{{replace|{{#invoke:wd|label|Q{{uc:{{{1}}}}}}}|'|&#39;}} <small>(Q{{uc:{{{1|}}}}})</small>]] }} | {{#if:{{#invoke:wd|label|raw}} | [[d:Special:EntityPage/{{#invoke:wd|label|raw}}|{{#invoke:wd|label}} <small>({{#invoke:wd|label|raw}})</small>]] | <small>(no entity)</small> }} }}</includeonly><noinclude>{{Documentation}}</noinclude> npxjrdgcgdl6eaxswj000ifruiuxxmj Template:Nowiki2 10 17525 116975 43115 2025-07-30T02:19:23Z en>Uzume 0 "LuaCall"->"Lua call" 116975 wikitext text/x-wiki {{#if: {{{tag|}}} | {{#if: {{{style|}}} | <{{{tag}}} style="{{{style}}}"> | <{{{tag}}}> }} }}{{#invoke:Lua call | call | mw.text.nowiki |\{{{1|}}}<!-- -->}}{{#if: {{{tag|}}} | </{{{tag}}}> }}<noinclude> {{Documentation}} </noinclude> pa4iwca3w1pq12cjb7ahi764mh5qg5a 116976 116975 2026-07-16T11:15:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Nowiki2]] 116975 wikitext text/x-wiki {{#if: {{{tag|}}} | {{#if: {{{style|}}} | <{{{tag}}} style="{{{style}}}"> | <{{{tag}}}> }} }}{{#invoke:Lua call | call | mw.text.nowiki |\{{{1|}}}<!-- -->}}{{#if: {{{tag|}}} | </{{{tag}}}> }}<noinclude> {{Documentation}} </noinclude> pa4iwca3w1pq12cjb7ahi764mh5qg5a Template:Short description/test 10 17528 116977 43121 2024-06-12T05:02:28Z en>Frost 0 Reverting edit(s) by [[Special:Contributions/105.113.70.20|105.113.70.20]] ([[User_talk:105.113.70.20|talk]]) to rev. 984713020 by Jonesey95: Non-constructive edit ([[w:en:WP:UV|UV 0.1.5]]) 43120 wikitext text/x-wiki <span class="shortdescription nomobile noexcerpt noprint">{{nowiki2|1={{#invoke:WikidataIB|getDescription|{{{1|}}}|qid={{{qid|}}}}}}}</span><noinclude> {{documentation}}</noinclude> fw3wk9ljkigbklyqi6a53yoybj28jge 116978 116977 2026-07-16T11:15:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Short_description/test]] 43120 wikitext text/x-wiki <span class="shortdescription nomobile noexcerpt noprint">{{nowiki2|1={{#invoke:WikidataIB|getDescription|{{{1|}}}|qid={{{qid|}}}}}}}</span><noinclude> {{documentation}}</noinclude> fw3wk9ljkigbklyqi6a53yoybj28jge Template:Short description/doc 10 17529 116979 97009 2026-06-10T08:43:18Z en>GhostInTheMachine 0 /* Redirects */ Shortcut now targets the WP article 116979 wikitext text/x-wiki <noinclude> {{pp|small=yes}} </noinclude> {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High risk}} {{cascade-protected template}} {{Warning|{{strong|Please do not use redirects or shortcuts for this template}}, as they cause problems with the [[Wikipedia:Shortdesc helper|short description editing gadget]] and other maintenance tools.}} {{Lua|Module:Check for unknown parameters|Module:String|Module:SDcat}} '''[[Template:Short description]]''' is used to add a [[Wikipedia:Short description|short description]] (which can be edited from within Wikipedia) to a Wikipedia page. These descriptions may appear in Wikipedia searches and elsewhere, and [[WP:SDPURPOSE|help users identify the desired article]]. == Usage == {{tld|Short description|''Write your short description here''}} This should be limited to about 40 characters, as explained at [[WP:SDFORMAT]], along with the other guidance at [[WP:SDCONTENT]]. If the page's title is sufficiently descriptive that a [[WP:SDNONE|short description is not needed]], use the following: {{tld|Short description|none}} == Parameters == {{TemplateData header|noheader=1}} <templatedata> { "description": { "en": "Creates a short description for a Wikipedia page, which is displayed in search results and other locations.", "es": "Crea una breve descripción, para un artículo de Wikipedia, que se utiliza en el Editor Visual para proporcionar contexto en los wikilinks (wikienlaces)." }, "params": { "1": { "label": { "en": "Description", "es": "Descripción" }, "description": { "en": "The short description of the article or 'none'. It should be limited to about 40 characters.", "es": "La descripción corta del artículo" }, "example": { "en": "Endangered species of South American fish", "es": "La enciclopedia en línea que cualquiera puede editar" }, "required": true, "type": "content" }, "2": { "label": { "en": "No replace?", "es": "2" }, "description": { "en": "Should be unused or 'noreplace'. Templates with noreplace will not replace a short description defined by an earlier template. Mainly for use within transcluded templates.", "es": "Se anula una descripción corta si se transcluye. Debe estar sin usar o con 'noreplace' (que significar no reemplazar)." }, "example": { "es": "noreplace" }, "required": false, "type": "string", "autovalue": "noreplace", "suggestedvalues": [ "noreplace" ] }, "pagetype": { "type": "string", "description": { "en": "The type of page. This puts it in the appropriate category - Things with short description. Normally unneeded, since handled through namespace detection.", "es": "El tipo de página. La coloca en la categoría apropiada - Cosas con descripción corta" }, "example": "Redirect, Disambiguation page", "required": false } }, "format": "{{_|_ = _}}\n" } </templatedata> == About writing good short descriptions == This page is about the short description {{em|template}}; it does not provide guidelines for writing a good short description. If you plan to use this template, you should make sure you read and follow the detailed guidance at [[WP:HOWTOSD]]. General information can be found at [[Wikipedia:Short description]]. == Template information == Eventually all articles should have a short description: * by directly using this template, in which case the short description will be unique to the article * transcluded in another template, such as a disambiguation template, where a generic short description is adequate for a large class of pages * where the short description is assembled from data in an infobox Automatically generated descriptions within templates should set the second parameter as {{code|noreplace}} so they do not override any short descriptions specifically added to the transcluding article. Short descriptions are not normally needed for non-article pages, such as redirects, but can be added if useful. If the article title alone is sufficient to ensure reliable identification of the desired article, a null value of {{tnull|Short description|none}} may be used. Short descriptions do not necessarily serve the same function as the Wikidata description for an item and they do not have to be the same, but some overlap is expected in many cases. Some Wikidata descriptions may be unsuitable, and if imported must be checked for relevance, accuracy and fitness for purpose. Responsibility for such imports lies with the importer. {{crossref|(See also [[d:Help:Description|Wikidata:Help:Description]].)}} === Example === At [[Oxygen therapy]], add the following at the very top of the article, above everything else: * {{tld|Short description|Use of oxygen as medical treatment}} == Testing == For testing purposes, the display of this template can be enabled by adding a line to your [[Special:MyPage/common.css]]: * <syntaxhighlight lang="CSS" inline>.shortdescription { display:block !important; }</syntaxhighlight> This can be easily removed or disabled when testing is finished. If you want to {{em|always}} see short descriptions, you may prefer a more utilitarian layout, such as: <syntaxhighlight lang="CSS"> .shortdescription { display:block !important; white-space: pre-wrap; } .shortdescription::before { content: "\A[Short description:\0020"; } .shortdescription::after { content: "]\A"; } </syntaxhighlight> There is a test version of this template available as [[Template:Short description/test]] which displays its text by default. * {{tld|Short description/test}} displays the short description if supplied * {{tld|Short description/test}} displays nothing if <code>none</code> is supplied * {{tld|Short description/test}} displays the description from Wikidata if <code>wikidata</code> is supplied. Taking {{Q|Q1096878}} as an example: * <code><nowiki>{{short description/test|Underwater diving where breathing is from equipment independent of the surface}}</nowiki></code> → {{short description/test|Underwater diving where breathing is from equipment independent of the surface }} * <code><nowiki>{{short description/test|none}}</nowiki></code> → {{short description/test|none}} * <code><nowiki>{{short description/test|wikidata}}</nowiki></code> → {{short description/test|wikidata|qid=Q1096878}} ===Pagetype parameter=== If {{param|Pagetype}} is '''not''' set, then this template adds the article to a category based on the namespace: * {{clc|Articles with short description}} * {{clc|Redirects with short description}} {{--}} for redirects in any namespace If {{param|Pagetype}} '''is''' set, then this template adds the article to a category matching the parameter. For example: * {{cl|Redirects with short description}} {{--}} {{code|pagetype {{=}} Redirect }} == <span class="anchor" id="Aliases"></span><span class="anchor" id="No-aliases"></span>Redirects == While there are currently <span class="plainlinks">[{{fullurl:Special:WhatLinksHere/Template:Short_description|hidetrans=1&hidelinks=1&limit=500}} redirects to this template]</span>, {{Strong|they must not be used}}, for the reasons below: * Other templates and gadgets attempt to extract short descriptions from pages by explicitly searching for the {{tl|Short description}} template. * For example, {{tl|Annotated link}} searches for the template in its uppercase "Short description" and lowercase form "short description"; either form is acceptable. * Infoboxes often check the article for an existing short description template before setting thier own short description. See the related [[Wikipedia:Redirects for discussion/Log/2021 July 20#Aliases for Short description template|2021 RfD]]. {{Strong|Do not}} start the template with a space: {{code|<nowiki> {{ Short description...</nowiki>}} or use an underscore: {{code|<nowiki> {{Short_description...</nowiki>}}. While these do create a valid short description, they will prevent searches for the {{code|<nowiki>{{Short description...</nowiki>}} text. ==Tracking categories== * {{clc|Templates that generate short descriptions}} * {{clc|Modules that create a short description}} * {{clc|Short description matches Wikidata}} * {{clc|Short description is different from Wikidata}} * {{clc|Short description with empty Wikidata description}} == Maintenance categories == * {{clc|Pages using short description with unknown parameters}} * {{clc|Articles with long short description}} * {{clc|Pages with lower-case short description}} == See also == * {{tlx|Auto short description}} * {{tlx|Annotated link}} * {{tlx|laal}} – displays an article's pagelinks alongside its short description * [[Module:Is infobox in lead]] * [[Wikipedia:Short descriptions]] – background information * [[Wikipedia:WikiProject Short descriptions]] – project to add Short descriptions to all articles <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Short description templates]] [[Category:Templates that add a tracking category]] [[Category:Templates that generate short descriptions]] }}</includeonly> q0wsv8zocauyqgghxvjy5bahuxqtfpz 116980 116979 2026-07-16T11:15:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Short_description/doc]] 116979 wikitext text/x-wiki <noinclude> {{pp|small=yes}} </noinclude> {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High risk}} {{cascade-protected template}} {{Warning|{{strong|Please do not use redirects or shortcuts for this template}}, as they cause problems with the [[Wikipedia:Shortdesc helper|short description editing gadget]] and other maintenance tools.}} {{Lua|Module:Check for unknown parameters|Module:String|Module:SDcat}} '''[[Template:Short description]]''' is used to add a [[Wikipedia:Short description|short description]] (which can be edited from within Wikipedia) to a Wikipedia page. These descriptions may appear in Wikipedia searches and elsewhere, and [[WP:SDPURPOSE|help users identify the desired article]]. == Usage == {{tld|Short description|''Write your short description here''}} This should be limited to about 40 characters, as explained at [[WP:SDFORMAT]], along with the other guidance at [[WP:SDCONTENT]]. If the page's title is sufficiently descriptive that a [[WP:SDNONE|short description is not needed]], use the following: {{tld|Short description|none}} == Parameters == {{TemplateData header|noheader=1}} <templatedata> { "description": { "en": "Creates a short description for a Wikipedia page, which is displayed in search results and other locations.", "es": "Crea una breve descripción, para un artículo de Wikipedia, que se utiliza en el Editor Visual para proporcionar contexto en los wikilinks (wikienlaces)." }, "params": { "1": { "label": { "en": "Description", "es": "Descripción" }, "description": { "en": "The short description of the article or 'none'. It should be limited to about 40 characters.", "es": "La descripción corta del artículo" }, "example": { "en": "Endangered species of South American fish", "es": "La enciclopedia en línea que cualquiera puede editar" }, "required": true, "type": "content" }, "2": { "label": { "en": "No replace?", "es": "2" }, "description": { "en": "Should be unused or 'noreplace'. Templates with noreplace will not replace a short description defined by an earlier template. Mainly for use within transcluded templates.", "es": "Se anula una descripción corta si se transcluye. Debe estar sin usar o con 'noreplace' (que significar no reemplazar)." }, "example": { "es": "noreplace" }, "required": false, "type": "string", "autovalue": "noreplace", "suggestedvalues": [ "noreplace" ] }, "pagetype": { "type": "string", "description": { "en": "The type of page. This puts it in the appropriate category - Things with short description. Normally unneeded, since handled through namespace detection.", "es": "El tipo de página. La coloca en la categoría apropiada - Cosas con descripción corta" }, "example": "Redirect, Disambiguation page", "required": false } }, "format": "{{_|_ = _}}\n" } </templatedata> == About writing good short descriptions == This page is about the short description {{em|template}}; it does not provide guidelines for writing a good short description. If you plan to use this template, you should make sure you read and follow the detailed guidance at [[WP:HOWTOSD]]. General information can be found at [[Wikipedia:Short description]]. == Template information == Eventually all articles should have a short description: * by directly using this template, in which case the short description will be unique to the article * transcluded in another template, such as a disambiguation template, where a generic short description is adequate for a large class of pages * where the short description is assembled from data in an infobox Automatically generated descriptions within templates should set the second parameter as {{code|noreplace}} so they do not override any short descriptions specifically added to the transcluding article. Short descriptions are not normally needed for non-article pages, such as redirects, but can be added if useful. If the article title alone is sufficient to ensure reliable identification of the desired article, a null value of {{tnull|Short description|none}} may be used. Short descriptions do not necessarily serve the same function as the Wikidata description for an item and they do not have to be the same, but some overlap is expected in many cases. Some Wikidata descriptions may be unsuitable, and if imported must be checked for relevance, accuracy and fitness for purpose. Responsibility for such imports lies with the importer. {{crossref|(See also [[d:Help:Description|Wikidata:Help:Description]].)}} === Example === At [[Oxygen therapy]], add the following at the very top of the article, above everything else: * {{tld|Short description|Use of oxygen as medical treatment}} == Testing == For testing purposes, the display of this template can be enabled by adding a line to your [[Special:MyPage/common.css]]: * <syntaxhighlight lang="CSS" inline>.shortdescription { display:block !important; }</syntaxhighlight> This can be easily removed or disabled when testing is finished. If you want to {{em|always}} see short descriptions, you may prefer a more utilitarian layout, such as: <syntaxhighlight lang="CSS"> .shortdescription { display:block !important; white-space: pre-wrap; } .shortdescription::before { content: "\A[Short description:\0020"; } .shortdescription::after { content: "]\A"; } </syntaxhighlight> There is a test version of this template available as [[Template:Short description/test]] which displays its text by default. * {{tld|Short description/test}} displays the short description if supplied * {{tld|Short description/test}} displays nothing if <code>none</code> is supplied * {{tld|Short description/test}} displays the description from Wikidata if <code>wikidata</code> is supplied. Taking {{Q|Q1096878}} as an example: * <code><nowiki>{{short description/test|Underwater diving where breathing is from equipment independent of the surface}}</nowiki></code> → {{short description/test|Underwater diving where breathing is from equipment independent of the surface }} * <code><nowiki>{{short description/test|none}}</nowiki></code> → {{short description/test|none}} * <code><nowiki>{{short description/test|wikidata}}</nowiki></code> → {{short description/test|wikidata|qid=Q1096878}} ===Pagetype parameter=== If {{param|Pagetype}} is '''not''' set, then this template adds the article to a category based on the namespace: * {{clc|Articles with short description}} * {{clc|Redirects with short description}} {{--}} for redirects in any namespace If {{param|Pagetype}} '''is''' set, then this template adds the article to a category matching the parameter. For example: * {{cl|Redirects with short description}} {{--}} {{code|pagetype {{=}} Redirect }} == <span class="anchor" id="Aliases"></span><span class="anchor" id="No-aliases"></span>Redirects == While there are currently <span class="plainlinks">[{{fullurl:Special:WhatLinksHere/Template:Short_description|hidetrans=1&hidelinks=1&limit=500}} redirects to this template]</span>, {{Strong|they must not be used}}, for the reasons below: * Other templates and gadgets attempt to extract short descriptions from pages by explicitly searching for the {{tl|Short description}} template. * For example, {{tl|Annotated link}} searches for the template in its uppercase "Short description" and lowercase form "short description"; either form is acceptable. * Infoboxes often check the article for an existing short description template before setting thier own short description. See the related [[Wikipedia:Redirects for discussion/Log/2021 July 20#Aliases for Short description template|2021 RfD]]. {{Strong|Do not}} start the template with a space: {{code|<nowiki> {{ Short description...</nowiki>}} or use an underscore: {{code|<nowiki> {{Short_description...</nowiki>}}. While these do create a valid short description, they will prevent searches for the {{code|<nowiki>{{Short description...</nowiki>}} text. ==Tracking categories== * {{clc|Templates that generate short descriptions}} * {{clc|Modules that create a short description}} * {{clc|Short description matches Wikidata}} * {{clc|Short description is different from Wikidata}} * {{clc|Short description with empty Wikidata description}} == Maintenance categories == * {{clc|Pages using short description with unknown parameters}} * {{clc|Articles with long short description}} * {{clc|Pages with lower-case short description}} == See also == * {{tlx|Auto short description}} * {{tlx|Annotated link}} * {{tlx|laal}} – displays an article's pagelinks alongside its short description * [[Module:Is infobox in lead]] * [[Wikipedia:Short descriptions]] – background information * [[Wikipedia:WikiProject Short descriptions]] – project to add Short descriptions to all articles <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Short description templates]] [[Category:Templates that add a tracking category]] [[Category:Templates that generate short descriptions]] }}</includeonly> q0wsv8zocauyqgghxvjy5bahuxqtfpz Template:Check completeness of transclusions 10 17755 116790 45647 2025-10-03T21:26:01Z en>Pppery 0 Untag 116790 wikitext text/x-wiki {| class="wikitable" |- ! {{#if: {{{header|}}} | {{{header}}} | Transclusion maintenance }} |- | [https://templatetransclusioncheck.toolforge.org/?lang=en&name={{FULLPAGENAMEE}} Check completeness of transclusions] |- {{#if: {{{update source|}}} | {{!}} [{{{update source}}} Update source] }} |- {{#if: {{{extra|}}} | {{!}} {{{extra}}} }} |}<noinclude> {{Documentation}} </noinclude> 77lc4exjlxnaxb0to163j8thz09np66 116791 116790 2026-07-15T19:07:01Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Check_completeness_of_transclusions]] 116790 wikitext text/x-wiki {| class="wikitable" |- ! {{#if: {{{header|}}} | {{{header}}} | Transclusion maintenance }} |- | [https://templatetransclusioncheck.toolforge.org/?lang=en&name={{FULLPAGENAMEE}} Check completeness of transclusions] |- {{#if: {{{update source|}}} | {{!}} [{{{update source}}} Update source] }} |- {{#if: {{{extra|}}} | {{!}} {{{extra}}} }} |}<noinclude> {{Documentation}} </noinclude> 77lc4exjlxnaxb0to163j8thz09np66 Module:Citation/CS1/Date validation 828 17757 116882 114931 2026-01-17T19:25:14Z en>Trappist the monk 0 116882 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local add_prop_cat, is_set, in_array, set_message, substitute, wrap_style; -- imported functions from selected Module:Citation/CS1/Utilities local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< F I L E - S C O P E D E C L A R A T I O N S >-------------------------------- File-scope variables are declared here ]] local lang_object = mw.getContentLanguage(); -- used by is_valid_accessdate(), is_valid_year(), date_name_xlate(); TODO: move to ~/Configuration? local year_limit; -- used by is_valid_year() --[=[-------------------------< I S _ V A L I D _ A C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time) accessdate is the date provided in |access-date= at time 00:00:00 UTC today is the current date at time 00:00:00 UTC plus 48 hours if today is 2015-01-01T00:00:00 then adding 24 hours gives 2015-01-02T00:00:00 – one second more than today adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser apparently doesn't understand non-English date month names. This function will always return false when the date contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that call this function with YYYY-MM-DD format dates. ]=] local function is_valid_accessdate (accessdate) local good1, good2; local access_ts, tomorrow_ts; -- to hold Unix time stamps representing the dates good1, access_ts = pcall (lang_object.formatDate, lang_object, 'U', accessdate ); -- convert accessdate value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which which tonumber() may not understand access_ts = tonumber (access_ts) or lang_object:parseFormattedNumber (access_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix time stamp end if 979516800 <= access_ts and access_ts < tomorrow_ts then -- Wikipedia start date <= accessdate < tomorrow's date return true; else return false; -- accessdate out of range end end --[[--------------------------< G E T _ M O N T H _ N U M B E R >---------------------------------------------- returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct. If not a valid month, returns 0 ]] local function get_month_number (month) return cfg.date_names['local'].long[month] or cfg.date_names['local'].short[month] or -- look for local names first cfg.date_names['en'].long[month] or cfg.date_names['en'].short[month] or -- failing that, look for English names 0; -- not a recognized month name end --[[--------------------------< G E T _ S E A S O N _ N U M B E R >-------------------------------------------- returns a number according to the sequence of seasons in a year: 21 for Spring, etc. Capitalization and spelling must be correct. If not a valid season, returns 0. 21-24 = Spring, Summer, Autumn, Winter, independent of “Hemisphere” returns 0 when <param> is not |date= Season numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons. EDTF does support the distinction between north and south hemisphere seasons but cs1|2 has no way to make that distinction. These additional divisions not currently supported: 25-28 = Spring - Northern Hemisphere, Summer- Northern Hemisphere, Autumn - Northern Hemisphere, Winter - Northern Hemisphere 29-32 = Spring – Southern Hemisphere, Summer– Southern Hemisphere, Autumn – Southern Hemisphere, Winter - Southern Hemisphere 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_season_number (season, param) if 'date' ~= param then return 0; -- season dates only supported by |date= end return cfg.date_names['local'].season[season] or -- look for local names first cfg.date_names['en'].season[season] or -- failing that, look for English names 0; -- not a recognized season name end --[[--------------------------< G E T _ Q U A R T E R _ N U M B E R >------------------------------------------ returns a number according to the sequence of quarters in a year: 33 for first quarter, etc. Capitalization and spelling must be correct. If not a valid quarter, returns 0. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) returns 0 when <param> is not |date= Quarter numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons and quarters. These additional divisions not currently supported: 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_quarter_number (quarter, param) if 'date' ~= param then return 0; -- quarter dates only supported by |date= end quarter = mw.ustring.gsub (quarter, ' +', ' '); -- special case replace multiple space chars with a single space char return cfg.date_names['local'].quarter[quarter] or -- look for local names first cfg.date_names['en'].quarter[quarter] or -- failing that, look for English names 0; -- not a recognized quarter name end --[[--------------------------< G E T _ P R O P E R _ N A M E _ N U M B E R >---------------------------------- returns a non-zero number if date contains a recognized proper-name. Capitalization and spelling must be correct. returns 0 when <param> is not |date= ]] local function get_proper_name_number (name, param) if 'date' ~= param then return 0; -- proper-name dates only supported by |date= end return cfg.date_names['local'].named[name] or -- look for local names dates first cfg.date_names['en'].named[name] or -- failing that, look for English names 0; -- not a recognized named date end --[[--------------------------< G E T _ E L E M E N T _ N U M B E R <------------------------------------------ returns true if month or season or quarter or proper name is valid (properly spelled, capitalized, abbreviated) ]] local function get_element_number (element, param) local num; local funcs = {get_month_number, get_season_number, get_quarter_number, get_proper_name_number}; -- list of functions to execute in order for _, func in ipairs (funcs) do -- spin through the function list num = func (element, param); -- call the function and get the returned number if 0 ~= num then -- non-zero when valid month season quarter return num; -- return that number end end return nil; -- not valid end --[[--------------------------< I S _ V A L I D _ Y E A R >---------------------------------------------------- Function gets current year from the server and compares it to year from a citation parameter. Years more than one year in the future are not acceptable. Special case for |pmc-embargo-date=: years more than two years in the future are not acceptable ]] local function is_valid_year (year, param) if not is_set (year_limit) then year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once end year = tonumber (year) or lang_object:parseFormattedNumber (year); -- convert to number for the comparison if year and (100 > year) then -- years less than 100 not supported return false; end if 'pmc-embargo-date' == param then -- special case for |pmc-embargo-date= return year and (year <= tonumber(os.date("%Y"))+2) or false; -- years more than two years in the future are not accepted end return year and (year <= year_limit) or false; end --[[--------------------------< I S _ V A L I D _ D A T E >---------------------------------------------------- Returns true if day is less than or equal to the number of days in month and year is no farther into the future than next year; else returns false. Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately 1923) dates are assumed to be Gregorian. ]] local function is_valid_date (year, month, day, param) local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local month_length; if not is_valid_year (year, param) then -- no farther into the future than next year except |pmc-embargo-date= no more than two years in the future return false; end month = tonumber (month); -- required for YYYY-MM-DD dates if (2 == month) then -- if February month_length = 28; -- then 28 days unless if 1582 > tonumber(year) then -- Julian calendar if 0 == (year%4) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end else -- Gregorian calendar if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400))) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end end else month_length = days_in_month[month] or 0; -- invalid month number is nil so default <month_length> to 0 end if tonumber (day) > month_length then return false; end return true; end --[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >-------------------------- Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August. This function looks in cfg.date_names{} to see if both month names are listed in the long subtable or both are listed in the short subtable. When both have the same style (both are listed in the same table), returns true; false else ]] local function is_valid_month_range_style (month1, month2) if (cfg.date_names.en.long[month1] and cfg.date_names.en.long[month2]) or -- are both English names listed in the long subtable? (cfg.date_names.en.short[month1] and cfg.date_names.en.short[month2]) or -- are both English names listed in the short subtable? (cfg.date_names['local'].long[month1] and cfg.date_names['local'].long[month2]) or -- are both local names listed in the long subtable? (cfg.date_names['local'].short[month1] and cfg.date_names['local'].short[month2]) then -- are both local names listed in the short subtable? return true; end return false; -- names are mixed end --[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------ Check a pair of months or seasons to see if both are valid members of a month or season pair. Month pairs are expected to be left to right, earliest to latest in time. All season ranges are accepted as valid because there are publishers out there who have published a Summer–Spring YYYY issue, hence treat as ok ]] local function is_valid_month_season_range(range_start, range_end, param) local range_start_number = get_month_number (range_start); local range_end_number; if 0 == range_start_number then -- is this a month range? range_start_number = get_season_number (range_start, param); -- not a month; is it a season? get start season number range_end_number = get_season_number (range_end, param); -- get end season number if (0 ~= range_start_number) and (0 ~= range_end_number) and (range_start_number ~= range_end_number) then return true; -- any season pairing is accepted except when both are the same end return false; -- range_start and/or range_end is not a season end -- here when range_start is a month range_end_number = get_month_number (range_end); -- get end month number if range_start_number < range_end_number and -- range_start is a month; does range_start precede range_end? is_valid_month_range_style (range_start, range_end) then -- do months have the same style? return true; -- proper order and same style end return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month end --[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------ This function receives a table of date parts for one or two dates and an empty table reference declared in Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=<value> is determined to be a valid date format. The question of what to do with invalid date formats is not answered here. The date parts in the input table are converted to an ISO 8601 conforming date string: single whole dates: yyyy-mm-dd month and year dates: yyyy-mm year dates: yyyy ranges: yyyy-mm-dd/yyyy-mm-dd yyyy-mm/yyyy-mm yyyy/yyyy Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from Julian to Proleptic Gregorian. The input table has: year, year2 – always present; if before 1582, ignore months and days if present month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 99 Christmas day, day2 – 0 if not provided, 1-31 for days the output table receives: rftdate: an ISO 8601 formatted date rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and proper-name dates) rftssn: one of four season keywords: winter, spring, summer, fall (lowercase) rftquarter: one of four values: 1, 2, 3, 4 ]] local function make_COinS_date (input, tCOinS_date) local date; -- one date or first date in a range local date2 = ''; -- end of range date input.year = tonumber (input.year) or lang_object:parseFormattedNumber (input.year); -- language-aware tonumber() input.year2 = tonumber (input.year2) or lang_object:parseFormattedNumber (input.year2); -- COinS dates are pseudo-ISO 8601 so convert to Arabic numerals if ((1582 == input.year) and (10 > tonumber(input.month))) or (1582 > input.year) then -- if a Julian calendar date tCOinS_date.rftdate = tostring (input.year); -- &rft.date gets year only return; -- done end -- here for all forms of Gregorian dates if 20 < tonumber (input.month) then -- if season, quarter, or proper-name date date = input.year; -- &rft.date gets year only if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year date = string.format ('%.4d/%.4d', input.year, input.year2) -- assemble the date range end local season = {[24] = 'winter', [21] = 'spring', [22] = 'summer', [23] = 'fall', [33] = '1', [34] = '2', [35] = '3', [36] = '4', [98] = 'Easter', [99] = 'Christmas'}; -- seasons lowercase, no autumn; proper-names use title case if 0 == input.month2 then -- single season, quarter, or proper-name date if 40 < tonumber(input.month) then tCOinS_date.rftchron = season[input.month]; -- proper-name date; used in journal metadata only elseif 30 < tonumber(input.month) then tCOinS_date.rftquarter = season[input.month]; -- quarter date; used in journal metadata only else tCOinS_date.rftssn = season[input.month]; -- season date; used in journal metadata only end else -- season ranges are lumped into &rft.chron; &rft.ssn and &rft.quarter are left blank if input.year ~= input.year2 then -- season year – season year range or season year–year if 0 ~= input.month2 then tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2); -- used in journal metadata only end else -- season–season year range tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range; used in journal metadata only end end tCOinS_date.rftdate = tostring (date); return; -- done end -- here for gregorian calendar dates if 0 ~= input.day then date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date elseif 0 ~= input.month then date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month else date = string.format ('%s', input.year); -- just year end if 0 ~= input.year2 then if 0 ~= input.day2 then date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date elseif 0 ~= input.month2 then date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month else date2 = string.format ('/%s', input.year2); -- just year end end tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator return; end --[[--------------------------< P A T T E R N S _ T >---------------------------------------------------------- this is the list of patterns for date formats that this module recognizes. Approximately the first half of these patterns represent formats that might be reformatted into another format. Those that might be reformatted have 'indicator' letters that identify the content of the matching capture: 'd' (day), 'm' (month), 'a' (anchor year), 'y' (year); second day, month, year have a '2' suffix. These patterns are used for both date validation and for reformatting. This table should not be moved to ~/Configuration because changes to this table require changes to check_date() and to reformatter() and reformat_date() ]] local patterns_t = { -- year-initial numerical year-month-day ['ymd'] = {'^([1-9]%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, -- month-initial: month day, year ['Mdy'] = {'^(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'a', 'y'}, -- month-initial day range: month day–day, year; days are separated by endash ['Md-dy'] = {'^(%D-) +([1-9]%d?)[%-–]([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'd2', 'a', 'y'}, -- day-initial: day month year ['dMy'] = {'^([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'a', 'y'}, -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed; not supported at en.wiki -- ['yMd'] = {'^(([1-9]%d%d%d?)%a?) +(%D-) +(%d%d?)$', 'a', 'y', 'm', 'd'}, -- day-range-initial: day–day month year; days are separated by endash ['d-dMy'] = {'^([1-9]%d?)[%-–]([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'd2', 'm', 'a', 'y'}, -- day initial month-day-range: day month - day month year; uses spaced endash ['dM-dMy'] = {'^([1-9]%d?) +(%D-) +[%-–] +([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'd2', 'm2', 'a', 'y'}, -- month initial month-day-range: month day – month day, year; uses spaced endash ['Md-Mdy'] = {'^(%D-) +([1-9]%d?) +[%-–] +(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$','m', 'd', 'm2', 'd2', 'a', 'y'}, -- day initial month-day-year-range: day month year - day month year; uses spaced endash ['dMy-dMy'] = {'^([1-9]%d?) +(%D-) +([1-9]%d%d%d?) +[%-–] +([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'y', 'd2', 'm2', 'a', 'y2'}, -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash ['Mdy-Mdy'] = {'^(%D-) +([1-9]%d?), +([1-9]%d%d%d?) +[%-–] +(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'y', 'm2', 'd2', 'a', 'y2'}, -- these date formats cannot be converted, per se, but month name can be rendered short or long -- month/season year - month/season year; separated by spaced endash ['My-My'] = {'^(%D-) +([1-9]%d%d%d?) +[%-–] +(%D-) +(([1-9]%d%d%d?)%a?)$', 'm', 'y', 'm2', 'a', 'y2'}, -- month/season range year; months separated by endash ['M-My'] = {'^(%D-)[%-–](%D-) +(([1-9]%d%d%d?)%a?)$', 'm', 'm2', 'a', 'y'}, -- month/season year or proper-name year; quarter year when First Quarter YYYY etc. ['My'] = {'^([^%d–]-) +(([1-9]%d%d%d?)%a?)$', 'm', 'a', 'y'}, -- this way because endash is a member of %D; %D- will match January–March 2019 when it shouldn't -- these date formats cannot be converted ['Sy4-y2'] = {'^(%D-) +(([1-9]%d)%d%d)[%-–]((%d%d)%a?)$'}, -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash ['Sy-y'] = {'^(%D-) +([1-9]%d%d%d?)[%-–](([1-9]%d%d%d?)%a?)$'}, -- special case Winter/Summer year-year; year separated with unspaced endash ['y-y'] = {'^([1-9]%d%d%d?)[%-–](([1-9]%d%d%d?)%a?)$'}, -- year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 ['y4-y2'] = {'^(([1-9]%d)%d%d)[%-–]((%d%d)%a?)$'}, -- year range: YYYY–YY; separated by unspaced endash ['y'] = {'^(([1-9]%d%d%d?)%a?)$'}, -- year; here accept either YYY or YYYY } --[[--------------------------< I S _ V A L I D _ E M B A R G O _ D A T E >------------------------------------ returns true and date value if that value has proper dmy, mdy, ymd format. returns false and 9999 (embargoed forever) when date value is not proper format; assumes that when |pmc-embargo-date= is set, the editor intended to embargo a PMC but |pmc-embargo-date= does not hold a single date. ]] local function is_valid_embargo_date (v) if v:match (patterns_t['ymd'][1]) or -- ymd v:match (patterns_t['Mdy'][1]) or -- dmy v:match (patterns_t['dMy'][1]) then -- mdy return true, v; end return false, '9999'; -- if here not good date so return false and set embargo date to long time in future end --[[--------------------------< C H E C K _ D A T E >---------------------------------------------------------- Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons must be spelled correctly. Future years beyond next year are not allowed. If the date fails the format tests, this function returns false and does not return values for anchor_year and COinS_date. When this happens, the date parameter is (DEBUG: not?) used in the COinS metadata and the CITEREF identifier gets its year from the year parameter if present otherwise CITEREF does not get a date value. Inputs: date_string - date string from date-holding parameters (date, year, publication-date, access-date, pmc-embargo-date, archive-date, lay-date) Returns: false if date string is not a real date; else true, anchor_year, COinS_date anchor_year can be used in CITEREF anchors COinS_date is ISO 8601 format date; see make_COInS_date() ]] local function check_date (date_string, param, tCOinS_date) local year; -- assume that year2, months, and days are not used; local year2 = 0; -- second year in a year range local month = 0; local month2 = 0; -- second month in a month range local day = 0; local day2 = 0; -- second day in a day range local anchor_year; local coins_date; if date_string:match (patterns_t['ymd'][1]) then -- year-initial numerical year month day format year, month, day = date_string:match (patterns_t['ymd'][1]); if 12 < tonumber(month) or 1 > tonumber(month) or 1582 > tonumber(year) or 0 == tonumber(day) then return false; end -- month or day number not valid or not Gregorian calendar anchor_year = year; elseif mw.ustring.match(date_string, patterns_t['Mdy'][1]) then -- month-initial: month day, year month, day, anchor_year, year = mw.ustring.match(date_string, patterns_t['Mdy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months elseif mw.ustring.match(date_string, patterns_t['Md-dy'][1]) then -- month-initial day range: month day–day, year; days are separated by endash month, day, day2, anchor_year, year = mw.ustring.match(date_string, patterns_t['Md-dy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2=month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns_t['dMy'][1]) then -- day-initial: day month year day, month, anchor_year, year = mw.ustring.match(date_string, patterns_t['dMy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months --[[ NOT supported at en.wiki elseif mw.ustring.match(date_string, patterns_t['yMd'][1]) then -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed anchor_year, year, month, day = mw.ustring.match(date_string, patterns_t['yMd'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months -- end NOT supported at en.wiki ]] elseif mw.ustring.match(date_string, patterns_t['d-dMy'][1]) then -- day-range-initial: day–day month year; days are separated by endash day, day2, month, anchor_year, year = mw.ustring.match(date_string, patterns_t['d-dMy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2 = month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns_t['dM-dMy'][1]) then -- day initial month-day-range: day month - day month year; uses spaced endash day, month, day2, month2, anchor_year, year = mw.ustring.match(date_string, patterns_t['dM-dMy'][1]); if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later; month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns_t['Md-Mdy'][1]) then -- month initial month-day-range: month day – month day, year; uses spaced endash month, day, month2, day2, anchor_year, year = mw.ustring.match(date_string, patterns_t['Md-Mdy'][1]); if (not is_valid_month_season_range(month, month2, param)) or not is_valid_year(year) then return false; end month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns_t['dMy-dMy'][1]) then -- day initial month-day-year-range: day month year - day month year; uses spaced endash day, month, year, day2, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['dMy-dMy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number (month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns_t['Mdy-Mdy'][1]) then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash month, day, year, month2, day2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Mdy-Mdy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns_t['Sy4-y2'][1]) then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash local century; month, year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Sy4-y2'][1]); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years year2 = century..year2; -- add the century to year2 for comparisons if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number(month, param); elseif mw.ustring.match(date_string, patterns_t['Sy-y'][1]) then -- special case Winter/Summer year-year; year separated with unspaced endash month, year, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Sy-y'][1]); month = get_season_number (month, param); -- <month> can only be winter or summer; also for metadata if (month ~= cfg.date_names['en'].season['Winter']) and (month ~= cfg.date_names['en'].season['Summer']) then return false; -- not Summer or Winter; abandon end anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns_t['My-My'][1]) then -- month/season year - month/season year; separated by spaced endash month, year, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['My-My'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_month_number(month); month2 = get_month_number(month2); elseif 0 ~= get_season_number(month, param) and 0 ~= get_season_number(month2, param) then -- both must be season year, not mixed month = get_season_number(month, param); month2 = get_season_number(month2, param); else return false; end elseif mw.ustring.match(date_string, patterns_t['M-My'][1]) then -- month/season range year; months separated by endash month, month2, anchor_year, year = mw.ustring.match(date_string, patterns_t['M-My'][1]); if (not is_valid_month_season_range(month, month2, param)) or (not is_valid_year(year)) then return false; end if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_month_number(month); month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end else month = get_season_number(month, param); month2 = get_season_number(month2, param); end year2 = year; elseif mw.ustring.match(date_string, patterns_t['My'][1]) then -- month/season/quarter/proper-name year month, anchor_year, year = mw.ustring.match(date_string, patterns_t['My'][1]); if not is_valid_year(year) then return false; end month = get_element_number(month, param); -- get month season quarter proper-name number or nil if not month then return false; end -- not valid whatever it is elseif mw.ustring.match(date_string, patterns_t['y-y'][1]) then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 year, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['y-y'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns_t['y4-y2'][1]) then -- Year range: YYYY–YY; separated by unspaced endash local century; year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['y4-y2'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if 13 > tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003 year2 = century .. year2; -- add the century to year2 for comparisons if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if in_array (param, {'date', 'publication-date', 'year'}) then -- here when 'valid' abbreviated year range; if one of these parameters add_prop_cat ('year-range-abbreviated'); -- add properties cat end elseif mw.ustring.match(date_string, patterns_t['y'][1]) then -- year; here accept either YYY or YYYY anchor_year, year = mw.ustring.match(date_string, patterns_t['y'][1]); if false == is_valid_year(year) then return false; end else return false; -- date format not one of the MOS:DATE approved formats end if param ~= 'date' then -- CITEREF disambiguation only allowed in |date=; |year= & |publication-date= promote to date if anchor_year:match ('%l$') then return false; end end if 'access-date' == param then -- test access-date here because we have numerical date parts if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2 then -- none of these; access-date must not be a range if not is_valid_accessdate(year .. '-' .. month .. '-' .. day) then return false; -- return false when access-date out of bounds end else return false; -- return false when access-date is a range of two dates end end if 'archive-date' == param then -- test archive-date here because we have numerical date parts if not (0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2) then -- none of these; archive-date must not be a range return false; -- return false when archive-date is a range of two dates end end local result=true; -- check whole dates for validity; assume true because not all dates will go through this test if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date) result = is_valid_date (year, month, day, param); -- <param> for |pmc-embargo-date= elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range) result = is_valid_date (year, month, day); result = result and is_valid_date (year, month, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range) result = is_valid_date (year, month, day); result = result and is_valid_date (year, month2, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range) result = is_valid_date(year, month, day); result = result and is_valid_date(year2, month2, day2); end if false == result then return false; end if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values make_COinS_date ({year = year, month = month, day = day, year2 = year2, month2 = month2, day2 = day2}, tCOinS_date); -- make an ISO 8601 date string for COinS end return true, anchor_year; -- format is good and date string represents a real date end --[[--------------------------< D A T E S >-------------------------------------------------------------------- Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes). Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially, parameters with errors are added to the <error_list> sequence table as the dates are tested. ]] local function dates(date_parameters_list, tCOinS_date, error_list) local anchor_year; -- will return as nil if the date being tested is not |date= local COinS_date; -- will return as nil if the date being tested is not |date= local embargo_date; -- if embargo date is a good dmy, mdy, ymd date then holds original value else reset to 9999 local good_date = false; for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(v.val) then -- if the parameter has a value v.val = mw.ustring.gsub(v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 if v.val:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year= local year = v.val:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested if 'date' == k then anchor_year, COinS_date = v.val:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter good_date = is_valid_year(year); elseif 'year' == k then good_date = is_valid_year(year); else good_date = false; end elseif 'date' == k then -- if the parameter is |date= if v.val:match("^n%.d%.%a?$") then -- ToDo: I18N -- if |date=n.d. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((n%.d%.)%a?)"); -- ToDo: I18N -- "n.d."; no error when date parameter is set to no date elseif v.val:match("^nd%a?$") then -- ToDo: I18N -- if |date=nd with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((nd)%a?)"); -- ToDo: I18N -- "nd"; no error when date parameter is set to no date else good_date, anchor_year, COinS_date = check_date (v.val, k, tCOinS_date); -- go test the date end elseif 'year' == k then -- if the parameter is |year= it should hold only a year value if v.val:match("^[1-9]%d%d%d?%a?$") then -- if |year = 3 or 4 digits only with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((%d+)%a?)"); else good_date = false; end elseif 'pmc-embargo-date' == k then -- if the parameter is |pmc-embargo-date= good_date = check_date (v.val, k); -- go test the date if true == good_date then -- if the date is a valid date good_date, embargo_date = is_valid_embargo_date (v.val); -- is |pmc-embargo-date= date a single dmy, mdy, or ymd formatted date? yes: returns embargo date; no: returns 9999 end else -- any other date-holding parameter good_date = check_date (v.val, k); -- go test the date end if false == good_date then -- assemble one error message so we don't add the tracking category multiple times table.insert (error_list, wrap_style ('parameter', v.name)); -- make parameter name suitable for error message list end end end return anchor_year, embargo_date; -- and done end --[[--------------------------< Y E A R _ C H E C K >---------------------------------------------------------- Temporary function to test |year= for acceptable values: YYY, YYYY, year-only ranges, their circa forms, with or without CITEREF disambiguators. When |year= holds some form of date that is not one of these year-only dates, emit a maintenance message. This function necessary because many non-cs1|2 templates have a |year= parameter so cirrus searches are more-or- less useless ]] local function year_check (year) year = year:gsub ('c%. *', ''); -- remove circa annotation (if present) before testing <year> for _, index in ipairs ({'y-y', 'y4-y2', 'y'}) do -- spin through these indexes into patterns_t if mw.ustring.match (year, patterns_t[index][1]) then return; -- if a match then |year= holds a valid 'year' end end set_message ('maint_year'); -- if here, |year= value is not an accepted value; add a maint cat end --[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------ Compare the value provided in |year= with the year value(s) provided in |date=. This function sets a local numeric value: 0 - year value does not match the year value in date 1 - (default) year value matches the year value in date or one of the year values when date contains two years 2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx) the numeric value in <result> determines the 'output' if any from this function: 0 – adds error message to error_list sequence table 1 – adds maint cat 2 – does nothing ]] local function year_date_check (year_string, year_origin, date_string, date_origin, error_list) local year; local date1; local date2; local result = 1; -- result of the test; assume that the test passes year = year_string:match ('(%d%d%d%d?)'); if date_string:match ('%d%d%d%d%-%d%d%-%d%d') then --special case where both date and year are required YYYY-MM-DD and YYYYx date1 = date_string:match ('(%d%d%d%d)'); year = year_string:match ('(%d%d%d%d)'); if year ~= date1 then result = 0; -- years don't match elseif year_string:match ('%d%d%d%d%a') then result = 2; -- years match; but because disambiguated, don't add to maint cat end elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard range formats of date with two three- or four-digit years date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)"); if year ~= date1 and year ~= date2 then result = 0; end elseif mw.ustring.match(date_string, "%d%d%d%d[%-–]%d%d") then -- YYYY-YY date ranges local century; date1, century, date2 = mw.ustring.match(date_string, "((%d%d)%d%d)[%-–]+(%d%d)"); date2 = century..date2; -- convert YY to YYYY if year ~= date1 and year ~= date2 then result = 0; end elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year date1 = date_string:match ("(%d%d%d%d?)"); if year ~= date1 then result = 0; end else -- should never get here; this function called only when no other date errors result = 0; -- no recognizable year in date end if 0 == result then -- year / date mismatch table.insert (error_list, substitute (cfg.messages['mismatch'], {year_origin, date_origin})); -- add error message to error_list sequence table elseif 1 == result then -- redundant year / date set_message ('maint_date_year'); -- add a maint cat end end --[[--------------------------< R E F O R M A T T E R >-------------------------------------------------------- reformat 'date' into new format specified by format_param if pattern_idx (the current format of 'date') can be reformatted. Does the grunt work for reformat_dates(). The table re_formats maps pattern_idx (current format) and format_param (desired format) to a table that holds: format string used by string.format() identifier letters ('d', 'm', 'y', 'd2', 'm2', 'y2') that serve as indexes into a table t{} that holds captures from mw.ustring.match() for the various date parts specified by patterns_t[pattern_idx][1] Items in patterns_t{} have the general form: ['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, where: ['ymd'] is pattern_idx patterns_t['ymd'][1] is the match pattern with captures for mw.ustring.match() patterns_t['ymd'][2] is an indicator letter identifying the content of the first capture patterns_t['ymd'][3] ... the second capture etc. when a pattern matches a date, the captures are loaded into table t{} in capture order using the idemtifier characters as indexes into t{} For the above, a ymd date is in t{} as: t.y = first capture (year), t.m = second capture (month), t.d = third capture (day) To reformat, this function is called with the pattern_idx that matches the current format of the date and with format_param set to the desired format. This function loads table t{} as described and then calls string.format() with the format string specified by re_format[pattern_idx][format_param][1] using values taken from t{} according to the capture identifier letters specified by patterns_t[pattern_idx][format_param][n] where n is 2.. ]] local re_formats = { ['ymd'] = { -- date format is ymd; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Mdy'] = { -- date format is Mdy; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['dMy'] = { -- date format is dMy; reformat to: ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Md-dy'] = { -- date format is Md-dy; reformat to: ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- |df=dmy -> d-dMy }, ['d-dMy'] = { -- date format is d-d>y; reformat to: ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- |df=mdy -> Md-dy }, ['dM-dMy'] = { -- date format is dM-dMy; reformat to: ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- |df=mdy -> Md-Mdy }, ['Md-Mdy'] = { -- date format is Md-Mdy; reformat to: ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- |df=dmy -> dM-dMy }, ['dMy-dMy'] = { -- date format is dMy-dMy; reformat to: ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- |df=mdy -> Mdy-Mdy }, ['Mdy-Mdy'] = { -- date format is Mdy-Mdy; reformat to: ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- for long/short reformatting ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- |df=dmy -> dMy-dMy }, ['My-My'] = { -- these for long/short reformatting ['any'] = {'%s %s – %s %s', 'm', 'y', 'm2', 'y2'}, -- dmy/mdy agnostic }, ['M-My'] = { -- these for long/short reformatting ['any'] = {'%s–%s %s', 'm', 'm2', 'y'}, -- dmy/mdy agnostic }, ['My'] = { -- these for long/short reformatting ['any'] = {'%s %s', 'm', 'y'}, -- dmy/mdy agnostic }, -- ['yMd'] = { -- not supported at en.wiki -- ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy -- ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- }, } local function reformatter (date, pattern_idx, format_param, mon_len) if not in_array (pattern_idx, {'ymd', 'Mdy', 'Md-dy', 'dMy', 'yMd', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- not in this set of date format patterns_t then not a reformattable date end if 'ymd' == format_param and in_array (pattern_idx, {'ymd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- ymd date ranges not supported at en.wiki; no point in reformatting ymd to ymd end if in_array (pattern_idx, {'My', 'M-My', 'My-My'}) then -- these are not dmy/mdy so can't be 'reformatted' into either format_param = 'any'; -- so format-agnostic end -- yMd is not supported at en.wiki; when yMd is supported at your wiki, uncomment the next line -- if 'yMd' == format_param and in_array (pattern_idx, {'yMd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy'}) then -- these formats not convertable; yMd not supported at en.wiki if 'yMd' == format_param then -- yMd not supported at en.wiki; when yMd is supported at your wiki, remove or comment-out this line return; -- not a reformattable date end local c1, c2, c3, c4, c5, c6, c7; -- these hold the captures specified in patterns_t[pattern_idx][1] c1, c2, c3, c4, c5, c6, c7 = mw.ustring.match (date, patterns_t[pattern_idx][1]); -- get the captures local t = { -- table that holds k/v pairs of date parts from the captures and patterns_t[pattern_idx][2..] [patterns_t[pattern_idx][2]] = c1; -- at minimum there is always one capture with a matching indicator letter [patterns_t[pattern_idx][3] or 'x'] = c2; -- patterns_t can have a variable number of captures; each capture requires an indicator letter; [patterns_t[pattern_idx][4] or 'x'] = c3; -- where there is no capture, there is no indicator letter so n in patterns_t[pattern_idx][n] will be nil; [patterns_t[pattern_idx][5] or 'x'] = c4; -- the 'x' here spoofs an indicator letter to prevent 'table index is nil' error [patterns_t[pattern_idx][6] or 'x'] = c5; [patterns_t[pattern_idx][7] or 'x'] = c6; [patterns_t[pattern_idx][8] or 'x'] = c7; }; if t.a then -- if this date has an anchor year capture (all convertable date formats except ymd) if t.y2 then -- for year range date formats t.y2 = t.a; -- use the anchor year capture when reassembling the date else -- here for single date formats (except ymd) t.y = t.a; -- use the anchor year capture when reassembling the date end end if tonumber(t.m) then -- if raw month is a number (converting from ymd) if 's' == mon_len then -- if we are to use abbreviated month names t.m = cfg.date_names['inv_local_short'][tonumber(t.m)]; -- convert it to a month name else t.m = cfg.date_names['inv_local_long'][tonumber(t.m)]; -- convert it to a month name end t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present elseif 'ymd' == format_param then -- when converting to ymd t.y = t.y:gsub ('%a', ''); -- strip CITREF disambiguator if present; anchor year already known so process can proceed; TODO: maint message? if 1582 > tonumber (t.y) then -- ymd format dates not allowed before 1582 return; end t.m = string.format ('%02d', get_month_number (t.m)); -- make sure that month and day are two digits t.d = string.format ('%02d', t.d); elseif mon_len then -- if mon_len is set to either 'short' or 'long' for _, mon in ipairs ({'m', 'm2'}) do -- because there can be two month names, check both if t[mon] then t[mon] = get_month_number (t[mon]); -- get the month number for this month (is length agnostic) if 0 == t[mon] then return; end -- seasons and named dates can't be converted t[mon] = (('s' == mon_len) and cfg.date_names['inv_local_short'][t[mon]]) or cfg.date_names['inv_local_long'][t[mon]]; -- fetch month name according to length end end end local new_date = string.format (re_formats[pattern_idx][format_param][1], -- format string t[re_formats[pattern_idx][format_param][2]], -- named captures from t{} t[re_formats[pattern_idx][format_param][3]], t[re_formats[pattern_idx][format_param][4]], t[re_formats[pattern_idx][format_param][5]], t[re_formats[pattern_idx][format_param][6]], t[re_formats[pattern_idx][format_param][7]], t[re_formats[pattern_idx][format_param][8]] ); return new_date; end --[[-------------------------< R E F O R M A T _ D A T E S >-------------------------------------------------- Reformats existing dates into the format specified by format. format is one of several manual keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The -all version includes access- and archive-dates; otherwise these dates are not reformatted. This function allows automatic date formatting. In ~/Configuration, the article source is searched for one of the {{use xxx dates}} templates. If found, xxx becomes the global date format as xxx-all. If |cs1-dates= in {{use xxx dates}} has legitimate value then that value determines how cs1|2 dates will be rendered. Legitimate values for |cs1-dates= are: l - all dates are rendered with long month names ls - publication dates use long month names; access-/archive-dates use abbreviated month names ly - publication dates use long month names; access-/archive-dates rendered in ymd format s - all dates are rendered with abbreviated (short) month names sy - publication dates use abbreviated month names; access-/archive-dates rendered in ymd format y - all dates are rendered in ymd format the format argument for automatic date formatting will be the format specified by {{use xxx dates}} with the value supplied by |cs1-dates so one of: xxx-l, xxx-ls, xxx-ly, xxx-s, xxx-sy, xxx-y, or simply xxx (|cs1-dates= empty, omitted, or invalid) where xxx shall be either of dmy or mdy. dates are extracted from date_parameters_list, reformatted (if appropriate), and then written back into the list in the new format. Dates in date_parameters_list are presumed here to be valid (no errors). This function returns true when a date has been reformatted, false else. Actual reformatting is done by reformatter(). ]] local function reformat_dates (date_parameters_list, format) local all = false; -- set to false to skip access- and archive-dates local len_p = 'l'; -- default publication date length shall be long local len_a = 'l'; -- default access-/archive-date length shall be long local result = false; local new_date; if format:match('%a+%-all') then -- manual df keyword; auto df keyword when length not specified in {{use xxx dates}}; format = format:match('(%a+)%-all'); -- extract the format all = true; -- all dates are long format dates because this keyword doesn't specify length elseif format:match('%a+%-[lsy][sy]?') then -- auto df keywords; internal only all = true; -- auto df applies to all dates; use length specified by capture len_p for all dates format, len_p, len_a = format:match('(%a+)%-([lsy])([sy]?)'); -- extract the format and length keywords if 'y' == len_p then -- because allowed by MOS:DATEUNIFY (sort of) range dates and My dates not reformatted format = 'ymd'; -- override {{use xxx dates}} elseif (not is_set(len_a)) or (len_p == len_a) then -- no access-/archive-date length specified or same length as publication dates then len_a = len_p; -- in case len_a not set end end -- else only publication dates and they are long for param_name, param_val in pairs (date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) then -- if the parameter has a value if not (not all and in_array (param_name, {'access-date', 'archive-date'})) then -- skip access- or archive-date unless format is xxx-all; yeah, ugly; TODO: find a better way for pattern_idx, pattern in pairs (patterns_t) do if mw.ustring.match (param_val.val, pattern[1]) then if all and in_array (param_name, {'access-date', 'archive-date'}) then -- if this date is an access- or archive-date new_date = reformatter (param_val.val, pattern_idx, (('y' == len_a) and 'ymd') or format, len_a); -- choose ymd or dmy/mdy according to len_a setting else -- all other dates new_date = reformatter (param_val.val, pattern_idx, format, len_p); end if new_date then -- set when date was reformatted date_parameters_list[param_name].val = new_date; -- update date in date list result = true; -- and announce that changes have been made break; end end -- if end -- for end -- if end -- if end -- for return result; -- declare boolean result and done end --[[--------------------------< D A T E _ H Y P H E N _ T O _ D A S H >---------------------------------------- Loops through the list of date-holding parameters and converts any hyphen to an ndash. Not called if the cs1|2 template has any date errors. Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false. ]] local function date_hyphen_to_dash (date_parameters_list) local result = false; local n; for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) and not mw.ustring.match (param_val.val, patterns_t.ymd[1]) then -- for those that are not ymd dates (ustring because here digits may not be Western) param_val.val, n = param_val.val:gsub ('%-', '–'); -- replace any hyphen with ndash if 0 ~= n then date_parameters_list[param_name].val = param_val.val; -- update the list result = true; end end end return result; -- so we know if any hyphens were replaced end --[[-------------------------< D A T E _ N A M E _ X L A T E >------------------------------------------------ Attempts to translate English date names to local-language date names using names supplied by MediaWiki's date parser function. This is simple name-for-name replacement and may not work for all languages. if xlat_dig is true, this function will also translate Western (English) digits to the local language's digits. This will also translate ymd dates. ]] local function date_name_xlate (date_parameters_list, xlt_dig) local xlate; local mode; -- long or short month names local modified = false; local date; local sources_t = { {cfg.date_names.en.long, cfg.date_names.inv_local_long}, -- for translating long English month names to long local month names {cfg.date_names.en.short, cfg.date_names.inv_local_short}, -- short month names {cfg.date_names.en.quarter, cfg.date_names.inv_local_quarter}, -- quarter date names {cfg.date_names.en.season, cfg.date_names.inv_local_season}, -- season date nam {cfg.date_names.en.named, cfg.date_names.inv_local_named}, -- named dates } local function is_xlateable (month) -- local function to get local date name that replaces existing English-language date name for _, date_names_t in ipairs (sources_t) do -- for each sequence table in date_names_t if date_names_t[1][month] then -- if date name is English month (long or short), quarter, season or named and if date_names_t[2][date_names_t[1][month]] then -- if there is a matching local date name return date_names_t[2][date_names_t[1][month]]; -- return the local date name end end end end for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(param_val.val) then -- if the parameter has a value date = param_val.val; for month in mw.ustring.gmatch (date, '[%a ]+') do -- iterate through all date names in the date (single date or date range) month = mw.text.trim (month); -- this because quarterly dates contain whitespace xlate = is_xlateable (month); -- get translate <month>; returns translation or nil if xlate then date = mw.ustring.gsub (date, month, xlate); -- replace the English with the translation date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end if xlt_dig then -- shall we also translate digits? date = date:gsub ('%d', cfg.date_names.xlate_digits); -- translate digits from Western to 'local digits' date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end end return modified; end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) add_prop_cat = utilities_page_ptr.add_prop_cat ; -- import functions from selected Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; set_message = utilities_page_ptr.set_message; substitute = utilities_page_ptr.substitute; wrap_style = utilities_page_ptr.wrap_style; cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration end --[[--------------------------< A R C H I V E _ D A T E _ C H E C K >------------------------------------------ Compare value in |archive-date= with the timestamp in Wayback machine urls. Emits an error message with suggested date from the |archive-url= timestamp in an appropriate format when the value in |archive-date= does not match the timestamp. this function never called when any date in a cs1|2 template has errors error message suggests new |archive-date= value in an appropriate format specified by <df>. <df> is either |df= or cfg.global_df in that order. If <df> is nil, suggested date has format from |archive-date=. There is a caveat: when |df=dmy or |df=mdy, the reformatter leaves |access-date= and |archive-date= formats as they are. The error message suggested date is passed to the formatter as YYYY-MM-DD so when |df=dmy or |df=mdy, the format is not changed. ]] local function archive_date_check (archive_date, archive_url_timestamp, df) local archive_date_format = 'dmy-y'; -- holds the date format of date in |archive-date; default to ymd; 'dmy' used here to spoof reformat_dates() for _, v_t in ipairs ({{'dMy', 'dmy-all'}, {'Mdy', 'mdy-all'}}) do -- is |archive-date= format dmy or mdy? if archive_date:match (patterns_t[v_t[1]][1]) then -- does the pattern match? archive_date_format = cfg.keywords_xlate[v_t[2]]; -- get appropriate |df= supported keyword from the i18n translator table break; end end local dates_t = {}; dates_t['archive-date'] = {val=archive_date, name=''}; -- setup to call reformat_dates(); never called when errors so <name> unset as not needed reformat_dates (dates_t, 'dmy-y'); -- reformat |archive-date= to ymd; 'dmy' used here to spoof reformat_dates() local archive_url_date = archive_url_timestamp:gsub ('(%d%d%d%d)(%d%d)(%d%d)%d*', '%1-%2-%3'); -- make ymd format date from timestamp if dates_t['archive-date'].val == archive_url_date then -- are the two dates the same return; -- yes, done else dates_t['archive-date'] = {val=archive_url_date, name=''}; -- setup to call reformat_dates() with the timestamp date reformat_dates (dates_t, df or archive_date_format); -- reformat timestamp to format specified by <df> or format used in |archive-date= archive_url_date = dates_t['archive-date'].val; set_message ('err_archive_date_url_ts_mismatch', archive_url_date); -- emit an error message end end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { -- return exported functions archive_date_check = archive_date_check, date_hyphen_to_dash = date_hyphen_to_dash, date_name_xlate = date_name_xlate, dates = dates, is_valid_date = is_valid_date, reformat_dates = reformat_dates, set_selected_modules = set_selected_modules, year_check = year_check, year_date_check = year_date_check, } 039z8dc7ugbbv8w4tsnejz5bfud8dgw 116883 116882 2026-07-16T10:58:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Citation/CS1/Date_validation]] 116882 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local add_prop_cat, is_set, in_array, set_message, substitute, wrap_style; -- imported functions from selected Module:Citation/CS1/Utilities local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< F I L E - S C O P E D E C L A R A T I O N S >-------------------------------- File-scope variables are declared here ]] local lang_object = mw.getContentLanguage(); -- used by is_valid_accessdate(), is_valid_year(), date_name_xlate(); TODO: move to ~/Configuration? local year_limit; -- used by is_valid_year() --[=[-------------------------< I S _ V A L I D _ A C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time) accessdate is the date provided in |access-date= at time 00:00:00 UTC today is the current date at time 00:00:00 UTC plus 48 hours if today is 2015-01-01T00:00:00 then adding 24 hours gives 2015-01-02T00:00:00 – one second more than today adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser apparently doesn't understand non-English date month names. This function will always return false when the date contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that call this function with YYYY-MM-DD format dates. ]=] local function is_valid_accessdate (accessdate) local good1, good2; local access_ts, tomorrow_ts; -- to hold Unix time stamps representing the dates good1, access_ts = pcall (lang_object.formatDate, lang_object, 'U', accessdate ); -- convert accessdate value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which which tonumber() may not understand access_ts = tonumber (access_ts) or lang_object:parseFormattedNumber (access_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix time stamp end if 979516800 <= access_ts and access_ts < tomorrow_ts then -- Wikipedia start date <= accessdate < tomorrow's date return true; else return false; -- accessdate out of range end end --[[--------------------------< G E T _ M O N T H _ N U M B E R >---------------------------------------------- returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct. If not a valid month, returns 0 ]] local function get_month_number (month) return cfg.date_names['local'].long[month] or cfg.date_names['local'].short[month] or -- look for local names first cfg.date_names['en'].long[month] or cfg.date_names['en'].short[month] or -- failing that, look for English names 0; -- not a recognized month name end --[[--------------------------< G E T _ S E A S O N _ N U M B E R >-------------------------------------------- returns a number according to the sequence of seasons in a year: 21 for Spring, etc. Capitalization and spelling must be correct. If not a valid season, returns 0. 21-24 = Spring, Summer, Autumn, Winter, independent of “Hemisphere” returns 0 when <param> is not |date= Season numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons. EDTF does support the distinction between north and south hemisphere seasons but cs1|2 has no way to make that distinction. These additional divisions not currently supported: 25-28 = Spring - Northern Hemisphere, Summer- Northern Hemisphere, Autumn - Northern Hemisphere, Winter - Northern Hemisphere 29-32 = Spring – Southern Hemisphere, Summer– Southern Hemisphere, Autumn – Southern Hemisphere, Winter - Southern Hemisphere 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_season_number (season, param) if 'date' ~= param then return 0; -- season dates only supported by |date= end return cfg.date_names['local'].season[season] or -- look for local names first cfg.date_names['en'].season[season] or -- failing that, look for English names 0; -- not a recognized season name end --[[--------------------------< G E T _ Q U A R T E R _ N U M B E R >------------------------------------------ returns a number according to the sequence of quarters in a year: 33 for first quarter, etc. Capitalization and spelling must be correct. If not a valid quarter, returns 0. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) returns 0 when <param> is not |date= Quarter numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons and quarters. These additional divisions not currently supported: 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_quarter_number (quarter, param) if 'date' ~= param then return 0; -- quarter dates only supported by |date= end quarter = mw.ustring.gsub (quarter, ' +', ' '); -- special case replace multiple space chars with a single space char return cfg.date_names['local'].quarter[quarter] or -- look for local names first cfg.date_names['en'].quarter[quarter] or -- failing that, look for English names 0; -- not a recognized quarter name end --[[--------------------------< G E T _ P R O P E R _ N A M E _ N U M B E R >---------------------------------- returns a non-zero number if date contains a recognized proper-name. Capitalization and spelling must be correct. returns 0 when <param> is not |date= ]] local function get_proper_name_number (name, param) if 'date' ~= param then return 0; -- proper-name dates only supported by |date= end return cfg.date_names['local'].named[name] or -- look for local names dates first cfg.date_names['en'].named[name] or -- failing that, look for English names 0; -- not a recognized named date end --[[--------------------------< G E T _ E L E M E N T _ N U M B E R <------------------------------------------ returns true if month or season or quarter or proper name is valid (properly spelled, capitalized, abbreviated) ]] local function get_element_number (element, param) local num; local funcs = {get_month_number, get_season_number, get_quarter_number, get_proper_name_number}; -- list of functions to execute in order for _, func in ipairs (funcs) do -- spin through the function list num = func (element, param); -- call the function and get the returned number if 0 ~= num then -- non-zero when valid month season quarter return num; -- return that number end end return nil; -- not valid end --[[--------------------------< I S _ V A L I D _ Y E A R >---------------------------------------------------- Function gets current year from the server and compares it to year from a citation parameter. Years more than one year in the future are not acceptable. Special case for |pmc-embargo-date=: years more than two years in the future are not acceptable ]] local function is_valid_year (year, param) if not is_set (year_limit) then year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once end year = tonumber (year) or lang_object:parseFormattedNumber (year); -- convert to number for the comparison if year and (100 > year) then -- years less than 100 not supported return false; end if 'pmc-embargo-date' == param then -- special case for |pmc-embargo-date= return year and (year <= tonumber(os.date("%Y"))+2) or false; -- years more than two years in the future are not accepted end return year and (year <= year_limit) or false; end --[[--------------------------< I S _ V A L I D _ D A T E >---------------------------------------------------- Returns true if day is less than or equal to the number of days in month and year is no farther into the future than next year; else returns false. Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately 1923) dates are assumed to be Gregorian. ]] local function is_valid_date (year, month, day, param) local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local month_length; if not is_valid_year (year, param) then -- no farther into the future than next year except |pmc-embargo-date= no more than two years in the future return false; end month = tonumber (month); -- required for YYYY-MM-DD dates if (2 == month) then -- if February month_length = 28; -- then 28 days unless if 1582 > tonumber(year) then -- Julian calendar if 0 == (year%4) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end else -- Gregorian calendar if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400))) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end end else month_length = days_in_month[month] or 0; -- invalid month number is nil so default <month_length> to 0 end if tonumber (day) > month_length then return false; end return true; end --[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >-------------------------- Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August. This function looks in cfg.date_names{} to see if both month names are listed in the long subtable or both are listed in the short subtable. When both have the same style (both are listed in the same table), returns true; false else ]] local function is_valid_month_range_style (month1, month2) if (cfg.date_names.en.long[month1] and cfg.date_names.en.long[month2]) or -- are both English names listed in the long subtable? (cfg.date_names.en.short[month1] and cfg.date_names.en.short[month2]) or -- are both English names listed in the short subtable? (cfg.date_names['local'].long[month1] and cfg.date_names['local'].long[month2]) or -- are both local names listed in the long subtable? (cfg.date_names['local'].short[month1] and cfg.date_names['local'].short[month2]) then -- are both local names listed in the short subtable? return true; end return false; -- names are mixed end --[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------ Check a pair of months or seasons to see if both are valid members of a month or season pair. Month pairs are expected to be left to right, earliest to latest in time. All season ranges are accepted as valid because there are publishers out there who have published a Summer–Spring YYYY issue, hence treat as ok ]] local function is_valid_month_season_range(range_start, range_end, param) local range_start_number = get_month_number (range_start); local range_end_number; if 0 == range_start_number then -- is this a month range? range_start_number = get_season_number (range_start, param); -- not a month; is it a season? get start season number range_end_number = get_season_number (range_end, param); -- get end season number if (0 ~= range_start_number) and (0 ~= range_end_number) and (range_start_number ~= range_end_number) then return true; -- any season pairing is accepted except when both are the same end return false; -- range_start and/or range_end is not a season end -- here when range_start is a month range_end_number = get_month_number (range_end); -- get end month number if range_start_number < range_end_number and -- range_start is a month; does range_start precede range_end? is_valid_month_range_style (range_start, range_end) then -- do months have the same style? return true; -- proper order and same style end return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month end --[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------ This function receives a table of date parts for one or two dates and an empty table reference declared in Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=<value> is determined to be a valid date format. The question of what to do with invalid date formats is not answered here. The date parts in the input table are converted to an ISO 8601 conforming date string: single whole dates: yyyy-mm-dd month and year dates: yyyy-mm year dates: yyyy ranges: yyyy-mm-dd/yyyy-mm-dd yyyy-mm/yyyy-mm yyyy/yyyy Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from Julian to Proleptic Gregorian. The input table has: year, year2 – always present; if before 1582, ignore months and days if present month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 99 Christmas day, day2 – 0 if not provided, 1-31 for days the output table receives: rftdate: an ISO 8601 formatted date rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and proper-name dates) rftssn: one of four season keywords: winter, spring, summer, fall (lowercase) rftquarter: one of four values: 1, 2, 3, 4 ]] local function make_COinS_date (input, tCOinS_date) local date; -- one date or first date in a range local date2 = ''; -- end of range date input.year = tonumber (input.year) or lang_object:parseFormattedNumber (input.year); -- language-aware tonumber() input.year2 = tonumber (input.year2) or lang_object:parseFormattedNumber (input.year2); -- COinS dates are pseudo-ISO 8601 so convert to Arabic numerals if ((1582 == input.year) and (10 > tonumber(input.month))) or (1582 > input.year) then -- if a Julian calendar date tCOinS_date.rftdate = tostring (input.year); -- &rft.date gets year only return; -- done end -- here for all forms of Gregorian dates if 20 < tonumber (input.month) then -- if season, quarter, or proper-name date date = input.year; -- &rft.date gets year only if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year date = string.format ('%.4d/%.4d', input.year, input.year2) -- assemble the date range end local season = {[24] = 'winter', [21] = 'spring', [22] = 'summer', [23] = 'fall', [33] = '1', [34] = '2', [35] = '3', [36] = '4', [98] = 'Easter', [99] = 'Christmas'}; -- seasons lowercase, no autumn; proper-names use title case if 0 == input.month2 then -- single season, quarter, or proper-name date if 40 < tonumber(input.month) then tCOinS_date.rftchron = season[input.month]; -- proper-name date; used in journal metadata only elseif 30 < tonumber(input.month) then tCOinS_date.rftquarter = season[input.month]; -- quarter date; used in journal metadata only else tCOinS_date.rftssn = season[input.month]; -- season date; used in journal metadata only end else -- season ranges are lumped into &rft.chron; &rft.ssn and &rft.quarter are left blank if input.year ~= input.year2 then -- season year – season year range or season year–year if 0 ~= input.month2 then tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2); -- used in journal metadata only end else -- season–season year range tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range; used in journal metadata only end end tCOinS_date.rftdate = tostring (date); return; -- done end -- here for gregorian calendar dates if 0 ~= input.day then date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date elseif 0 ~= input.month then date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month else date = string.format ('%s', input.year); -- just year end if 0 ~= input.year2 then if 0 ~= input.day2 then date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date elseif 0 ~= input.month2 then date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month else date2 = string.format ('/%s', input.year2); -- just year end end tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator return; end --[[--------------------------< P A T T E R N S _ T >---------------------------------------------------------- this is the list of patterns for date formats that this module recognizes. Approximately the first half of these patterns represent formats that might be reformatted into another format. Those that might be reformatted have 'indicator' letters that identify the content of the matching capture: 'd' (day), 'm' (month), 'a' (anchor year), 'y' (year); second day, month, year have a '2' suffix. These patterns are used for both date validation and for reformatting. This table should not be moved to ~/Configuration because changes to this table require changes to check_date() and to reformatter() and reformat_date() ]] local patterns_t = { -- year-initial numerical year-month-day ['ymd'] = {'^([1-9]%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, -- month-initial: month day, year ['Mdy'] = {'^(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'a', 'y'}, -- month-initial day range: month day–day, year; days are separated by endash ['Md-dy'] = {'^(%D-) +([1-9]%d?)[%-–]([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'd2', 'a', 'y'}, -- day-initial: day month year ['dMy'] = {'^([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'a', 'y'}, -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed; not supported at en.wiki -- ['yMd'] = {'^(([1-9]%d%d%d?)%a?) +(%D-) +(%d%d?)$', 'a', 'y', 'm', 'd'}, -- day-range-initial: day–day month year; days are separated by endash ['d-dMy'] = {'^([1-9]%d?)[%-–]([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'd2', 'm', 'a', 'y'}, -- day initial month-day-range: day month - day month year; uses spaced endash ['dM-dMy'] = {'^([1-9]%d?) +(%D-) +[%-–] +([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'd2', 'm2', 'a', 'y'}, -- month initial month-day-range: month day – month day, year; uses spaced endash ['Md-Mdy'] = {'^(%D-) +([1-9]%d?) +[%-–] +(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$','m', 'd', 'm2', 'd2', 'a', 'y'}, -- day initial month-day-year-range: day month year - day month year; uses spaced endash ['dMy-dMy'] = {'^([1-9]%d?) +(%D-) +([1-9]%d%d%d?) +[%-–] +([1-9]%d?) +(%D-) +(([1-9]%d%d%d?)%a?)$', 'd', 'm', 'y', 'd2', 'm2', 'a', 'y2'}, -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash ['Mdy-Mdy'] = {'^(%D-) +([1-9]%d?), +([1-9]%d%d%d?) +[%-–] +(%D-) +([1-9]%d?), +(([1-9]%d%d%d?)%a?)$', 'm', 'd', 'y', 'm2', 'd2', 'a', 'y2'}, -- these date formats cannot be converted, per se, but month name can be rendered short or long -- month/season year - month/season year; separated by spaced endash ['My-My'] = {'^(%D-) +([1-9]%d%d%d?) +[%-–] +(%D-) +(([1-9]%d%d%d?)%a?)$', 'm', 'y', 'm2', 'a', 'y2'}, -- month/season range year; months separated by endash ['M-My'] = {'^(%D-)[%-–](%D-) +(([1-9]%d%d%d?)%a?)$', 'm', 'm2', 'a', 'y'}, -- month/season year or proper-name year; quarter year when First Quarter YYYY etc. ['My'] = {'^([^%d–]-) +(([1-9]%d%d%d?)%a?)$', 'm', 'a', 'y'}, -- this way because endash is a member of %D; %D- will match January–March 2019 when it shouldn't -- these date formats cannot be converted ['Sy4-y2'] = {'^(%D-) +(([1-9]%d)%d%d)[%-–]((%d%d)%a?)$'}, -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash ['Sy-y'] = {'^(%D-) +([1-9]%d%d%d?)[%-–](([1-9]%d%d%d?)%a?)$'}, -- special case Winter/Summer year-year; year separated with unspaced endash ['y-y'] = {'^([1-9]%d%d%d?)[%-–](([1-9]%d%d%d?)%a?)$'}, -- year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 ['y4-y2'] = {'^(([1-9]%d)%d%d)[%-–]((%d%d)%a?)$'}, -- year range: YYYY–YY; separated by unspaced endash ['y'] = {'^(([1-9]%d%d%d?)%a?)$'}, -- year; here accept either YYY or YYYY } --[[--------------------------< I S _ V A L I D _ E M B A R G O _ D A T E >------------------------------------ returns true and date value if that value has proper dmy, mdy, ymd format. returns false and 9999 (embargoed forever) when date value is not proper format; assumes that when |pmc-embargo-date= is set, the editor intended to embargo a PMC but |pmc-embargo-date= does not hold a single date. ]] local function is_valid_embargo_date (v) if v:match (patterns_t['ymd'][1]) or -- ymd v:match (patterns_t['Mdy'][1]) or -- dmy v:match (patterns_t['dMy'][1]) then -- mdy return true, v; end return false, '9999'; -- if here not good date so return false and set embargo date to long time in future end --[[--------------------------< C H E C K _ D A T E >---------------------------------------------------------- Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons must be spelled correctly. Future years beyond next year are not allowed. If the date fails the format tests, this function returns false and does not return values for anchor_year and COinS_date. When this happens, the date parameter is (DEBUG: not?) used in the COinS metadata and the CITEREF identifier gets its year from the year parameter if present otherwise CITEREF does not get a date value. Inputs: date_string - date string from date-holding parameters (date, year, publication-date, access-date, pmc-embargo-date, archive-date, lay-date) Returns: false if date string is not a real date; else true, anchor_year, COinS_date anchor_year can be used in CITEREF anchors COinS_date is ISO 8601 format date; see make_COInS_date() ]] local function check_date (date_string, param, tCOinS_date) local year; -- assume that year2, months, and days are not used; local year2 = 0; -- second year in a year range local month = 0; local month2 = 0; -- second month in a month range local day = 0; local day2 = 0; -- second day in a day range local anchor_year; local coins_date; if date_string:match (patterns_t['ymd'][1]) then -- year-initial numerical year month day format year, month, day = date_string:match (patterns_t['ymd'][1]); if 12 < tonumber(month) or 1 > tonumber(month) or 1582 > tonumber(year) or 0 == tonumber(day) then return false; end -- month or day number not valid or not Gregorian calendar anchor_year = year; elseif mw.ustring.match(date_string, patterns_t['Mdy'][1]) then -- month-initial: month day, year month, day, anchor_year, year = mw.ustring.match(date_string, patterns_t['Mdy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months elseif mw.ustring.match(date_string, patterns_t['Md-dy'][1]) then -- month-initial day range: month day–day, year; days are separated by endash month, day, day2, anchor_year, year = mw.ustring.match(date_string, patterns_t['Md-dy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2=month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns_t['dMy'][1]) then -- day-initial: day month year day, month, anchor_year, year = mw.ustring.match(date_string, patterns_t['dMy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months --[[ NOT supported at en.wiki elseif mw.ustring.match(date_string, patterns_t['yMd'][1]) then -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed anchor_year, year, month, day = mw.ustring.match(date_string, patterns_t['yMd'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months -- end NOT supported at en.wiki ]] elseif mw.ustring.match(date_string, patterns_t['d-dMy'][1]) then -- day-range-initial: day–day month year; days are separated by endash day, day2, month, anchor_year, year = mw.ustring.match(date_string, patterns_t['d-dMy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2 = month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns_t['dM-dMy'][1]) then -- day initial month-day-range: day month - day month year; uses spaced endash day, month, day2, month2, anchor_year, year = mw.ustring.match(date_string, patterns_t['dM-dMy'][1]); if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later; month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns_t['Md-Mdy'][1]) then -- month initial month-day-range: month day – month day, year; uses spaced endash month, day, month2, day2, anchor_year, year = mw.ustring.match(date_string, patterns_t['Md-Mdy'][1]); if (not is_valid_month_season_range(month, month2, param)) or not is_valid_year(year) then return false; end month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns_t['dMy-dMy'][1]) then -- day initial month-day-year-range: day month year - day month year; uses spaced endash day, month, year, day2, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['dMy-dMy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number (month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns_t['Mdy-Mdy'][1]) then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash month, day, year, month2, day2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Mdy-Mdy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns_t['Sy4-y2'][1]) then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash local century; month, year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Sy4-y2'][1]); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years year2 = century..year2; -- add the century to year2 for comparisons if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number(month, param); elseif mw.ustring.match(date_string, patterns_t['Sy-y'][1]) then -- special case Winter/Summer year-year; year separated with unspaced endash month, year, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['Sy-y'][1]); month = get_season_number (month, param); -- <month> can only be winter or summer; also for metadata if (month ~= cfg.date_names['en'].season['Winter']) and (month ~= cfg.date_names['en'].season['Summer']) then return false; -- not Summer or Winter; abandon end anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns_t['My-My'][1]) then -- month/season year - month/season year; separated by spaced endash month, year, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['My-My'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_month_number(month); month2 = get_month_number(month2); elseif 0 ~= get_season_number(month, param) and 0 ~= get_season_number(month2, param) then -- both must be season year, not mixed month = get_season_number(month, param); month2 = get_season_number(month2, param); else return false; end elseif mw.ustring.match(date_string, patterns_t['M-My'][1]) then -- month/season range year; months separated by endash month, month2, anchor_year, year = mw.ustring.match(date_string, patterns_t['M-My'][1]); if (not is_valid_month_season_range(month, month2, param)) or (not is_valid_year(year)) then return false; end if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_month_number(month); month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end else month = get_season_number(month, param); month2 = get_season_number(month2, param); end year2 = year; elseif mw.ustring.match(date_string, patterns_t['My'][1]) then -- month/season/quarter/proper-name year month, anchor_year, year = mw.ustring.match(date_string, patterns_t['My'][1]); if not is_valid_year(year) then return false; end month = get_element_number(month, param); -- get month season quarter proper-name number or nil if not month then return false; end -- not valid whatever it is elseif mw.ustring.match(date_string, patterns_t['y-y'][1]) then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 year, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['y-y'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns_t['y4-y2'][1]) then -- Year range: YYYY–YY; separated by unspaced endash local century; year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns_t['y4-y2'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if 13 > tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003 year2 = century .. year2; -- add the century to year2 for comparisons if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if in_array (param, {'date', 'publication-date', 'year'}) then -- here when 'valid' abbreviated year range; if one of these parameters add_prop_cat ('year-range-abbreviated'); -- add properties cat end elseif mw.ustring.match(date_string, patterns_t['y'][1]) then -- year; here accept either YYY or YYYY anchor_year, year = mw.ustring.match(date_string, patterns_t['y'][1]); if false == is_valid_year(year) then return false; end else return false; -- date format not one of the MOS:DATE approved formats end if param ~= 'date' then -- CITEREF disambiguation only allowed in |date=; |year= & |publication-date= promote to date if anchor_year:match ('%l$') then return false; end end if 'access-date' == param then -- test access-date here because we have numerical date parts if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2 then -- none of these; access-date must not be a range if not is_valid_accessdate(year .. '-' .. month .. '-' .. day) then return false; -- return false when access-date out of bounds end else return false; -- return false when access-date is a range of two dates end end if 'archive-date' == param then -- test archive-date here because we have numerical date parts if not (0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2) then -- none of these; archive-date must not be a range return false; -- return false when archive-date is a range of two dates end end local result=true; -- check whole dates for validity; assume true because not all dates will go through this test if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date) result = is_valid_date (year, month, day, param); -- <param> for |pmc-embargo-date= elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range) result = is_valid_date (year, month, day); result = result and is_valid_date (year, month, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range) result = is_valid_date (year, month, day); result = result and is_valid_date (year, month2, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range) result = is_valid_date(year, month, day); result = result and is_valid_date(year2, month2, day2); end if false == result then return false; end if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values make_COinS_date ({year = year, month = month, day = day, year2 = year2, month2 = month2, day2 = day2}, tCOinS_date); -- make an ISO 8601 date string for COinS end return true, anchor_year; -- format is good and date string represents a real date end --[[--------------------------< D A T E S >-------------------------------------------------------------------- Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes). Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially, parameters with errors are added to the <error_list> sequence table as the dates are tested. ]] local function dates(date_parameters_list, tCOinS_date, error_list) local anchor_year; -- will return as nil if the date being tested is not |date= local COinS_date; -- will return as nil if the date being tested is not |date= local embargo_date; -- if embargo date is a good dmy, mdy, ymd date then holds original value else reset to 9999 local good_date = false; for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(v.val) then -- if the parameter has a value v.val = mw.ustring.gsub(v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 if v.val:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year= local year = v.val:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested if 'date' == k then anchor_year, COinS_date = v.val:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter good_date = is_valid_year(year); elseif 'year' == k then good_date = is_valid_year(year); else good_date = false; end elseif 'date' == k then -- if the parameter is |date= if v.val:match("^n%.d%.%a?$") then -- ToDo: I18N -- if |date=n.d. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((n%.d%.)%a?)"); -- ToDo: I18N -- "n.d."; no error when date parameter is set to no date elseif v.val:match("^nd%a?$") then -- ToDo: I18N -- if |date=nd with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((nd)%a?)"); -- ToDo: I18N -- "nd"; no error when date parameter is set to no date else good_date, anchor_year, COinS_date = check_date (v.val, k, tCOinS_date); -- go test the date end elseif 'year' == k then -- if the parameter is |year= it should hold only a year value if v.val:match("^[1-9]%d%d%d?%a?$") then -- if |year = 3 or 4 digits only with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((%d+)%a?)"); else good_date = false; end elseif 'pmc-embargo-date' == k then -- if the parameter is |pmc-embargo-date= good_date = check_date (v.val, k); -- go test the date if true == good_date then -- if the date is a valid date good_date, embargo_date = is_valid_embargo_date (v.val); -- is |pmc-embargo-date= date a single dmy, mdy, or ymd formatted date? yes: returns embargo date; no: returns 9999 end else -- any other date-holding parameter good_date = check_date (v.val, k); -- go test the date end if false == good_date then -- assemble one error message so we don't add the tracking category multiple times table.insert (error_list, wrap_style ('parameter', v.name)); -- make parameter name suitable for error message list end end end return anchor_year, embargo_date; -- and done end --[[--------------------------< Y E A R _ C H E C K >---------------------------------------------------------- Temporary function to test |year= for acceptable values: YYY, YYYY, year-only ranges, their circa forms, with or without CITEREF disambiguators. When |year= holds some form of date that is not one of these year-only dates, emit a maintenance message. This function necessary because many non-cs1|2 templates have a |year= parameter so cirrus searches are more-or- less useless ]] local function year_check (year) year = year:gsub ('c%. *', ''); -- remove circa annotation (if present) before testing <year> for _, index in ipairs ({'y-y', 'y4-y2', 'y'}) do -- spin through these indexes into patterns_t if mw.ustring.match (year, patterns_t[index][1]) then return; -- if a match then |year= holds a valid 'year' end end set_message ('maint_year'); -- if here, |year= value is not an accepted value; add a maint cat end --[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------ Compare the value provided in |year= with the year value(s) provided in |date=. This function sets a local numeric value: 0 - year value does not match the year value in date 1 - (default) year value matches the year value in date or one of the year values when date contains two years 2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx) the numeric value in <result> determines the 'output' if any from this function: 0 – adds error message to error_list sequence table 1 – adds maint cat 2 – does nothing ]] local function year_date_check (year_string, year_origin, date_string, date_origin, error_list) local year; local date1; local date2; local result = 1; -- result of the test; assume that the test passes year = year_string:match ('(%d%d%d%d?)'); if date_string:match ('%d%d%d%d%-%d%d%-%d%d') then --special case where both date and year are required YYYY-MM-DD and YYYYx date1 = date_string:match ('(%d%d%d%d)'); year = year_string:match ('(%d%d%d%d)'); if year ~= date1 then result = 0; -- years don't match elseif year_string:match ('%d%d%d%d%a') then result = 2; -- years match; but because disambiguated, don't add to maint cat end elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard range formats of date with two three- or four-digit years date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)"); if year ~= date1 and year ~= date2 then result = 0; end elseif mw.ustring.match(date_string, "%d%d%d%d[%-–]%d%d") then -- YYYY-YY date ranges local century; date1, century, date2 = mw.ustring.match(date_string, "((%d%d)%d%d)[%-–]+(%d%d)"); date2 = century..date2; -- convert YY to YYYY if year ~= date1 and year ~= date2 then result = 0; end elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year date1 = date_string:match ("(%d%d%d%d?)"); if year ~= date1 then result = 0; end else -- should never get here; this function called only when no other date errors result = 0; -- no recognizable year in date end if 0 == result then -- year / date mismatch table.insert (error_list, substitute (cfg.messages['mismatch'], {year_origin, date_origin})); -- add error message to error_list sequence table elseif 1 == result then -- redundant year / date set_message ('maint_date_year'); -- add a maint cat end end --[[--------------------------< R E F O R M A T T E R >-------------------------------------------------------- reformat 'date' into new format specified by format_param if pattern_idx (the current format of 'date') can be reformatted. Does the grunt work for reformat_dates(). The table re_formats maps pattern_idx (current format) and format_param (desired format) to a table that holds: format string used by string.format() identifier letters ('d', 'm', 'y', 'd2', 'm2', 'y2') that serve as indexes into a table t{} that holds captures from mw.ustring.match() for the various date parts specified by patterns_t[pattern_idx][1] Items in patterns_t{} have the general form: ['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, where: ['ymd'] is pattern_idx patterns_t['ymd'][1] is the match pattern with captures for mw.ustring.match() patterns_t['ymd'][2] is an indicator letter identifying the content of the first capture patterns_t['ymd'][3] ... the second capture etc. when a pattern matches a date, the captures are loaded into table t{} in capture order using the idemtifier characters as indexes into t{} For the above, a ymd date is in t{} as: t.y = first capture (year), t.m = second capture (month), t.d = third capture (day) To reformat, this function is called with the pattern_idx that matches the current format of the date and with format_param set to the desired format. This function loads table t{} as described and then calls string.format() with the format string specified by re_format[pattern_idx][format_param][1] using values taken from t{} according to the capture identifier letters specified by patterns_t[pattern_idx][format_param][n] where n is 2.. ]] local re_formats = { ['ymd'] = { -- date format is ymd; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Mdy'] = { -- date format is Mdy; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['dMy'] = { -- date format is dMy; reformat to: ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Md-dy'] = { -- date format is Md-dy; reformat to: ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- |df=dmy -> d-dMy }, ['d-dMy'] = { -- date format is d-d>y; reformat to: ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- |df=mdy -> Md-dy }, ['dM-dMy'] = { -- date format is dM-dMy; reformat to: ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- |df=mdy -> Md-Mdy }, ['Md-Mdy'] = { -- date format is Md-Mdy; reformat to: ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- |df=dmy -> dM-dMy }, ['dMy-dMy'] = { -- date format is dMy-dMy; reformat to: ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- |df=mdy -> Mdy-Mdy }, ['Mdy-Mdy'] = { -- date format is Mdy-Mdy; reformat to: ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- for long/short reformatting ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- |df=dmy -> dMy-dMy }, ['My-My'] = { -- these for long/short reformatting ['any'] = {'%s %s – %s %s', 'm', 'y', 'm2', 'y2'}, -- dmy/mdy agnostic }, ['M-My'] = { -- these for long/short reformatting ['any'] = {'%s–%s %s', 'm', 'm2', 'y'}, -- dmy/mdy agnostic }, ['My'] = { -- these for long/short reformatting ['any'] = {'%s %s', 'm', 'y'}, -- dmy/mdy agnostic }, -- ['yMd'] = { -- not supported at en.wiki -- ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy -- ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- }, } local function reformatter (date, pattern_idx, format_param, mon_len) if not in_array (pattern_idx, {'ymd', 'Mdy', 'Md-dy', 'dMy', 'yMd', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- not in this set of date format patterns_t then not a reformattable date end if 'ymd' == format_param and in_array (pattern_idx, {'ymd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- ymd date ranges not supported at en.wiki; no point in reformatting ymd to ymd end if in_array (pattern_idx, {'My', 'M-My', 'My-My'}) then -- these are not dmy/mdy so can't be 'reformatted' into either format_param = 'any'; -- so format-agnostic end -- yMd is not supported at en.wiki; when yMd is supported at your wiki, uncomment the next line -- if 'yMd' == format_param and in_array (pattern_idx, {'yMd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy'}) then -- these formats not convertable; yMd not supported at en.wiki if 'yMd' == format_param then -- yMd not supported at en.wiki; when yMd is supported at your wiki, remove or comment-out this line return; -- not a reformattable date end local c1, c2, c3, c4, c5, c6, c7; -- these hold the captures specified in patterns_t[pattern_idx][1] c1, c2, c3, c4, c5, c6, c7 = mw.ustring.match (date, patterns_t[pattern_idx][1]); -- get the captures local t = { -- table that holds k/v pairs of date parts from the captures and patterns_t[pattern_idx][2..] [patterns_t[pattern_idx][2]] = c1; -- at minimum there is always one capture with a matching indicator letter [patterns_t[pattern_idx][3] or 'x'] = c2; -- patterns_t can have a variable number of captures; each capture requires an indicator letter; [patterns_t[pattern_idx][4] or 'x'] = c3; -- where there is no capture, there is no indicator letter so n in patterns_t[pattern_idx][n] will be nil; [patterns_t[pattern_idx][5] or 'x'] = c4; -- the 'x' here spoofs an indicator letter to prevent 'table index is nil' error [patterns_t[pattern_idx][6] or 'x'] = c5; [patterns_t[pattern_idx][7] or 'x'] = c6; [patterns_t[pattern_idx][8] or 'x'] = c7; }; if t.a then -- if this date has an anchor year capture (all convertable date formats except ymd) if t.y2 then -- for year range date formats t.y2 = t.a; -- use the anchor year capture when reassembling the date else -- here for single date formats (except ymd) t.y = t.a; -- use the anchor year capture when reassembling the date end end if tonumber(t.m) then -- if raw month is a number (converting from ymd) if 's' == mon_len then -- if we are to use abbreviated month names t.m = cfg.date_names['inv_local_short'][tonumber(t.m)]; -- convert it to a month name else t.m = cfg.date_names['inv_local_long'][tonumber(t.m)]; -- convert it to a month name end t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present elseif 'ymd' == format_param then -- when converting to ymd t.y = t.y:gsub ('%a', ''); -- strip CITREF disambiguator if present; anchor year already known so process can proceed; TODO: maint message? if 1582 > tonumber (t.y) then -- ymd format dates not allowed before 1582 return; end t.m = string.format ('%02d', get_month_number (t.m)); -- make sure that month and day are two digits t.d = string.format ('%02d', t.d); elseif mon_len then -- if mon_len is set to either 'short' or 'long' for _, mon in ipairs ({'m', 'm2'}) do -- because there can be two month names, check both if t[mon] then t[mon] = get_month_number (t[mon]); -- get the month number for this month (is length agnostic) if 0 == t[mon] then return; end -- seasons and named dates can't be converted t[mon] = (('s' == mon_len) and cfg.date_names['inv_local_short'][t[mon]]) or cfg.date_names['inv_local_long'][t[mon]]; -- fetch month name according to length end end end local new_date = string.format (re_formats[pattern_idx][format_param][1], -- format string t[re_formats[pattern_idx][format_param][2]], -- named captures from t{} t[re_formats[pattern_idx][format_param][3]], t[re_formats[pattern_idx][format_param][4]], t[re_formats[pattern_idx][format_param][5]], t[re_formats[pattern_idx][format_param][6]], t[re_formats[pattern_idx][format_param][7]], t[re_formats[pattern_idx][format_param][8]] ); return new_date; end --[[-------------------------< R E F O R M A T _ D A T E S >-------------------------------------------------- Reformats existing dates into the format specified by format. format is one of several manual keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The -all version includes access- and archive-dates; otherwise these dates are not reformatted. This function allows automatic date formatting. In ~/Configuration, the article source is searched for one of the {{use xxx dates}} templates. If found, xxx becomes the global date format as xxx-all. If |cs1-dates= in {{use xxx dates}} has legitimate value then that value determines how cs1|2 dates will be rendered. Legitimate values for |cs1-dates= are: l - all dates are rendered with long month names ls - publication dates use long month names; access-/archive-dates use abbreviated month names ly - publication dates use long month names; access-/archive-dates rendered in ymd format s - all dates are rendered with abbreviated (short) month names sy - publication dates use abbreviated month names; access-/archive-dates rendered in ymd format y - all dates are rendered in ymd format the format argument for automatic date formatting will be the format specified by {{use xxx dates}} with the value supplied by |cs1-dates so one of: xxx-l, xxx-ls, xxx-ly, xxx-s, xxx-sy, xxx-y, or simply xxx (|cs1-dates= empty, omitted, or invalid) where xxx shall be either of dmy or mdy. dates are extracted from date_parameters_list, reformatted (if appropriate), and then written back into the list in the new format. Dates in date_parameters_list are presumed here to be valid (no errors). This function returns true when a date has been reformatted, false else. Actual reformatting is done by reformatter(). ]] local function reformat_dates (date_parameters_list, format) local all = false; -- set to false to skip access- and archive-dates local len_p = 'l'; -- default publication date length shall be long local len_a = 'l'; -- default access-/archive-date length shall be long local result = false; local new_date; if format:match('%a+%-all') then -- manual df keyword; auto df keyword when length not specified in {{use xxx dates}}; format = format:match('(%a+)%-all'); -- extract the format all = true; -- all dates are long format dates because this keyword doesn't specify length elseif format:match('%a+%-[lsy][sy]?') then -- auto df keywords; internal only all = true; -- auto df applies to all dates; use length specified by capture len_p for all dates format, len_p, len_a = format:match('(%a+)%-([lsy])([sy]?)'); -- extract the format and length keywords if 'y' == len_p then -- because allowed by MOS:DATEUNIFY (sort of) range dates and My dates not reformatted format = 'ymd'; -- override {{use xxx dates}} elseif (not is_set(len_a)) or (len_p == len_a) then -- no access-/archive-date length specified or same length as publication dates then len_a = len_p; -- in case len_a not set end end -- else only publication dates and they are long for param_name, param_val in pairs (date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) then -- if the parameter has a value if not (not all and in_array (param_name, {'access-date', 'archive-date'})) then -- skip access- or archive-date unless format is xxx-all; yeah, ugly; TODO: find a better way for pattern_idx, pattern in pairs (patterns_t) do if mw.ustring.match (param_val.val, pattern[1]) then if all and in_array (param_name, {'access-date', 'archive-date'}) then -- if this date is an access- or archive-date new_date = reformatter (param_val.val, pattern_idx, (('y' == len_a) and 'ymd') or format, len_a); -- choose ymd or dmy/mdy according to len_a setting else -- all other dates new_date = reformatter (param_val.val, pattern_idx, format, len_p); end if new_date then -- set when date was reformatted date_parameters_list[param_name].val = new_date; -- update date in date list result = true; -- and announce that changes have been made break; end end -- if end -- for end -- if end -- if end -- for return result; -- declare boolean result and done end --[[--------------------------< D A T E _ H Y P H E N _ T O _ D A S H >---------------------------------------- Loops through the list of date-holding parameters and converts any hyphen to an ndash. Not called if the cs1|2 template has any date errors. Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false. ]] local function date_hyphen_to_dash (date_parameters_list) local result = false; local n; for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) and not mw.ustring.match (param_val.val, patterns_t.ymd[1]) then -- for those that are not ymd dates (ustring because here digits may not be Western) param_val.val, n = param_val.val:gsub ('%-', '–'); -- replace any hyphen with ndash if 0 ~= n then date_parameters_list[param_name].val = param_val.val; -- update the list result = true; end end end return result; -- so we know if any hyphens were replaced end --[[-------------------------< D A T E _ N A M E _ X L A T E >------------------------------------------------ Attempts to translate English date names to local-language date names using names supplied by MediaWiki's date parser function. This is simple name-for-name replacement and may not work for all languages. if xlat_dig is true, this function will also translate Western (English) digits to the local language's digits. This will also translate ymd dates. ]] local function date_name_xlate (date_parameters_list, xlt_dig) local xlate; local mode; -- long or short month names local modified = false; local date; local sources_t = { {cfg.date_names.en.long, cfg.date_names.inv_local_long}, -- for translating long English month names to long local month names {cfg.date_names.en.short, cfg.date_names.inv_local_short}, -- short month names {cfg.date_names.en.quarter, cfg.date_names.inv_local_quarter}, -- quarter date names {cfg.date_names.en.season, cfg.date_names.inv_local_season}, -- season date nam {cfg.date_names.en.named, cfg.date_names.inv_local_named}, -- named dates } local function is_xlateable (month) -- local function to get local date name that replaces existing English-language date name for _, date_names_t in ipairs (sources_t) do -- for each sequence table in date_names_t if date_names_t[1][month] then -- if date name is English month (long or short), quarter, season or named and if date_names_t[2][date_names_t[1][month]] then -- if there is a matching local date name return date_names_t[2][date_names_t[1][month]]; -- return the local date name end end end end for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(param_val.val) then -- if the parameter has a value date = param_val.val; for month in mw.ustring.gmatch (date, '[%a ]+') do -- iterate through all date names in the date (single date or date range) month = mw.text.trim (month); -- this because quarterly dates contain whitespace xlate = is_xlateable (month); -- get translate <month>; returns translation or nil if xlate then date = mw.ustring.gsub (date, month, xlate); -- replace the English with the translation date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end if xlt_dig then -- shall we also translate digits? date = date:gsub ('%d', cfg.date_names.xlate_digits); -- translate digits from Western to 'local digits' date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end end return modified; end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) add_prop_cat = utilities_page_ptr.add_prop_cat ; -- import functions from selected Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; set_message = utilities_page_ptr.set_message; substitute = utilities_page_ptr.substitute; wrap_style = utilities_page_ptr.wrap_style; cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration end --[[--------------------------< A R C H I V E _ D A T E _ C H E C K >------------------------------------------ Compare value in |archive-date= with the timestamp in Wayback machine urls. Emits an error message with suggested date from the |archive-url= timestamp in an appropriate format when the value in |archive-date= does not match the timestamp. this function never called when any date in a cs1|2 template has errors error message suggests new |archive-date= value in an appropriate format specified by <df>. <df> is either |df= or cfg.global_df in that order. If <df> is nil, suggested date has format from |archive-date=. There is a caveat: when |df=dmy or |df=mdy, the reformatter leaves |access-date= and |archive-date= formats as they are. The error message suggested date is passed to the formatter as YYYY-MM-DD so when |df=dmy or |df=mdy, the format is not changed. ]] local function archive_date_check (archive_date, archive_url_timestamp, df) local archive_date_format = 'dmy-y'; -- holds the date format of date in |archive-date; default to ymd; 'dmy' used here to spoof reformat_dates() for _, v_t in ipairs ({{'dMy', 'dmy-all'}, {'Mdy', 'mdy-all'}}) do -- is |archive-date= format dmy or mdy? if archive_date:match (patterns_t[v_t[1]][1]) then -- does the pattern match? archive_date_format = cfg.keywords_xlate[v_t[2]]; -- get appropriate |df= supported keyword from the i18n translator table break; end end local dates_t = {}; dates_t['archive-date'] = {val=archive_date, name=''}; -- setup to call reformat_dates(); never called when errors so <name> unset as not needed reformat_dates (dates_t, 'dmy-y'); -- reformat |archive-date= to ymd; 'dmy' used here to spoof reformat_dates() local archive_url_date = archive_url_timestamp:gsub ('(%d%d%d%d)(%d%d)(%d%d)%d*', '%1-%2-%3'); -- make ymd format date from timestamp if dates_t['archive-date'].val == archive_url_date then -- are the two dates the same return; -- yes, done else dates_t['archive-date'] = {val=archive_url_date, name=''}; -- setup to call reformat_dates() with the timestamp date reformat_dates (dates_t, df or archive_date_format); -- reformat timestamp to format specified by <df> or format used in |archive-date= archive_url_date = dates_t['archive-date'].val; set_message ('err_archive_date_url_ts_mismatch', archive_url_date); -- emit an error message end end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { -- return exported functions archive_date_check = archive_date_check, date_hyphen_to_dash = date_hyphen_to_dash, date_name_xlate = date_name_xlate, dates = dates, is_valid_date = is_valid_date, reformat_dates = reformat_dates, set_selected_modules = set_selected_modules, year_check = year_check, year_date_check = year_date_check, } 039z8dc7ugbbv8w4tsnejz5bfud8dgw Template:Random page in category 10 18169 117156 47372 2023-06-22T18:41:24Z en>Izno 0 [[phab:T337149#8953569]] 117156 wikitext text/x-wiki {{#if:{{#ifeq:{{NAMESPACENUMBER}}|14|*|{{{1<includeonly>|</includeonly>}}}}} |<span class="plainlinks random-page-in-category">[https://RandomInCategory.toolforge.org/{{urlencode:{{{1|{{PAGENAME}}}}}|WIKI}}?site={{urlencode:{{SERVERNAME}}|WIKI}}{{#if:{{{ns|}}}|&namespace={{urlencode:{{{ns}}}|WIKI}}}}{{#if:{{{type|}}}|&type={{urlencode:{{{type}}}|WIKI}}}}{{#if:{{{returntype|}}}|&returntype={{{returntype}}}}}{{#if:{{{action|}}}|&action={{urlencode:{{{action}}}|WIKI}}}} {{{text|Random {{#ifeq:{{{type|}}}|subcat|category|{{{type|page}}}}} in {{#if:{{{1|}}}|category {{{1}}}|this category}}}}}]</span> |{{Error|Error: A category needs to be specified or this template needs to be placed on a category page}} }}<noinclude> {{Documentation}} </noinclude> 44cbkootlsz5sjo3biw2okuzuz2v6xc 117157 117156 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Random_page_in_category]] 117156 wikitext text/x-wiki {{#if:{{#ifeq:{{NAMESPACENUMBER}}|14|*|{{{1<includeonly>|</includeonly>}}}}} |<span class="plainlinks random-page-in-category">[https://RandomInCategory.toolforge.org/{{urlencode:{{{1|{{PAGENAME}}}}}|WIKI}}?site={{urlencode:{{SERVERNAME}}|WIKI}}{{#if:{{{ns|}}}|&namespace={{urlencode:{{{ns}}}|WIKI}}}}{{#if:{{{type|}}}|&type={{urlencode:{{{type}}}|WIKI}}}}{{#if:{{{returntype|}}}|&returntype={{{returntype}}}}}{{#if:{{{action|}}}|&action={{urlencode:{{{action}}}|WIKI}}}} {{{text|Random {{#ifeq:{{{type|}}}|subcat|category|{{{type|page}}}}} in {{#if:{{{1|}}}|category {{{1}}}|this category}}}}}]</span> |{{Error|Error: A category needs to be specified or this template needs to be placed on a category page}} }}<noinclude> {{Documentation}} </noinclude> 44cbkootlsz5sjo3biw2okuzuz2v6xc Template:Collapsible option 10 18404 116718 108576 2026-04-21T15:17:21Z en>Frietjes 0 per request 116718 wikitext text/x-wiki This template's '''initial visibility currently defaults to {{param value|{{#switch:{{{default|}}}|collapsed=collapsed|expanded=expanded|autocollapse|#default=autocollapse}}}}''', meaning that {{#switch:{{{default|}}}|collapsed=it is hidden apart from its title bar.|expanded=it is fully visible.|autocollapse|#default=if there is another collapsible item on the page (a [[Wikipedia:Navigation_template#Types|navbox, sidebar]], or [[Help:Collapsing tables and more|table with the collapsible attribute]]), it is hidden apart from its title bar; if not, it is fully visible.}} To change this template's initial visibility, the {{parameter|{{{parameter_name|state}}}}} [[Help:Template#Parameters|parameter]] may be used: <ul> {{#ifeq:{{{default|}}}|collapsed|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}}| |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=collapsed}}</nowiki>|lang=wikitext|inline=1}} will show the template collapsed, i.e. hidden apart from its title bar.</li>}} {{#ifeq:{{{default|}}}|expanded|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=expanded}}</nowiki>|lang=wikitext|inline=1}} will show the template expanded, i.e. fully visible.</li>}} {{#ifeq:{{{default|autocollapse}}}|autocollapse|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=autocollapse}}</nowiki>|lang=wikitext|inline=1}} will show the template autocollapsed, i.e. if there is another collapsible item on the page (a [[Wikipedia:Navigation_template#Types|navbox, sidebar]], or [[Help:Collapsing|table with the collapsible attribute]]), it is hidden apart from its title bar, but if not, it is fully visible.</li>}}</ul><!-- -->{{#if:{{{align|}}}|{{parameter|align|{{var|value}}}} is also available; where {{var|value}} can be either <code>right</code> or <code>left</code>. The default is {{kbd|center}}. }}{{#if:{{{title-background|}}}|{{parameter|title-background|{{var|value}}}} is also available; where {{var|value}} can be either {{kbd|navbox}} or a {{kbd|color}}. The default is {{kbd|none}}, and {{{kbd|navbox}}} defaults to the default navbox color. }}{{#if:{{{width|}}}| {{parameter|width|{{var|value}}}} is also available; where {{var|value}} can be either {{kbd|{{var|N}} [em/%/px]}} or {{kbd|auto}}. The default is {{kbd|100%}}. }}{{sandbox other|__EXPECTUNUSEDTEMPLATE__}}<!-- Add {{pp-template}} if template page where this template is transcluded is protected: -->{{template other | {{#if:{{PROTECTIONLEVEL:edit}} |{{pp-template|docusage=yes}} | {{#if:{{PROTECTIONLEVEL:move}} |{{pp-move|docusage=yes|small=yes}} }} }} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 6ecf4uy7k6zbyqz3ipgg8pxi5edcfb2 116719 116718 2026-07-15T17:38:41Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Collapsible_option]] 116718 wikitext text/x-wiki This template's '''initial visibility currently defaults to {{param value|{{#switch:{{{default|}}}|collapsed=collapsed|expanded=expanded|autocollapse|#default=autocollapse}}}}''', meaning that {{#switch:{{{default|}}}|collapsed=it is hidden apart from its title bar.|expanded=it is fully visible.|autocollapse|#default=if there is another collapsible item on the page (a [[Wikipedia:Navigation_template#Types|navbox, sidebar]], or [[Help:Collapsing tables and more|table with the collapsible attribute]]), it is hidden apart from its title bar; if not, it is fully visible.}} To change this template's initial visibility, the {{parameter|{{{parameter_name|state}}}}} [[Help:Template#Parameters|parameter]] may be used: <ul> {{#ifeq:{{{default|}}}|collapsed|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}}| |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=collapsed}}</nowiki>|lang=wikitext|inline=1}} will show the template collapsed, i.e. hidden apart from its title bar.</li>}} {{#ifeq:{{{default|}}}|expanded|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=expanded}}</nowiki>|lang=wikitext|inline=1}} will show the template expanded, i.e. fully visible.</li>}} {{#ifeq:{{{default|autocollapse}}}|autocollapse|<!-- don't show -->|<li>{{#tag:syntaxhighlight|<nowiki>{{</nowiki><includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly><nowiki>|</nowiki>{{{parameter_name|state}}}<nowiki>=autocollapse}}</nowiki>|lang=wikitext|inline=1}} will show the template autocollapsed, i.e. if there is another collapsible item on the page (a [[Wikipedia:Navigation_template#Types|navbox, sidebar]], or [[Help:Collapsing|table with the collapsible attribute]]), it is hidden apart from its title bar, but if not, it is fully visible.</li>}}</ul><!-- -->{{#if:{{{align|}}}|{{parameter|align|{{var|value}}}} is also available; where {{var|value}} can be either <code>right</code> or <code>left</code>. The default is {{kbd|center}}. }}{{#if:{{{title-background|}}}|{{parameter|title-background|{{var|value}}}} is also available; where {{var|value}} can be either {{kbd|navbox}} or a {{kbd|color}}. The default is {{kbd|none}}, and {{{kbd|navbox}}} defaults to the default navbox color. }}{{#if:{{{width|}}}| {{parameter|width|{{var|value}}}} is also available; where {{var|value}} can be either {{kbd|{{var|N}} [em/%/px]}} or {{kbd|auto}}. The default is {{kbd|100%}}. }}{{sandbox other|__EXPECTUNUSEDTEMPLATE__}}<!-- Add {{pp-template}} if template page where this template is transcluded is protected: -->{{template other | {{#if:{{PROTECTIONLEVEL:edit}} |{{pp-template|docusage=yes}} | {{#if:{{PROTECTIONLEVEL:move}} |{{pp-move|docusage=yes|small=yes}} }} }} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 6ecf4uy7k6zbyqz3ipgg8pxi5edcfb2 Template:For 10 18432 117192 48227 2026-07-06T22:03:12Z en>Jonesey95 0 Undid 3 revisions from [[Special:Diff/1362844261|1362844261]] until [[Special:Diff/1362895215|1362895215]]. Self-revert. It turns out that [[:Category:Articles with hatnote templates targeting a nonexistent page]] already existed 48226 wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 7es2p1mk6qse8zlwn5qqya2ysrq1rcr 117193 117192 2026-07-16T11:40:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:For]] 48226 wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 7es2p1mk6qse8zlwn5qqya2ysrq1rcr Module:Portal-inline 828 19807 116757 50858 2026-03-16T14:34:14Z en>Hike395 0 Restored revision 1292011912 by [[Special:Contributions/Hike395|Hike395]] ([[User talk:Hike395|talk]]): Rv: doesn't handle tab group correctly 116757 Scribunto text/plain -- determine whether we're being called from a sandbox local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) local sandbox = isSandbox and '/sandbox' or '' local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local portalModule = require('Module:Portal'..sandbox) local getImageName = portalModule._image local checkPortals = portalModule._checkPortals local processPortalArgs = portalModule._processPortalArgs local p = {} -- Function to format error message and tracking category -- Arguments: -- errMsg: string, or nil/false if no error -- trackingCat: string for tracking category (or empty string) local function formatError(errMsg, trackingCat) local result = trackingCat or '' if errMsg then local errTag = mw.html.create('span') errTag:addClass("error") errTag:css("font-size",'100%') errTag:wikitext("Error: "..errMsg) result = tostring(errTag)..result end return result end local function image(portal, args) local size = args.size == "small" and "21x19px" or args.size == "tiny" and "17x15px" or "32x28px" return string.format('[[File:%s|%s]]',getImageName(portal,true), size) end local function link(portal, args) local displayName = "" if not (args.text == "" or args.text == nil) then displayName = args.text elseif args.short then displayName = portal else displayName = portal .. "&#32;portal" end return string.format('[[Portal:%s|%s]]',portal,displayName) end function p._main(portals, args) -- Normalize all arguments if args.redlinks == 'include' then args.redlinks = true end for key, default in pairs({tracking=true,redlinks=false,short=false}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local trackingCat = '' local errMsg = nil -- Check for existing categories, drop if not. -- Possible generate tracking category & error message if needed args.minPortals = args.minPortals or 1 args.maxPortals = args.maxPortals or 1 portals, trackingCat, errMsg = checkPortals(portals,args) -- use more specific tracking cat for inline portal trackingCat = mw.ustring.gsub(trackingCat,"Portal templates","Portal-inline template") -- either too many/few portals, or no portals left after filtering, then return if errMsg or #portals == 0 then return formatError(errMsg, trackingCat) end fstring = '<span class="nowrap">%s </span>%s%s' if yesno(args.nowrap or '') then fstring = '<span class="nowrap">%s %s%s</span>' end return mw.ustring.format(fstring,image(portals[1],args),link(portals[1],args),(trackingCat or '')) end function p.main(frame) local origArgs = getArgs(frame) local portals, args = processPortalArgs(origArgs) return p._main(portals, args) end return p 34r722h4azs7oeaspjhcpwmtnkva8kx 116758 116757 2026-07-15T18:13:33Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Portal-inline]] 116757 Scribunto text/plain -- determine whether we're being called from a sandbox local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) local sandbox = isSandbox and '/sandbox' or '' local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local portalModule = require('Module:Portal'..sandbox) local getImageName = portalModule._image local checkPortals = portalModule._checkPortals local processPortalArgs = portalModule._processPortalArgs local p = {} -- Function to format error message and tracking category -- Arguments: -- errMsg: string, or nil/false if no error -- trackingCat: string for tracking category (or empty string) local function formatError(errMsg, trackingCat) local result = trackingCat or '' if errMsg then local errTag = mw.html.create('span') errTag:addClass("error") errTag:css("font-size",'100%') errTag:wikitext("Error: "..errMsg) result = tostring(errTag)..result end return result end local function image(portal, args) local size = args.size == "small" and "21x19px" or args.size == "tiny" and "17x15px" or "32x28px" return string.format('[[File:%s|%s]]',getImageName(portal,true), size) end local function link(portal, args) local displayName = "" if not (args.text == "" or args.text == nil) then displayName = args.text elseif args.short then displayName = portal else displayName = portal .. "&#32;portal" end return string.format('[[Portal:%s|%s]]',portal,displayName) end function p._main(portals, args) -- Normalize all arguments if args.redlinks == 'include' then args.redlinks = true end for key, default in pairs({tracking=true,redlinks=false,short=false}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local trackingCat = '' local errMsg = nil -- Check for existing categories, drop if not. -- Possible generate tracking category & error message if needed args.minPortals = args.minPortals or 1 args.maxPortals = args.maxPortals or 1 portals, trackingCat, errMsg = checkPortals(portals,args) -- use more specific tracking cat for inline portal trackingCat = mw.ustring.gsub(trackingCat,"Portal templates","Portal-inline template") -- either too many/few portals, or no portals left after filtering, then return if errMsg or #portals == 0 then return formatError(errMsg, trackingCat) end fstring = '<span class="nowrap">%s </span>%s%s' if yesno(args.nowrap or '') then fstring = '<span class="nowrap">%s %s%s</span>' end return mw.ustring.format(fstring,image(portals[1],args),link(portals[1],args),(trackingCat or '')) end function p.main(frame) local origArgs = getArgs(frame) local portals, args = processPortalArgs(origArgs) return p._main(portals, args) end return p 34r722h4azs7oeaspjhcpwmtnkva8kx Template:Highlight 10 19849 116902 50970 2025-06-05T21:11:36Z en>Pppery 0 Clean subst 116902 wikitext text/x-wiki {{{{{|safesubst:}}}#if:{{{3|}}}|{{{{{|safesubst:}}}#ifexpr:({{{{{|safesubst:}}}#time:U|{{{3}}}}} - {{{{{|safesubst:}}}#time:U|now}}) > 0|{{{{{|safesubst:}}}highlight/core|{{{1|}}}|{{{{{|safesubst:}}}#ifeq:{{{2|}}}||yellow|{{{2}}}}}}}|{{{1|}}}}}|{{{{{|safesubst:}}}highlight/core|{{{1|}}}|{{{2|yellow}}}}}}}<noinclude>{{documentation}}</noinclude> m8xos9vxwpnyww39k6bnpxcq61oza0j 116903 116902 2026-07-16T10:58:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Highlight]] 116902 wikitext text/x-wiki {{{{{|safesubst:}}}#if:{{{3|}}}|{{{{{|safesubst:}}}#ifexpr:({{{{{|safesubst:}}}#time:U|{{{3}}}}} - {{{{{|safesubst:}}}#time:U|now}}) > 0|{{{{{|safesubst:}}}highlight/core|{{{1|}}}|{{{{{|safesubst:}}}#ifeq:{{{2|}}}||yellow|{{{2}}}}}}}|{{{1|}}}}}|{{{{{|safesubst:}}}highlight/core|{{{1|}}}|{{{2|yellow}}}}}}}<noinclude>{{documentation}}</noinclude> m8xos9vxwpnyww39k6bnpxcq61oza0j Template:Highlight/core 10 19850 116904 50972 2025-06-26T12:25:28Z en>Xaosflux 0 use mark element, requested on talk 116904 wikitext text/x-wiki <mark style="color:black;background:{{{2|yellow}}}">{{{1}}}</mark><noinclude> {{Documentation|content=Helper template for [[Template:Highlight]].}} </noinclude> 6r7z14qo4g655bdav3untstp8euwql3 116905 116904 2026-07-16T10:58:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Highlight/core]] 116904 wikitext text/x-wiki <mark style="color:black;background:{{{2|yellow}}}">{{{1}}}</mark><noinclude> {{Documentation|content=Helper template for [[Template:Highlight]].}} </noinclude> 6r7z14qo4g655bdav3untstp8euwql3 Template:R protected 10 20095 116865 51519 2026-04-10T21:42:21Z en>Toadspike 0 Adding {{pp-template}} 116865 wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}</noinclude><includeonly>{{#switch:{{{protlevel|{{#invoke:effective protection level|edit|1={{{title|{{FULLPAGENAME}}}}}}}}}} |sysop={{R protected/full|nocat={{{nocat|}}}}}{{pp-protected|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |templateeditor={{R protected/template|nocat={{{nocat|}}}}}{{pp-template|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |extendedconfirmed={{R protected/excon|nocat={{{nocat|}}}}}{{pp-extended|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |autoconfirmed={{R protected/semi|nocat={{{nocat|}}}}}{{pp-semi|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |#default=<!-- Show nothing -->{{#ifeq:{{{nocat|}}}|true||[[Category:Wikipedia pages with incorrect protection templates]]}} }}</includeonly><noinclude> {{documentation}} </noinclude> e03wg7rf043et6g51gjxh8u9x8ia1li 116866 116865 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_protected]] 116865 wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}</noinclude><includeonly>{{#switch:{{{protlevel|{{#invoke:effective protection level|edit|1={{{title|{{FULLPAGENAME}}}}}}}}}} |sysop={{R protected/full|nocat={{{nocat|}}}}}{{pp-protected|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |templateeditor={{R protected/template|nocat={{{nocat|}}}}}{{pp-template|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |extendedconfirmed={{R protected/excon|nocat={{{nocat|}}}}}{{pp-extended|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |autoconfirmed={{R protected/semi|nocat={{{nocat|}}}}}{{pp-semi|small=yes|category={{#ifeq:{{{nocat|}}}|true|no|yes}}}} |#default=<!-- Show nothing -->{{#ifeq:{{{nocat|}}}|true||[[Category:Wikipedia pages with incorrect protection templates]]}} }}</includeonly><noinclude> {{documentation}} </noinclude> e03wg7rf043et6g51gjxh8u9x8ia1li Template:Tracks and uses Wikidata 10 20616 116918 54345 2025-01-24T02:22:18Z en>Shkuru Afshar 0 116918 wikitext text/x-wiki <onlyinclude><includeonly>{{sister project |position = {{{position|}}} |image = [[File:Wikidata-logo-without-paddings.svg|30px|class=noviewer|alt=|link=]] |text = This {{module other|module|template}} [[:Category:{{{cat|Wikidata tracking categories}}}|tracks]] and uses<!-- --> {{#if:{{{section|}}} | one or more [[Wikidata]] properties; see [[#{{{section}}}|§&nbsp;{{{section}}}]] for details.<!-- --> | [[Wikidata]] propert{{#if:{{{2|}}}|ies|y}}: {{#invoke:Uses Wikidata|usesProperty}} }} }}{{#switch:{{SUBPAGENAME}}|sandbox|testcases|doc=<!--nocat-->|#default={{#ifeq:{{PAGENAME}}|Uses Wikidata|<!-- -->|{{module other|[[Category:Modules using data from Wikidata]] [[Category:Modules tracking Wikidata]]<!-- -->|{{template other|[[Category:Templates using data from Wikidata]] [[Category:Templates tracking Wikidata]]}} }} }} }}</includeonly></onlyinclude> {{documentation}}<!--Please add any categories to the /doc page --> 6uvnokzdq5e1ms430yp6aot8x2we1ne 116919 116918 2026-07-16T10:58:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Tracks_and_uses_Wikidata]] 116918 wikitext text/x-wiki <onlyinclude><includeonly>{{sister project |position = {{{position|}}} |image = [[File:Wikidata-logo-without-paddings.svg|30px|class=noviewer|alt=|link=]] |text = This {{module other|module|template}} [[:Category:{{{cat|Wikidata tracking categories}}}|tracks]] and uses<!-- --> {{#if:{{{section|}}} | one or more [[Wikidata]] properties; see [[#{{{section}}}|§&nbsp;{{{section}}}]] for details.<!-- --> | [[Wikidata]] propert{{#if:{{{2|}}}|ies|y}}: {{#invoke:Uses Wikidata|usesProperty}} }} }}{{#switch:{{SUBPAGENAME}}|sandbox|testcases|doc=<!--nocat-->|#default={{#ifeq:{{PAGENAME}}|Uses Wikidata|<!-- -->|{{module other|[[Category:Modules using data from Wikidata]] [[Category:Modules tracking Wikidata]]<!-- -->|{{template other|[[Category:Templates using data from Wikidata]] [[Category:Templates tracking Wikidata]]}} }} }} }}</includeonly></onlyinclude> {{documentation}}<!--Please add any categories to the /doc page --> 6uvnokzdq5e1ms430yp6aot8x2we1ne Template:R from long name 10 20650 117046 54439 2025-11-25T04:58:29Z en>Paine Ellsworth 0 per edit request on talk page - include unnamed parameter 117046 wikitext text/x-wiki <noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from long name |name=From a longer title |from=a title that is a complete, more complete or longer version of the topic's name{{#if:{{{of|{{{for|{{{1|}}}}}}}}}|<nowiki />; the short version is: "{{{of|{{{for|{{{1}}}}}}}}}"}} |info=It leads to the title in accordance with the naming conventions for [[WP:COMMONNAME|common names]] and can help writing and searches. However, do not replace these redirected links with a [[WP:piped link|piped link]] unless the page is updated for another reason. |all category=Redirects from long names }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> iqxzjdw6emc8ldpn9bcjcsrhchzjd8b 117047 117046 2026-07-16T11:38:24Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_from_long_name]] 117046 wikitext text/x-wiki <noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from long name |name=From a longer title |from=a title that is a complete, more complete or longer version of the topic's name{{#if:{{{of|{{{for|{{{1|}}}}}}}}}|<nowiki />; the short version is: "{{{of|{{{for|{{{1}}}}}}}}}"}} |info=It leads to the title in accordance with the naming conventions for [[WP:COMMONNAME|common names]] and can help writing and searches. However, do not replace these redirected links with a [[WP:piped link|piped link]] unless the page is updated for another reason. |all category=Redirects from long names }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> iqxzjdw6emc8ldpn9bcjcsrhchzjd8b Module:WikidataCheck 828 21066 116896 63710 2023-11-30T11:27:19Z en>Zyxw 0 adding bug fix for prior edit request, see discussion at [[Template talk:WikidataCheck#Checking sourced properties only?]] 116896 Scribunto text/plain local p = {} function p.wikidatacheck(frame) local pframe = frame:getParent() local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template local property = config.property local value = config.value or "" local catbase = config.category local namespaces = config.namespaces local nocatsame = config.nocatsame or "" local ignorecase = config.ignorecase or "" local qid = config.qid or "" local onlysourced = (config.onlysourced == 'yes') or false local ok = false -- one-way flag to check if we're in a good namespace local ns = mw.title.getCurrentTitle().namespace for v in mw.text.gsplit( namespaces, ",", true) do if tonumber(v) == ns then ok = true end end if not ok then -- not in one of the approved namespaces return "" end local entity if qid == "" then entity = mw.wikibase.getEntityObject() else entity = mw.wikibase.getEntityObject(qid) end if not entity then -- no Wikidata item return "[[Category:" .. catbase .. " not in Wikidata]]" end if value == "" then return nil -- Using Wikidata end local claims = entity.claims or {} local hasProp = claims[property] if not hasProp then -- no claim of that property return "[[Category:" .. catbase .. " not in Wikidata]]" -- bad. Bot needs to add the property end if ignorecase ~= "" then value = string.lower( value ) end for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values? propValue = (v.mainsnak.datavalue or {}).value if ignorecase ~= "" then propValue = string.lower( propValue ) end local sourced = false -- check for external refs a la Module:WikidataIB onlysourced if v.references then for j, vr in ipairs(v.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then sourced = true break end end end if propValue == value and (not onlysourced or sourced) then if nocatsame == "" then return "[[Category:" .. catbase .. " same as Wikidata]]" -- yay! else return nil -- if nocatsame, the "same as" category is not added end end end return "[[Category:" .. catbase .. " different from Wikidata]]" -- needs human review :( end return p 0aruyv7g8m0jjwgb2002hlhcpqup2xw 116897 116896 2026-07-16T10:58:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:WikidataCheck]] 116896 Scribunto text/plain local p = {} function p.wikidatacheck(frame) local pframe = frame:getParent() local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template local property = config.property local value = config.value or "" local catbase = config.category local namespaces = config.namespaces local nocatsame = config.nocatsame or "" local ignorecase = config.ignorecase or "" local qid = config.qid or "" local onlysourced = (config.onlysourced == 'yes') or false local ok = false -- one-way flag to check if we're in a good namespace local ns = mw.title.getCurrentTitle().namespace for v in mw.text.gsplit( namespaces, ",", true) do if tonumber(v) == ns then ok = true end end if not ok then -- not in one of the approved namespaces return "" end local entity if qid == "" then entity = mw.wikibase.getEntityObject() else entity = mw.wikibase.getEntityObject(qid) end if not entity then -- no Wikidata item return "[[Category:" .. catbase .. " not in Wikidata]]" end if value == "" then return nil -- Using Wikidata end local claims = entity.claims or {} local hasProp = claims[property] if not hasProp then -- no claim of that property return "[[Category:" .. catbase .. " not in Wikidata]]" -- bad. Bot needs to add the property end if ignorecase ~= "" then value = string.lower( value ) end for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values? propValue = (v.mainsnak.datavalue or {}).value if ignorecase ~= "" then propValue = string.lower( propValue ) end local sourced = false -- check for external refs a la Module:WikidataIB onlysourced if v.references then for j, vr in ipairs(v.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then sourced = true break end end end if propValue == value and (not onlysourced or sourced) then if nocatsame == "" then return "[[Category:" .. catbase .. " same as Wikidata]]" -- yay! else return nil -- if nocatsame, the "same as" category is not added end end end return "[[Category:" .. catbase .. " different from Wikidata]]" -- needs human review :( end return p 0aruyv7g8m0jjwgb2002hlhcpqup2xw Template:Key press/styles.css 10 23669 117196 66730 2024-10-03T17:12:25Z en>Matrix 0 dark mode fixes 117196 sanitized-css text/css /* {{pp-template}} */ .keyboard-key { border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.1); background-color: var(--background-color-neutral-subtle, #f8f9fa); background-image: linear-gradient(to bottom, var(--background-color-neutral, #eaecf0), var(--background-color-neutral-subtle, #f8f9fa), var(--background-color-neutral, #eaecf0)); color: var(--color-base, #202122); padding: 0.1em 0.3em; font-family: inherit; font-size: 0.85em; } ju6ncl0rj4jerf8mff9ywt3joykx897 117197 117196 2026-07-16T11:41:16Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Key_press/styles.css]] 117196 sanitized-css text/css /* {{pp-template}} */ .keyboard-key { border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.1); background-color: var(--background-color-neutral-subtle, #f8f9fa); background-image: linear-gradient(to bottom, var(--background-color-neutral, #eaecf0), var(--background-color-neutral-subtle, #f8f9fa), var(--background-color-neutral, #eaecf0)); color: var(--color-base, #202122); padding: 0.1em 0.3em; font-family: inherit; font-size: 0.85em; } ju6ncl0rj4jerf8mff9ywt3joykx897 Module:For nowiki 828 23711 116906 66826 2026-07-03T14:39:36Z en>Pppery 0 Add conjunction param 116906 Scribunto text/plain local p = {} local function doLoop(frame, args, code, sep, offset, argstosub) local result = {} code = mw.text.unstripNoWiki(code) code = code:gsub('&lt;', '<'):gsub('&gt;', '>') for i, value in ipairs(args) do if i > offset then argstosub["i"] = i - offset argstosub["1"] = value local actualCode = code:gsub("{{{([^{}|]*)|?[^{}]*}}}", argstosub) table.insert(result, frame:preprocess(actualCode)) end end if frame.args.conjunction then return mw.text.listToText(result, sep, frame.args.conjunction) else return table.concat(result, sep) end end function p.main(frame) local args = frame:getParent().args local sep = args[1] local code = args.code or args[2] local offset = args.code and 1 or 2 local start = args.start or 1 local argstosub = {} for key, value in pairs(args) do if not tonumber(key) and key ~= "i" and key ~= "count" then argstosub[key] = value end end local countArg = args.count and tonumber(args.count); if countArg then offset = 0 args = {} for i = 1, countArg do args[i] = i + start - 1 end end return doLoop(frame, args, code, sep, offset, argstosub) end function p.template(frame) local sep = frame.args[1] local code = frame.args[2] or frame.args.code local offset = tonumber(frame.args.offset) or 0 return doLoop(frame:getParent(), frame:getParent().args, code, sep, offset, {}) end return p e2lejejozty6lsp51geqvnus12f6dym 116907 116906 2026-07-16T10:58:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:For_nowiki]] 116906 Scribunto text/plain local p = {} local function doLoop(frame, args, code, sep, offset, argstosub) local result = {} code = mw.text.unstripNoWiki(code) code = code:gsub('&lt;', '<'):gsub('&gt;', '>') for i, value in ipairs(args) do if i > offset then argstosub["i"] = i - offset argstosub["1"] = value local actualCode = code:gsub("{{{([^{}|]*)|?[^{}]*}}}", argstosub) table.insert(result, frame:preprocess(actualCode)) end end if frame.args.conjunction then return mw.text.listToText(result, sep, frame.args.conjunction) else return table.concat(result, sep) end end function p.main(frame) local args = frame:getParent().args local sep = args[1] local code = args.code or args[2] local offset = args.code and 1 or 2 local start = args.start or 1 local argstosub = {} for key, value in pairs(args) do if not tonumber(key) and key ~= "i" and key ~= "count" then argstosub[key] = value end end local countArg = args.count and tonumber(args.count); if countArg then offset = 0 args = {} for i = 1, countArg do args[i] = i + start - 1 end end return doLoop(frame, args, code, sep, offset, argstosub) end function p.template(frame) local sep = frame.args[1] local code = frame.args[2] or frame.args.code local offset = tonumber(frame.args.offset) or 0 return doLoop(frame:getParent(), frame:getParent().args, code, sep, offset, {}) end return p e2lejejozty6lsp51geqvnus12f6dym Template:Possibly empty category 10 24096 117024 67392 2025-10-01T01:03:31Z en>Izno 0 -div 117024 wikitext text/x-wiki __EXPECTUNUSEDCATEGORY__{{#ifeq:{{{hide}}}|true||{{Cmbox | type = content | style = text-align: center; | text = <div class="sysop-show" style="font-size:15px; font-weight: bold;">Administrators: Please do not delete this category as empty!</div> This category may be empty occasionally or even most of the time. {{{1|}}} }}}}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}}|false|{{Single namespace|category}}|<!-- Category suppressed -->}}</includeonly><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> hgxp22s4x88fegluv6ktwha8hhipsad 117025 117024 2026-07-16T11:37:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Possibly_empty_category]] 117024 wikitext text/x-wiki __EXPECTUNUSEDCATEGORY__{{#ifeq:{{{hide}}}|true||{{Cmbox | type = content | style = text-align: center; | text = <div class="sysop-show" style="font-size:15px; font-weight: bold;">Administrators: Please do not delete this category as empty!</div> This category may be empty occasionally or even most of the time. {{{1|}}} }}}}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}}|false|{{Single namespace|category}}|<!-- Category suppressed -->}}</includeonly><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> hgxp22s4x88fegluv6ktwha8hhipsad Template:Other category-header templates 10 24097 117036 67394 2025-10-17T05:48:58Z en>ConnerTT 0 Reverted edits by [[Special:Contribs/2001:44C8:4607:FC13:186E:B2F7:75C7:253A|2001:44C8:4607:FC13:186E:B2F7:75C7:253A]] ([[User talk:2001:44C8:4607:FC13:186E:B2F7:75C7:253A|talk]]) to last version by Materialscientist 117036 wikitext text/x-wiki ===Other category-header templates=== {{#if:{{{toc|}}} |__FORCETOC__ |__NOTOC__}} {{Navbox | name = Other category-header templates | state = {{{state<includeonly>|expanded</includeonly>}}} | title = Category-heading templates | above = Templates meant to appear at or near the top of [[Special:Categories|category pages]] | bodyclass = hlist | group1 = [[:Category:Wikipedia templates by namespace|By namespace]] | list1 = {{Navbox |child |groupstyle=font-weight:normal; | group1 = [[:Category:Category namespace templates|Category]] | list1 = * {{tl|Category explanation}} * {{tl|Parent-only stub category}} * {{tl|Regional stub category}} * {{tl|Set category}} * {{tl|Stub category}} * {{tl|Topic category}} | group2 = [[:Category:File namespace templates|File]] | list2 = * {{tl|Category game screenshot header}} * {{tl|File category}} * {{tl|File template notice}} * {{tl|Media template notice}} | group3 = Other | list3 = * {{tl|Help category}} * {{tl|Maintenance category}} * {{tl|Portal category}} * {{tl|Sockpuppet category}} * {{tl|Template category}} * {{tl|User category}} }} | group2 = [[:Category:Wikipedia maintenance templates|Maintenance]] | list2 = * {{tl|All included}} * {{tl|Category diffuse}} * {{tl|Category header}} * {{tl|Container category}} * {{tl|Diffusing subcategory}} * {{tl|Geography parent category}} * {{tl|Hidden category}} * {{tl|Non-diffusing parent category}} * {{tl|Non-diffusing subcategory}} * {{tl|Overpopulated category}} * {{tl|Possibly empty category}} * {{tl|Redirect category}} * {{tl|Tracking category}} |below= * See also: [[:Template:Category hatnote templates|Category hatnote templates]] }}<noinclude> {{Documentation}} </noinclude> ntfekqvrbe03xkivxplwy8apl45cl4s 117037 117036 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Other_category-header_templates]] 117036 wikitext text/x-wiki ===Other category-header templates=== {{#if:{{{toc|}}} |__FORCETOC__ |__NOTOC__}} {{Navbox | name = Other category-header templates | state = {{{state<includeonly>|expanded</includeonly>}}} | title = Category-heading templates | above = Templates meant to appear at or near the top of [[Special:Categories|category pages]] | bodyclass = hlist | group1 = [[:Category:Wikipedia templates by namespace|By namespace]] | list1 = {{Navbox |child |groupstyle=font-weight:normal; | group1 = [[:Category:Category namespace templates|Category]] | list1 = * {{tl|Category explanation}} * {{tl|Parent-only stub category}} * {{tl|Regional stub category}} * {{tl|Set category}} * {{tl|Stub category}} * {{tl|Topic category}} | group2 = [[:Category:File namespace templates|File]] | list2 = * {{tl|Category game screenshot header}} * {{tl|File category}} * {{tl|File template notice}} * {{tl|Media template notice}} | group3 = Other | list3 = * {{tl|Help category}} * {{tl|Maintenance category}} * {{tl|Portal category}} * {{tl|Sockpuppet category}} * {{tl|Template category}} * {{tl|User category}} }} | group2 = [[:Category:Wikipedia maintenance templates|Maintenance]] | list2 = * {{tl|All included}} * {{tl|Category diffuse}} * {{tl|Category header}} * {{tl|Container category}} * {{tl|Diffusing subcategory}} * {{tl|Geography parent category}} * {{tl|Hidden category}} * {{tl|Non-diffusing parent category}} * {{tl|Non-diffusing subcategory}} * {{tl|Overpopulated category}} * {{tl|Possibly empty category}} * {{tl|Redirect category}} * {{tl|Tracking category}} |below= * See also: [[:Template:Category hatnote templates|Category hatnote templates]] }}<noinclude> {{Documentation}} </noinclude> ntfekqvrbe03xkivxplwy8apl45cl4s Template:Possibly empty category/doc 10 24098 117040 67396 2023-06-24T16:31:15Z en>--WikiUser1234945-- 0 Reverted edits by [[Special:Contributions/2601:2C4:4600:87A0:3595:6D3D:DB4D:8E5B|2601:2C4:4600:87A0:3595:6D3D:DB4D:8E5B]] ([[User talk:2601:2C4:4600:87A0:3595:6D3D:DB4D:8E5B|talk]]): unexplained content removal ([[WP:HG|HG]]) (3.4.12) 67395 wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{High-use}} {{Template shortcut|Pec}} The {{Tlx|Possibly empty category}} template may be placed at the top of any category page for which it is normal that it sometimes is empty. This is typical for some maintenance, tracking and clean-up categories. It shows up only when the category is detected as empty. Experience has shown that people sometimes delete those categories, thinking that they are no longer in use. However, if a legitimate [[WP:G8]] criteria applies, such as "Categories populated by deleted or retargeted templates", then deletion may take place. Admins should check if a legitimate G8 applies before deleting. This template is also intended to be used to prevent these categories from being listed at [[Wikipedia:Database reports/Empty categories]]. ==Options== * Adding {{code|<nowiki>|hide=true</nowiki>}} makes the template invisible. ==See also== * {{Tl|Db-a3}} (Db-empty) * {{Tl|Db-c1}} (Db-catempty) * {{Tl|Void}} {{Other category-header templates}} <includeonly>{{Sandbox other|| <!--Categories below this line, please; interwikis at Wikidata--> [[Category:Category namespace templates]] }}</includeonly> 4wre0oqelvwd4ynlo1rv8xf1e55xsaf 117041 117040 2026-07-16T11:38:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Possibly_empty_category/doc]] 67395 wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{High-use}} {{Template shortcut|Pec}} The {{Tlx|Possibly empty category}} template may be placed at the top of any category page for which it is normal that it sometimes is empty. This is typical for some maintenance, tracking and clean-up categories. It shows up only when the category is detected as empty. Experience has shown that people sometimes delete those categories, thinking that they are no longer in use. However, if a legitimate [[WP:G8]] criteria applies, such as "Categories populated by deleted or retargeted templates", then deletion may take place. Admins should check if a legitimate G8 applies before deleting. This template is also intended to be used to prevent these categories from being listed at [[Wikipedia:Database reports/Empty categories]]. ==Options== * Adding {{code|<nowiki>|hide=true</nowiki>}} makes the template invisible. ==See also== * {{Tl|Db-a3}} (Db-empty) * {{Tl|Db-c1}} (Db-catempty) * {{Tl|Void}} {{Other category-header templates}} <includeonly>{{Sandbox other|| <!--Categories below this line, please; interwikis at Wikidata--> [[Category:Category namespace templates]] }}</includeonly> 4wre0oqelvwd4ynlo1rv8xf1e55xsaf Template:Hmbox 10 24299 117130 67874 2024-07-20T14:18:14Z en>Jonesey95 0 fix white space 117130 wikitext text/x-wiki <templatestyles src="Hmbox/styles.css" /><div role="note" class="hmbox-outer {{{class|}}}"><div class="hmbox-inner">[[File:{{{image|Blank.png}}}|{{{{{|safesubst:}}}#if:{{{imagesize|}}}|{{{imagesize}}}|20x20}}px|link=|alt=]] {{{message|}}}</div>{{{{{|safesubst:}}}#if:{{{extra|}}}|&#8202;– <span style="font-size: 85%">{{{extra}}}</span>}}</div><noinclude> {{documentation}} <!-- Place category links on the /doc sub-page; language links go to Wikidata, thank you! --> </noinclude> ibm4j0mffcs11avddn2qzoeldd27hon 117131 117130 2026-07-16T11:40:10Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hmbox]] 117130 wikitext text/x-wiki <templatestyles src="Hmbox/styles.css" /><div role="note" class="hmbox-outer {{{class|}}}"><div class="hmbox-inner">[[File:{{{image|Blank.png}}}|{{{{{|safesubst:}}}#if:{{{imagesize|}}}|{{{imagesize}}}|20x20}}px|link=|alt=]] {{{message|}}}</div>{{{{{|safesubst:}}}#if:{{{extra|}}}|&#8202;– <span style="font-size: 85%">{{{extra}}}</span>}}</div><noinclude> {{documentation}} <!-- Place category links on the /doc sub-page; language links go to Wikidata, thank you! --> </noinclude> ibm4j0mffcs11avddn2qzoeldd27hon Module:Portal/images/p 828 24892 116749 111098 2026-05-26T23:29:33Z en>Hike395 0 use Rod of Asclepius instead of cauduceus for psychiatry 116749 Scribunto text/plain --[==[ This is the "P" list of portal image names. It contains a list of portal images for use with [[Module:Portal]] -- for portal names that start with the letter "P". For aliases to existing portal names, and for portal names that -- start with other letters, please use the appropriate page from the following list: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/u]] - for portal names beginning with "U". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- When adding entries, please use alphabetical order. The format of the images table entries is as follows: -- ["portal name"] = "image.svg", -- The portal name should be the name of your portal, in lower case. For example, the portal name for -- "Portal:United Kingdom" would be "united kingdom". The image name should be capitalised normally, and the "File:" -- namespace prefix should be omitted. ]==] return { ["pacific northwest"] = "Abies lasiocarpa 0775.JPG|alt=photo", ["painting"] = "600-artist-palette.svg|alt=artist's palette", ["pakistan"] = "Flag of Pakistan.svg|border|link=|alt=flag", ["palau"] = "Flag of Palau.svg|border|link=|alt=flag", ["paleontology"] = "Pleuroceras ammonite with no background.png|alt=icon", ["paleozoic"] = "Tiktaalik BW flopped.jpg|alt=icon", ["palestine"] = "Flag of Palestine.svg|border|link=|alt=flag", ["pan-africanism"] = "Flag of the UNIA.svg", ["panama"] = "Flag of Panama.svg|border|link=|alt=flag", ["pandemics"] = "Protokol Kesehatan.jpg|alt=photo", ["papua new guinea"] = "Flag of Papua New Guinea.svg|border|link=|alt=flag", ["paraguay"] = "Flag of Paraguay.svg|border|link=|alt=flag", ["patna"] = "Golghar, Patna, 1888.jpg|link=|alt=", ["peace"] = "Peace dove icon.svg|alt=Peace dove", ["peer review"] = "PR icon.png|alt=icon", ["pennsylvania"] = "Flag of Pennsylvania.svg|border|link=|alt=flag", ["peru"] = "Flag of Peru.svg|border|link=|alt=flag", ["philadelphia"] = "Flag of Philadelphia, Pennsylvania.svg|link=|alt=", ["philately"] = "Stamp UK Penny Red pl148.jpg|link=|alt=", ["philippines"] = "Flag of the Philippines.svg|border|link=|alt=flag", ["philosophy"] = "Socrates.png|link=|alt=", ["phoenicia"] = "Phoenician aleph.svg|alt=Black on white image of the Phoenician letter Aleph|class=skin-invert-image", ["photography"] = "Camera-871052.svg|link=|alt=", ["physics"] = "Stylised atom with three Bohr model orbits and stylised nucleus.svg|alt=icon|class=skin-invert-image", ["piracy"] = "Skull & crossbones.svg|link=|alt=|class=skin-invert-image", ["pitcairn islands"] = "Flag of the Pitcairn Islands.svg|border|link=|alt=flag", ["pittsburgh"] = "Coat of arms of Pittsburgh, Pennsylvania.svg|link=|alt=", ["plants"] = "Leaf 1 web.jpg|alt=icon", ["poetry"] = "Quill and ink.svg|alt=icon|class=skin-invert-image", ["pokémon"] = "Wikiball.svg|alt=icon", ["poland"] = "Flag of Poland.svg|border|link=|alt=flag", ["political science"] = "Plato-raphael.jpg|link=|alt=", ["politics"] = "A coloured voting box.svg|border|alt=icon", ["polyhedra"] = "Small snub icosicosidodecahedron.png|alt=icon", ["polynesia"] = "Polynesia.png|link=|alt=map", ["pollution"] = "Benxi Steel Industries.jpg|alt=photo", ["pop music"] = "Audio-input-microphone.png|alt=icon|class=skin-invert-image", ["portal"] = "PorcheCentralNordCathedraleChartre041130-.jpg|alt=icon", ["portugal"] = "Flag of Portugal (official).svg|border|link=|alt=flag", ["prehistoric mammals"] = "Smilodon Knight.jpg|link=|alt=", ["primates"] = "Man of the woods.JPG|alt=icon", ["prince edward island"] = "Flag of Prince Edward Island.svg|border|link=|alt=flag", ["probability"] = "Nuvola apps atlantik.png|alt=icon", ["prostitution"] = "Bombilla roja - red Edison lamp.svg|alt=icon", ["protected areas of india"] = "Nagzira Tiger By Vijay Phulwadhawa.jpg|alt=photo", ["prussia"] = "Flag of Prussia (1892-1918).svg|alt=photo", ["psychiatry"] = "Psi with Rod of Asclepius.svg|alt=icon|class=skin-invert-image", ["psychology"] = "Psi2.svg|link=|alt=|class=skin-invert-image", ["puducherry"] = "Emblem of India (without motto).svg|link=|alt=|class=skin-invert-image", ["puerto rico"] = "Flag of Puerto Rico.svg|border|link=|alt=flag", ["punjab"] = "Golden Temple (Harmandir Sahib) in Amritsar, India.jpg|border|alt=image", ["punjab, india"] = "Seal of the Government Of Punjab (Black On White).svg|link=|alt=icon|class=skin-invert-image", ["punjab, pakistan"] = "Flag of Punjab.svg|border|alt=flag", } dn1pwodd4mqm15t1uk6jc78mmlcqf07 116750 116749 2026-07-15T18:13:32Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Portal/images/p]] 116749 Scribunto text/plain --[==[ This is the "P" list of portal image names. It contains a list of portal images for use with [[Module:Portal]] -- for portal names that start with the letter "P". For aliases to existing portal names, and for portal names that -- start with other letters, please use the appropriate page from the following list: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/u]] - for portal names beginning with "U". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- When adding entries, please use alphabetical order. The format of the images table entries is as follows: -- ["portal name"] = "image.svg", -- The portal name should be the name of your portal, in lower case. For example, the portal name for -- "Portal:United Kingdom" would be "united kingdom". The image name should be capitalised normally, and the "File:" -- namespace prefix should be omitted. ]==] return { ["pacific northwest"] = "Abies lasiocarpa 0775.JPG|alt=photo", ["painting"] = "600-artist-palette.svg|alt=artist's palette", ["pakistan"] = "Flag of Pakistan.svg|border|link=|alt=flag", ["palau"] = "Flag of Palau.svg|border|link=|alt=flag", ["paleontology"] = "Pleuroceras ammonite with no background.png|alt=icon", ["paleozoic"] = "Tiktaalik BW flopped.jpg|alt=icon", ["palestine"] = "Flag of Palestine.svg|border|link=|alt=flag", ["pan-africanism"] = "Flag of the UNIA.svg", ["panama"] = "Flag of Panama.svg|border|link=|alt=flag", ["pandemics"] = "Protokol Kesehatan.jpg|alt=photo", ["papua new guinea"] = "Flag of Papua New Guinea.svg|border|link=|alt=flag", ["paraguay"] = "Flag of Paraguay.svg|border|link=|alt=flag", ["patna"] = "Golghar, Patna, 1888.jpg|link=|alt=", ["peace"] = "Peace dove icon.svg|alt=Peace dove", ["peer review"] = "PR icon.png|alt=icon", ["pennsylvania"] = "Flag of Pennsylvania.svg|border|link=|alt=flag", ["peru"] = "Flag of Peru.svg|border|link=|alt=flag", ["philadelphia"] = "Flag of Philadelphia, Pennsylvania.svg|link=|alt=", ["philately"] = "Stamp UK Penny Red pl148.jpg|link=|alt=", ["philippines"] = "Flag of the Philippines.svg|border|link=|alt=flag", ["philosophy"] = "Socrates.png|link=|alt=", ["phoenicia"] = "Phoenician aleph.svg|alt=Black on white image of the Phoenician letter Aleph|class=skin-invert-image", ["photography"] = "Camera-871052.svg|link=|alt=", ["physics"] = "Stylised atom with three Bohr model orbits and stylised nucleus.svg|alt=icon|class=skin-invert-image", ["piracy"] = "Skull & crossbones.svg|link=|alt=|class=skin-invert-image", ["pitcairn islands"] = "Flag of the Pitcairn Islands.svg|border|link=|alt=flag", ["pittsburgh"] = "Coat of arms of Pittsburgh, Pennsylvania.svg|link=|alt=", ["plants"] = "Leaf 1 web.jpg|alt=icon", ["poetry"] = "Quill and ink.svg|alt=icon|class=skin-invert-image", ["pokémon"] = "Wikiball.svg|alt=icon", ["poland"] = "Flag of Poland.svg|border|link=|alt=flag", ["political science"] = "Plato-raphael.jpg|link=|alt=", ["politics"] = "A coloured voting box.svg|border|alt=icon", ["polyhedra"] = "Small snub icosicosidodecahedron.png|alt=icon", ["polynesia"] = "Polynesia.png|link=|alt=map", ["pollution"] = "Benxi Steel Industries.jpg|alt=photo", ["pop music"] = "Audio-input-microphone.png|alt=icon|class=skin-invert-image", ["portal"] = "PorcheCentralNordCathedraleChartre041130-.jpg|alt=icon", ["portugal"] = "Flag of Portugal (official).svg|border|link=|alt=flag", ["prehistoric mammals"] = "Smilodon Knight.jpg|link=|alt=", ["primates"] = "Man of the woods.JPG|alt=icon", ["prince edward island"] = "Flag of Prince Edward Island.svg|border|link=|alt=flag", ["probability"] = "Nuvola apps atlantik.png|alt=icon", ["prostitution"] = "Bombilla roja - red Edison lamp.svg|alt=icon", ["protected areas of india"] = "Nagzira Tiger By Vijay Phulwadhawa.jpg|alt=photo", ["prussia"] = "Flag of Prussia (1892-1918).svg|alt=photo", ["psychiatry"] = "Psi with Rod of Asclepius.svg|alt=icon|class=skin-invert-image", ["psychology"] = "Psi2.svg|link=|alt=|class=skin-invert-image", ["puducherry"] = "Emblem of India (without motto).svg|link=|alt=|class=skin-invert-image", ["puerto rico"] = "Flag of Puerto Rico.svg|border|link=|alt=flag", ["punjab"] = "Golden Temple (Harmandir Sahib) in Amritsar, India.jpg|border|alt=image", ["punjab, india"] = "Seal of the Government Of Punjab (Black On White).svg|link=|alt=icon|class=skin-invert-image", ["punjab, pakistan"] = "Flag of Punjab.svg|border|alt=flag", } dn1pwodd4mqm15t1uk6jc78mmlcqf07 Module:Portal/images/u 828 24895 116761 79985 2025-10-16T16:09:57Z en>Anomie 0 Remove link= parameter from images with licenses that require the file description page link for attribution and notice of license. See [[MOS:PDI]] for more info. 116761 Scribunto text/plain --[==[ This is the "U" list of portal image names. It contains a list of portal images for use with [[Module:Portal]] -- for portal names that start with the letter "U". For aliases to existing portal names, and for portal names that -- start with other letters, please use the appropriate page from the following list: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/p]] - for portal names beginning with "P". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- When adding entries, please use alphabetical order. The format of the images table entries is as follows: -- ["portal name"] = "image.svg", -- The portal name should be the name of your portal, in lower case. For example, the portal name for -- "Portal:United Kingdom" would be "united kingdom". The image name should be capitalised normally, and the "File:" -- namespace prefix should be omitted. ]==] return { ["udaipur"] = "Udaipur palace night.jpg|alt=photo", ["uganda"] = "Flag of Uganda.svg|border|link=|alt=flag", ["uk railways"] = "170433 at Edinburgh Waverley.JPG|alt=icon", ["uk waterways"] = "Moore Bridge.jpg|link=|alt=", ["ukraine"] = "Flag of Ukraine.svg|border|link=|alt=flag", ["umm al quwain"] = "Flag of Umm al-Qaiwain.svg|border|link=|alt=flag", ["u.s. census"] = "Flag of the United States.svg|border|link=|alt=flag", ["u.s. counties"] = "USA+PR+VI-CSS map.svg|alt=map", ["underwater diving"] = "Helmet logo for Underwater Diving portal.png|link=|alt=", ["united arab emirates"] = "Flag of the United Arab Emirates.svg|border|link=|alt=flag", ["united kingdom"] = "Flag of the United Kingdom.svg|border|link=|alt=flag", ["united nations"] = "UN emblem blue.svg|link=|alt=", ["united states"] = "Flag of the United States.svg|border|link=|alt=flag", ["united states air force"] = "Military service mark of the United States Air Force.svg|link=|alt=seal", ["united states arms"] = "United States Arms.svg|link=|alt=arms", ["united states army"] = "Mark of the United States Army.svg|link=|alt=emblem", ["united states coast guard"] = "USCG W.svg|link=|alt=seal", ["united states coast guard auxiliary"] = "Seal of the United States Coast Guard Auxiliary.svg|link=|alt=seal", ["united states constitution"] = "Constitution Pg1of4 AC icon cut.png|link=|alt=image", ["united states government"] = "DC 49 1 (6633999321).jpg|alt=photo", ["united states governors"] = "United States Governors map.svg|link=|alt=map", ["united states history"] = "MayflowerHarbor.jpg|link=|alt=painting", ["united states marine corps"] = "Emblem of the United States Marine Corps.svg|link=|alt=", ["united states navy"] = "Emblem of the United States Navy.svg|link=|alt=emblem", ["united states politicians"] = "US House 2016.svg|alt=map", ["united states roads"] = "Blank shield.svg|link=|alt=logo", ["united states space force"] = "Seal of the United States Space Force.png|link=|alt=seal", ["united states territories"] = "US insular areas.svg|alt=map", ["united states virgin islands"] = "Flag of the United States Virgin Islands.svg|border|link=|alt=flag", ["unreferenced biographies of living persons"] = "Vraagteken.svg|link=|alt=icon", ["university of north texas"] = "North Texas Stacked Wordmark.png|link=|alt=wordmark", ["university of oxford"] = "Bibliotheksstempel Bodleiana.jpg|link=|alt=", ["university of pennsylvania"] = "Penn Quakers logo.svg|link=|alt=logo", ["university of san francisco"] = "SanFranciscoDonslogobeginning2012.jpg|link=|alt=logo", ["university of southern california"] = "CaptureUSClogo.JPG|link=|alt=logo", ["university of texas at austin"] = "UT&T text logo.svg|link=|alt=logo", ["university of virginia"] = "Virginia Athletics wordmark.svg|link=|alt=wordmark|class=skin-invert-image", ["universities"] = "Platopainting.jpg|link=|alt=", ["uruguay"] = "Flag of Uruguay.svg|border|link=|alt=flag", ["userboxes"] = "Crystal kthememgr.svg|alt=icon", ["utah"] = "Flag of Utah.svg|border|link=|alt=flag", ["uttar pradesh"] = "Seal of Uttar Pradesh.png|link=|alt=seal", ["uttarakhand"] = "India Uttarakhand locator map.svg|alt=map", ["uzbekistan"] = "Flag of Uzbekistan.svg|border|link=|alt=flag" } 5m91u9xbim5fpbxzeqmxkqceauou980 116762 116761 2026-07-15T18:13:34Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Portal/images/u]] 116761 Scribunto text/plain --[==[ This is the "U" list of portal image names. It contains a list of portal images for use with [[Module:Portal]] -- for portal names that start with the letter "U". For aliases to existing portal names, and for portal names that -- start with other letters, please use the appropriate page from the following list: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/p]] - for portal names beginning with "P". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- When adding entries, please use alphabetical order. The format of the images table entries is as follows: -- ["portal name"] = "image.svg", -- The portal name should be the name of your portal, in lower case. For example, the portal name for -- "Portal:United Kingdom" would be "united kingdom". The image name should be capitalised normally, and the "File:" -- namespace prefix should be omitted. ]==] return { ["udaipur"] = "Udaipur palace night.jpg|alt=photo", ["uganda"] = "Flag of Uganda.svg|border|link=|alt=flag", ["uk railways"] = "170433 at Edinburgh Waverley.JPG|alt=icon", ["uk waterways"] = "Moore Bridge.jpg|link=|alt=", ["ukraine"] = "Flag of Ukraine.svg|border|link=|alt=flag", ["umm al quwain"] = "Flag of Umm al-Qaiwain.svg|border|link=|alt=flag", ["u.s. census"] = "Flag of the United States.svg|border|link=|alt=flag", ["u.s. counties"] = "USA+PR+VI-CSS map.svg|alt=map", ["underwater diving"] = "Helmet logo for Underwater Diving portal.png|link=|alt=", ["united arab emirates"] = "Flag of the United Arab Emirates.svg|border|link=|alt=flag", ["united kingdom"] = "Flag of the United Kingdom.svg|border|link=|alt=flag", ["united nations"] = "UN emblem blue.svg|link=|alt=", ["united states"] = "Flag of the United States.svg|border|link=|alt=flag", ["united states air force"] = "Military service mark of the United States Air Force.svg|link=|alt=seal", ["united states arms"] = "United States Arms.svg|link=|alt=arms", ["united states army"] = "Mark of the United States Army.svg|link=|alt=emblem", ["united states coast guard"] = "USCG W.svg|link=|alt=seal", ["united states coast guard auxiliary"] = "Seal of the United States Coast Guard Auxiliary.svg|link=|alt=seal", ["united states constitution"] = "Constitution Pg1of4 AC icon cut.png|link=|alt=image", ["united states government"] = "DC 49 1 (6633999321).jpg|alt=photo", ["united states governors"] = "United States Governors map.svg|link=|alt=map", ["united states history"] = "MayflowerHarbor.jpg|link=|alt=painting", ["united states marine corps"] = "Emblem of the United States Marine Corps.svg|link=|alt=", ["united states navy"] = "Emblem of the United States Navy.svg|link=|alt=emblem", ["united states politicians"] = "US House 2016.svg|alt=map", ["united states roads"] = "Blank shield.svg|link=|alt=logo", ["united states space force"] = "Seal of the United States Space Force.png|link=|alt=seal", ["united states territories"] = "US insular areas.svg|alt=map", ["united states virgin islands"] = "Flag of the United States Virgin Islands.svg|border|link=|alt=flag", ["unreferenced biographies of living persons"] = "Vraagteken.svg|link=|alt=icon", ["university of north texas"] = "North Texas Stacked Wordmark.png|link=|alt=wordmark", ["university of oxford"] = "Bibliotheksstempel Bodleiana.jpg|link=|alt=", ["university of pennsylvania"] = "Penn Quakers logo.svg|link=|alt=logo", ["university of san francisco"] = "SanFranciscoDonslogobeginning2012.jpg|link=|alt=logo", ["university of southern california"] = "CaptureUSClogo.JPG|link=|alt=logo", ["university of texas at austin"] = "UT&T text logo.svg|link=|alt=logo", ["university of virginia"] = "Virginia Athletics wordmark.svg|link=|alt=wordmark|class=skin-invert-image", ["universities"] = "Platopainting.jpg|link=|alt=", ["uruguay"] = "Flag of Uruguay.svg|border|link=|alt=flag", ["userboxes"] = "Crystal kthememgr.svg|alt=icon", ["utah"] = "Flag of Utah.svg|border|link=|alt=flag", ["uttar pradesh"] = "Seal of Uttar Pradesh.png|link=|alt=seal", ["uttarakhand"] = "India Uttarakhand locator map.svg|alt=map", ["uzbekistan"] = "Flag of Uzbekistan.svg|border|link=|alt=flag" } 5m91u9xbim5fpbxzeqmxkqceauou980 Module:Submit an edit request 828 24906 117272 69370 2024-12-16T15:29:26Z en>HouseBlaster 0 bypass redirect 117272 Scribunto text/plain -- This module implements {{Submit an edit request}}. local CONFIG_MODULE = 'Module:Submit an edit request/config' -- Load necessary modules local mRedirect = require('Module:Redirect') local cfg = mw.loadData(CONFIG_MODULE) local effectiveProtectionLevel = require('Module:Effective protection level')._main local escape = require("Module:String")._escapePattern local lang = mw.language.getContentLanguage() local p = {} local validLevels = { semi = 'semi', extended = 'extended', template = 'template', full = 'full', interface = 'interface', manual = 'manual' } local function message(key, ...) local params = {...} local msg = cfg[key] if #params < 1 then return msg else return mw.message.newRawMessage(msg):params(params):plain() end end local function validateLevel(level) return level and validLevels[level] or 'full' end local function getLevelInfo(level, field) return cfg.protectionLevels[level][field] end local function resolveRedirect(page) return mRedirect.luaMain(page) end local function isProtected(page) local action = mw.title.new(page).exists and 'edit' or 'create' return effectiveProtectionLevel(action, page) ~= '*' end function p.makeRequestUrl(level, titleObj) titleObj = titleObj or mw.title.getCurrentTitle() local basePage = titleObj.basePageTitle.fullText if cfg['main-page-content'][basePage] then return tostring(mw.uri.fullUrl(message('main-page-request-page'))) end local talkPageName = titleObj.talkPageTitle if talkPageName == nil then return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page'))) end talkPageName = resolveRedirect(talkPageName.prefixedText) if isProtected(talkPageName) then return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page'))) end level = validateLevel(level) if level == 'manual' then return tostring(mw.uri.fullUrl(talkPageName, { action = 'edit', section = 'new' })) end local sectionname = message( 'preload-title-text', getLevelInfo(level, 'levelText'), lang:formatDate(message('preload-title-date-format')) ) local content = mw.title.new(talkPageName):getContent() if content and content:find("== *" .. escape(sectionname) .. " *==") then local dedup = 2 while true do local newname = message("preload-title-dedup-suffix", sectionname, dedup) if not content:find("== *" .. escape(newname) .. " *==") then sectionname = newname break end dedup = dedup + 1 end end local url = mw.uri.fullUrl(talkPageName, { action = 'edit', editintro = getLevelInfo(level, 'editintro'), preload = message('preload-template'), preloadtitle = sectionname, section = 'new' }) url = tostring(url) -- Add the preload parameters. @TODO: merge this into the mw.uri.fullUrl -- query table once [[phab:T93059]] is fixed. local function encodeParam(key, val) return string.format('&%s=%s', mw.uri.encode(key), mw.uri.encode(val)) end url = url .. encodeParam('preloadparams[]', getLevelInfo(level, 'requestTemplate')) url = url .. encodeParam('preloadparams[]', titleObj.prefixedText) return url end function p._link(args) return string.format( '<span class="plainlinks">[%s %s]</span>', p.makeRequestUrl(args.type), args.display or message('default-display-value') ) end function p._button(args) return require('Module:Clickable button').main{ [1] = args.display or message('default-display-value'), url = p.makeRequestUrl(args.type), class = 'mw-ui-progressive' } end local function makeInvokeFunc(func, wrapper) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = {wrapper} }) return func(args) end end p.link = makeInvokeFunc(p._link, message('link-wrapper-template')) p.button = makeInvokeFunc(p._button, message('button-wrapper-template')) return p nk1nb7zr3yxhcpwmhyp0oewkuy26v66 117273 117272 2026-07-16T11:45:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Submit_an_edit_request]] 117272 Scribunto text/plain -- This module implements {{Submit an edit request}}. local CONFIG_MODULE = 'Module:Submit an edit request/config' -- Load necessary modules local mRedirect = require('Module:Redirect') local cfg = mw.loadData(CONFIG_MODULE) local effectiveProtectionLevel = require('Module:Effective protection level')._main local escape = require("Module:String")._escapePattern local lang = mw.language.getContentLanguage() local p = {} local validLevels = { semi = 'semi', extended = 'extended', template = 'template', full = 'full', interface = 'interface', manual = 'manual' } local function message(key, ...) local params = {...} local msg = cfg[key] if #params < 1 then return msg else return mw.message.newRawMessage(msg):params(params):plain() end end local function validateLevel(level) return level and validLevels[level] or 'full' end local function getLevelInfo(level, field) return cfg.protectionLevels[level][field] end local function resolveRedirect(page) return mRedirect.luaMain(page) end local function isProtected(page) local action = mw.title.new(page).exists and 'edit' or 'create' return effectiveProtectionLevel(action, page) ~= '*' end function p.makeRequestUrl(level, titleObj) titleObj = titleObj or mw.title.getCurrentTitle() local basePage = titleObj.basePageTitle.fullText if cfg['main-page-content'][basePage] then return tostring(mw.uri.fullUrl(message('main-page-request-page'))) end local talkPageName = titleObj.talkPageTitle if talkPageName == nil then return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page'))) end talkPageName = resolveRedirect(talkPageName.prefixedText) if isProtected(talkPageName) then return tostring(mw.uri.fullUrl(message('protected-talk-page-request-page'))) end level = validateLevel(level) if level == 'manual' then return tostring(mw.uri.fullUrl(talkPageName, { action = 'edit', section = 'new' })) end local sectionname = message( 'preload-title-text', getLevelInfo(level, 'levelText'), lang:formatDate(message('preload-title-date-format')) ) local content = mw.title.new(talkPageName):getContent() if content and content:find("== *" .. escape(sectionname) .. " *==") then local dedup = 2 while true do local newname = message("preload-title-dedup-suffix", sectionname, dedup) if not content:find("== *" .. escape(newname) .. " *==") then sectionname = newname break end dedup = dedup + 1 end end local url = mw.uri.fullUrl(talkPageName, { action = 'edit', editintro = getLevelInfo(level, 'editintro'), preload = message('preload-template'), preloadtitle = sectionname, section = 'new' }) url = tostring(url) -- Add the preload parameters. @TODO: merge this into the mw.uri.fullUrl -- query table once [[phab:T93059]] is fixed. local function encodeParam(key, val) return string.format('&%s=%s', mw.uri.encode(key), mw.uri.encode(val)) end url = url .. encodeParam('preloadparams[]', getLevelInfo(level, 'requestTemplate')) url = url .. encodeParam('preloadparams[]', titleObj.prefixedText) return url end function p._link(args) return string.format( '<span class="plainlinks">[%s %s]</span>', p.makeRequestUrl(args.type), args.display or message('default-display-value') ) end function p._button(args) return require('Module:Clickable button').main{ [1] = args.display or message('default-display-value'), url = p.makeRequestUrl(args.type), class = 'mw-ui-progressive' } end local function makeInvokeFunc(func, wrapper) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = {wrapper} }) return func(args) end end p.link = makeInvokeFunc(p._link, message('link-wrapper-template')) p.button = makeInvokeFunc(p._button, message('button-wrapper-template')) return p nk1nb7zr3yxhcpwmhyp0oewkuy26v66 Module:Submit an edit request/config 828 24907 117274 69372 2026-01-11T00:43:40Z en>Pppery 0 Bypass rdr 117274 Scribunto text/plain -- This module contains configuration data for [[Module:Submit an edit request]]. return { -------------------------------------------------------------------------------- -- Messages -------------------------------------------------------------------------------- -- The default display value for edit requests. ['default-display-value'] = 'Submit an edit request', -- The template that stores the edit request preload text ['preload-template'] = 'Template:Submit an edit request/preload', -- The section heading that is generated when a user clicks on an edit request -- link. $1 is the protection level text, e.g. "Semi-protected" or -- "Template-protected". $2 is the current date, in the format specified by the -- "preload-title-date-format" message. ['preload-title-text'] = '$1 edit request on $2', -- The date format for the automatically-generated section heading. The format -- must be valid input for the #time parser function. ['preload-title-date-format'] = 'j F Y', -- What do do with the generated section header if another header with the same section already exists -- $1 is the original section header. $2 is an automatically generated number, starting at 2 and increasing -- by one until a unique header is found. ['preload-title-dedup-suffix'] = '$1 ($2)', -- The names of pages (and their subpages) that make up the content of the main page for this wiki ['main-page-content'] = { ['Wikipedia:Today\'s featured article'] = true, ['Template:In the news'] = true, ['Template:Did you know'] = true, ['Wikipedia:Selected anniversaries'] = true, ['Template:POTD protected'] = true, ['Wikipedia:Today\'s featured list'] = true }, -- The page used to request changes to things on the Main Page. ['main-page-request-page'] = 'Wikipedia:Main Page/Errors', -- The page used to request edits to protected talk pages. ['protected-talk-page-request-page'] = 'Wikipedia:Requests for page protection/Edit', -- The names of the templates to be used as wrappers for the "link" and "button" -- functions. These are passed as arguments to the "wrappers" option of -- [[Module:Arguments]]. ['link-wrapper-template'] = 'Template:Submit an edit request/link', ['button-wrapper-template'] = 'Template:Submit an edit request', -------------------------------------------------------------------------------- -- Protection level config -------------------------------------------------------------------------------- protectionLevels = { --[[ -- These settings are for the different protection levels which the module can -- output edit request links for. -- -- editintro: -- The template to use as the edit intro users see when they click on an edit -- request link. -- -- request-template: -- The name of the edit request template for that protection level. Do not -- include the "Template:" text. -- -- protectionlevel: -- The name of the protection level, used for formatting the automatically- -- generated section headings. --]] -- Semi-protection semi = { editintro = 'Template:Edit semi-protected/editintro', requestTemplate = 'edit semi-protected', levelText = 'Semi-protected', }, -- Extended-confirmed-protection extended = { editintro = 'Template:Edit extended-protected/editintro', requestTemplate = 'edit extended-protected', levelText = 'Extended-confirmed-protected', }, -- Template-protection template = { editintro = 'Template:Edit template-protected/editintro', requestTemplate = 'edit template-protected', levelText = 'Template-protected', }, -- Full protection full = { editintro = 'Template:Edit fully-protected/editintro', requestTemplate = 'edit fully-protected', levelText = 'Protected', }, -- Interface-protection interface = { editintro = 'Template:Edit interface-protected/editintro', requestTemplate = 'edit interface-protected', levelText = 'Interface-protected', }, } } pt4ho7slt5fo4w5xg1pn6u5vzde87r1 117275 117274 2026-07-16T11:45:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Submit_an_edit_request/config]] 117274 Scribunto text/plain -- This module contains configuration data for [[Module:Submit an edit request]]. return { -------------------------------------------------------------------------------- -- Messages -------------------------------------------------------------------------------- -- The default display value for edit requests. ['default-display-value'] = 'Submit an edit request', -- The template that stores the edit request preload text ['preload-template'] = 'Template:Submit an edit request/preload', -- The section heading that is generated when a user clicks on an edit request -- link. $1 is the protection level text, e.g. "Semi-protected" or -- "Template-protected". $2 is the current date, in the format specified by the -- "preload-title-date-format" message. ['preload-title-text'] = '$1 edit request on $2', -- The date format for the automatically-generated section heading. The format -- must be valid input for the #time parser function. ['preload-title-date-format'] = 'j F Y', -- What do do with the generated section header if another header with the same section already exists -- $1 is the original section header. $2 is an automatically generated number, starting at 2 and increasing -- by one until a unique header is found. ['preload-title-dedup-suffix'] = '$1 ($2)', -- The names of pages (and their subpages) that make up the content of the main page for this wiki ['main-page-content'] = { ['Wikipedia:Today\'s featured article'] = true, ['Template:In the news'] = true, ['Template:Did you know'] = true, ['Wikipedia:Selected anniversaries'] = true, ['Template:POTD protected'] = true, ['Wikipedia:Today\'s featured list'] = true }, -- The page used to request changes to things on the Main Page. ['main-page-request-page'] = 'Wikipedia:Main Page/Errors', -- The page used to request edits to protected talk pages. ['protected-talk-page-request-page'] = 'Wikipedia:Requests for page protection/Edit', -- The names of the templates to be used as wrappers for the "link" and "button" -- functions. These are passed as arguments to the "wrappers" option of -- [[Module:Arguments]]. ['link-wrapper-template'] = 'Template:Submit an edit request/link', ['button-wrapper-template'] = 'Template:Submit an edit request', -------------------------------------------------------------------------------- -- Protection level config -------------------------------------------------------------------------------- protectionLevels = { --[[ -- These settings are for the different protection levels which the module can -- output edit request links for. -- -- editintro: -- The template to use as the edit intro users see when they click on an edit -- request link. -- -- request-template: -- The name of the edit request template for that protection level. Do not -- include the "Template:" text. -- -- protectionlevel: -- The name of the protection level, used for formatting the automatically- -- generated section headings. --]] -- Semi-protection semi = { editintro = 'Template:Edit semi-protected/editintro', requestTemplate = 'edit semi-protected', levelText = 'Semi-protected', }, -- Extended-confirmed-protection extended = { editintro = 'Template:Edit extended-protected/editintro', requestTemplate = 'edit extended-protected', levelText = 'Extended-confirmed-protected', }, -- Template-protection template = { editintro = 'Template:Edit template-protected/editintro', requestTemplate = 'edit template-protected', levelText = 'Template-protected', }, -- Full protection full = { editintro = 'Template:Edit fully-protected/editintro', requestTemplate = 'edit fully-protected', levelText = 'Protected', }, -- Interface-protection interface = { editintro = 'Template:Edit interface-protected/editintro', requestTemplate = 'edit interface-protected', levelText = 'Interface-protected', }, } } pt4ho7slt5fo4w5xg1pn6u5vzde87r1 Template:Purge button 10 25004 117138 69563 2024-12-27T16:34:05Z en>Izno 0 remove some more hardcoded styles 117138 wikitext text/x-wiki <templatestyles src="Purge button/styles.css" /><div class="purge-button {{#switch:{{lc:{{{align|{{{1|}}}}}}}}|right=purge-button-right|center=purge-button-center|#default=purge-button-left}} plainlinks" {{#if:{{{iconsize|}}}|style="width:{{#expr:{{{iconsize}}}+6}}px;"}}>[[File:View-refresh.svg|{{{iconsize|64}}}px|link=|alt=]] [[Special:Purge/{{FULLPAGENAME}}|<span class="purge-button-label" {{#if:{{{textstyle|}}}|style="{{{textstyle|}}}"}}>{{#if:{{{label|}}}|{{{label}}}|Update this page}}</span>]]</div><noinclude>{{clear}}<!--(to separate template and Documentation boxes)-->{{Documentation}}</noinclude> l6zcwl7avkvahkmq3vlmwiwv0h1scnw 117139 117138 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Purge_button]] 117138 wikitext text/x-wiki <templatestyles src="Purge button/styles.css" /><div class="purge-button {{#switch:{{lc:{{{align|{{{1|}}}}}}}}|right=purge-button-right|center=purge-button-center|#default=purge-button-left}} plainlinks" {{#if:{{{iconsize|}}}|style="width:{{#expr:{{{iconsize}}}+6}}px;"}}>[[File:View-refresh.svg|{{{iconsize|64}}}px|link=|alt=]] [[Special:Purge/{{FULLPAGENAME}}|<span class="purge-button-label" {{#if:{{{textstyle|}}}|style="{{{textstyle|}}}"}}>{{#if:{{{label|}}}|{{{label}}}|Update this page}}</span>]]</div><noinclude>{{clear}}<!--(to separate template and Documentation boxes)-->{{Documentation}}</noinclude> l6zcwl7avkvahkmq3vlmwiwv0h1scnw Template:Colored link 10 25060 116720 69683 2025-10-16T18:20:23Z en>Moxy 0 Restored revision 1279824535 by [[Special:Contributions/Pppery|Pppery]] ([[User talk:Pppery|talk]]): Was there a talk....are we doing with this all over Category:Text color templates? as of now we have a mismatch of things happening 116720 wikitext text/x-wiki [[:{{{2}}}|<span class="tmpl-colored-link {{{{{|safesubst:}}}#if:{{{noinvert|}}}|mw-no-invert|}}" style="color: {{{1}}}; text-decoration: inherit;">{{{3|{{{2}}}}}}</span>]]<noinclude> {{Documentation}}<!-- Add categories to the /doc subpage, not here! --> </noinclude> bm2i1cvm8jj7zvsf6gc1j4e7lbbma1q 116721 116720 2026-07-15T17:38:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Colored_link]] 116720 wikitext text/x-wiki [[:{{{2}}}|<span class="tmpl-colored-link {{{{{|safesubst:}}}#if:{{{noinvert|}}}|mw-no-invert|}}" style="color: {{{1}}}; text-decoration: inherit;">{{{3|{{{2}}}}}}</span>]]<noinclude> {{Documentation}}<!-- Add categories to the /doc subpage, not here! --> </noinclude> bm2i1cvm8jj7zvsf6gc1j4e7lbbma1q Template:Chart top 10 25489 116819 70902 2026-07-13T19:30:02Z en>GoldRingChip 0 Removed has_brackets=yes 116819 wikitext text/x-wiki {| class="collapsible {{#ifeq:{{Yesno-no|{{{collapsed|{{{collapse|}}}}}}}}|yes|collapsed|expanded}}" style="{{#switch:{{{align|}}}{{{float|}}} | left = margin: 0.3em 1em 0.3em 0; float:left; clear:{{{clear|left}}}; min-width:{{{min-width|{{{width|33em}}}}}}; | right = margin: 0.3em 0 0.3em 1em; float:right; clear:{{{clear|right}}}; min-width:{{{min-width|{{{width|33em}}}}}}; | #default = margin: 0.3em auto auto; clear:{{{clear|none}}}; min-width:{{{min-width|{{{width|60em}}}}}}; }} width:{{{width|auto}}}; font-size:85%; border:1px solid #aaa" ! style="padding:0.2em 0.3em 0.2em {{#if:{{{template_name|}}}|0.3em|4.3em}};{{#if:{{{background|}}}|background:{{{background|}}}; color: black|background:none; color: inherit}}; width:{{{width|auto}}}" | {{#if:{{{template_name|}}} |{{Navbar-collapsible|{{{title|{{{1|Family of {{PAGENAME}}}}}}}}|{{{template_name}}}|brackets=yes}} |{{{title|{{{1|Family of {{PAGENAME}}}}}}}} }} |- | style="text-align:{{{text-align|center}}}" | {{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using chart top with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Chart top]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | align | background | clear | collapse | collapsed | float | min-width | template_name | text-align | title | width }}<noinclude> |} {{documentation}}</noinclude> m8rk0znq9mjtsd5vyrw34wv7ollz4xk 116820 116819 2026-07-16T10:31:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Chart_top]] 116819 wikitext text/x-wiki {| class="collapsible {{#ifeq:{{Yesno-no|{{{collapsed|{{{collapse|}}}}}}}}|yes|collapsed|expanded}}" style="{{#switch:{{{align|}}}{{{float|}}} | left = margin: 0.3em 1em 0.3em 0; float:left; clear:{{{clear|left}}}; min-width:{{{min-width|{{{width|33em}}}}}}; | right = margin: 0.3em 0 0.3em 1em; float:right; clear:{{{clear|right}}}; min-width:{{{min-width|{{{width|33em}}}}}}; | #default = margin: 0.3em auto auto; clear:{{{clear|none}}}; min-width:{{{min-width|{{{width|60em}}}}}}; }} width:{{{width|auto}}}; font-size:85%; border:1px solid #aaa" ! style="padding:0.2em 0.3em 0.2em {{#if:{{{template_name|}}}|0.3em|4.3em}};{{#if:{{{background|}}}|background:{{{background|}}}; color: black|background:none; color: inherit}}; width:{{{width|auto}}}" | {{#if:{{{template_name|}}} |{{Navbar-collapsible|{{{title|{{{1|Family of {{PAGENAME}}}}}}}}|{{{template_name}}}|brackets=yes}} |{{{title|{{{1|Family of {{PAGENAME}}}}}}}} }} |- | style="text-align:{{{text-align|center}}}" | {{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using chart top with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Chart top]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | align | background | clear | collapse | collapsed | float | min-width | template_name | text-align | title | width }}<noinclude> |} {{documentation}}</noinclude> m8rk0znq9mjtsd5vyrw34wv7ollz4xk Template:Tree chart/end 10 25490 116821 70904 2025-06-21T02:23:50Z en>HouseBlaster 0 make name-agnostic 116821 wikitext text/x-wiki <noinclude><table></noinclude></table><noinclude>{{Documentation}}</noinclude> fezta2a3qmow3rikttoybl5b9mte5xz 116822 116821 2026-07-16T10:31:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Tree_chart/end]] 116821 wikitext text/x-wiki <noinclude><table></noinclude></table><noinclude>{{Documentation}}</noinclude> fezta2a3qmow3rikttoybl5b9mte5xz Template:Tree chart/start 10 25491 116823 70906 2026-07-11T03:41:49Z en>Pppery 0 Add class 116823 wikitext text/x-wiki <table class="tree-chart" style="border-spacing: 0px; border-collapse: separate; {{#switch: {{{align|}}} |left = float: left; |right = float: right; |center = margin: 0 auto; |#default = }} {{{style|}}}"><noinclude> {{Tree chart/end}} {{documentation}} </noinclude> khxmk3q51k86fasxt0qzrcuiiyil8hc 116824 116823 2026-07-16T10:31:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Tree_chart/start]] 116823 wikitext text/x-wiki <table class="tree-chart" style="border-spacing: 0px; border-collapse: separate; {{#switch: {{{align|}}} |left = float: left; |right = float: right; |center = margin: 0 auto; |#default = }} {{{style|}}}"><noinclude> {{Tree chart/end}} {{documentation}} </noinclude> khxmk3q51k86fasxt0qzrcuiiyil8hc Module:Tree chart 828 25492 116825 70908 2024-04-30T15:22:01Z en>Pppery 0 Copy from sandbox per request 116825 Scribunto text/plain require('strict') local p = {} local cells = mw.loadData('Module:Tree chart/data') function p._main(cell_args) local ret = mw.html.create() local top = ret:tag('tr') :css{ height = '1px', ['text-align'] = 'center' } local bottom = ret:tag('tr') :css{ height = '1px', ['text-align'] = 'center' } for _, v in ipairs(cell_args) do if type(v) == 'string' then top:wikitext(cells[v].t) bottom:wikitext(cells[v].b) else top:tag('td') :attr{ colspan = v.colspan or cell_args.colspan or 6, rowspan = v.rowspan or cell_args.rowspan or 2 } :css{ padding = '0.2em', border = (v.border or cell_args.border or '2') .. 'px solid' } :cssText(v.boxstyle or cell_args.boxstyle) :wikitext(v.text) end end return tostring(ret) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Tree chart', trim = false, removeBlanks = false}) local cell_args = { colspan = args.colspan, rowspan = args.rowspan, border = args.border, boxstyle = args.boxstyle } for _, val in ipairs(args) do local trimmedVal = val:match('^%s*(.-)%s*$') if trimmedVal == '' then trimmedVal = '$' end if cells[trimmedVal] then table.insert(cell_args, trimmedVal) else -- Unnamed params behave weirdly -- white space at the front counts for param_{{{1}}}, but not whitespace at the end, so remove it local rightTrimmedVal = val:gsub('%s+$','') table.insert(cell_args, { text = args[trimmedVal] or ('{{{'..trimmedVal..'}}}'), colspan = args['colspan_'..rightTrimmedVal], rowspan = args['rowspan_'..rightTrimmedVal], border = args['border_'..rightTrimmedVal], boxstyle = args['boxstyle_'..rightTrimmedVal] }) end end return p._main(cell_args) end return p e73icedqvymkhbbzm4rrh23qebo72u6 116826 116825 2026-07-16T10:31:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Tree_chart]] 116825 Scribunto text/plain require('strict') local p = {} local cells = mw.loadData('Module:Tree chart/data') function p._main(cell_args) local ret = mw.html.create() local top = ret:tag('tr') :css{ height = '1px', ['text-align'] = 'center' } local bottom = ret:tag('tr') :css{ height = '1px', ['text-align'] = 'center' } for _, v in ipairs(cell_args) do if type(v) == 'string' then top:wikitext(cells[v].t) bottom:wikitext(cells[v].b) else top:tag('td') :attr{ colspan = v.colspan or cell_args.colspan or 6, rowspan = v.rowspan or cell_args.rowspan or 2 } :css{ padding = '0.2em', border = (v.border or cell_args.border or '2') .. 'px solid' } :cssText(v.boxstyle or cell_args.boxstyle) :wikitext(v.text) end end return tostring(ret) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Tree chart', trim = false, removeBlanks = false}) local cell_args = { colspan = args.colspan, rowspan = args.rowspan, border = args.border, boxstyle = args.boxstyle } for _, val in ipairs(args) do local trimmedVal = val:match('^%s*(.-)%s*$') if trimmedVal == '' then trimmedVal = '$' end if cells[trimmedVal] then table.insert(cell_args, trimmedVal) else -- Unnamed params behave weirdly -- white space at the front counts for param_{{{1}}}, but not whitespace at the end, so remove it local rightTrimmedVal = val:gsub('%s+$','') table.insert(cell_args, { text = args[trimmedVal] or ('{{{'..trimmedVal..'}}}'), colspan = args['colspan_'..rightTrimmedVal], rowspan = args['rowspan_'..rightTrimmedVal], border = args['border_'..rightTrimmedVal], boxstyle = args['boxstyle_'..rightTrimmedVal] }) end end return p._main(cell_args) end return p e73icedqvymkhbbzm4rrh23qebo72u6 Module:Tree chart/data 828 25493 116827 70910 2025-07-22T19:38:21Z en>GoldRingChip 0 Restored revision 1221546896 by [[Special:Contributions/Pppery|Pppery]] ([[User talk:Pppery|talk]]): Revert my changes 116827 Scribunto text/plain local SLD = '1px solid' local DSH = '1px dashed' local DOT = '1px dotted' local data = { ['!'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['%'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ["'"] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['('] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, [')'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['*'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['+'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, [','] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['-'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['.'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['7'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, [':'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['A'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['C'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['D'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['E'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['F'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['G'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['G2'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['H'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['J'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['K'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['L'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['M'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['P'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['Q'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['R'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['S'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['T3'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['T2'] = { b = { { style ={ ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['T'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['U'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['V'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['W'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['X'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['X2'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['Y'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['Z'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['^'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['$'] = { t = { { attr = { colspan = '2', rowspan = '2'}, style = { width = '2em', height = '2em' } } } }, ['`'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['a2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['a'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['b2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['b3'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['b'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['c'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['d'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['di'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['dj'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['e'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['f'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['fh'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] =DSH, width = '1em', height = '1em' } } } }, ['fy'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['h'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['he'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['i'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['ic'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['j'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['jc'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['k2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['k3'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['k'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kq'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kr'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kq2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['kr2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['l2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l3'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l4'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['m2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['m'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['mp'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['mp2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['n2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['n'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['np'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['np2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['o2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['o'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['om'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['om2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['on'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['on2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['p2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['p'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['q2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['q'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['ql'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['ql2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] =DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['r2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['r'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['rl'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['rl2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['t'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['v'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['x'] = {}, ['y'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['ye'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['~'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } } } local retval = {} for k,v in pairs(data) do retval[k] = {} for k2,v2 in pairs(v) do local renderedCells = mw.html.create() for k3,v3 in ipairs(v2) do renderedCells:tag('td'):css(v3.style or {}):attr(v3.attr or {}) end retval[k][k2] = tostring(renderedCells) end end return retval g6bakgq1oihq77zx8jbsli7b8wpd6mc 116828 116827 2026-07-16T10:31:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Tree_chart/data]] 116827 Scribunto text/plain local SLD = '1px solid' local DSH = '1px dashed' local DOT = '1px dotted' local data = { ['!'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['%'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ["'"] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['('] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, [')'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['*'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['+'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, [','] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['-'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['.'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['7'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, [':'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['A'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['C'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['D'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['E'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['F'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['G'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['G2'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['H'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['J'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['K'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['L'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['M'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['P'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['Q'] = { t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['R'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['S'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['T3'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['T2'] = { b = { { style ={ ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['T'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['U'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['V'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['W'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['X'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['X2'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['Y'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['Z'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['^'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['$'] = { t = { { attr = { colspan = '2', rowspan = '2'}, style = { width = '2em', height = '2em' } } } }, ['`'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['a2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['a'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['b2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['b3'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['b'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['c'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['d'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['di'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['dj'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['e'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['f'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['fh'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] =DSH, width = '1em', height = '1em' } } } }, ['fy'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['h'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['he'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['i'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['ic'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['j'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['jc'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['k2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['k3'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['k'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DOT, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kq'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kr'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['kq2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['kr2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['l2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l3'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l4'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['l'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['m2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['m'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DOT, width = '2em', height = '1em' } } } }, ['mp'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['mp2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['n2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['n'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['np'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['np2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['o2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = DSH, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['o'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['om'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['om2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['on'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['on2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DOT, width = '1em', height = '1em' } } } }, ['p2'] = { b = { { style = { ['border-right'] = DSH, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DSH, ['border-bottom'] = '1px dotted #000001', width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['p'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DOT, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['q2'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = '1px dashed #000001', width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['q'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } } } }, ['ql'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['ql2'] = { b = { { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = DOT, ['border-bottom'] =DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['r2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['r'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['rl'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = SLD, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['rl2'] = { b = { { style = { ['border-right'] = DOT, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['t'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { style = { ['border-right'] = SLD, ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } } } }, ['v'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = SLD, width = '2em', height = '1em' } } } }, ['x'] = {}, ['y'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } }, { style = { width = '1em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } }, ['ye'] = { b = { { style = { ['border-right'] = SLD, width = '1em', height = '1em' } } }, t = { { style = { ['border-bottom'] = DSH, width = '1em', height = '1em' } }, { attr = { rowspan = '2' }, style = { width = '1em', height = '2em' } } } }, ['~'] = { b = { { attr = { colspan = '2' }, style = { width = '2em', height = '1em' } } }, t = { { attr = { colspan = '2' }, style = { ['border-bottom'] = DSH, width = '2em', height = '1em' } } } } } local retval = {} for k,v in pairs(data) do retval[k] = {} for k2,v2 in pairs(v) do local renderedCells = mw.html.create() for k3,v3 in ipairs(v2) do renderedCells:tag('td'):css(v3.style or {}):attr(v3.attr or {}) end retval[k][k2] = tostring(renderedCells) end end return retval g6bakgq1oihq77zx8jbsli7b8wpd6mc Template:Templatedata header 10 25547 116844 71041 2024-09-20T21:49:24Z en>Knitsey 0 Reverted 1 edit by [[Special:Contributions/Nachaka|Nachaka]] ([[User talk:Nachaka|talk]]) 71040 wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] 4f5j00d4fbzl99id7id41c4xn7tyk03 116845 116844 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Templatedata_header]] 71040 wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] 4f5j00d4fbzl99id7id41c4xn7tyk03 Template:Cross 10 25725 117258 71497 2026-07-03T03:08:44Z en>Paine Ellsworth 0 add [[WP:RCAT|rcat template]]s 117258 wikitext text/x-wiki #REDIRECT [[Template:Xmark]] {{Redirect category shell| {{R with Wikidata item}} {{R from move}} {{R from alternative name}} {{R from template shortcut}} }} pzx1ocemkeqxqshel014w7dtfhp17vz 117259 117258 2026-07-16T11:45:17Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Cross]] 117258 wikitext text/x-wiki #REDIRECT [[Template:Xmark]] {{Redirect category shell| {{R with Wikidata item}} {{R from move}} {{R from alternative name}} {{R from template shortcut}} }} pzx1ocemkeqxqshel014w7dtfhp17vz Template:Stack begin 10 26202 117180 73061 2024-06-06T17:39:09Z en>SilverLocust 0 re-add mw-stack per edit request in line with [[Tenplate:Stack]] 117180 wikitext text/x-wiki <templatestyles src="Stack/styles.css"/><div class="stack mw-stack {{#switch:{{{float|right}}}|left=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|left|true=clear-}}left|right=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|right|true=clear-}}right}}"><!-- --><div {{#if:{{{cellspacing|}}}|style="margin: {{{cellspacing}}}px"}}><!-- -->{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using stack with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Stack begin]] with unknown parameter "_VALUE_"|ignoreblank=y| cellspacing | clear | float | margin }}<noinclude> {{stack end}} {{documentation}} </noinclude> fk08z8f1fbxa0f5lixlz7knsqh4kucn 117181 117180 2026-07-16T11:40:25Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Stack_begin]] 117180 wikitext text/x-wiki <templatestyles src="Stack/styles.css"/><div class="stack mw-stack {{#switch:{{{float|right}}}|left=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|left|true=clear-}}left|right=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|right|true=clear-}}right}}"><!-- --><div {{#if:{{{cellspacing|}}}|style="margin: {{{cellspacing}}}px"}}><!-- -->{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using stack with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Stack begin]] with unknown parameter "_VALUE_"|ignoreblank=y| cellspacing | clear | float | margin }}<noinclude> {{stack end}} {{documentation}} </noinclude> fk08z8f1fbxa0f5lixlz7knsqh4kucn Module:Parameter validation 828 29218 117108 77174 2026-05-15T13:39:27Z en>MSGJ 0 tweaks by [[User:Mr. Starfleet Command]] 117108 Scribunto text/plain local util = { empty = function( s ) return s == nil or type( s ) == 'string' and mw.text.trim( s ) == '' end, extract_options = function ( frame, optionsPrefix ) optionsPrefix = optionsPrefix or 'options' local options, n = {} if frame.args.module_options then local module_options = mw.loadData( frame.args.module_options ) if type( module_options ) ~= 'table' then return {} end local title = mw.title.getCurrentTitle() local local_ptions = module_options[ title.namespace ] or module_options[ title.nsText ] or {} for k, v in pairs( local_ptions ) do options[k] = v end end repeat local ok, more = pcall( mw.text.jsonDecode, frame.args[optionsPrefix .. ( n or '' )] ) if ok and type( more ) == 'table' then for k, v in pairs( more ) do options[k] = v end end n = ( n or 0 ) + 1 until not ok return options end, build_namelist = function ( template_name, sp ) local res = { template_name } if sp then if type( sp ) == 'string' then sp = { sp } end for _, p in ipairs( sp ) do table.insert( res, template_name .. '/' .. p ) end end return res end, table_empty = function( t ) -- normally, test if next(t) is nil, but for some perverse reason, non-empty tables returned by loadData return nil... if type( t ) ~= 'table' then return true end if #t > 0 then return false end return true end, } local function _readTemplateData( templateName ) local title = mw.title.makeTitle( 0, templateName ) local templateContent = title and title.exists and title:getContent() -- template's raw content local capture = templateContent and mw.ustring.match( templateContent, '<templatedata%s*>(.*)</templatedata%s*>' ) -- templatedata as text -- capture = capture and mw.ustring.gsub( capture, '"(%d+)"', tonumber ) -- convert "1": {} to 1: {}. frame.args uses numerical indexes for order-based params. local trailingComma = capture and mw.ustring.find( capture, ',%s*[%]%}]' ) -- look for ,] or ,} : jsonDecode allows it, but it's verbotten in json if capture and not trailingComma then return pcall( mw.text.jsonDecode, capture ) end return false end local function readTemplateData( templateName ) for _, name in ipairs( templateName ) do local td, result = _readTemplateData( name ) if td then return result end end return nil end -- this is the function to be called by other modules. it expects the frame, and then an optional list of subpages, e.g. { "Documentation" }. -- if second parameter is nil, only template page will be searched for templatedata. local function calculateViolations( frame, subpages ) -- used for parameter type validy test. keyed by TD 'type' string. values are function(val) returning bool. local type_validators = { ['number'] = function( s ) return mw.language.getContentLanguage():parseFormattedNumber( s ) end } local function compatible( typ, val ) local func = type_validators[typ] return type( func ) ~= 'function' or util.empty( val ) or func( val ) end local t_frame = frame:getParent() local t_args, template_name = t_frame.args, t_frame:getTitle() template_name = mw.ustring.gsub( template_name, '/sandbox', '', 1 ) local td_source = util.build_namelist( template_name, subpages ) if frame.args.td_source then table.insert(td_source, frame.args.td_source) end local templatedata = readTemplateData( td_source ) local td_params = templatedata and templatedata.params local all_aliases = {} if not td_params then return { ['no-templatedata'] = { [''] = '' } } end -- from this point on, we know templatedata is valid. local res = {} -- before returning to caller, we'll prune empty tables -- allow for aliases for x, p in pairs( td_params ) do for y, alias in ipairs( p.aliases or {} ) do p.primary = x td_params[x] = p all_aliases[alias] = p if tonumber(alias) then all_aliases[tonumber(alias)] = p end end end -- handle undeclared and deprecated local already_seen = {} local series = frame.args.series for p_name, value in pairs( t_args ) do local tp_param, noval, numeric = td_params[p_name] or all_aliases[p_name], util.empty( value ), tonumber( p_name ) local table_name local hasval = not noval if not tp_param and series then -- 2nd chance. check to see if series for s_name, p in pairs(td_params) do if mw.ustring.match( p_name, '^' .. s_name .. '%d+' .. '$') then -- mw.log('found p_name ' .. p_name .. ' s_name:' .. s_name, ' p is:', p) debugging series support tp_param = p end -- don't bother breaking. td always correct. end end if not tp_param then -- not in TD: this is called undeclared -- calculate the relevant table for this undeclared parameter, based on parameter and value types table_name = noval and numeric and 'empty-undeclared-numeric' or noval and not numeric and 'empty-undeclared' or hasval and numeric and 'undeclared-numeric' or 'undeclared' -- tzvototi nishar. else -- in td: test for deprecation and mistype. if deprecated, no further tests table_name = tp_param.deprecated and hasval and 'deprecated' or tp_param.deprecated and noval and 'empty-deprecated' or not compatible( tp_param.type, value ) and 'incompatible' or not series and already_seen[tp_param] and hasval and 'duplicate' if hasval and table_name ~= 'duplicate' then already_seen[tp_param] = p_name end end -- report it. if table_name then res[table_name] = res[table_name] or {} if table_name == 'duplicate' then local primary_param = tp_param.primary local primaryData = res[table_name][primary_param] if not primaryData then primaryData = {} table.insert(primaryData, already_seen[tp_param]) end table.insert(primaryData, p_name) res[table_name][primary_param] = primaryData else res[table_name][p_name] = value end end end -- check for empty/missing parameters declared "required" for p_name, param in pairs( td_params ) do if param.required and util.empty( t_args[p_name] ) then local is_alias for _, alias in ipairs( param.aliases or {} ) do is_alias = is_alias or not util.empty( t_args[alias] ) end if not is_alias then res['empty-required'] = res['empty-required'] or {} res['empty-required'][p_name] = '' end end end mw.logObject(res) return res end -- wraps report in hidden frame local function wrapReport(report, template_name, options) mw.logObject(report) if util.empty( report ) then return '' end local naked = mw.title.new( template_name ).text naked = mw.ustring.gsub(naked, 'Infobox', 'infobox', 1) report = ( options['wrapper-prefix'] or '<div class="paramvalidator-wrapper"><span class="paramvalidator-error">' ) .. report .. ( options['wrapper-suffix'] or '</span></div>' ) report = mw.ustring.gsub( report, 'tname_naked', naked ) report = mw.ustring.gsub( report, 'templatename', template_name ) return report end -- this is the "user" version, called with {{#invoke:}} returns a string, as defined by the options parameter local function validateParams( frame ) local options, report, template_name = util.extract_options( frame ), '', frame:getParent():getTitle() local ignore = function( p_name ) for _, pattern in ipairs( options.ignore or {} ) do if mw.ustring.match( p_name, '^' .. pattern .. '$' ) then return true end end return false end local replace_macros = function( error_type, s, param_names ) local function concat_and_escape( t , sep ) sep = sep or ', ' return ( mw.ustring.gsub( table.concat( t, sep ), '%%', '%%%%' ) ) end if s and ( type( param_names ) == 'table' ) then local k_ar, kv_ar = {}, {} for k, v in pairs( param_names ) do table.insert( k_ar, k ) if type(v) == 'table' then v = table.concat(v, ', ') end if error_type == 'duplicate' then table.insert( kv_ar, v) else table.insert( kv_ar, k .. ': ' .. v) end end s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) ) s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar, ' AND ' ) ) if mw.getCurrentFrame():preprocess( '{{REVISIONID}}' ) ~= '' then s = mw.ustring.gsub( s, '<div.*<%/div>', '', 1 ) end end return s end local report_params = function( key, param_names ) local res = replace_macros( key, options[key], param_names ) res = frame:preprocess(res or '') report = report .. ( res or '' ) return res end -- no option no work. if util.table_empty( options ) then return '' end -- get the errors. local violations = calculateViolations( frame, options['doc-subpage'] ) -- special request of bora: use skip_empty_numeric if violations['empty-undeclared-numeric'] then for i = 1, tonumber( options['skip-empty-numeric'] ) or 0 do violations['empty-undeclared-numeric'][i] = nil end end -- handle ignore list, and prune empty violations - in that order! local offenders = 0 for name, tab in pairs( violations ) do -- remove ignored parameters from all violations for pname in pairs( tab ) do if ignore( pname ) then tab[pname] = nil end end -- prune empty violations if util.table_empty( tab ) then violations[name] = nil end -- WORK IS DONE. report the errors. -- if report then count it. if violations[name] and report_params( name, tab ) then offenders = offenders + 1 end end if offenders > 1 then report_params( 'multiple' ) end if offenders ~= 0 then report_params( 'any' ) end -- could have tested for empty( report ), but since we count them anyway... return wrapReport(report, template_name, options) end return { ['validateparams'] = validateParams, ['calculateViolations'] = calculateViolations, ['wrapReport'] = wrapReport } b2xz8kqfrgct90ewowjyfx1v5w9ke5h 117109 117108 2026-07-16T11:39:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Parameter_validation]] 117108 Scribunto text/plain local util = { empty = function( s ) return s == nil or type( s ) == 'string' and mw.text.trim( s ) == '' end, extract_options = function ( frame, optionsPrefix ) optionsPrefix = optionsPrefix or 'options' local options, n = {} if frame.args.module_options then local module_options = mw.loadData( frame.args.module_options ) if type( module_options ) ~= 'table' then return {} end local title = mw.title.getCurrentTitle() local local_ptions = module_options[ title.namespace ] or module_options[ title.nsText ] or {} for k, v in pairs( local_ptions ) do options[k] = v end end repeat local ok, more = pcall( mw.text.jsonDecode, frame.args[optionsPrefix .. ( n or '' )] ) if ok and type( more ) == 'table' then for k, v in pairs( more ) do options[k] = v end end n = ( n or 0 ) + 1 until not ok return options end, build_namelist = function ( template_name, sp ) local res = { template_name } if sp then if type( sp ) == 'string' then sp = { sp } end for _, p in ipairs( sp ) do table.insert( res, template_name .. '/' .. p ) end end return res end, table_empty = function( t ) -- normally, test if next(t) is nil, but for some perverse reason, non-empty tables returned by loadData return nil... if type( t ) ~= 'table' then return true end if #t > 0 then return false end return true end, } local function _readTemplateData( templateName ) local title = mw.title.makeTitle( 0, templateName ) local templateContent = title and title.exists and title:getContent() -- template's raw content local capture = templateContent and mw.ustring.match( templateContent, '<templatedata%s*>(.*)</templatedata%s*>' ) -- templatedata as text -- capture = capture and mw.ustring.gsub( capture, '"(%d+)"', tonumber ) -- convert "1": {} to 1: {}. frame.args uses numerical indexes for order-based params. local trailingComma = capture and mw.ustring.find( capture, ',%s*[%]%}]' ) -- look for ,] or ,} : jsonDecode allows it, but it's verbotten in json if capture and not trailingComma then return pcall( mw.text.jsonDecode, capture ) end return false end local function readTemplateData( templateName ) for _, name in ipairs( templateName ) do local td, result = _readTemplateData( name ) if td then return result end end return nil end -- this is the function to be called by other modules. it expects the frame, and then an optional list of subpages, e.g. { "Documentation" }. -- if second parameter is nil, only template page will be searched for templatedata. local function calculateViolations( frame, subpages ) -- used for parameter type validy test. keyed by TD 'type' string. values are function(val) returning bool. local type_validators = { ['number'] = function( s ) return mw.language.getContentLanguage():parseFormattedNumber( s ) end } local function compatible( typ, val ) local func = type_validators[typ] return type( func ) ~= 'function' or util.empty( val ) or func( val ) end local t_frame = frame:getParent() local t_args, template_name = t_frame.args, t_frame:getTitle() template_name = mw.ustring.gsub( template_name, '/sandbox', '', 1 ) local td_source = util.build_namelist( template_name, subpages ) if frame.args.td_source then table.insert(td_source, frame.args.td_source) end local templatedata = readTemplateData( td_source ) local td_params = templatedata and templatedata.params local all_aliases = {} if not td_params then return { ['no-templatedata'] = { [''] = '' } } end -- from this point on, we know templatedata is valid. local res = {} -- before returning to caller, we'll prune empty tables -- allow for aliases for x, p in pairs( td_params ) do for y, alias in ipairs( p.aliases or {} ) do p.primary = x td_params[x] = p all_aliases[alias] = p if tonumber(alias) then all_aliases[tonumber(alias)] = p end end end -- handle undeclared and deprecated local already_seen = {} local series = frame.args.series for p_name, value in pairs( t_args ) do local tp_param, noval, numeric = td_params[p_name] or all_aliases[p_name], util.empty( value ), tonumber( p_name ) local table_name local hasval = not noval if not tp_param and series then -- 2nd chance. check to see if series for s_name, p in pairs(td_params) do if mw.ustring.match( p_name, '^' .. s_name .. '%d+' .. '$') then -- mw.log('found p_name ' .. p_name .. ' s_name:' .. s_name, ' p is:', p) debugging series support tp_param = p end -- don't bother breaking. td always correct. end end if not tp_param then -- not in TD: this is called undeclared -- calculate the relevant table for this undeclared parameter, based on parameter and value types table_name = noval and numeric and 'empty-undeclared-numeric' or noval and not numeric and 'empty-undeclared' or hasval and numeric and 'undeclared-numeric' or 'undeclared' -- tzvototi nishar. else -- in td: test for deprecation and mistype. if deprecated, no further tests table_name = tp_param.deprecated and hasval and 'deprecated' or tp_param.deprecated and noval and 'empty-deprecated' or not compatible( tp_param.type, value ) and 'incompatible' or not series and already_seen[tp_param] and hasval and 'duplicate' if hasval and table_name ~= 'duplicate' then already_seen[tp_param] = p_name end end -- report it. if table_name then res[table_name] = res[table_name] or {} if table_name == 'duplicate' then local primary_param = tp_param.primary local primaryData = res[table_name][primary_param] if not primaryData then primaryData = {} table.insert(primaryData, already_seen[tp_param]) end table.insert(primaryData, p_name) res[table_name][primary_param] = primaryData else res[table_name][p_name] = value end end end -- check for empty/missing parameters declared "required" for p_name, param in pairs( td_params ) do if param.required and util.empty( t_args[p_name] ) then local is_alias for _, alias in ipairs( param.aliases or {} ) do is_alias = is_alias or not util.empty( t_args[alias] ) end if not is_alias then res['empty-required'] = res['empty-required'] or {} res['empty-required'][p_name] = '' end end end mw.logObject(res) return res end -- wraps report in hidden frame local function wrapReport(report, template_name, options) mw.logObject(report) if util.empty( report ) then return '' end local naked = mw.title.new( template_name ).text naked = mw.ustring.gsub(naked, 'Infobox', 'infobox', 1) report = ( options['wrapper-prefix'] or '<div class="paramvalidator-wrapper"><span class="paramvalidator-error">' ) .. report .. ( options['wrapper-suffix'] or '</span></div>' ) report = mw.ustring.gsub( report, 'tname_naked', naked ) report = mw.ustring.gsub( report, 'templatename', template_name ) return report end -- this is the "user" version, called with {{#invoke:}} returns a string, as defined by the options parameter local function validateParams( frame ) local options, report, template_name = util.extract_options( frame ), '', frame:getParent():getTitle() local ignore = function( p_name ) for _, pattern in ipairs( options.ignore or {} ) do if mw.ustring.match( p_name, '^' .. pattern .. '$' ) then return true end end return false end local replace_macros = function( error_type, s, param_names ) local function concat_and_escape( t , sep ) sep = sep or ', ' return ( mw.ustring.gsub( table.concat( t, sep ), '%%', '%%%%' ) ) end if s and ( type( param_names ) == 'table' ) then local k_ar, kv_ar = {}, {} for k, v in pairs( param_names ) do table.insert( k_ar, k ) if type(v) == 'table' then v = table.concat(v, ', ') end if error_type == 'duplicate' then table.insert( kv_ar, v) else table.insert( kv_ar, k .. ': ' .. v) end end s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) ) s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar, ' AND ' ) ) if mw.getCurrentFrame():preprocess( '{{REVISIONID}}' ) ~= '' then s = mw.ustring.gsub( s, '<div.*<%/div>', '', 1 ) end end return s end local report_params = function( key, param_names ) local res = replace_macros( key, options[key], param_names ) res = frame:preprocess(res or '') report = report .. ( res or '' ) return res end -- no option no work. if util.table_empty( options ) then return '' end -- get the errors. local violations = calculateViolations( frame, options['doc-subpage'] ) -- special request of bora: use skip_empty_numeric if violations['empty-undeclared-numeric'] then for i = 1, tonumber( options['skip-empty-numeric'] ) or 0 do violations['empty-undeclared-numeric'][i] = nil end end -- handle ignore list, and prune empty violations - in that order! local offenders = 0 for name, tab in pairs( violations ) do -- remove ignored parameters from all violations for pname in pairs( tab ) do if ignore( pname ) then tab[pname] = nil end end -- prune empty violations if util.table_empty( tab ) then violations[name] = nil end -- WORK IS DONE. report the errors. -- if report then count it. if violations[name] and report_params( name, tab ) then offenders = offenders + 1 end end if offenders > 1 then report_params( 'multiple' ) end if offenders ~= 0 then report_params( 'any' ) end -- could have tested for empty( report ), but since we count them anyway... return wrapReport(report, template_name, options) end return { ['validateparams'] = validateParams, ['calculateViolations'] = calculateViolations, ['wrapReport'] = wrapReport } b2xz8kqfrgct90ewowjyfx1v5w9ke5h Module:Parameter validation/default config 828 29219 117110 77176 2026-05-15T13:38:37Z en>MSGJ 0 tweaks by [[User:Mr. Starfleet Command]] 117110 Scribunto text/plain local function create_message(msg) return require('Module:If preview')._warning({ mw.ustring.format('[[templatename]] used with %s.', msg) }) end local function create(cat, msg) return mw.ustring.format('{{main other|[[Category:Pages using tname_naked with %s parameters]]}}', cat) .. create_message(msg) end local options = { ['undeclared'] = create('unknown', 'unknown parameter(s): paramname'), ['deprecated'] = create('deprecated', 'deprecated parameter(s): paramname'), ['duplicate'] = create('duplicate', 'duplicate parameter(s): paramandvalue'), ['doc-subpage'] = 'doc', } local result = { [0] = options, [2] = options, [4] = options, [6] = options, [10] = options, [12] = options, [14] = options, } return result 5q8hbkx98zpullg796znnwqi8pmpmz7 117111 117110 2026-07-16T11:39:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Parameter_validation/default_config]] 117110 Scribunto text/plain local function create_message(msg) return require('Module:If preview')._warning({ mw.ustring.format('[[templatename]] used with %s.', msg) }) end local function create(cat, msg) return mw.ustring.format('{{main other|[[Category:Pages using tname_naked with %s parameters]]}}', cat) .. create_message(msg) end local options = { ['undeclared'] = create('unknown', 'unknown parameter(s): paramname'), ['deprecated'] = create('deprecated', 'deprecated parameter(s): paramname'), ['duplicate'] = create('duplicate', 'duplicate parameter(s): paramandvalue'), ['doc-subpage'] = 'doc', } local result = { [0] = options, [2] = options, [4] = options, [6] = options, [10] = options, [12] = options, [14] = options, } return result 5q8hbkx98zpullg796znnwqi8pmpmz7 Template:Marriage/styles.css 10 29223 117118 77184 2025-07-04T20:30:48Z en>Paine Ellsworth 0 per edit request on talk page - remove unwanted property 117118 sanitized-css text/css /* {{pp-template}} */ .marriage-line-margin2px { line-height: 0; margin-bottom: -2px; } .marriage-line-margin3px { line-height: 0; margin-bottom: -3px; } .marriage-display-inline { display: inline; } svkk90r9qcgelhufx0yirkmdwf7ntrk 117119 117118 2026-07-16T11:39:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Marriage/styles.css]] 117118 sanitized-css text/css /* {{pp-template}} */ .marriage-line-margin2px { line-height: 0; margin-bottom: -2px; } .marriage-line-margin3px { line-height: 0; margin-bottom: -3px; } .marriage-display-inline { display: inline; } svkk90r9qcgelhufx0yirkmdwf7ntrk Help:CS1 errors 12 29395 117210 106819 2026-06-28T17:04:07Z en>Trappist the monk 0 Reverted edit by [[Special:Contribs/Ալբինա Կարապետյան|Ալբինա Կարապետյան]] ([[User talk:Ալբինա Կարապետյան|talk]]) to last version by Trappist the monk 117210 wikitext text/x-wiki {{Short description|Wikipedia help page}} {{pp-semi-indef}} {{Wikipedia how to}} {{Bots|deny=Citation bot}} {{Skip to top and bottom}} <!-- IMPORTANT: do not remove or change section header span ids without also changing links in Module:Citation/CS1 --> This page describes the error messages reported by the {{cs1}} and {{cs2}} citations, what they mean, and how editors might resolve the errors. [[:Category:CS1 errors]] is the general errors category and [[:Category:CS1 maintenance]] is the general maintenance category. Errors issued by Wikipedia's <code>&lt;ref></code> system, in which citation templates are typically embedded, can be found at [[Help:Cite errors]]. == Controlling error message display == === Preview messages === When editors preview an article, MediaWiki displays a preview message box under the Preview header. When {{cs1}} and {{cs2}} templates have error or maintenance messages, [[Module:Citation/CS1]] summarizes those messages in the preview message box. Such a message box might look something like this: <div style="margin-left:1.6em;" class="cdx-message cdx-message--warning cdx-message--block"> <span class="cdx-message__icon"></span><div class="cdx-message__content"> {{int:Previewnote}} <span class="mw-continue-editing"> {{fakelink|→ {{int:Continue-editing}}|#editform}}</span> {{int:Scribunto-lua-warning|{{color|#085|{{mono|<nowiki>{{</nowiki>[[Template:cite book|cite book]]<nowiki>}}</nowiki>}}: this {{fakelink|reference}} has maintenance messages}}; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).}} {{int:Scribunto-lua-warning|{{color|#bf3c2c|{{mono|<nowiki>{{</nowiki>[[Template:cite journal|cite journal]]<nowiki>}}</nowiki>}}: this {{fakelink|reference}} has errors}}; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).}} </div> </div> The summary messages have three components: #'{{int:Scribunto-lua-warning|}}' – this prefix is provided by MediaWiki; #a colored ({{color|#085|green maintenance}} or {{color|#bf3c2c|red error}}) message that identifies the type of template that has a message with a link to that template's documentation; wrapper templates with messages will show the name of the wrapped template, and; #'messages may be hidden' – the message suffix with a help link to this page. Preview messages in the preview message box cannot be hidden. The preview message suffix 'messages may be hidden' means that the template's message(s) may not be visible. To learn how to show or hide template messages, see the next section ({{slink||Error and maintenance messages}}). === Error and maintenance messages === <section begin="show_error_messages_help_text" /><section begin="show_all_messages_help_text" />By default, {{cs1}} and {{cs2}} <span style="color:#bf3c2c">error messages</span> are visible to all readers and <span style="color:#085">maintenance messages</span> are hidden from all readers. To display <span style="color:#085">maintenance messages</span> in the rendered article, include the following text in your common [[Cascading Stylesheets|CSS]] page ([[Special:MyPage/common.css|common.css]]) or your specific skin's CSS page and ([[Special:MyPage/skin.css|skin.css]]<!-- in other wiki without [[MediaWiki:Redirect skin.js]], replace this link to [[Special:MyPage/vector-2022.css|vector-2022.css]]、[[Special:MyPage/vector.css|vector.css] -->). (Note to new editors: those CSS pages are specific to you, and control your view of pages, by adding to your user account's [[CSS]] code. If you have not yet created such a page, then clicking one of the <code>.css</code> links above will yield a page that starts "Wikipedia does not have a [[user page]] with this exact name." Click the "Start the User:''username''/''filename'' page" link, paste the text below, save the page, follow the instructions at the bottom of the new page on bypassing your browser's cache, and finally, in order to see the previously hidden maintenance messages, refresh the page you were editing earlier.) <syntaxhighlight lang="css">:root .mw-parser-output .cs1-maint {display: inline;} /* display Citation Style 1 maintenance messages */</syntaxhighlight> To display hidden-by-default <span style="color:#bf3c2c">error messages</span>: <syntaxhighlight lang="css">:root .mw-parser-output .cs1-hidden-error {display: inline;} /* display hidden Citation Style 1 error messages */</syntaxhighlight> Even with this CSS installed, older pages in Wikipedia's cache may not have been updated to show these error messages even though the page is listed in one of the tracking categories. A [[WP:NULLEDIT|null edit]] will resolve that issue. After (error and/maintenance) messages are displayed, it might still not be easy to find them in a large article with a lot of citations. Messages can then be found by searching (with {{key press|Ctrl|F}}) for "(help)" or "cs1". To hide normally-displayed <span style="color:#bf3c2c">error messages</span>: <syntaxhighlight lang="css">:root .mw-parser-output .cs1-visible-error {display: none;} /* hide Citation Style 1 error messages */</syntaxhighlight> You can personalize the display of these messages (such as changing the color), but you will need to ask someone who knows CSS or at [[WP:VPT|the technical village pump]] if you do not understand how. {{lang|la|Nota bene}}: these CSS rules are not obeyed by [[Wikipedia:Tools/Navigation popups|Navigation popups]]. They also do not hide script warning messages in the Preview box that begin with "This is only a preview; your changes have not yet been saved".<section end="show_all_messages_help_text" /><section end="show_error_messages_help_text" /> === Properties category highlighting === <section begin="prop_cat_highlight_help_text" /> [[Module:Citation/CS1]] adds properties categories to some CS1|2 citations. Unlike errors or maintenance needs, there is no message when a properties category is added. Properties categories may be temporary or may be perpetual. Editors can use CSS to add special styling to CS1|2 template renderings that will highlight a citation that added a properties category. For example, this template uses a long volume name: :<code><nowiki>{{cite book |title=Title |date=May–Jun 2021 |volume = 1: Long volume}}</nowiki></code> ::{{cite book |title=Title |date=May–Jun 2021 |volume = 1: Long volume |no-tracking=y}} If you add this to your CSS that citation will render with a {{background|#FFC|pale yellow}} background: :<syntaxhighlight lang="css">.cs1-prop-long-vol {background: #FFC;}</syntaxhighlight> Add one or more of these (with appropriate styling) to your CSS to highlight template renderings when those templates add the associated properties category: ::{{code|lang=css|.cs1-prop-foreign-lang-source {}|}} – subcategories of {{cl|CS1 foreign language sources}} ::{{code|lang=css|.cs1-prop-foreign-lang-source-2 {}|}} – {{cl|CS1 foreign language sources (ISO 639-2)}} ::{{code|lang=css|.cs1-prop-interwiki-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another language Wikipedia ::{{code|lang=css|.cs1-prop-interproj-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another MediaWiki project ::{{code|lang=css|.cs1-prop-location-test {}|}} – {{cl|CS1 location test‎}} ::{{code|lang=css|.cs1-prop-long-vol {}|}} – {{cl|CS1: long volume value}} ::{{code|lang=css|.cs1-prop-script {}|}} – subcategories of {{cl|CS1 uses foreign language script‎}} ::{{code|lang=css|.cs1-prop-tracked-param {}|}} – subcategories of {{cl|CS1 tracked parameters}} ::{{code|lang=css|.cs1-prop-unfit {}|}} — {{cl|CS1: unfit URL}} ::{{code|lang=css|.cs1-prop-year-range-abbreviated {}|}} – {{cl|CS1: abbreviated year range‎}} <section end="prop_cat_highlight_help_text" /> ==Most common errors== This is a list of the ten most-populated cs1|2 error categories ordered by page count. {{#invoke:cs1 documentation support|most_common_error_cats}} {{See also|Category:CS1 errors|Category:CS1 maintenance}} ==<span id="accessdate_missing_url">|access-date= requires |url= </span>== <section begin="accessdate_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_accessdate_missing_url}} The {{para|access-date}} is the date that the online resource addressed by {{para|url}} was added to the article. If {{para|access-date}} has been included in the citation without {{para|url}} then this message appears. If the citation does not use a web link, then {{para|access-date}} is redundant and should be removed. When the online resource has a publication or other fixed date associated with it, {{para|access-date}} is of limited value though may be useful in identifying an appropriate archived version of the resource. Without {{para|url}}, {{para|access-date}} is not considered useful. To resolve this error, provide a value for {{para|url}} or remove {{para|access-date}}. Editors should try to determine why the citation has {{para|access-date}} without {{para|url}}. For example, the citation may never have had a {{para|url}}, or {{para|url}} may have been removed because it links to a site that violates the creator's copyright (see [[WP:COPYLINK]]), or because {{para|url}} was deemed to be dead. If the citation never had {{para|url}} or it was removed for copyright violations, remove {{para|access-date}}. When a dead {{para|url}} has been removed, restore the {{para|url}} and if possible repair it (see [[WP:LINKROT]]). Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_accessdate_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="accessdate_missing_url_help_text" /> ==<span id="archive_date_url_ts_mismatch">|archive-date= / |archive-url= timestamp mismatch</span>== <section begin="archive_date_url_ts_mismatch_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_date_url_ts_mismatch}} Archive.org URLs have a 14-digit snapshot timestamp. This error message is displayed when the archive snapshot date is not the same as the date stated in {{para|archive-date}}. To resolve this error, make sure that {{para|archive-url}} and {{para|archive-date}} refer to the same snapshot. This could mean that values assigned to either or both parameters need to be updated. To get the correct {{para|archive-date}} value, view the archived page's source, looking for a line near the bottom that starts with "FILE ARCHIVED ON". The archive date should appear on that line. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_date_url_ts_mismatch|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_date_url_ts_mismatch_help_text" /> Pages with this error in the tracking category can be fixed by the bot [[WP:WAYBACKMEDIC]]. Requests to run the bot can be made at [[WP:URLREQ]]. ==<span id="archive_date_missing_url">|archive-date= requires |archive-url= </span>== <section begin="archive_date_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_date_missing_url}} {{para|archive-date}}, identifies the date that the web resource was archived. Without a matching {{para|archive-url}} parameter, {{para|archive-date}} is meaningless. To resolve this error, provide a value for {{para|archive-url}} or remove {{para|archive-date}} Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_date_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_date_missing_url_help_text" /> ==<span id="archive_url">|archive-url= is malformed </span>== <section begin="archive_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_url|$1=&lt;reason>}} Archive.org allows a variety of URLs to access snapshots of an archived page. Some of these are: : <code><nowiki>https://web.archive.org/web/YYYYMMDD</nowiki><wbr /><nowiki>hhmmss/http://www.example.com</nowiki></code> – a single snapshot; this is the preferred form for use with {{para|archive-url}} : <code><nowiki>https://web.archive.org/web/*/http://</nowiki><wbr />www.example.com</code> – a wildcard search results page; useful for locating an appropriate snapshot but not appropriate in a citation : <code><nowiki>https://web.archive.org/web/</nowiki><wbr />201603/<nowiki>http://www.example.com</nowiki></code> – incomplete timestamp; archive.org returns the most recent snapshot : <code><nowiki>https://web.archive.org/save/http://</nowiki><wbr />www.example.com</code> – saves a new snapshot of the current target; do not use this form There are two forms of the basic URL: : <code><nowiki>https://web.archive.org/</nowiki><''timestamp''>/...</code> – the old form : <code><nowiki>https://web.archive.org</nowiki>/'''web/'''<''timestamp''><''flags''>/...</code> – the new form The error message identifies the reason for the message. The reasons are: : {{error-small|save command}} – the archive.org URL is the save command : {{error-small|path}} – '''web/''' was expected but something else was found : {{error-small|timestamp}} – the timestamp portion of the URL path is: :* not 14 digits :* not a valid date (time portion of the timestamp is not checked): :**year farther into the future than next year :**year is earlier than archiver launch date of 1996 for archive.org :**month is not in the range [01–12] :**day is not in the range [01 – [28|29|30|31]] (as appropriate for the year and month) : {{error-small|flag}} – the flag portion of the URL path (if present; new form URLs only) is not 2 lowercase letters followed by an underscore: 'id_' : {{error-small|liveweb}} – <code>liveweb.archive.org</code> is a deprecated form of the domain name When the archive.org URL has any of these errors, Module:Citation/CS1 does not link to archive.org in normal article view and emits an appropriate error message. However, in article preview mode, the module creates a modified link to archive.org that uses a partial timestamp with <code>*</code> wildcard suffix. This new URL links to an archive.org calendar view so that editors may more easily select a suitable archived snapshot from those available at archive.org to fix the malformed {{para|archive-url}} link. (If no snapshots have been archived at archive.org, and the cited page is still live, this link also allows editors to save the first snapshot of the page at archive.org.) To resolve this error, choose the URL of an appropriate snapshot from those held at archive.org. [https://archive.org/web/ Search for the target URL] at archive.org. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_url_help_text" /> ==<span id="archive_missing_date">|archive-url= requires |archive-date= </span>== <section begin="archive_missing_date_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_date}} {{para|archive-date}}, identifies the date that the web resource was archived. To resolve this error, provide a value for {{para|archive-date}} (see acceptable date formats in [[MOS:DATEFORMAT]]). For web resources archived at archive.org,<ref name="archive.org" /> the archival date can be found in the {{para|archive-url}}; for resources archived at webcitation.org,<ref name="webcitation.org" /> the cache date is included in the archive header. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_missing_date_help_text" /> ==<span id="archive_missing_url">|archive-url= requires |url= </span>== <section begin="archive_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_url}} A properly formatted citation that includes {{para|archive-url}} and {{para|archive-date}} requires {{para|url}}. When the citation includes {{para|url-status|live}}, the ordering of elements in the rendered citation is changed to put the original URL first. To resolve this error, provide a value for {{para|url}}. For web resources archived at archive.org,<ref name="archive.org" /> the original URL can be found in the {{para|archive-url}} value; for resources archived at webcitation.org,<ref name="webcitation.org" /> the original URL is included in the archive header. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_missing_url_help_text" /> ==<span id="arxiv_missing">|arxiv= required</span>== <section begin="arxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_arxiv_missing}} {{tlx|cite arXiv}} requires one, but not both, of the identifier parameters {{para|arxiv}} or {{para|eprint}} to specify an [[arXiv]] identifier. To resolve this error, ensure that the template has {{para|arxiv}} or {{para|eprint}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_arxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="arxiv_missing_help_text" /> ==<span id="asintld_missing_asin">|asin-tld= requires |asin=</span>== <section begin="asintld_missing_asin_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_asintld_missing_asin|$1=asin-tld}} When {{para|asin-tld}} is used in a CS1|2 template, {{para|asin}} (with value) must also be present. To resolve this error, either add the missing ASIN or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_asintld_missing_asin|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="asintld_missing_asin_help_text" /> ==<span id="biorxiv_missing">|biorxiv= required</span>== <section begin="biorxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_biorxiv_missing}} {{tlx|cite bioRxiv}} requires the identifier parameter {{para|biorxiv}}. To resolve this error, ensure that the template has {{para|biorxiv}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_biorxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="biorxiv_missing_help_text" /> ==<span id="chapter_ignored">|chapter= ignored</span>== <section begin="chapter_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_chapter_ignored|$1=chapter}} {{cs1}} templates {{tlx|cite web}}, {{tlx|cite news}}, {{tlx|cite journal}}, {{tlx|cite magazine}}, {{tlx|cite press release}}, {{tlx|cite podcast}}, {{tlx|cite newsgroup}}, as well as template {{tlx|citation}} when it uses {{para|work}} or any of its aliases, do not support {{para|chapter}} and its components {{para|trans-chapter}}, {{para|script-chapter}}, {{para|chapter-url}}, and {{para|chapter-format}}. The alias parameters {{para|contribution}}, {{para|entry}}, {{para|article}}, {{para|section}}, and their components, are similarly not supported. To resolve this error: * use a more appropriate citation template (such as {{tl|cite book}} or {{tl|cite encyclopedia}}), or * place the content of the {{para|chapter}} parameter in {{para|title}}, or * for {{tl|cite news}}, {{para|department}} can be used to give the name of the newspaper's section, such as "Obituaries", or * for {{tl|citation}}, remove {{para|work}} or its aliases such as {{para|website}} and place their content in {{para|title}} if appropriate * move the content of the {{para|chapter}} parameter out of the template, before the closing <nowiki></ref></nowiki> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_chapter_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="chapter_ignored_help_text" /> ==<span id="invisible_char">&lt;char> character in |&lt;param>= at position ''n''</span>== <section begin="invisible_char_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&lt;char> character|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>|$3={{var|n}}}} This error is reported for citations with parameter values that contain invisible or non-printable characters known as [[control character]]s; the error includes the position at which the character can be found. [[Module:Citation/CS1]] detects parameter values that contain any of these characters: * [[non-breaking space]], U+00A0 * [[soft hyphen]], U+00AD * [[replacement character]], U+FFFD * [[hair space]], U+200A * [[zero-width space]], U+200B * [[zero-width joiner]], U+200D (note that these are permitted as part of emoji modifiers; see note below) * [[horizontal tab]], U+0009 (HT) * [[line feed]], U+0010 (LF) * [[carriage return]], U+0013 (CR) * [[delete character]], U+007F (DEL) * [[C0 and C1 control codes|C0 control]], U+0000–U+001F (NULL–US) * [[C0 and C1 control codes|C1 control]], U+0080–U+009F (XXX–APC) To resolve invisible-character errors, remove or replace the identified character. Most intentional white-space characters should be replaced with a normal space character (i.e. press your keyboard's space bar). See [[MOS:NBSP]] for guidance on insertion of intentional non-breaking spaces. Because these characters are mostly invisible, the error message identifies the character's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted. If you move through the citation with the arrow keys then the cursor may stand still once at an invisible character, which can be removed with {{keypress|Delete}} or {{keypress|Backspace}}. If you copy-paste a string to the "Characters" field at https://r12a.github.io/app-conversion/ and click "View in UniView" then the position and name of all characters is shown. [[Zero-width joiner]] characters (U+200D) are used as a valid part of emoji modification (for example, adding a skull emoji to a flag emoji to create a pirate flag emoji). When new modifiers are added to the emoji character set, which happens one or two times per year, those modifiers need to be added to the Citation Style 1 "Configuration" module. Editors can request this addition at [[Help talk:Citation Style 1]]. {{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&lt;name> stripmarker|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>|$3={{var|n}}}} [[Help:Strip markers|Strip markers]] are special sequences of characters that [[MediaWiki]] inserts as a place-holder for certain [[XML]]-like tags. These tags include {{tag|gallery}}, {{tag|math}}, {{tag|nowiki}}, {{tag|pre}}, and {{tag|ref}}. The strip markers are replaced with content before the final page rendering. The module ignores math and nowiki strip markers. To resolve strip marker errors, remove or replace the identified tag. The error message identifies the strip marker's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted when calculating the position. Strip marker errors can also be caused by unsupported additional text or templates in parameter values{{mdash}}for example, {{tl|ISBN}} in {{para|title}}. Resolve the problem by moving the extraneous text outside the citation template, or by removing the extraneous text or template markup, as appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invisible_char|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invisible_char_help_text" /> ==<span id="bad_arxiv">Check |arxiv= value</span>== <section begin="bad_arxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_arxiv}} When {{cs1}} and {{cs2}} templates contain {{para|arxiv}}, a test is done to see if the [[arXiv]] identifier conforms with the arXiv identifier scheme.<ref>{{cite web |url=https://arxiv.org/help/arxiv_identifier |title=Understanding the arXiv identifier |website=[[Cornell University Library]] |access-date=2014-08-20|archive-url=http://web.archive.org/web/20150102034251/https://arxiv.org/help/arxiv_identifier|archive-date=2015-01-02}}</ref> The identifier is checked for a valid number of digits in the article id; valid year and month values; and properly-placed hyphens, slashes, and dots. To resolve this error, ensure that the {{para|arxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_arxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_arxiv_help_text" /> ==<span id="bad_asin">Check |asin= value</span>== <section begin="bad_asin_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_asin}} When {{cs1}} and {{cs2}} templates contain {{para|asin}}, a test is done to see if the [[ASIN]] identifier contains ten upper-case alphanumeric characters without punctuation or spaces and that if the first character is numeric, that the ASIN conforms to the rules for a ten-digit [[ISBN]]. To resolve this error, ensure that the {{para|asin}} value is correct. If the {{para|asin}} value is correct and all-numeric, use {{para|isbn}} instead and delete any {{para|asin-tld}} parameters. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_asin|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_asin_help_text" /> ==<span id="bad_asin_tld">Check |asin-tld= value</span>== <section begin="bad_asin-tld_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_asin_tld}} {{cs1}} and {{cs2}} templates contain a test for known {{para|asin-tld}} values to specify the [[top-level domain]] (TLD) of a given [[ASIN]] identifier link. The list of currently supported values is: <section begin="asin-tld_values_list" /><code>ae</code>, <code>au</code>, <code>br</code>, <code>ca</code>, <code>cn</code>, <code>de</code>, <code>es</code>, <code>fr</code>, <code>in</code>, <code>it</code>, <code>jp</code>, <code>mx</code>, <code>nl</code>, <code>pl</code>, <code>sa</code>, <code>se</code>, <code>sg</code>, <code>tr</code>, <code>uk</code><section end="asin-tld_values_list" /> It is not necessary to provide {{para|asin-tld}} to specify the default (United States). If you want to specify this condition explicitly, a pseudo-value of <code>us</code> can be given to denote this. All these values are automatically resolved to the correct TLD following one of the schemes <code>''nn''</code>, <code>com.''nn''</code>, <code>co.''nn''</code>, <code>z.''nn''</code>, and <code>com</code>. If an unsupported value is encountered, the template will issue this error message. To resolve this error, ensure that the {{para|asin-tld}} value is correct. If the value is correct, please report this at [[Help talk:Citation Style 1]], so that it can be added to the list of supported values. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_asin_tld|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_asin-tld_help_text" /> ==<span id="bad_bibcode">Check |bibcode= &lt;message></span>== <section begin="bad_bibcode_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_bibcode|$1=&lt;message>}} When {{cs1}} and {{cs2}} templates contain {{para|bibcode}}, a test is done to see if the [[bibcode]] identifier has the proper format.<ref>{{cite web |title=Bibcodes |url=https://ui.adsabs.harvard.edu/help/actions/bibcode |website=ADS news, blogs, and help pages |publisher=The SAO Astrophysics Data System |access-date=2025-10-21 |date=2015-02-09}}</ref> Bibcodes are expected to match these requirements: : length must be 19 characters (&lt;message> = '<span class="error" style="font-size:100%">length</span>') : characters in position(s): (except as specified otherwise, violations produce '<span class="error" style="font-size:100%">value</span>' in the &lt;message> portion of the error message): :: 1–4 must be digits and must represent a year in the range of 1000 – next year (&lt;message> = '<span class="error" style="font-size:100%">year</span>') :: 5 must be a letter :: 6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. (&lt;message> = '<span class="error" style="font-size:100%">journal</span>')) :: 9–18 must be letter, digit, or dot :: 19 must be a letter or dot To resolve this error, ensure that the {{para|bibcode}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_bibcode|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_bibcode_help_text" /> ==<span id="bad_biorxiv">Check |biorxiv= value</span>== <section begin="bad_biorxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}} When {{cs1}} and {{cs2}} templates contain {{para|biorxiv}}, a test is done to see if the [[bioRxiv]] identifier has the proper form. There are two valid forms, each beginning with bioRxiv's doi directory indicator and registrant code (10.1101 or 10.64898) and followed by: : six numeric characters without punctuation or spaces: ::{{para|biorxiv|10.1101/######}} ::: <code>######</code> – 6-digit bioRxiv identifier : ymd format date prefix followed by six numeric characters without punctuation or spaces followed by optional version: :: {{para|biorxiv|10.1101/yyyy.mm.dd.######v#}} where: ::: <code>yyyy.mm.dd.</code> – represents a date no earlier than 11 December 2019 (<code>2019.12.11.</code>) and no later than tomorrow's date; date must be a valid date ::: <code>######</code> – 6-digit bioRxiv identifier ::: <code>v#</code> – optional version indicator A common error is to include the bioRxiv ''URL'' (<code>{{red|<nowiki>https://dx.doi.org/</nowiki>}}10.1101/######}}</code>). To resolve this error, ensure that the {{para|biorxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_biorxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_biorxiv_help_text" /> ==<span id="bad_citeseerx">Check |citeseerx= value</span>== <section begin="bad_citeseerx_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_citeseerx}} When {{cs1}} and {{cs2}} templates contain {{para|citeseerx}}, a test is done to see if the [[CiteSeerX]] identifier has the proper format. The expected identifier is the value assigned to the <code>?doi=</code> query key in the URL of a CiteSeerX document. (This query key should not be confused with a [[Digital Object Identifier]]: it should not be input as {{para|doi}}.) For instance, if you want to link to <code>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.220.7880</code>, use {{para|citeseerx|10.1.1.220.7880}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_citeseerx|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_citeseerx_help_text" /> ==<span id="bad_date">Check date values in: |&lt;param1>=, |&lt;param2>=, ...</span>== <section begin="bad_date_help_text" />{{help desk}} {{plainlist}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_date|$1=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, ...}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_date|$1=<code class="cs1-code">{{pipe}}year=</code> / <code class="cs1-code">{{pipe}}date=</code> mismatch}} {{endplainlist}} When {{cs1}} and {{cs2}} templates contain date-holding parameters, an automated test is done to see if the dates are real dates that comply with a [[Help:Citation_Style_1#Date format compliance with Wikipedia's Manual of Style|subset of the date rules]] in Wikipedia's Manual of Style, specifically checking for violations of [[Wikipedia:Manual of Style/Dates and numbers#Dates and years|MOS:DATEFORMAT]]. To resolve this error, ensure that the date is an actual date and that the date format follows the [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]] in the named parameter. See [[Help:CS1 errors#ExamplesOfUnacceptableDates|examples of unacceptable dates and how to fix them]], below. Or, some conceptual issues to look for: * impossible dates, such as 29 February 2011 (2011 was not a leap year) * {{para|access-date}} must specify a day, not just a month or year * {{para|archive-date}} must specify a whole date * misplaced, incorrect, or extraneous punctuation * misplaced, incorrect, or extraneous spacing * extra or missing zeros, such as June 06 instead of June 6 * extraneous text * hyphens or slashes instead of en dashes in date ranges (en dashes are required) * misspelling or improper capitalization (see [[MOS:ALLCAPS]] for more detail that is not in [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]]) * other unacceptable date formats listed in [[MOS:BADDATEFORMAT]] * more than one date in a date-holding parameter * days of the week (such as Monday, June 6 instead of June 6) * years before 100 AD, including BCE/BC dates. Try using parameter {{para|orig-date}} instead. See [[Help:Citation_Style_1#CS1_compliance_with_Wikipedia.27s_Manual_of_Style|Help: Citation Style 1]] for information about limitations in the CS1 citation templates' handling of date formats. [[WP:DATERANGE|The MOS section on date ranges]] describes how to separate dates in a date range. Do not use <code>&amp;nbsp;</code>, <code>&amp;ndash;</code>, or {{tlx|spaced ndash}} as these corrupt the metadata. To add an en dash, use the [[Help:CharInsert#Insert|CharInsert]] edit tool or see [[Wikipedia:How to make dashes]]. You may also copy and paste this one: &ndash;. A bot is often able to correct the separator, provided the overall format is unambiguous. Future dates in {{para|date}} in CS1|2 citations are limited to current year + 1; that is, for {{#time:Y}}, citation dates in {{#time:Y|now +1 year}} are acceptable but citation dates in {{#time:Y|now +2 year}} and beyond are not. Dates prior to 1582 are treated as [[Julian calendar]] dates. Dates from 1582 onward are treated as [[Gregorian calendar]] dates. The Julian calendar was used in some places until approximately 1923. Three Julian calendar dates in the overlap period, 29 February in the years 1700, 1800, and 1900, will cause this error message because those years are not leap years in the Gregorian calendar. The access date (in {{para|access-date}}) is checked to ensure that it contains a full date (day, month, and year) and is between 15 January 2001 (the founding date of Wikipedia) and today's date plus one day, because it represents the date that an editor viewed a web-based source to verify a statement on Wikipedia. Because editors may be in time zones that are one day ahead of the UTC date, one extra day is accepted. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_date_help_text" /> {{anchor|Date Fix Table|Dates|DateFixTable}} {{anchor|ExamplesOfUnacceptableDates}} {| class="wikitable" |+ Examples of unacceptable dates and how to fix them |- ! Issue !! Unacceptable !! Acceptable |- | Hyphen in date range (use en dash) || {{para|plain=y|date|2002{{red|-}}2003}} || {{para|plain=y|date|2002{{green|–}}2003}} |- | Slash in date range (use en dash) || {{para|plain=y|date|2002{{red|/}}2003}} or {{para|plain=y|date|July{{red|/}}August 2003}}||{{para|plain=y|date|2002{{green|–}}2003}} or {{para|plain=y|date|July{{green|–}}August 2003}} |- | Hyphen in date range (use en dash) || {{para|plain=y|date|April{{red|-}}May 2004}} || {{para|plain=y|date|April{{green|–}}May 2004}} |- | Missing space around en dash for range of full dates || {{para|plain=y|date|April 2003{{red|–}}May 2004}} || {{para|plain=y|date|April 2003 {{green|–}} May 2004}} |- | Month capitalization || {{para|plain=y|date|28 {{red|f}}ebruary 1900}} || {{para|plain=y|date|28 {{green|F}}ebruary 1900}} |- | Month capitalization || {{para|plain=y|date|28 F{{red|EBRUARY}} 1900}} || {{para|plain=y|date|28 F{{green|ebruary}} 1900}} |- | Season capitalization || {{para|plain=y|date|{{red|s}}pring 2011}} || {{para|plain=y|date|{{green|S}}pring 2011}} |- | Future date (typo) || {{para|plain=y|date|2{{red|10}}2}} || {{para|plain=y|date|2{{green|01}}2}} |- | Access date in future (see note above) || {{para|plain=y|access-date|{{red|{{day+1|{{day+1}}}}, {{CURRENTYEAR}}}}}} || {{para|plain=y|access-date|{{Currentmonthday}}, {{CURRENTYEAR}}}} |- | Access date impossibly far in the past (typo) || {{para|plain=y|access-date|1 January 20{{red|01}}}} || {{para|plain=y|access-date|1 January 20{{green|10}}}} |- | Access date only specifies month || {{para|plain=y|access-date|{{red|January}} 2015}} || {{para|plain=y|access-date|{{green|12 January}} 2015}} |- | Ambiguous date range or year and month || {{para|plain=y|date|2002-{{red|03}}}} || {{plainlist| * {{para|plain=y|date|2002–{{green|20}}03}} * {{para|plain=y|date|{{green|March}} 2002}}}} |- | Bad abbreviation || {{para|plain=y|date|{{red|Febr.}} 28, 1900}} || {{plainlist| * {{para|plain=y|date|{{green|Feb}} 28, 1900}} * {{para|plain=y|date|{{green|February}} 28, 1900}}}} |- | Nonexistent date || {{para|plain=y|date|{{red|February 29, 1900}}}} || |- | Undated || {{para|plain=y|date|{{red|Undated}}}} || {{para|plain=y|date|{{green|n.d.}}}} |- | Comma in month and year || {{para|plain=y|date|February{{red|,}} 1900}} || {{para|plain=y|date|February 1900}} |- | Comma in season || {{para|plain=y|date|Winter{{red|,}} 1900–1901}} || {{para|plain=y|date|Winter 1900–1901}} |- | Missing comma in format which requires it || {{para|plain=y|date|{{red|February 28 1900}}}} || {{para|plain=y|date|February 28{{green|,}} 1900}} or {{para|plain=y|date|28 February 1900}} or {{para|plain=y|date|1900-02-28}} |- | Non-date text || {{para|plain=y|date|2008{{red|, originally 2000}}}} || {{para|plain=y|date|2008}} {{green|{{para|plain=y|orig-date|2000}}}} |- | Zero-padding || {{para|plain=y|date|January {{red|04}}, 1987}} || {{para|plain=y|date|January {{green|4}}, 1987}} |- | Date with slashes || {{para|plain=y|date|12{{red|/}}6{{red|/}}87}} || {{para|plain=y|date|{{green|December 6, 19}}87}} or {{para|plain=y|date|{{green|6 December 19}}87}} or {{para|plain=y|date|{{green|1987-12-06}}}}<br/>or<br/>{{para|plain=y|date|{{green|12 June 19}}87}} or {{para|plain=y|date|{{green|June 12, 19}}87}} or {{para|plain=y|date|{{green|1987-06-12}}}} |- | Two-digit year || {{para|plain=y|date|{{red|87}}-12-06}} || {{para|plain=y|date|{{green|19}}87-12-06}} |- | One-digit month or day || {{para|plain=y|date|2007-{{red|3}}-{{red|6}}}} || {{para|plain=y|date|2007-{{green|03}}-{{green|06}}}} |- | Wikified date || {{para|plain=y|date|{{red|<nowiki>[[</nowiki>}}April 1{{red|<nowiki>]]</nowiki>}}, {{red|<nowiki>[[</nowiki>}}1999{{red|<nowiki>]]</nowiki>}} }} || {{para|plain=y|date|{{green|April 1, 1999}}}} |- | "mm-dd-yyyy" or "dd-mm-yyyy" date format || {{para|plain=y|date|{{red|07-12-}}2009}} || {{para|plain=y|date|{{green|7 December}} 2009}} or {{para|plain=y|date|{{green|12 July}} 2009}}<br />or<br />{{para|plain=y|date|{{green|July 12,}} 2009}} or {{para|plain=y|date|{{green|December 7,}} 2009}}<br />or <br />{{para|plain=y|date|2009-{{green|07-12}}}} or {{para|plain=y|date|2009-{{green|12-07}}}} |- | Quarters || {{para|plain=y|date|{{red|3Q}} 1984}} or {{para|plain=y|date|{{red|3rd Qtr.,}} 1984}} or {{para|plain=y|date|{{red|Third quarter}} 1984}} || {{para|plain=y|date|{{green|Third Quarter}} 1984}} |- | Named dates || {{para|plain=y|date|{{red|Xmas}} 1984}} or {{para|plain=y|date|{{red|christmas}} 1984}} || {{para|plain=y|date|{{green|Christmas}} 1984}} |- | Approximate or uncertain dates || {{para|plain=y|date|{{red|circa}} 1970}} or {{para|plain=y|date|{{red|<nowiki>{{circa}}</nowiki>}} 1970}} || {{para|plain=y|date|{{green|c.}} 1970}} |- |} ==<span id="bad_doi">Check |doi= value</span>== <section begin="bad_doi_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_doi}} When {{cs1}} and {{cs2}} templates contain {{para|doi}}, a test is done to see if the prefix portion of the [[Digital object identifier|DOI]] value is correctly formatted and has what appears to be a valid registrant code. A proper DOI prefix begins with the <code>10.</code> directory indicator. The remaining portion of the prefix is a string of digits and the dot character which form the registrant code. When the directory indicator is <code>10.</code>, the CS1|2 templates test for a valid registrant code. Valid registrant codes: * must be composed of digits * must be in the range: ** 1000–9999 ** 10000–89999 * may have one or more subcodes that begin with a dot followed by digits (1000.10) * must not be 5555 (invalid/temporary/test) Additionally, the {{para|doi}} value is checked to make sure that it does not contain spaces, en dashes, does not end with punctuation. Further validation of the DOI is not performed. Do not include the <code><nowiki>https://doi.org/</nowiki></code> scheme and domain name from a URL. A proper {{para|doi}} value looks like {{para|doi|10.1103/PhysRevLett.80.904}}. To resolve this error, ensure that the {{para|doi}} value is correct. In very rare cases, publishers have released works with a DOI deviating from the standard form. If you are certain that such a non-conforming DOI truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. (Do not use this markup for DOIs which are ''inactive'' rather than ''non-conforming''. Instead, use {{para|doi-broken-date}} for them.) Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_doi|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_doi_help_text" /> ==<span id="bad_hdl">Check |hdl= value</span>== <section begin="bad_hdl_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_hdl}} When {{cs1}} and {{cs2}} templates contain {{para|hdl}}, a test is done to see if the [[Handle System|hdl]] value looks like a properly defined value. The {{para|hdl}} value is checked to make sure that it does not contain spaces or en dashes and does not end with punctuation. Further validation of the hdl is not performed. To resolve this error, ensure that the {{para|hdl}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_hdl|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_hdl_help_text" /> ==<span id="bad_isbn">Check |isbn= value</span>== <section begin="bad_isbn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_isbn|$1=&lt;type>}} {{cs1}} and {{cs2}} templates that contain {{para|isbn}} are checked to ensure that the [[ISBN]] is the proper length (ten or thirteen digits), that the ISBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISBN specification. Only one ISBN is allowed in this field because the whole {{para|isbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISBN, or characters that are not part of the ISBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]]. (If relevant, they can be specified using {{para|id|{{tlp|ISBN|...}}}} instead.) The error message &lt;type> indicator can be: : {{error-small|length}} – ISBN is not 10 or 13 digits : {{error-small|checksum}} – ISBN has one or more incorrect digits; look for typos and transposition : {{error-small|invalid character}} – ISBN has one or more 'digits' that is not in the allowed set appropriate to ISBN length : {{error-small|invalid prefix}} – 13-digit ISBNs must begin with '978' or '979' : {{error-small|invalid form}} – 10-digit ISBNs with the mis-positioned 'X' character : {{error-small|invalid group id}} – 13-digit ISBN begins with '9790'; this prefix / group ID combination is reserved to [[ISMN]] To resolve this error, ensure that the {{para|isbn}} value is correct, that only one ISBN is used, that the proper optional separators are used, and that no other text is included. Use the ISBN printed on the work rather than one retrieved from third-party sources. If ''both are available'', use the 13-digit ISBN. When a 10-digit ISBN is used, if the check digit is a lowercase 'x', change it to an uppercase 'X'. * '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the ISBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere). * If you only have a 10-digit ISBN, '''do''' use the number as-is, do not try to convert it to the 13-digit form. * If the ISBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for ISBNs. It is not uncommon for the ISBN to be misprinted in the front matter but correct on the cover. * '''Do''' preview your edit and check that the new ISBN does now link to the correct source. * Bad ISBNs are a [[Wikipedia:Signs_of_AI_writing#Invalid DOI and ISBNs|possible indicator of LLM-generated text]]. '''Do''' consider reviewing the surrounding text, the entire article, or recent edits to that article for AI [[Hallucination (artificial intelligence)|hallucinations]] and [[Wikipedia:Signs_of_AI_writing|other hallmarks of LLM generation]]. In very rare cases, publishers have released books with malformed ISBNs. If you are certain that a non-conforming ISBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected ISBN. Use a corrected ISBN when possible. Sometimes there are numbers assigned to {{para|isbn}} that appear to be legitimate – length is right, check digit is correct – but that aren't true ISBN numbers. This [http://isbn.org/ISBN_converter tool] may be helpful. See also [[Wikipedia:ISBN]]. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_isbn|pages=yes}}.<ref group="lower-alpha" name="categories" /><!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISBN, and #ifeq: --><section end="bad_isbn_help_text" /> ==<span id="bad_ismn">Check |ismn= value</span>== <section begin="bad_ismn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ismn}} {{cs1}} and {{cs2}} templates that contain {{para|ismn}} are checked to ensure that the [[ISMN]] is the proper length (thirteen digits), that the ISMN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISMN specification. Only one ISMN is allowed in this field because the whole {{para|ismn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISMN, or characters that are not part of the ISMN, corrupt the COinS metadata. (If relevant, they can be specified using {{para|id|{{tlp|ISMN|...}}}} instead.) To resolve this error, ensure that the {{para|ismn}} value is correct, that only one ISMN is used, that the proper optional separators are used, and that no other text is included. Make sure that the ISMN contains exactly 13 digits. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ismn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ismn_help_text" /> ==<span id="bad_issn">Check |issn= value</span>== <section begin="bad_issn_help_text" />{{help desk}} {{plainlist}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} {{endplainlist}} {{cs1}} and {{cs2}} templates that contain {{para|issn}} and/or {{para|eissn}} are checked to ensure that the [[ISSN]] is the proper length (eight digits) and that the final [[check digit]] validates according to the ISSN specification. Only one each of ISSN and eISSN is allowed in this field because the whole {{para|issn}} and {{para|eissn}} values are included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. (If relevant, they can be specified using {{para|id|{{tlp|ISSN|...}} {{tlp|EISSN|...}}}} instead.) The ISSN and eISSN are always rendered as two four-digit numbers separated with a hyphen. To resolve this error, ensure that the {{para|issn}} and {{para|eissn}} values are correct, that only one value per parameter is used, and that no other text is included (allowable characters are 0–9, X, and -). If the check-digit is a lowercase 'x', change it to an uppercase 'X'. It may also be worth checking an actual [[hyphen]] (-) has been used, and not a hyphen-like character like an [[endash]] (–). In very rare cases, publishers have released works with a malformed identifier. If you are certain that a non-conforming identifier truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In some cases, works may have been reissued with a corrected identifier. Use the corrected one when possible. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_issn|pages=yes}}.<ref group="lower-alpha" name="categories" /><!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISSN, and #ifeq: --><section end="bad_issn_help_text" /> ==<span id="bad_jfm">Check |jfm= value</span>== <section begin="bad_jfm_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_jfm}} When {{cs1}} and {{cs2}} templates contain {{para|jfm}}, a test is done to see if the [[Jahrbuch über die Fortschritte der Mathematik|JFM]] identifier value looks like a properly defined value. The {{para|jfm}} identifier is checked to make sure that it has the form: <code>nn.nnnn.nn</code> where <code>n</code> is any digit 0–9. Further validation of the JFM identifier is not performed. To resolve this error, ensure that the {{para|jfm}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_jfm|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_jfm_help_text" /> ==<span id="bad_jstor">Check |jstor= value</span>== <section begin="bad_jstor_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_jstor}} When {{cs1}} and {{cs2}} templates contain {{para|jstor}}, a test is done to see if the [[JSTOR (identifier)|JSTOR]] identifier value looks like a properly defined value. Error messages are emitted when the assigned value has some form of the string 'jstor' (case-agnostic), or has a URI scheme (<code>http://</code> or <code>https://</code>), or has any space characters. To resolve this error, ensure that the {{para|jstor}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_jstor|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_jstor_help_text" /> ==<span id="bad_lccn">Check |lccn= value</span>== <section begin="bad_lccn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_lccn}} The {{para|lccn}} parameter is for the [[Library of Congress Control Number]] identifier. It is checked to ensure that the identifier is the proper length and has the correct initial digits. LCCN is a character string 8–12 characters long. The length of the LCCN dictates the character type of the initial 1–3 characters; the rightmost eight are always digits.<ref>{{cite web |url=https://www.loc.gov/marc/lccn-namespace.html#syntax |title=The LCCN Namespace |website=Network Development and MARC Standards Office |publisher=[[Library of Congress]] |date=November 2003}}</ref> {|class="wikitable" |+ LCCN format description ! Length !! Description |- | 8 || all characters are digits |- | 9 || first character is a lower case letter |- | 10|| first two characters are either both lower case letters or both digits |- | 11|| first character is a lower case letter, second and third characters are either both lower case letters or both digits |- | 12|| first two characters are both lower case letters |- |} Further validation is not performed. To resolve this error, ensure that the {{para|lccn}} value is correct and that there are no other letters, punctuation, or other characters. When receiving this error, be on the lookout for publishers who omitted leading zeros in the LCCN following the two or four digit year. For example, an LCCN that is [https://catalog.loc.gov/vwebv/search?searchCode=LCCN&searchArg=92035247&searchType=1&permalink=y properly 92-035427] could be shortened in the printed work to [https://books.google.com/books?id=3ocPU-S9gloC&q=35247 92-35247]. When experimenting with inserting omitted zeroes, cross-check the finished number against the LCCN permalinks online. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_lccn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_lccn_help_text" /> ==<span id="bad_medrxiv">Check |medrxiv= value</span>== <section begin="bad_medrxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_medrxiv}} When {{cs1}} and {{cs2}} templates contain {{para|medrxiv}}, a test is done to see if the [[medRxiv]] identifier has the proper form. The medRxiv identifier begins with medRxiv's doi directory indicator and registrant code (10.1101 or 10.64898) and followed by: : ymd format date prefix followed by eight numeric characters without punctuation or spaces followed by optional version: :: {{para|medrxiv|10.1101/yyyy.mm.dd.########v#}} where: ::: <code>yyyy.mm.dd.</code> – represents a date no earlier than 1 January 2020 (<code>2020.01.01.</code>) and no later than tomorrow's date; date must be a valid date ::: <code>########</code> – 8-digit medRxiv identifier ::: <code>v#</code> – optional version indicator A common error is to include the medRxiv ''URL'' (<code>{{red|<nowiki>https://dx.doi.org/</nowiki>}}10.1101/yyyy.mm.dd.########}}</code>). To resolve this error, ensure that the {{para|medrxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_medrxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_medrxiv_help_text" /> ==<span id="bad_message_id">Check |message-id= value</span>== <section begin="bad_message_id_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_usenet_id}} The {{para|message-id}} parameter holds the unique identifier associated with a netnews message.<ref>{{cite web |url=https://tools.ietf.org/html/rfc5536 |title=Netnews Article Format |website=[[Internet Engineering Task Force]] |at=[https://tools.ietf.org/html/rfc5536#section-3.1.3 3.1.3] |rfc=5536 |date=November 2009}}</ref> The value in {{para|message-id}} is checked to make sure that it contains <code>@</code> between left and right identifiers. {{para|message-id}} is also checked to make sure that the first character is not <code>&lt;</code> and the last character is not <code>></code>. [[Module:Citation/CS1]] adds the [[URI scheme]] <code>news:</code> to the value in {{para|message-id}}. If the value in {{para|message-id}} is wrapped in <code><...></code> characters, the link created fails. Further validation is not performed. To resolve this error, ensure that the {{para|message-id}} value is correct, that it contains <code>@</code> and is not wrapped in <code><...></code> characters. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_usenet_id|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_message_id_help_text" /> ==<span id="bad_mr">Check |mr= value</span>== <section begin="bad_mr_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_mr}} When {{cs1}} and {{cs2}} templates contain {{para|mr}}, a test is done to see if the [[Mathematical Reviews|MR]] identifier value looks like a properly defined value. The {{para|mr}} identifier is checked to make sure that it contains only digits and that it is no more than seven digits in length. Further validation of the MR identifier is not performed. To resolve this error, ensure that the {{para|mr}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_mr|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_mr_help_text" /> ==<span id="bad_oclc">Check |oclc= value</span>== <section begin="bad_oclc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_oclc}} The {{para|oclc}} parameter is for the [[OCLC]] identifier. Only a single OCLC identifier is allowed. (If relevant, multiple OCLCs can be specified using {{para|id|{{tlp|OCLC|...}}}} instead.) The identifier must be in one of these forms: # prefix <code>ocm</code> followed by 8 digits # prefix <code>ocn</code> followed by 9 digits # prefix <code>on</code> followed by 10 (or more) digits # prefix <code>(OCoLC)</code> followed by a variable number of digits without leading zeros # 1 to 10 (or more) digits without prefix Further validation is not performed. To resolve this error, ensure that the {{para|oclc}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|oclc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. A tip for fixing this error: Editors sometimes place valid [[ISBN]], [[LCCN]], [[ASIN]], or other identifiers in {{para|oclc}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_oclc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_oclc_help_text" /> ==<span id="bad_ol">Check |ol= value</span>== <section begin="bad_ol_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ol}} The {{para|ol}} parameter is for the [[Open Library]] identifier. The identifier is one or more digits followed by a last character that is either <code>A</code> (authors), <code>M</code> (books), or <code>W</code> (works). Further validation is not performed. To resolve this error, ensure that the {{para|ol}} value is correct. Do not include "OL" in the value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ol|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ol_help_text" /> ==<span id="bad_osti">Check |osti= value</span>== <section begin="bad_osti_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_osti}} The {{para|osti}} parameter is for the [[Office of Scientific and Technical Information]] (OSTI) identifier. OSTIs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1018 and {{#invoke:Cs1 documentation support|id_limits_get|osti}}. Further validation is not performed. A common error is to include the OSTI ''URL'' (<code><nowiki>https://dx.doi.org/10.2172/</nowiki>{{red|&lt;{{var|OSTI>}}}}</code>), or the OSTI ''DOI'' (<code>10.2172/{{red|&lt;{{var|OSTI>}}}}</code>). To resolve this error, ensure that the {{para|osti}} value is correct. If the value is correct and lower than 1018 or larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|osti}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_osti|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_osti_help_text" /> ==<span id="bad_paramlink">Check |&lt;param>-link= value</span>== <section begin="bad_paramlink_help_text" />{{help desk}} {{plainlist}} * {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=<code class="cs1-code">&lt;param>-link</code>}} * {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=<code class="cs1-code">&lt;param></code>}} {{endplainlist}} These link-holding parameters and their matching title-/name-holding parameters are combined to create a working [[wikilink]] to a related article. {| class="wikitable" |+Parameters combined to make wikilinks !Link-holding parameter !! title-/name-holding parameter(s) |- | {{para|author-link}}{{dagger}} || {{para|author}}, {{para|last}}, {{para|last}} + {{para|first}} |- | {{para|contributor-link}}{{dagger}} || {{para|contributor}}, {{para|contributor-last}}, {{para|contributor-last}} + {{para|contributor-first}} |- | {{para|editor-link}}{{dagger}} || {{para|editor}}, {{para|editor-last}}, {{para|editor-last}} + {{para|editor-first}} |- | {{para|episode-link}} || {{para|episode}} |- | {{para|interviewer-link}}{{dagger}} || {{para|interviewer}}, {{para|interviewer-last}}, {{para|interviewer-last}} + {{para|interviewer-first}} |- | {{para|series-link}} || {{para|series}} |- | {{para|subject-link}}{{dagger}} || {{para|subject}} |- | {{para|title-link}} || {{para|title}} |- | {{para|translator-link}}{{dagger}} || {{para|translator}}, {{para|translator-last}}, {{para|translator-last}} + {{para|translator-first}} |- |colspan="2"|{{dagger}} Parameters checked for this error may also have the enumerated forms: {{para|author-link{{var|n}}}} or {{para|author{{var|n}}-link}} etc. |} This error occurs when any of these {{para|&lt;param>-link}} parameters contain a wikilink or a URL, or they contain any of the characters not permitted in Wikipedia article titles per [[WP:TITLESPECIALCHARACTERS]] (except <code>_</code> (underscore), used as a replacement for spaces, and <code>#</code>, used as a [[fragment identifier]] when linking to article sections). The prohibited characters are: <code>&lt; > [ ] | { }</code>. The {{para|&lt;param>-link}} parameter value should contain only the title of a Wikipedia article or a link to a section of a Wikipedia article. [[Module:Citation/CS1]] checks the {{para|&lt;param>-link}} parameter values for wikimarkup and for a [[URI scheme]] (<code>http://</code>, <code>https://</code>, the protocol relative scheme <code>//</code>, etc.). Interlanguage links in any of the {{para|&lt;param>-link}} parameters require a leading colon: : <code><nowiki>:fr:Période d'exil de Caravage</nowiki></code> While primarily intended to catch the errors mentioned above, Module:Citation/CS1 will also catch malformed interlanguage wikilinks wherever they occur. Interlanguage wikilinks that have the form: : <code><nowiki>[[fr:Période d'exil de Caravage]]</nowiki></code> do not create visible clickable links in the article text. Instead, these links appear in the left pane in the languages list. Module:Citation/CS1 disables interlanguage links in this form and emits an error message. The correct form is: : <code><nowiki>[[:fr:Période d'exil de Caravage]]</nowiki></code> This error can also be caused when: * there is a {{para|&lt;param>-link}} value and the matching {{para|&lt;param>}} parameter contains a wikilink.<!--formatting template such as {{tl|smallcaps}} or {{tl|IAST}}, which should not be used in CS1 or CS2 templates.--> * {{para|first}} and {{para|&lt;param>-first}} (and enumerated forms) contain a wikilink To resolve this error, do one of the following: * Ensure that the {{para|&lt;param>-link}} value is the full name of a Wikipedia article (without brackets) or a section of an article, and not a link to an external web site. * Make sure that there are no wikilinks in the matching {{para|&lt;param>}} parameters. * If you want to link to a URL outside of Wikipedia, move the link to {{para|url}} or a similar parameter, if one is available in the template you are using. <!--* Make sure that there are no illegal characters in the paired parameters. These templates or HTML entities can be used to replace illegal characters in the title-holding parameter: {| class="wikitable" style="margin-left: 6.4em" |+ Replacements for prohibited wikilink title characters ! < !! > !! [ !! ] !! {{pipe}} !! { !! } |- | &amp;lt; || &amp;gt; || &amp;#91; || &amp;#93; || &amp;#124; || &amp;#123; || &amp;#125; |- | colspan="2"|&nbsp;||colspan="2" style="text-align: center;" | [[Template:Bracket|<nowiki>{{bracket|text}}</nowiki>]] || [[Template:Pipe|<nowiki>{{pipe}}</nowiki>]] ||colspan="2" | &nbsp; |}--> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_paramlink|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_paramlink_help_text" /> ==<span id="bad_pmc">Check |pmc= value</span>== <section begin="bad_pmc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmc}} The {{para|pmc}} parameter is for the [[PubMed Central]] identifier. PMCs are sequential numbers beginning at 1 and counting up. [[Module:Citation/CS1]] checks the PMC identifier to make sure that the value is a number greater than zero and less than {{#invoke:Cs1 documentation support|id_limits_get|pmc}} and that the identifier contains only digits. Further validation is not performed. To resolve this error, ensure that the {{para|pmc}} value is correct, and that there are no letters, punctuation, or other characters. Do not include "PMC" in the value. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_pmc_help_text" /> ==<span id="bad_pmid">Check |pmid= value</span>== <section begin="bad_pmid_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmid}} The {{para|pmid}} parameter is for the [[PubMed#PubMed identifier|PubMed identifier]]. PMIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|pmid}}. Further validation is not performed. To resolve this error, ensure that the {{para|pmid}} value is correct. If you find something that looks like a PMID and begins with "PMC", use {{para|pmc}} instead of {{para|pmid}}. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmid|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_pmid_help_text" /> ==<span id="bad_rfc">Check |rfc= value</span>== <section begin="bad_rfc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_rfc}} The {{para|rfc}} parameter is for the Internet Engineering Task Force (IETF) [[IETF RFC|RFC]] identifier (unrelated to Wikipedia's internal RfCs). IETF RFCs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|rfc}}. Further validation is not performed. To resolve this error, ensure that the {{para|rfc}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|rfc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_rfc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_rfc_help_text" /> ==<span id="bad_sbn">Check |sbn= value</span>== <section begin="bad_sbn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_sbn|$1=&lt;type>}} {{cs1}} and {{cs2}} templates that contain {{para|sbn}} are checked to ensure that the [[Standard Book Number|SBN]] is the proper length (nine digits), that the SBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the SBN specification. Only one SBN is allowed in this field because the whole {{para|sbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one SBN, or characters that are not part of the SBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]]. The error message &lt;type> indicator can be: : <span class="error" style="font-size:100%">length</span> – SBN is not 9 digits : <span class="error" style="font-size:100%">checksum</span> – SBN has one or more incorrect digits; look for typos and transposition : <span class="error" style="font-size:100%">invalid character</span> – SBN has one or more 'digits' that is not in the allowed set : <span class="error" style="font-size:100%">invalid form</span> – mis-positioned 'X' check digit To resolve this error, ensure that the {{para|sbn}} value is correct, that only one SBN is used, that the proper optional separators are used, and that no other text is included. If the check digit is a lowercase 'x', change it to an uppercase 'X'. * '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the SBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere). * If the SBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for SBNs. It is not uncommon for the SBN to be misprinted in the front matter but correct on the cover. * '''Do''' preview your edit and check that the new SBN does now link to the correct source. In very rare cases, publishers have released books with malformed SBNs. If you are certain that a non-conforming SBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected SBN. Use a corrected SBN when possible. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_sbn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_sbn_help_text" /> ==<span id="bad_ssrn">Check |ssrn= value</span>== <section begin="bad_ssrn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ssrn}} The {{para|ssrn}} parameter is for the [[Social Science Research Network|Social Science Research Network identifier]]. SSRNs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 100 and {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}. Further validation is not performed. To resolve this error, ensure that the {{para|ssrn}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ssrn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ssrn_help_text" /> ==<span id="bad_s2cid">Check |s2cid= value</span>== <section begin="bad_s2cid_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_s2cid}} The {{para|s2cid}} parameter is for the [[Semantic Scholar]] corpus identifier. S2CIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}. Further validation is not performed. To resolve this error, ensure that the {{para|s2cid}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_s2cid|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_s2cid_help_text" /> ==<span id="bad_url">Check |url= value</span>== <section begin="bad_url_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_url|$1=<code class="cs1-code">{{pipe}}url=</code>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_url|$1=<code class="cs1-code">{{pipe}}archive-url=</code>}}}} External links in {{cs1}} and {{cs2}} templates are made from two parts: the ''title'' ({{para|title}}, {{para|chapter}}, etc.) and the ''URL'' ({{para|url}}, {{para|archive-url}}, {{para|chapter-url}}, etc.). The {{para|url}} parameter and other URL parameters must begin with a supported [[URI scheme]]. The URI schemes <code>http://</code>, <code>https://</code>, and the protocol relative scheme <code>//</code> are most commonly used; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news:</code>, <code>mailto:</code> and <code>gopher://</code> are also supported. The URL scheme and host are checked to ensure that they contain only Latin characters, certain (required) punctuation, and do not contain spaces. The URL may be protocol relative (begins with <code>//</code>). If there are no spaces and the URL is not protocol relative, then the scheme must comply with <nowiki>RFC 3986</nowiki>.<ref>{{citation |mode=cs1 |contribution-url=http://tools.ietf.org/html/std66#section-3.1 |contribution=Scheme |title=Uniform Resource Identifier (URI): Generic Syntax |publisher=[[Internet Engineering Task Force]] |date=January 2005 |rfc=3986}}</ref> Some URL domains are written with non-Latin characters. cs1|2 does not accept those kinds of URLs so they must be '[[Internationalized domain name|internationalized]]'. Online tools are available to internationalize URLs that are written in non-Latin scripts: * {{cite web |url=https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml?loc=en_US |title=IDN Conversion Tool |website=Verisign }} Only enter the domain in the tool and not the full url. Top- and second-level domain names are checked for proper form. Generally, top-level domain names must be two or more letters; second-level domain names must be two or more letters, digits, or hyphens (first and last character must be a letter or digit). [[Single-letter second-level domain]]s are supported for: * all [[Country code top-level domain|cc TLD]]s (the country code is not validated) * the [[.org]] [[TLD]] * certain letters of the [[.com]] TLD (q, x, z) * certain letters of the [[.net]] TLD (i, q) * certain other TLDs ({{#invoke:cs1 documentation support|single_ltr_2nd_lvl_domain_lister}}) Third- and subsequent-level domain names are not checked. The path portion of the URL is not checked. There is an additional test for {{para|archive-url}}. The cs1|2 templates expect that {{para|archive-url}} will hold a unique URL for an archived snapshot of the source identified by {{para|url}} or {{para|chapter-url}} (or any of its aliases). This error message is emitted when the value assigned to {{para|archive-url}} is the same as the matching title or chapter URL. To resolve this error, ensure that: *{{para|url}} and other URL parameters contain valid URLs *URLs copy-pasted from elsewhere include the URI scheme *that the domain name uses only Latin characters *Any space characters (" ") in the URL are replaced with "%20" Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_url_help_text" /> ==<span id="bad_zbl">Check |zbl= value</span>== <section begin="bad_zbl_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_zbl}} When {{cs1}} and {{cs2}} templates contain {{para|zbl}}, a test is done to see if the [[Zentralblatt MATH|Zbl]] identifier value looks like a properly defined value. The {{para|zbl}} identifier is checked to make sure that it has the form: <code>nnnn.nnnnn</code> where <code>n</code> is any digit 0–9. Up to three leading zeros in the first quartet may be omitted. Further validation of the Zbl identifier is not performed. To resolve this error, ensure that the {{para|zbl}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_zbl|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_zbl_help_text" /> ==<span id="param_unknown_empty">Cite has empty unknown parameter: &lt;param></span>== <section begin="param_unknown_empty_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=_|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=s|$2=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, ...}}}} This error message highlights CS1|2 templates that hold empty parameters with names that are not known to a given CS1|2 template. This error message is a companion to [[Help:CS1 errors#parameter_ignored|Unknown parameter {{pipe}}xxxx= ignored]]. Empty positional parameters, which typically look like two adjacent pipes in a template, <code><nowiki>| |</nowiki></code>, or a pipe and then the end of the template, <code><nowiki>|}}</nowiki></code>, are identified as numbered parameters: {{error-small|{{para|1|plain=yes}}}}. Similarly, a pipe followed by an HTML comment that encloses everything before the next pipe or closing brace, <code>| &lt;!--&lt;{{var|param name/value pair}}>--> |</code> will be identified as an empty numbered parameter. Parameters that have both a pipe and an equal sign but do not have a name are identified as empty-string parameters: <code>|=</code> or <code>| =</code> → {{error-small|{{para|(empty string)|plain=yes}}}}. Various templates that wrap CS1|2 templates may cause this error when they use constructs like this: <syntaxhighlight lang="wikitext" inline>|{{#if:{{{2|}}}|title}}={{{2|}}}</syntaxhighlight>. When <code><nowiki>{{{2|}}}</nowiki></code> does not have a value, the template creates <code>|=</code>. To resolve this error: * remove the extra pipe, * correct the parameter name, * remove the parameter from the CS1|2 template, or * change the citation to use a more appropriate template (e.g. change {{tl|Cite document}} to {{tl|Cite web}}) Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_unknown_empty|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_unknown_empty_help_text" /> ==<span id="missing_publisher"></span>Cite document requires |publisher=== <section begin="missing_publisher_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_publisher|$1=document|$2=publisher}} This error message is displayed when {{tlx|Cite document}} does not have {{para|publisher}}. Usually, there is a more appropriate template that can be used in place of {{tld|cite document}}. When {{tld|cite document}} is used, it accepts a limited subset of the cs1|2 parameter suite but requires {{para|publisher}}. To resolve this error, use a more appropriate template (preferred solution) or provide {{para|publisher}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_publisher|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_publisher_help_text" /> ==<span id="missing_periodical"></span>Cite &lt;template> requires |&lt;param>=== <section begin="missing_periodical_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_periodical|$1=&lt;template>|$2=&lt;param>}} These CS1 periodical templates require a periodical parameter. The periodical templates are: : {{tlx|cite journal}} <!-- : {{tlx|cite news}} -->:{{tlx|cite magazine}} <!-- : {{tlx|cite web}} -->The error message suggests a periodical parameter that matches the template, but there is no requirement to use the suggested parameter; any one of these periodical parameters may be used: * {{para|journal}} * {{para|magazine}} * {{para|newspaper}} * {{para|periodical}} * {{para|website}} * {{para|work}} In some cases, an incorrect template has been used (e.g. {{tlx|cite journal}} for a web page, book, or standalone document). The appropriate resolution in these cases is to change the incorrect template to {{tlx|cite web}}, {{tlx|cite book}}, {{tlx|cite document}}, or a different, more appropriate template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_periodical|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_periodical_help_text" /> ==<span id="deprecated_params"></span>Cite uses deprecated parameter |&lt;param>= == <section begin="deprecated_params_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_deprecated_params|$1=&lt;param>}} Over time, some parameters have become obsolete or unnecessary. When this happens, the parameters are identified as deprecated. Editors are encouraged to use other parameters that accomplish the same purpose as those that have been deprecated. The CS1|2 deprecated parameters are listed in the following table, along with recommended replacement parameters. Parameter names are case-sensitive. Editors should expect that support for deprecated parameters will soon be withdrawn. To resolve this error, use a supported parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_deprecated_params|pages=yes}}.<ref group="lower-alpha" name="categories" /><section begin="deprecated_params_table" /> {|class="wikitable" |+ Deprecated CS1/CS2 parameters ! style="width: 12em;" | Deprecated parameter ! Replace with ! style="width: 6em;" | Date |- | none deprecated at present || || |}<section end="deprecated_params_table" /><section end="deprecated_params_help_text" /><section begin="deleted_params_table" /> <!-- Support for the following parameter aliases was recently removed. Usage in mainspace should be about zero, and hints for them added to the suggestion list. However, as they may occasionally pop up again through copy&paste or usage of old scripts for some while, list them here as well for users coming here searching for help. --> {|class="wikitable" |+ Recently removed CS1/CS2 parameters ! style="width: 12em;" | Removed parameter !! Replace with !! style="width: 6em;" | Date !! Note <!-- |- | none removed at present | --> |- | {{para|authors}} | {{para|last{{var|n}}}} / {{para|first{{var|n}}}}, {{para|author{{var|n}}}}, {{para|vauthors}} | August 2024 | |}<section end="deleted_params_table" /> ==<span id="generic_name">Cite uses generic name</span>== <section begin="generic_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_generic_name|$1=&lt;param>}} Articles are listed in this category when [[Module:Citation/CS1]] identifies template author or editor name parameters that use place-holder names. Such names may have been provided by bots or other tools that are unable to identify the source's correct names. Pages in this category should only be added by Module:Citation/CS1. CS1|2 maintains a short list of 'names' that are typically not the correct names for the cited source. Some examples are: {{div col begin |colwidth=15em}} *<code>about us</code> *<code>author</code> *<code>bureau</code> *<code>collaborator</code> *<code>contributor</code> *<code>contact us</code> *<code>directory</code> *<code>editor</code> *<code>email</code> *<code>facebook</code> *<code>google</code> *<code>home page</code> *<code>instagram</code> *<code>interviewer</code> *<code>linkedIn</code> *<code>pinterest</code> *<code>policy</code> *<code>privacy</code> *<code>site name</code> *<code>statement</code> *<code>submitted</code> *<code>super user</code> *<code>translator</code> *<code>tumblr</code> *<code>twitter</code> *<code>user</code> *<code>verfasser</code> {{div col end}} If you are aware of other common place-holder names, please report them at [[Help talk:Citation Style 1]], so that they can be added to the list. To resolve this error, replace the place-holder name with the source's actual author or editor name, or use a more appropriate parameter. Example fixes: * Replace {{para|author|Smith, Jane, editor}} with {{para|editor|Smith, Jane}} False positives are possible. When the name is valid, wrap the parameter value in the [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]]: :{{para|author|((Super User))}} Please do not use this markup when it is not appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_generic_name|pages=yes}}.<ref group="lower-alpha" name="categories" /> See also the error category [[:Category:CS1 errors: generic title]].<section end="generic_name_help_text" /> ==<span id="generic_title">Cite uses generic title</span>== <section begin="generic_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_generic_title}} Articles are listed in this category when [[Module:Citation/CS1]] identifies template {{para|title}} parameters that use place-holder titles. Such titles may have been provided by bots or other tools that are unable to identify the source's correct title. Pages in this category should only be added by Module:Citation/CS1. CS1|2 maintains a short list of 'titles' that are typically not the title of the cited source. Some examples are: {{div col begin |colwidth=15em}} *<code>404</code> *<code>are you a robot</code> *<code>hugedomains.com</code> *<code>internet archive wayback machine</code> *<code>log into facebook</code> *<code>login • instagram</code> *<code>no title</code> – various forms *<code>page not found</code> *<code>redirecting...</code> *<code>subscribe to read</code> *<code>unknown</code> – various forms *<code>usurped title</code> *<code>wayback machine</code> *<code>webcite query result</code> *<code>website is for sale</code> *<code>wikiwix's cache</code> {{div col end}} If you are aware of other common place-holder titles, please report them at [[Help talk:Citation Style 1]], so that they can be added to the list. To resolve this error, replace the place-holder title with the source's actual title. False positives are possible. When the name is valid, wrap the parameter value in the [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]]: :{{para|title|((404th Fighter Aviation Regiment))}} Please do not use this markup when it is not appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_generic_title|pages=yes}}.<ref group="lower-alpha" name="categories" /> See also the maintenance category [[:Category:CS1 maint: archived copy as title]] and the similar error category [[:Category:CS1 errors: generic name]].<section end="generic_title_help_text" /> ==<span id="citeseerx_missing">|citeseerx= required</span>== <section begin="citeseerx_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_citeseerx_missing}} {{tlx|cite citeseerx}} requires the identifier parameter {{para|citeseerx}}. To resolve this error, ensure that the template has {{para|citeseerx}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citeseerx_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="citeseerx_missing_help_text" /> ==<span id="class_ignored">|class= ignored</span>== <section begin="class_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_class_ignored}} Only used in {{tlx|cite arXiv}} templates, {{para|class}} is only appropriate when the template uses {{para|arxiv|YYMM.NNNN}} or {{para|arxiv|YYMM.NNNNN}} identifier formats; see [[Template:Cite arXiv#Usage|Cite arXiv §Usage]]. To resolve this error, remove {{para|class}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_class_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="class_ignored_help_text" /> ==<span id="contributor_ignored">|contributor= ignored</span>== <section begin="contributor_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_ignored}} Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. This error occurs when {{para|contributor}} is used in a template that is not {{tlx|cite book}} or {{tlx|citation}} or is one of these two templates and one of the {{para|work}} parameter aliases is set. To resolve this error, consider the {{para|others}} parameter, choose a more appropriate CS1 or CS2 template or remove {{para|contributor}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="contributor_ignored_help_text" /> ==<span id="contributor_missing_required_param">|contributor= requires |&lt;param>= </span>== <section begin="contributor_missing_required_param_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=author}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=contribution}}}} Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. As such, the primary author is required ({{para|author}} or appropriate alias) as is the title of the contribution ({{para|contribution}}). To resolve this error, include the book's primary author in {{para|author1}}, or {{para|last1}}, {{para|first1}}, or {{para|vauthors}} and include the contribution title in {{para|contribution}}; or consider the {{para|others}} parameter or remove {{para|contributor}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_missing_required_param|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="contributor_missing_required_param_help_text" /> ==<span id="doibroken_missing_doi">|doi-broken-date= requires |doi=</span>== <section begin="doibroken_missing_doi_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_doibroken_missing_doi|$1=doi-broken-date}} When {{para|doi-broken-date}} is used in a CS1|2 template, {{para|doi}} (with value) must also be present. To resolve this error, either add the missing DOI or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_doibroken_missing_doi|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="doibroken_missing_doi_help_text" /> ==<span id="extra_text_edition">|edition= has extra text </span>== <section begin="extra_text_edition_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_edition}} The templates are responsible for static text rendered in the citation. When {{para|edition}} is used in a template, cs1|2 adds the abbreviation 'ed.' to the value in the parameter so: :{{para|edition|1st}} renders as: :1st ed. The templates emit this error message when various forms of <code>ed</code>, <code>edn</code>, or <code>edition</code> are found in the value assigned to {{para|edition}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_edition|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_edition_help_text" /> ==<span id="empty_citation">Empty citation</span>== <section begin="empty_citation_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_empty_citation}} A {{cs1}} or {{cs2}} template marked as "Empty" contains no recognizable parameter identifiers. For example, this citation is marked as "empty" even though it contains usable information: :<code><nowiki>{{cite web |http://www.foobar.com |The Foobar News}}</nowiki></code> The citation is "empty" because it does not contain the necessary parameter identifiers (in this case {{para|url}} and {{para|title}}) that tell {{tlx|cite web}} how to use the information that the citation contains. A citation is also marked as "empty" when it contains only parameters that it doesn't recognize: : <code><nowiki>{{cite book |titolo=The Bazquux Uprising |anno=2015}}</nowiki></code> This citation is "empty" because the Italian-language parameters {{para|titolo}} and {{para|anno}} are not recognized as valid parameter names on the English Wikipedia. "Empty citation" may also mean that an editor meant to use another template entirely. Perhaps the editor used {{tlx|citation}} when the intent was to use {{tlx|citation needed}} or {{tlx|quote}}. To resolve this error, add appropriate parameter identifiers, translate foreign language parameter names to their English equivalents, or replace the CS1/CS2 template with a more appropriate template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_empty_citation|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="empty_citation_help_text" /> == <span id="explicit_et_al">Explicit use of et al.</span> == <section begin="explicit_etal_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_etal|$1=&lt;param>}} This error occurs where a {{cs1}} or {{cs2}} template detects that one of the names parameters contains some form of "et al." either as a separate name parameter ({{para|author6|et al.}}) or as a suffix added to a name list ({{para|author|Smith, A.B. et al.}}) or first name ({{para|first|John, et al.}}). This error can occur in any of the author, editor, interviewer, translator, or contributor parameters. Use the {{para|display-authors}} parameter instead (or other applicable {{para|display-&lt;{{var|names}}>}} parameter), as documented at [[Help:Citation Style 1#Display options]]. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_etal|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="explicit_etal_help_text" /> ==<span id="param_has_ext_link">External link in |&lt;param>=</span>== <section begin="param_has_ext_link_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_ext_link|$1={{pipe}}&lt;param>=}} This error occurs when a URL is found in any parameter that is not one of these URL-holding parameters: {{div col begin}} *{{para|archive-url}} *{{para|article-url}} *{{para|chapter-url}} *{{para|conference-url}} *{{para|contribution-url}} *{{para|entry-url}} *{{para|map-url}} *{{para|section-url}} *{{para|transcript-url}} *{{para|url}} {{div col end}} or any of these insource locator parameters: {{div col begin}} *{{para|page}} *{{para|p}} *{{para|pages}} *{{para|pp}} *{{para|at}} *{{para|quote-page}} *{{para|quote-pages}} {{div col end}} To resolve this error, remove the external link from the identified parameter. Consider placing the external link in a more appropriate parameter: * for {{para|chapter}}, the URL may belong in {{para|chapter-url}}. * for other parameters, it may belong in {{para|url}}. Wrapping the parameter value in double parentheses (i.e. "accept as written" markup) does not work around this error message. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_ext_link|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_has_ext_link_help_text" /> ==<span id="first_missing_last">|&lt;first>''n''= missing |&lt;last>''n''=</span>== <section begin="first_missing_last_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_first_missing_last|$1=&lt;first>{{var|n}}|$2=&lt;last>{{var|n}}}} {{cs1}} and {{cs2}} templates requires a {{para|&lt;last>''n''}} parameter for each {{para|&lt;first>''n''}} parameter in a citation. Author, contributor, editor, interviewer, and translator lists are checked for proper last/first pairing. CS1|2 will emit this error message for the first mismatch it detects. If there are more last/first mismatches in a citation, subsequent mismatches are not detected. There is no requirement that each {{para|&lt;last>''n''}} have a matching {{para|&lt;first>''n''}}. To resolve this error, ensure that each {{para|&lt;first>''n''}} has a corresponding {{para|&lt;last>''n''}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_first_missing_last|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="first_missing_last_help_text" /> ==<span id="format_missing_url">|format= requires |url= </span>== <section begin="format_missing_url_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=format|$2=url}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=...-format|$2=...-url}}}} These errors occur when {{cs1}} and {{cs2}} templates use {{para|format}} or {{para|...-format}} without also providing a corresponding URL for {{para|url}} or {{para|...-url}}, respectively. The {{para|format}} and {{para|...-format}} parameters are used to specify the file format of a web resource, such as [[PDF]], [[Doc (computing)|DOC]], or [[Microsoft Excel file format|XLS]]. In some cases an editor may have intended to use {{para|type}} to specify a kind of document, such as hard cover, paperback, or pamphlet. The {{para|format}} and {{para|...-format}} value is always displayed. The list of {{para|...-format}} parameters is: : {{para|archive-format}}, {{para|article-format}}, {{para|chapter-format}}, {{para|conference-format}}, {{para|contribution-format}}, {{para|entry-format}}, {{para|event-format}}, {{para|map-format}}, {{para|section-format}}, {{para|transcript-format}} (<!-- TBD: Ia this still necessary to be mentioned? -->Citations that relied on the pre-2014<!-- 2014-11-29 -->, somewhat odd use of {{para|url}} and {{para|format}} may need adjustment in regard to {{para|chapter-format}}.) To resolve this error, remove {{para|format}} or {{para|chapter-format}}; define {{para|url}} or {{para|chapter-url}}; or change {{para|format}} to {{para|type}} (or to {{para|chapter-format}} if {{para|chapter-url}} is used without {{para|url}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_format_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="format_missing_url_help_text" /> ==<span id="disp_name">Invalid |display-&lt;names>=&lt;value></span>== <section begin="disp_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_disp_name|$1=display-&lt;names>|$2=&lt;value>}} These error messages are emitted when [[Module:Citation/CS1]] identifies citations that use one or more of the {{para|display-&lt;names>}} parameters with an invalid assigned <code>&lt;value></code>. An invalid assigned <code>&lt;value></code> is a number that is greater than or equal to the number of <code>&lt;names></code> in the associated name-list or it is non-numeric text that Module:Citation/CS1 cannot recognize as a form of the keyword <code>etal</code>. To resolve this error, do one of the following: * Remove the {{para|display-&lt;names>}} parameter from the citation (typically because "et al." is not appropriate in the citation) * Change the <code>&lt;value></code> of the {{para|display-&lt;names>}} parameter such that it is less than the number of <code>&lt;names></code> in the name-list (thereby truncating the displayed list to the number) * Change the <code>&lt;value></code> of the {{para|display-&lt;names>}} parameter to <code>etal</code>, which will cause "et al" to display after the last <code>&lt;name></code>. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_disp_name|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="disp_name_help_text" /> ==<span id="invalid_param_val">Invalid &lt;param>=&lt;value></span>== <section begin="invalid_param_val_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_param_val|$1=&lt;param>|$2=&lt;value>}} To function properly, some parameters are limited to a certain set of acceptable values. This error message indicates that a parameter has been assigned a value that is not a member of the parameter's defined set of acceptable values. Letters in values must all be in lower case, as shown below. {|class="wikitable" |+ Parameters with limited acceptable values |- ! Parameter !! Acceptable values |- | {{para|df}} ||<code>dmy</code>, <code>dmy-all</code>, <code>mdy</code>, <code>mdy-all</code>, <code>ymd</code>, <code>ymd-all</code> |- | {{para|mode}}||<code>cs1</code>, <code>cs2</code> |- | {{para|name-list-style}} || <code>amp</code>, <code>ampersand</code>, <code>and</code>, <code>&</code>, <code>serial</code>, <code>vanc</code> |- | {{para|no-pp}}||rowspan=2|<code>true</code>, <code>y</code>, <code>yes</code> |- | {{para|no-tracking}} |- | {{para|bibcode-access}}||rowspan=8|<code>free</code> |- | {{para|doi-access}} |- | {{para|hdl-access}} |- | {{para|jstor-access}} |- | {{para|ol-access}} |- | {{para|osti-access}} |- | {{para|ssrn-access}} |- | {{para|s2cid-access}} |- | {{para|url-access}}||rowspan=7|<code>subscription</code>, <code>registration</code>, <code>limited</code> |- | {{para|article-url-access}} |- | {{para|chapter-url-access}} |- | {{para|contribution-url-access}} |- | {{para|entry-url-access}} |- | {{para|map-url-access}} |- | {{para|section-url-access}} |- | {{para|url-status}}||<code>dead</code>, <code>live</code>, <code>deviated</code>, <code>unfit</code>, <code>usurped</code> (see [[Template:Citation_Style_documentation#csdoc_urlstatus|documentation]]) |} To resolve this error for the parameters in the table, use an appropriate value. Support for {{para|ref|harv}} is withdrawn because cs1|2 templates now automatically create the <code>CITEREF</code> anchor value that {{para|ref|harv}} controlled. To resolve this error, remove {{para|ref|harv}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_param_val|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invalid_param_val_help_text" /> ==<span id="script_parameter">Invalid |script-&lt;param>=: &lt;type></span>== <section begin="script_parameter_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_script_parameter|$1=script-&lt;param>|$2=&lt;type>}} The various {{para|script-&lt;{{var|param}}>}} parameters are checked for proper form. When an error is detected, the error message briefly identifies the type of the error: : <span class="error" style="font-size:100%">missing title part</span> – the {{para|script-&lt;{{var|param}}>}} parameter has a language-code prefix but is otherwise empty : <span class="error" style="font-size:100%">missing prefix</span> – the {{para|script-&lt;{{var|param}}>}} parameter has text but is missing the required language-code prefix; the prefix has the form <code>xx:</code> or <code>xxx:</code> where <code>xx</code> or <code>xxx</code> is a valid [[ISO 639-1]] or [[ISO 639-3]] language code known to CS1|2 as a language that uses a non-Latin script; the colon (<code>:</code>) is required : <span class="error" style="font-size:100%">unknown language code</span> – the {{para|script-&lt;{{var|param}}>}} parameter has a (possibly valid) language code that CS1|2 does not recognize as a language using a non-Latin script Language codes known to CS1|2 for languages that do not use a Latin script are: {{#invoke:Cs1 documentation support|script_lang_lister}}<!-- makes a language code: name list from the master list in [[Module:Citation/CS1/Configuration]] --> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_script_parameter|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="script_parameter_help_text" /> ==<span id="invalid_isbn_date">ISBN / Date incompatibility</span>== <section begin="invalid_isbn_date_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_isbn_date}} – this error message hidden by default [[ISBN]]s were created c. 1965. Books published before that date will not have been issued an ISBN. However, reissues of pre-ISBN publications <em>are</em> issued ISBNs, even barring the publication of a new edition. Consider double-checking whether the ISBN is valid before removing it. To resolve this error: * Remove the ISBN when citing a source published before 1965. ** If the cited edition or reissue of the book was published after 1965, ensure that {{para|date}} or {{para|year}} has the correct publication year. The reissue date is typically available by querying [[WorldCat]] with the reissue's ISBN. Adding {{para|orig-date}} may be appropriate in such cases; e.g., {{para|orig-date|1st Pub. 1929}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_isbn_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invalid_isbn_date_help_text" /> ==<span id="extra_text_issue">|issue=/|number= has extra text</span>== <section begin="extra_text_issue_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_issue|$1=issue}}<br/> {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_issue|$1=number}} The templates are responsible for static text rendered in the citation. When {{para|issue}} or {{para|number}} is used in a template, cs1|2 formats the issue number according to the style corresponding with the publication type associated with the used citation template. The templates emit this error message when various forms of issue or number prefixes (like <code>Iss.</code> or <code>No.</code>) are found in the value assigned to {{para|issue}} or {{para|number}}. To resolve this error, remove the extraneous text from the parameter value. If the extraneous text removed is related to issues, please use the {{para|issue}} parameter rather than {{para|number}} for this, and vice versa. At present, the output is the same for both parameters, but this may not hold true in future versions, therefore it is important that issues and number values are used with the proper parameter as per what nomenclature is used in the actual publication. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_issue|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_issue_help_text" /> ==<span id="apostrophe_markup">Italic or bold markup not allowed in: |&lt;param>=</span>== <section begin="apostrophe_markup_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_apostrophe_markup|$1=&lt;param>{{var|n}}}} Italic (<code><nowiki>''</nowiki></code>) or bold (<code><nowiki>'''</nowiki></code>) wikimarkup is not allowed in publisher and periodical parameters. These parameters include: * {{para|publisher}} * {{para|journal}} * {{para|magazine}} * {{para|newspaper}} * {{para|periodical}} * {{para|website}} * {{para|work}} To resolve this error, remove wiki markup from the named parameter's value and ensure that the template is using the correct parameters; when citing a newspaper, use {{para|newspaper}} for the newspaper's name, not {{para|publisher}}, etc. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_apostrophe_markup|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="apostrophe_markup_help_text" /> ==<span id="medrxiv_missing">|medrxiv= required</span>== <section begin="medrxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_medrxiv_missing}} {{tlx|cite medRxiv}} requires the identifier parameter {{para|medrxiv}}. To resolve this error, ensure that the template has {{para|medrxiv}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_medrxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="medrxiv_missing_help_text" /> ==<span id="missing_name">Missing |&lt;name>''n''=</span>== <section begin="missing_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_name|$1=&lt;name>|$2={{var|n}}}} So that all names are listed in a rendered citation, {{cs1}} and {{cs2}} templates require ''n'' in {{para|&lt;last>{{var|n}}}} (and its aliases) to increment by 1 for each name in the list (author, contributor, editor, interviewer, translator). This error message is emitted when there is a 'hole' in the numbering (an author list made up of {{para|author1}} and {{para|author3}} but without {{para|author2}} for example). The test will not detect a 'hole' that is larger than 1. It is presumed that when {{para|author{{var|n}}}} and {{para|author{{var|n+1}}}} are both not present, then the test has reached the end of the list. To resolve this error, ensure that the numbering of the {{para|&lt;last>{{var|n}}}} parameters increments properly. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_name|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_name_help_text" /> ==<span id="missing_title">Missing or empty |title= </span>== There are two slightly different error conditions that can arise when [[Help:Citation Style 1|CS1 citations]] lack appropriate titles. In each case, CS1 reports this error message. The necessary resolution may vary depending on the cause of the error. The error message links to the appropriate description below. ===<span id="bare_url_missing_title">Bare URL without a title</span>=== <section begin="bare_url_missing_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bare_url_missing_title|$1=<code class="cs1-code">{{pipe}}&lt;param>=</code>}} All {{cs1}} and {{cs2}} templates report this error when one of the [[URL]]-containing parameters cannot be paired with an associated title. This error may also occur when {{para|title}} cannot be linked with {{para|url}} because the citation also contains a conflicting {{para|title-link}} parameter. {|class="wikitable" |+ URL-containing parameters and associated title parameters |- ! URL parameters ! Title parameters |- | {{para|archive-url}} | {{para|title}} |- | {{para|article-url}} | {{para|article}}, {{para|chapter}}, {{para|contribution}}, {{para|entry}}, {{para|section}} |- | {{para|chapter-url}} | {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}}, {{para|section}} |- | {{para|conference-url}} | {{para|conference}}, {{para|event}} |- | {{para|contribution-url}} | {{para|contribution}}, {{para|chapter}}, {{para|article}}, {{para|entry}}, {{para|section}} |- | {{para|entry-url}} | {{para|entry}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|section}} |- | {{para|event-url}} | {{para|event}}, {{para|conference}} <!-- |- | {{para|lay-url}} | &nbsp;&nbsp;({{para|lay-source}}) --> |- | {{para|map-url}} | {{para|map}} |- | {{para|section-url}} | {{para|section}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}} |- | {{para|transcript-url}} | {{para|transcript}} |- | {{para|url}} | {{para|title}} |} A unique case exists for {{tl|cite journal}}: if {{para|pmc}} or {{para|doi}} has a value, {{para|url}} is omitted or empty, and {{para|title-link}} does not point to an article, then {{para|title}} is automatically linked with the same URL as the PMC or DOI. This default behaviour can be overridden using {{para|title-link|none/pmc/doi}}. Because URLs are ugly and generally uninformative, it is expected that editors should provide a meaningful title for each URL. In most cases this can be accomplished by using the {{para|title}} parameter. To resolve this error, provide an appropriate title for the URL-containing parameter. In the case where {{para|url}} and {{para|title-link}} are contending for {{para|title}} you must choose which one to keep. Consider moving {{para|url}} or {{para|title-link}} to a more suitable parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bare_url_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bare_url_missing_title_help_text" /> ===<span id="citation_missing_title">Citation without a title of any form</span>=== <section begin="citation_missing_title_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=title}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=series}}}} This error occurs for {{cs1}} and {{cs2}} templates when all of {{para|title}}, {{para|trans-title}}, and {{para|script-title}} are omitted or left blank. At least one of these title parameters must be provided for each citation. {{tlx|cite episode}} will show this error if {{para|series}} is omitted or left blank (even if a {{para|title}} is provided). {{tlx|cite encyclopedia}} will show this error if {{para|encyclopedia}} has a value but {{para|entry}} (or another {{para|chapter}} alias) is omitted or left blank. Sometimes this error occurs because an editor has used a CS1|2 citation as a [[Help:Shortened footnotes|shortened footnote]] when {{tlx|sfn}} or one of the {{tlx|harv}} family of templates would have been more appropriate. This error also occurs when an editor used {{tlx|citation}} but intended to use {{tlx|citation needed}}. To resolve this error, provide a value for {{para|title}}, {{para|trans-title}}, and/or {{para|script-title}} or replace the CS1|2 template with a more appropriate template. If you are listing a periodical or an issue of a periodical in a bibliography rather than within {{tag|ref}} tags, {{tlx|List journal}} may be more appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citation_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="citation_missing_title_help_text" /> ==<span id="cite_web_url">Missing or empty |url= </span>== <section begin="cite_web_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_cite_web_url}} This error message is reported by {{tlx|cite web}}, {{tlx|cite podcast}}, and {{tlx|cite mailing list}} when the template parameters {{para|url}} and {{para|archive-url}} are both missing, blank or not properly entered. Note that {{para|website}} or {{para|work}} is the name of the site, not the URL. To resolve this error, provide a value for {{para|url}} or use a more appropriate template such as {{tl|cite book}}, {{tl|cite journal}} or other {{cs1}} or {{cs2}} template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_cite_web_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="cite_web_url_help_text" /> ==<span id="missing_pipe">Missing pipe</span>== <section begin="missing_pipe_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_pipe|$1=&lt;param>}} {{cs1}} and {{cs2}} templates report this error when one parameter has text that looks like it is a parameter missing a pipe (<code>|</code>). This error occurs when a template parameter value contains characters and digits followed by an equal sign. If the alphanumeric text immediately preceding the equal sign is a valid CS1|2 parameter name, the module assumes that the template is missing a pipe and emits this error message. Some legitimate titles will contain a CS1|2 parameter name followed by an equal sign. In that case, enclose the equal sign in nowiki tags, like this: {{tag|nowiki|content={{=}}}}. For most other cases, simply add the missing pipe. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_pipe|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_pipe_help_text" /> ==<span id="redundant_parameters">More than one of |&lt;param1>=, |&lt;param2>=, and |&lt;param3>= specified</span>== <section begin="redundant_parameters_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, and <code class="cs1-code">{{pipe}}&lt;param3>=</code>}} This error occurs when a {{cs1}} or {{cs2}} template includes more than one parameter that maps to the same meaning. For example, {{para|author}}, {{para|last}}, and {{para|last1}} are all synonyms of each other, so no more than one of these parameters should ever be used in a single template. To resolve this error, remove or modify the redundant parameter(s). {{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=author-name-list parameters}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=editor-name-list parameters}}}} This error occurs when a CS1 or CS2 template uses more than one type of author or editor name-list style. There are three kinds of incompatible author-name-list styles: : {{para|author''n''}} and {{para|last''n''}} / {{para|first''n''}} (and their various aliases), {{para|vauthors}}, and {{para|authors}} and similarly, three editor-name-list styles: : {{para|editor''n''}} and {{para|editor-last''n''}} / {{para|editor-first''n''}} (and their various aliases) as well as {{para|veditors}} To resolve this error, choose one name-list-style. Use the chosen style for both of the author and editor name-lists. Pages with these errors are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_redundant_parameters|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="redundant_parameters_help_text" /> ==<span id="extra_text_pages">|page(s)= has extra text</span>== <section begin="extra_text_pages_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_pages|$1=&lt;param>}} The templates are responsible for static text rendered in the citation. When {{para|page}}/{{para|p}}, {{para|pages}}/{{para|pp}}, {{para|quote-page}} or {{para|quote-pages}} is used in a template, cs1|2 inserts the appropriate pagination prefix 'p.' or 'pp.' ahead of the value in the parameter so: :{{para|page|123}} renders as: :p. 123 and: :{{para|page|123–125}} renders as: :pp. 123–125 The templates emit this error message when various forms of <code>p</code>, <code>pp</code>, <code>pg</code>, <code>pgs</code>, <code>page</code>, or <code>pages</code> are found in the value assigned to {{para|page}}/{{para|p}}, {{para|pages}}/{{para|pp}}, {{para|quote-page}} or {{para|quote-pages}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_pages|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_pages_help_text" /> ==<span id="param_access_requires_param">&#124;&lt;param>-access= requires &#124;&lt;param>=</span>== <section begin="param_access_requires_param_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_access_requires_param|$1=&lt;param>|$2=&lt;param>}} This error is reported when an [[Help:Citation Style 1#Registration or subscription required|access level]] has been specified for some external link, but the corresponding required parameter is missing or empty. The parameter can be one of {| class="wikitable" |+ Access-level specifier required parameter |- ! Specifier !! Required parameter |- | {{para|article-url-access}} || {{para|article-url}} |- | {{para|bibcode-access}} || {{para|bibcode}} |- | {{para|chapter-url-access}} || {{para|chapter-url}} |- | {{para|contribution-url-access}} || {{para|contribution-url}} |- | {{para|doi-access}} || {{para|doi}} |- | {{para|entry-url-access}} || {{para|entry-url}} |- | {{para|hdl-access}} || {{para|hdl}} |- | {{para|jstor-access}} || {{para|jstor}} |- | {{para|map-url-access}} || {{para|map-url}} |- | {{para|ol-access}} || {{para|ol}} |- | {{para|osti-access}} || {{para|osti}} |- | {{para|section-url-access}} || {{para|section-url}} |- | {{para|s2cid-access}} || {{para|s2cid}} |- | {{para|url-access}} || {{para|url}} |} To resolve this error, either provide a value for the parameter, or remove the access level specification. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_access_requires_param|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_access_requires_param_help_text" /> ==<span id="numeric_names">|&lt;param>= has numeric name</span>== <section begin="numeric_names_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_numeric_names|$1=&lt;param>}} This error is reported when a name-list parameter {{para|author{{var|n}}}}, {{para|contributor{{var|n}}}}, {{para|editor{{var|n}}}}, {{para|interviewer{{var|n}}}}, {{para|translator{{var|n}}}} (including aliases) has an assigned value that is composed solely of digits and / or punctuation. Errors of this type are often the result of automated or semi-automated edits where the source metadata is misplaced or improperly translated. To resolve this error, make sure that the value assigned to the name-list parameter is a name and only a name. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_numeric_names|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="numeric_names_help_text" /> ==<span id="periodical_ignored">|&lt;periodical>= ignored</span>== <section begin="periodical_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_periodical_ignored|$1=periodical}} {{cs1}} templates {{tlx|cite book}} and {{tlx|cite encyclopedia}} do not support {{para|periodical}} (and aliases {{para|journal}}, {{para|magazine}}, {{para|newspaper}}, {{para|website}}, {{para|work}}) and associated {{para|script-periodical}} and {{para|trans-periodical}} (and their aliases). To resolve this error: * use a more appropriate citation template, or * most common: change {{para|title}} to {{para|chapter}} (or appropriate alias) and then change {{para|periodical}} to {{para|title}}, or * change {{para|work}} to {{para|series}} if {{para|title}} is the actual title of the book and {{para|work}} contains the name of a book series, or * change {{para|work}} to another appropriate parameter (it has been used to hold values for {{para|publisher}}, {{para|editor}}, {{para|via}}, and more), or * move the content of the {{para|periodical}} parameter out of the template, before the closing <nowiki></ref></nowiki>, or * delete the {{para|periodical}} parameter Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_periodical_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="periodical_ignored_help_text" /> ==<span id="embargo_missing_pmc">|pmc-embargo-date= requires |pmc=</span>== <section begin="embargo_missing_pmc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_embargo_missing_pmc|$1=pmc-embargo-date}} When {{para|pmc-embargo-date}} is used in a CS1|2 template, {{para|pmc}} (with value) must also be present. To resolve this error, either add the missing PMC or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_embargo_missing_pmc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="embargo_missing_pmc_help_text" /> ==<span id="ssrn_missing">|ssrn= required</span>== <section begin="ssrn_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_ssrn_missing}} {{tlx|cite SSRN}} requires the identifier parameter {{para|ssrn}}. To resolve this error, ensure that the template has {{para|ssrn}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_ssrn_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="ssrn_missing_help_text" /> ==<span id="text_ignored">Text "????" ignored</span>== <section begin="text_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_text_ignored|$1=????}} Unlike many Wikipedia templates, the {{cs1}} and {{cs2}} templates do not use unnamed or positional parameters. When a citation contains text between [[vertical bar]]s and that text does not contain an equal sign (=), CS1|2 ignores the text and reports the error. This is true even when the text is the name of a valid parameter. This error can also be caused by vertical bars (pipe characters) that are part of URLs or titles. When vertical bars occur in URLs, replace each vertical bar with <code>%7C</code>. When vertical bars occur in parameter values that are not URLs, replace each vertical bar with <code>&amp;#124;</code> or <code>{{tl|!}}</code>. To resolve this error, remove the extraneous text, add '=', add an appropriate parameter name from the template you're using to complete the parameter, or properly encode vertical bars in URLs and titles. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_text_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="text_ignored_help_text" /> ==<span id="trans_missing_title">|trans-&lt;param>= requires |&lt;param>= or |script-&lt;param>=</span>== <section begin="trans_missing_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_trans_missing_title|$1=&lt;param>|$2=&lt;param>|$3=&lt;param>}} {{cs1}} and {{cs2}} templates report this error when the citation has an English translation of the title in {{para|trans-title}} or chapter title in {{para|trans-chapter}} but does not have the original-language title in {{para|title}} or original-language chapter title in {{para|chapter}}. To resolve this error, provide the original language title for {{para|title}} or chapter title for {{para|chapter}}. Consider adding {{para|language}} if not already part of the citation. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_trans_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="trans_missing_title_help_text" /> ==<span id="parameter_ignored">Unknown parameter |&lt;param>= ignored<span id="parameter_ignored_suggest"> </span></span>== <section begin="parameter_ignored_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored|$1=&lt;param>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored_suggest|$1=&lt;param>|$2=&lt;sparam>}}}} {{cs1}} and {{cs2}} templates report this error when the name portion of a parameter's {{para|name|value}} pair is not recognized as a valid name. Typically, this is caused by spelling or capitalization errors or when a page is reverted to a version where the citation template did support the parameter. It can also be caused by the use of parameters that are valid in some, but not all, CS1|2 templates. For example, {{tl|cite book}} citations are sometimes erroneously created using {{para|title}} and {{para|work}} when they should use {{para|chapter}} and {{para|title}} instead. The CS1|2 engine does not ignore unrecognized parameters. The purpose of the citation is to properly identify the source, not to act as a repository of notes and ancillary information. CS1|2 template parameters are lower case. CS1|2 will report this error when the parameter's name contains uppercase letters ({{!xt|Xxxx, xxXx, XXXX}}) but the parameter's name is defined as lowercase ({{xt|xxxx}}). Some identifier parameters, like {{para|isbn}}, {{para|pmc}}, {{para|doi}}, etc., can be either lower case or upper case, but not of mixed case ({{para|isbn|mxt=y}} or {{para|ISBN|mxt=y}} but not {{para|Isbn|!mxt=y}}). For [[Module:Citation/CS1/Suggestions|common parameter misspellings]], like {{para|pubisher}} instead of {{para|publisher}} and some former template parameters, CS1|2 will suggest a valid parameter name. The [[Help:CS1_errors#deprecated_params|list of deprecated and recently removed parameters]] may contain additional information as well. Reported unknown parameters following a {{para|DUPLICATE_&lt;param>}} scheme are created by [[User:Citation bot|Citation Bot]] when it finds duplicate parameters {{para|&lt;param>}} in a template. To resolve this error, replace the erroneous parameter name with a correct one, possibly using the suggested name. Ensure that the parameter's name is correctly spelled and that there are no characters except spaces between the parameter's name and the leading vertical bar (|) or trailing equals sign (=). A list of valid parameters can be found by consulting [[Help:Citation Style 1]] or visiting the description page of the specific template being used, such as {{tlx|cite web}}, {{tlx|cite book}}, {{tlx|cite journal}}, etc. Consider moving information associated with the unknown parameter into an appropriate parameter or to a section of the article's talk page for preservation. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_parameter_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="parameter_ignored_help_text" /> ==<span id="wikilink_in_url">URL–wikilink conflict</span>== <section begin="wikilink_in_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_wikilink_in_url}} External links in a rendered citation are a combination of url-holding parameters, {{para|url}}, {{para|chapter-url}}, etc., with title-holding parameters, {{para|title}}, {{para|chapter}}, etc. Title-holding parameters may be [[wikilink]]ed to another Wikipedia article but not when there is a matching url-holding parameter in the citation. When this condition occurs, the wikilink is suppressed, the wiki markup ignored, and the rendered citation links to the external site. With {{tlx|cite journal}}, auto-linking of the {{para|pmc}} or {{para|doi}} parameter value can cause this condition to occur implicitly without a specific url-holding parameter. Some [[Help:Template|templates]] will also cause this error if they are part of a title-holding parameter. The error occurs when the template produces wikilinked content. For example, {{tlx|lang}} templates output a wikilinked category. Templates in title-holding parameters may also corrupt the citation's [[WP:COinS|COinS]] metadata. As a general rule, avoid using templates in title-holding parameters unless you know that the template's effects are entirely visual ({{tlx|!}} and the like). This type of error may also occur in identifier-based templates ({{tlx|cite doi}}, etc.). When this happens, the error message is shown in the article but the error is actually located in the identifier-based citation template. To resolve this error, remove wikilinks from title-holding parameters that are intended to be externally linked or remove the external URL, which will allow the internal wikilinks to work as expected. If the conflict is implicitly caused through auto-linking (see above), this can be disabled using {{para|title-link|none}}. If wikilink-producing templates are important to the citation, move them out of the CS1 template but leave them inside the citation's {{tag|ref}} tags. Some of the functionality provided by templates may also be available through CS1 parameters. To resolve errors in identifier-based citation templates, the template must be edited to correct the error. Exercise caution when editing these templates because identifier-based citation templates are often used in multiple articles. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_wikilink_in_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="wikilink_in_url_help_text" /> ==<span id="vancouver">Vancouver style error</span>== <section begin="vancouver_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_vancouver|$1=&lt;type>|$2=&lt;number>}} This error is reported for citations that use {{para|vauthors}}, {{para|veditors}}, {{para|name-list-style|vanc}}. [[Vancouver style]] restricts author or editor names to the Latin alphabet. For the purposes of this test, [[Module:Citation/CS1]] defines the Latin alphabet as the letters defined in the [[Unicode]] Latin character sets: : C0 Controls and Basic Latin<ref>{{cite web |title=C0 Controls and Basic Latin |website=[[Unicode]] |url=https://www.unicode.org/charts/PDF/U0000.pdf |access-date=2015-04-19}}</ref> (0041–005A, 0061–007A) : C1 Controls and Latin-1 Supplement<ref>{{cite web |title=C1 Controls and Latin-1 Supplement |website=Unicode |url=https://www.unicode.org/charts/PDF/U0080.pdf |access-date=2015-04-19}}</ref> (00C0–00D6, 00D8–00F6, 00F8–00FF) : Latin Extended-A<ref>{{cite web |title=Latin Extended-A |website=Unicode |url=https://www.unicode.org/charts/PDF/U0100.pdf |access-date=2015-04-19}}</ref> (0100–017F) : Latin Extended-B<ref>{{cite web |title=Latin Extended-B |website=Unicode |url=https://www.unicode.org/charts/PDF/U0180.pdf |access-date=2015-04-19}}</ref> (0180–01BF, 01C4–024F) : Latin Extended Additional<ref>{{cite web |title=Latin Extended Additional |website=Unicode |url=https://www.unicode.org/charts/PDF/U1E00.pdf |access-date=2025-06-02}}</ref> (1E00–1EFF) This error is also reported when more than two initials are used: in case of more than two initials, list only the first two. This error is also reported when a corporate or institutional author is listed in {{para|vauthors}} without proper delimiters. Corporate authors should be listed this way: : {{para|vauthors|First Surname FM, Surname AB, {{green|((}}Corporate or institutional Author{{green|))}}, Last Surname XY}} While normally correct, sometimes the names listed on a PMID page contain errors when the author surname has a lowercase [[nobiliary particle]]. For example, {{PMID|17726700}} lists Magnus von Knebel Doeberitz as Doeberitz Mv which is not correct. This author's name should be listed as {{para|vauthors|von Knebel Doeberitz M}}.<ref>{{cite web |title=Other surname rules |website=National Center for Biotechnology Information |date=2018-05-18 |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/}}</ref> Certain punctuation will be flagged as an error. For example, Unicode U+2019, right single quotation mark, causes an error because it is not a member of the Latin character sets identified above: {{para|vauthors|Van{{red|’}}t Veer M}}. Replace this character with the straight (or typewriter) apostrophe: {{para|vauthors|Van{{green|'}}t Veer M}}. To resolve this error, Romanize author and editor names.<ref>{{cite book |chapter=Names in non-roman alphabets or character-based languages |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers |author-last=Patrias |author-first=Karen |editor-last=Wendling |editor-first=Dan |location=Bethesda, Maryland, USA |publisher=[[National Library of Medicine]] |date=2007 |edition=2nd |chapter-url=https://www.ncbi.nlm.nih.gov/books/NBK7258/box/A48818/}}</ref> Romanizing can result in two-letter initials, for example, the Greek letter 'Θ' Romanizes to 'Th'.<ref>{{cite web |title=Greek |website=Library of Congress |url=https://www.loc.gov/catdir/cpso/romanization/greek.pdf}}</ref> When author names have this kind of initial, Module:Citation/CS1 can't know if this kind of initial is a typo or a legitimate Romanized character so it will emit the Vancouver error. To suppress the error after determining that the two-character initial is correct and not a typo, treat the name as if it were a corporate name by wrapping it in [[Help:Citation_Style_1#Accept-this-as-written_markup|doubled parentheses]]: {{para|vauthors|..., Tatarinov IuS, ...}} → {{para|vauthors|..., ((Tatarinov IuS)), ...}} Similarly, Chinese hyphenated given names may appear in PubMed listings. For example: 'Wang Hsien-yu' may be listed on PubMed as 'Wang Hy' which will result in a Vancouver error. When this occurs, and upon verification that such names are correct, wrap them in doubled parentheses. Specific rules for names:<ref>{{cite book |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers [Internet] |edition=2nd |author-first=Karen |author-last=Patrias |editor-first=Dan |editor-last=Wendling |location=Bethesda, Maryland, USA |publisher=National Library of Medicine |date=2007 |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/ |access-date=2019-03-31}}</ref> * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33071/?report=objectonly Surnames with hyphens and other punctuation in them] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/?report=objectonly Other surname rules] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33104/?report=objectonly Given names containing punctuation, a prefix, a preposition, or particle] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33118/?report=objectonly Degrees, titles, and honors before or after a personal name] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33127/?report=objectonly Designations of rank within a family, such as Jr and III] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33134/?report=objectonly Names appearing in non-roman alphabets (Cyrillic, Greek, Arabic, Hebrew, Korean) or character-based languages (Chinese, Japanese)] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33152/?report=objectonly Organizations as author] ** CS1|2 does not obey the semicolon-as-separator rule. Separate corporate and organizational names from each other and from individual names with a comma; wrap corporate and organizational names in doubled parentheses as described above. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_vancouver|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="vancouver_help_text" /> ==<span id="extra_text_volume">|volume= has extra text</span>== <section begin="extra_text_volume_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_volume|$1=volume}} The templates are responsible for static text rendered in the citation. When {{para|volume}} is used in a template, cs1|2 formats the volume value according to the style corresponding with the publication type associated with the used citation template. The templates emit this error message when some form of the word "volume" ("volume", "vol.") is found in the value assigned to {{para|volume}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_volume|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_volume_help_text" /> ==<span id="param_has_twl_url">Wikipedia Library link in &lt;param></span>== <section begin="twl_url_help_text" />{{Shortcut|WP:WLERROR}}{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_twl_url|$1=&lt;{{var|param}}>}} This error is reported when a URL-holding parameter has a URL that links to [[Wikipedia:The Wikipedia Library|The Wikipedia Library]]. These urls include this text: :<code>wikipedialibrary.idm.oclc.org</code> When these sorts of URLs are encountered, [[Module:Citation/CS1]] emits this error message and automatically sets {{para|url-access|subscription}} because these URLs are not accessible by readers. To resolve this error, make sure that the value assigned to the URL parameter is {{em|not}} the Wikipedia Library URL but {{em|is}} the URL of the source. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_twl_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="twl_url_help_text" /> ==<span id="module_cite">#invoke:Cite errors</span>== <section begin="module_cite_help_text" />{{help desk}} {{hatnote|These error messages are emitted by [[Module:Cite]], a helper module for [[Module:Citation/CS1]] that may be used to replace cs1{{!}}2 templates in articles that have or will exceed the [[Help:Template limits#Post-expand include size|Post-expand include size]] limit.}} <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">missing template name as first positional parameter</span> [[Module:Cite]] requires as its first positional parameter the canonical name of one of the cs1 templates (without the <code>cite</code> prefix) or the name of the cs2 template (<code>citation</code>). The module emits this error message when the first positional parameter is missing or empty. <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">unknown template name: &lt;{{var|template name}}></span> The module emits this error message when the first positional parameter is not the canonical name of a recognized cs1|2 template. To resolve either of these errors, make sure that the module call has one of these canonical template names as its first positional parameter value: {{div col|colwidth=20em}} *<code>arxiv</code> *<code>av media</code> *<code>av media notes</code> *<code>biorxiv</code> *<code>book</code> *<code>citation</code> *<code>citeseerx</code> *<code>conference</code> *<code>document</code> *<code>encyclopedia</code> *<code>episode</code> *<code>interview</code> *<code>journal</code> *<code>magazine</code> *<code>mailing list</code> *<code>map</code> *<code>medrxiv</code> *<code>news</code> *<code>newsgroup</code> *<code>podcast</code> *<code>press release</code> *<code>report</code> *<code>serial</code> *<code>sign</code> *<code>speech</code> *<code>ssrn</code> *<code>tech report</code> *<code>thesis</code> *<code>web</code> {{div col end}} Pages with this error are automatically placed in {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: cite module|Category:CS1 errors: cite module|[[:Category:CS1 errors: cite module]]}} ({{PAGESINCATEGORY:CS1 errors: cite module}} pages).<ref group="lower-alpha" name="categories" /><section end="module_cite_help_text" /><!--When moving this section keep the following attached to the Notes section below --><section begin="notes_help_text" /> ==Notes== <!-- When moving this section keep <section begin="notes_help_text"> (located above this section header) attacted --> {{reflist |group=lower-alpha |refs= <ref group="lower-alpha" name="categories">Pages in the Category talk, Draft talk, File talk, Help talk, MediaWiki talk, Module talk, Portal talk, Talk, Template talk, User, User talk, and Wikipedia talk namespaces are not included in the tracking categories. In addition, pages with names matching the patterns '/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', and '/[Aa]rchive' are not included in the tracking categories.<!--See Module:Citation/CS1/Configuration in uncategorized_namespaces{}--></ref> }}<section end="notes_help_text" /><!-- When moving this section keep the following attached to the References section below --><section begin="references_help_text" /> ==References== <!-- When moving this section keep <section begin="references_help_text"> (located above this section header) attacted --> {{reflist |refs= <ref name="archive.org">{{cite web |url=https://archive.org |title=archive.org website |website=Internet Archive}}</ref> <ref name="webcitation.org">{{cite web |url=https://www.webcitation.org |title=webcitation.org website |website=WebCite}}</ref> }}<section end="references_help_text" /> {{Wikipedia referencing}} {{Help navigation}} 4du5wc3ntufj63ko3hk2c9pyg1fv2v0 117211 117210 2026-07-16T11:41:55Z Tumbuka Arch 6863 1 revision imported from [[:en:Help:CS1_errors]] 117210 wikitext text/x-wiki {{Short description|Wikipedia help page}} {{pp-semi-indef}} {{Wikipedia how to}} {{Bots|deny=Citation bot}} {{Skip to top and bottom}} <!-- IMPORTANT: do not remove or change section header span ids without also changing links in Module:Citation/CS1 --> This page describes the error messages reported by the {{cs1}} and {{cs2}} citations, what they mean, and how editors might resolve the errors. [[:Category:CS1 errors]] is the general errors category and [[:Category:CS1 maintenance]] is the general maintenance category. Errors issued by Wikipedia's <code>&lt;ref></code> system, in which citation templates are typically embedded, can be found at [[Help:Cite errors]]. == Controlling error message display == === Preview messages === When editors preview an article, MediaWiki displays a preview message box under the Preview header. When {{cs1}} and {{cs2}} templates have error or maintenance messages, [[Module:Citation/CS1]] summarizes those messages in the preview message box. Such a message box might look something like this: <div style="margin-left:1.6em;" class="cdx-message cdx-message--warning cdx-message--block"> <span class="cdx-message__icon"></span><div class="cdx-message__content"> {{int:Previewnote}} <span class="mw-continue-editing"> {{fakelink|→ {{int:Continue-editing}}|#editform}}</span> {{int:Scribunto-lua-warning|{{color|#085|{{mono|<nowiki>{{</nowiki>[[Template:cite book|cite book]]<nowiki>}}</nowiki>}}: this {{fakelink|reference}} has maintenance messages}}; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).}} {{int:Scribunto-lua-warning|{{color|#bf3c2c|{{mono|<nowiki>{{</nowiki>[[Template:cite journal|cite journal]]<nowiki>}}</nowiki>}}: this {{fakelink|reference}} has errors}}; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).}} </div> </div> The summary messages have three components: #'{{int:Scribunto-lua-warning|}}' – this prefix is provided by MediaWiki; #a colored ({{color|#085|green maintenance}} or {{color|#bf3c2c|red error}}) message that identifies the type of template that has a message with a link to that template's documentation; wrapper templates with messages will show the name of the wrapped template, and; #'messages may be hidden' – the message suffix with a help link to this page. Preview messages in the preview message box cannot be hidden. The preview message suffix 'messages may be hidden' means that the template's message(s) may not be visible. To learn how to show or hide template messages, see the next section ({{slink||Error and maintenance messages}}). === Error and maintenance messages === <section begin="show_error_messages_help_text" /><section begin="show_all_messages_help_text" />By default, {{cs1}} and {{cs2}} <span style="color:#bf3c2c">error messages</span> are visible to all readers and <span style="color:#085">maintenance messages</span> are hidden from all readers. To display <span style="color:#085">maintenance messages</span> in the rendered article, include the following text in your common [[Cascading Stylesheets|CSS]] page ([[Special:MyPage/common.css|common.css]]) or your specific skin's CSS page and ([[Special:MyPage/skin.css|skin.css]]<!-- in other wiki without [[MediaWiki:Redirect skin.js]], replace this link to [[Special:MyPage/vector-2022.css|vector-2022.css]]、[[Special:MyPage/vector.css|vector.css] -->). (Note to new editors: those CSS pages are specific to you, and control your view of pages, by adding to your user account's [[CSS]] code. If you have not yet created such a page, then clicking one of the <code>.css</code> links above will yield a page that starts "Wikipedia does not have a [[user page]] with this exact name." Click the "Start the User:''username''/''filename'' page" link, paste the text below, save the page, follow the instructions at the bottom of the new page on bypassing your browser's cache, and finally, in order to see the previously hidden maintenance messages, refresh the page you were editing earlier.) <syntaxhighlight lang="css">:root .mw-parser-output .cs1-maint {display: inline;} /* display Citation Style 1 maintenance messages */</syntaxhighlight> To display hidden-by-default <span style="color:#bf3c2c">error messages</span>: <syntaxhighlight lang="css">:root .mw-parser-output .cs1-hidden-error {display: inline;} /* display hidden Citation Style 1 error messages */</syntaxhighlight> Even with this CSS installed, older pages in Wikipedia's cache may not have been updated to show these error messages even though the page is listed in one of the tracking categories. A [[WP:NULLEDIT|null edit]] will resolve that issue. After (error and/maintenance) messages are displayed, it might still not be easy to find them in a large article with a lot of citations. Messages can then be found by searching (with {{key press|Ctrl|F}}) for "(help)" or "cs1". To hide normally-displayed <span style="color:#bf3c2c">error messages</span>: <syntaxhighlight lang="css">:root .mw-parser-output .cs1-visible-error {display: none;} /* hide Citation Style 1 error messages */</syntaxhighlight> You can personalize the display of these messages (such as changing the color), but you will need to ask someone who knows CSS or at [[WP:VPT|the technical village pump]] if you do not understand how. {{lang|la|Nota bene}}: these CSS rules are not obeyed by [[Wikipedia:Tools/Navigation popups|Navigation popups]]. They also do not hide script warning messages in the Preview box that begin with "This is only a preview; your changes have not yet been saved".<section end="show_all_messages_help_text" /><section end="show_error_messages_help_text" /> === Properties category highlighting === <section begin="prop_cat_highlight_help_text" /> [[Module:Citation/CS1]] adds properties categories to some CS1|2 citations. Unlike errors or maintenance needs, there is no message when a properties category is added. Properties categories may be temporary or may be perpetual. Editors can use CSS to add special styling to CS1|2 template renderings that will highlight a citation that added a properties category. For example, this template uses a long volume name: :<code><nowiki>{{cite book |title=Title |date=May–Jun 2021 |volume = 1: Long volume}}</nowiki></code> ::{{cite book |title=Title |date=May–Jun 2021 |volume = 1: Long volume |no-tracking=y}} If you add this to your CSS that citation will render with a {{background|#FFC|pale yellow}} background: :<syntaxhighlight lang="css">.cs1-prop-long-vol {background: #FFC;}</syntaxhighlight> Add one or more of these (with appropriate styling) to your CSS to highlight template renderings when those templates add the associated properties category: ::{{code|lang=css|.cs1-prop-foreign-lang-source {}|}} – subcategories of {{cl|CS1 foreign language sources}} ::{{code|lang=css|.cs1-prop-foreign-lang-source-2 {}|}} – {{cl|CS1 foreign language sources (ISO 639-2)}} ::{{code|lang=css|.cs1-prop-interwiki-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another language Wikipedia ::{{code|lang=css|.cs1-prop-interproj-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another MediaWiki project ::{{code|lang=css|.cs1-prop-location-test {}|}} – {{cl|CS1 location test‎}} ::{{code|lang=css|.cs1-prop-long-vol {}|}} – {{cl|CS1: long volume value}} ::{{code|lang=css|.cs1-prop-script {}|}} – subcategories of {{cl|CS1 uses foreign language script‎}} ::{{code|lang=css|.cs1-prop-tracked-param {}|}} – subcategories of {{cl|CS1 tracked parameters}} ::{{code|lang=css|.cs1-prop-unfit {}|}} — {{cl|CS1: unfit URL}} ::{{code|lang=css|.cs1-prop-year-range-abbreviated {}|}} – {{cl|CS1: abbreviated year range‎}} <section end="prop_cat_highlight_help_text" /> ==Most common errors== This is a list of the ten most-populated cs1|2 error categories ordered by page count. {{#invoke:cs1 documentation support|most_common_error_cats}} {{See also|Category:CS1 errors|Category:CS1 maintenance}} ==<span id="accessdate_missing_url">|access-date= requires |url= </span>== <section begin="accessdate_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_accessdate_missing_url}} The {{para|access-date}} is the date that the online resource addressed by {{para|url}} was added to the article. If {{para|access-date}} has been included in the citation without {{para|url}} then this message appears. If the citation does not use a web link, then {{para|access-date}} is redundant and should be removed. When the online resource has a publication or other fixed date associated with it, {{para|access-date}} is of limited value though may be useful in identifying an appropriate archived version of the resource. Without {{para|url}}, {{para|access-date}} is not considered useful. To resolve this error, provide a value for {{para|url}} or remove {{para|access-date}}. Editors should try to determine why the citation has {{para|access-date}} without {{para|url}}. For example, the citation may never have had a {{para|url}}, or {{para|url}} may have been removed because it links to a site that violates the creator's copyright (see [[WP:COPYLINK]]), or because {{para|url}} was deemed to be dead. If the citation never had {{para|url}} or it was removed for copyright violations, remove {{para|access-date}}. When a dead {{para|url}} has been removed, restore the {{para|url}} and if possible repair it (see [[WP:LINKROT]]). Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_accessdate_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="accessdate_missing_url_help_text" /> ==<span id="archive_date_url_ts_mismatch">|archive-date= / |archive-url= timestamp mismatch</span>== <section begin="archive_date_url_ts_mismatch_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_date_url_ts_mismatch}} Archive.org URLs have a 14-digit snapshot timestamp. This error message is displayed when the archive snapshot date is not the same as the date stated in {{para|archive-date}}. To resolve this error, make sure that {{para|archive-url}} and {{para|archive-date}} refer to the same snapshot. This could mean that values assigned to either or both parameters need to be updated. To get the correct {{para|archive-date}} value, view the archived page's source, looking for a line near the bottom that starts with "FILE ARCHIVED ON". The archive date should appear on that line. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_date_url_ts_mismatch|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_date_url_ts_mismatch_help_text" /> Pages with this error in the tracking category can be fixed by the bot [[WP:WAYBACKMEDIC]]. Requests to run the bot can be made at [[WP:URLREQ]]. ==<span id="archive_date_missing_url">|archive-date= requires |archive-url= </span>== <section begin="archive_date_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_date_missing_url}} {{para|archive-date}}, identifies the date that the web resource was archived. Without a matching {{para|archive-url}} parameter, {{para|archive-date}} is meaningless. To resolve this error, provide a value for {{para|archive-url}} or remove {{para|archive-date}} Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_date_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_date_missing_url_help_text" /> ==<span id="archive_url">|archive-url= is malformed </span>== <section begin="archive_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_url|$1=&lt;reason>}} Archive.org allows a variety of URLs to access snapshots of an archived page. Some of these are: : <code><nowiki>https://web.archive.org/web/YYYYMMDD</nowiki><wbr /><nowiki>hhmmss/http://www.example.com</nowiki></code> – a single snapshot; this is the preferred form for use with {{para|archive-url}} : <code><nowiki>https://web.archive.org/web/*/http://</nowiki><wbr />www.example.com</code> – a wildcard search results page; useful for locating an appropriate snapshot but not appropriate in a citation : <code><nowiki>https://web.archive.org/web/</nowiki><wbr />201603/<nowiki>http://www.example.com</nowiki></code> – incomplete timestamp; archive.org returns the most recent snapshot : <code><nowiki>https://web.archive.org/save/http://</nowiki><wbr />www.example.com</code> – saves a new snapshot of the current target; do not use this form There are two forms of the basic URL: : <code><nowiki>https://web.archive.org/</nowiki><''timestamp''>/...</code> – the old form : <code><nowiki>https://web.archive.org</nowiki>/'''web/'''<''timestamp''><''flags''>/...</code> – the new form The error message identifies the reason for the message. The reasons are: : {{error-small|save command}} – the archive.org URL is the save command : {{error-small|path}} – '''web/''' was expected but something else was found : {{error-small|timestamp}} – the timestamp portion of the URL path is: :* not 14 digits :* not a valid date (time portion of the timestamp is not checked): :**year farther into the future than next year :**year is earlier than archiver launch date of 1996 for archive.org :**month is not in the range [01–12] :**day is not in the range [01 – [28|29|30|31]] (as appropriate for the year and month) : {{error-small|flag}} – the flag portion of the URL path (if present; new form URLs only) is not 2 lowercase letters followed by an underscore: 'id_' : {{error-small|liveweb}} – <code>liveweb.archive.org</code> is a deprecated form of the domain name When the archive.org URL has any of these errors, Module:Citation/CS1 does not link to archive.org in normal article view and emits an appropriate error message. However, in article preview mode, the module creates a modified link to archive.org that uses a partial timestamp with <code>*</code> wildcard suffix. This new URL links to an archive.org calendar view so that editors may more easily select a suitable archived snapshot from those available at archive.org to fix the malformed {{para|archive-url}} link. (If no snapshots have been archived at archive.org, and the cited page is still live, this link also allows editors to save the first snapshot of the page at archive.org.) To resolve this error, choose the URL of an appropriate snapshot from those held at archive.org. [https://archive.org/web/ Search for the target URL] at archive.org. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_url_help_text" /> ==<span id="archive_missing_date">|archive-url= requires |archive-date= </span>== <section begin="archive_missing_date_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_date}} {{para|archive-date}}, identifies the date that the web resource was archived. To resolve this error, provide a value for {{para|archive-date}} (see acceptable date formats in [[MOS:DATEFORMAT]]). For web resources archived at archive.org,<ref name="archive.org" /> the archival date can be found in the {{para|archive-url}}; for resources archived at webcitation.org,<ref name="webcitation.org" /> the cache date is included in the archive header. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_missing_date_help_text" /> ==<span id="archive_missing_url">|archive-url= requires |url= </span>== <section begin="archive_missing_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_url}} A properly formatted citation that includes {{para|archive-url}} and {{para|archive-date}} requires {{para|url}}. When the citation includes {{para|url-status|live}}, the ordering of elements in the rendered citation is changed to put the original URL first. To resolve this error, provide a value for {{para|url}}. For web resources archived at archive.org,<ref name="archive.org" /> the original URL can be found in the {{para|archive-url}} value; for resources archived at webcitation.org,<ref name="webcitation.org" /> the original URL is included in the archive header. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="archive_missing_url_help_text" /> ==<span id="arxiv_missing">|arxiv= required</span>== <section begin="arxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_arxiv_missing}} {{tlx|cite arXiv}} requires one, but not both, of the identifier parameters {{para|arxiv}} or {{para|eprint}} to specify an [[arXiv]] identifier. To resolve this error, ensure that the template has {{para|arxiv}} or {{para|eprint}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_arxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="arxiv_missing_help_text" /> ==<span id="asintld_missing_asin">|asin-tld= requires |asin=</span>== <section begin="asintld_missing_asin_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_asintld_missing_asin|$1=asin-tld}} When {{para|asin-tld}} is used in a CS1|2 template, {{para|asin}} (with value) must also be present. To resolve this error, either add the missing ASIN or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_asintld_missing_asin|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="asintld_missing_asin_help_text" /> ==<span id="biorxiv_missing">|biorxiv= required</span>== <section begin="biorxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_biorxiv_missing}} {{tlx|cite bioRxiv}} requires the identifier parameter {{para|biorxiv}}. To resolve this error, ensure that the template has {{para|biorxiv}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_biorxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="biorxiv_missing_help_text" /> ==<span id="chapter_ignored">|chapter= ignored</span>== <section begin="chapter_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_chapter_ignored|$1=chapter}} {{cs1}} templates {{tlx|cite web}}, {{tlx|cite news}}, {{tlx|cite journal}}, {{tlx|cite magazine}}, {{tlx|cite press release}}, {{tlx|cite podcast}}, {{tlx|cite newsgroup}}, as well as template {{tlx|citation}} when it uses {{para|work}} or any of its aliases, do not support {{para|chapter}} and its components {{para|trans-chapter}}, {{para|script-chapter}}, {{para|chapter-url}}, and {{para|chapter-format}}. The alias parameters {{para|contribution}}, {{para|entry}}, {{para|article}}, {{para|section}}, and their components, are similarly not supported. To resolve this error: * use a more appropriate citation template (such as {{tl|cite book}} or {{tl|cite encyclopedia}}), or * place the content of the {{para|chapter}} parameter in {{para|title}}, or * for {{tl|cite news}}, {{para|department}} can be used to give the name of the newspaper's section, such as "Obituaries", or * for {{tl|citation}}, remove {{para|work}} or its aliases such as {{para|website}} and place their content in {{para|title}} if appropriate * move the content of the {{para|chapter}} parameter out of the template, before the closing <nowiki></ref></nowiki> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_chapter_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="chapter_ignored_help_text" /> ==<span id="invisible_char">&lt;char> character in |&lt;param>= at position ''n''</span>== <section begin="invisible_char_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&lt;char> character|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>|$3={{var|n}}}} This error is reported for citations with parameter values that contain invisible or non-printable characters known as [[control character]]s; the error includes the position at which the character can be found. [[Module:Citation/CS1]] detects parameter values that contain any of these characters: * [[non-breaking space]], U+00A0 * [[soft hyphen]], U+00AD * [[replacement character]], U+FFFD * [[hair space]], U+200A * [[zero-width space]], U+200B * [[zero-width joiner]], U+200D (note that these are permitted as part of emoji modifiers; see note below) * [[horizontal tab]], U+0009 (HT) * [[line feed]], U+0010 (LF) * [[carriage return]], U+0013 (CR) * [[delete character]], U+007F (DEL) * [[C0 and C1 control codes|C0 control]], U+0000–U+001F (NULL–US) * [[C0 and C1 control codes|C1 control]], U+0080–U+009F (XXX–APC) To resolve invisible-character errors, remove or replace the identified character. Most intentional white-space characters should be replaced with a normal space character (i.e. press your keyboard's space bar). See [[MOS:NBSP]] for guidance on insertion of intentional non-breaking spaces. Because these characters are mostly invisible, the error message identifies the character's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted. If you move through the citation with the arrow keys then the cursor may stand still once at an invisible character, which can be removed with {{keypress|Delete}} or {{keypress|Backspace}}. If you copy-paste a string to the "Characters" field at https://r12a.github.io/app-conversion/ and click "View in UniView" then the position and name of all characters is shown. [[Zero-width joiner]] characters (U+200D) are used as a valid part of emoji modification (for example, adding a skull emoji to a flag emoji to create a pirate flag emoji). When new modifiers are added to the emoji character set, which happens one or two times per year, those modifiers need to be added to the Citation Style 1 "Configuration" module. Editors can request this addition at [[Help talk:Citation Style 1]]. {{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&lt;name> stripmarker|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>|$3={{var|n}}}} [[Help:Strip markers|Strip markers]] are special sequences of characters that [[MediaWiki]] inserts as a place-holder for certain [[XML]]-like tags. These tags include {{tag|gallery}}, {{tag|math}}, {{tag|nowiki}}, {{tag|pre}}, and {{tag|ref}}. The strip markers are replaced with content before the final page rendering. The module ignores math and nowiki strip markers. To resolve strip marker errors, remove or replace the identified tag. The error message identifies the strip marker's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted when calculating the position. Strip marker errors can also be caused by unsupported additional text or templates in parameter values{{mdash}}for example, {{tl|ISBN}} in {{para|title}}. Resolve the problem by moving the extraneous text outside the citation template, or by removing the extraneous text or template markup, as appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invisible_char|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invisible_char_help_text" /> ==<span id="bad_arxiv">Check |arxiv= value</span>== <section begin="bad_arxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_arxiv}} When {{cs1}} and {{cs2}} templates contain {{para|arxiv}}, a test is done to see if the [[arXiv]] identifier conforms with the arXiv identifier scheme.<ref>{{cite web |url=https://arxiv.org/help/arxiv_identifier |title=Understanding the arXiv identifier |website=[[Cornell University Library]] |access-date=2014-08-20|archive-url=http://web.archive.org/web/20150102034251/https://arxiv.org/help/arxiv_identifier|archive-date=2015-01-02}}</ref> The identifier is checked for a valid number of digits in the article id; valid year and month values; and properly-placed hyphens, slashes, and dots. To resolve this error, ensure that the {{para|arxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_arxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_arxiv_help_text" /> ==<span id="bad_asin">Check |asin= value</span>== <section begin="bad_asin_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_asin}} When {{cs1}} and {{cs2}} templates contain {{para|asin}}, a test is done to see if the [[ASIN]] identifier contains ten upper-case alphanumeric characters without punctuation or spaces and that if the first character is numeric, that the ASIN conforms to the rules for a ten-digit [[ISBN]]. To resolve this error, ensure that the {{para|asin}} value is correct. If the {{para|asin}} value is correct and all-numeric, use {{para|isbn}} instead and delete any {{para|asin-tld}} parameters. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_asin|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_asin_help_text" /> ==<span id="bad_asin_tld">Check |asin-tld= value</span>== <section begin="bad_asin-tld_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_asin_tld}} {{cs1}} and {{cs2}} templates contain a test for known {{para|asin-tld}} values to specify the [[top-level domain]] (TLD) of a given [[ASIN]] identifier link. The list of currently supported values is: <section begin="asin-tld_values_list" /><code>ae</code>, <code>au</code>, <code>br</code>, <code>ca</code>, <code>cn</code>, <code>de</code>, <code>es</code>, <code>fr</code>, <code>in</code>, <code>it</code>, <code>jp</code>, <code>mx</code>, <code>nl</code>, <code>pl</code>, <code>sa</code>, <code>se</code>, <code>sg</code>, <code>tr</code>, <code>uk</code><section end="asin-tld_values_list" /> It is not necessary to provide {{para|asin-tld}} to specify the default (United States). If you want to specify this condition explicitly, a pseudo-value of <code>us</code> can be given to denote this. All these values are automatically resolved to the correct TLD following one of the schemes <code>''nn''</code>, <code>com.''nn''</code>, <code>co.''nn''</code>, <code>z.''nn''</code>, and <code>com</code>. If an unsupported value is encountered, the template will issue this error message. To resolve this error, ensure that the {{para|asin-tld}} value is correct. If the value is correct, please report this at [[Help talk:Citation Style 1]], so that it can be added to the list of supported values. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_asin_tld|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_asin-tld_help_text" /> ==<span id="bad_bibcode">Check |bibcode= &lt;message></span>== <section begin="bad_bibcode_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_bibcode|$1=&lt;message>}} When {{cs1}} and {{cs2}} templates contain {{para|bibcode}}, a test is done to see if the [[bibcode]] identifier has the proper format.<ref>{{cite web |title=Bibcodes |url=https://ui.adsabs.harvard.edu/help/actions/bibcode |website=ADS news, blogs, and help pages |publisher=The SAO Astrophysics Data System |access-date=2025-10-21 |date=2015-02-09}}</ref> Bibcodes are expected to match these requirements: : length must be 19 characters (&lt;message> = '<span class="error" style="font-size:100%">length</span>') : characters in position(s): (except as specified otherwise, violations produce '<span class="error" style="font-size:100%">value</span>' in the &lt;message> portion of the error message): :: 1–4 must be digits and must represent a year in the range of 1000 – next year (&lt;message> = '<span class="error" style="font-size:100%">year</span>') :: 5 must be a letter :: 6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. (&lt;message> = '<span class="error" style="font-size:100%">journal</span>')) :: 9–18 must be letter, digit, or dot :: 19 must be a letter or dot To resolve this error, ensure that the {{para|bibcode}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_bibcode|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_bibcode_help_text" /> ==<span id="bad_biorxiv">Check |biorxiv= value</span>== <section begin="bad_biorxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}} When {{cs1}} and {{cs2}} templates contain {{para|biorxiv}}, a test is done to see if the [[bioRxiv]] identifier has the proper form. There are two valid forms, each beginning with bioRxiv's doi directory indicator and registrant code (10.1101 or 10.64898) and followed by: : six numeric characters without punctuation or spaces: ::{{para|biorxiv|10.1101/######}} ::: <code>######</code> – 6-digit bioRxiv identifier : ymd format date prefix followed by six numeric characters without punctuation or spaces followed by optional version: :: {{para|biorxiv|10.1101/yyyy.mm.dd.######v#}} where: ::: <code>yyyy.mm.dd.</code> – represents a date no earlier than 11 December 2019 (<code>2019.12.11.</code>) and no later than tomorrow's date; date must be a valid date ::: <code>######</code> – 6-digit bioRxiv identifier ::: <code>v#</code> – optional version indicator A common error is to include the bioRxiv ''URL'' (<code>{{red|<nowiki>https://dx.doi.org/</nowiki>}}10.1101/######}}</code>). To resolve this error, ensure that the {{para|biorxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_biorxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_biorxiv_help_text" /> ==<span id="bad_citeseerx">Check |citeseerx= value</span>== <section begin="bad_citeseerx_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_citeseerx}} When {{cs1}} and {{cs2}} templates contain {{para|citeseerx}}, a test is done to see if the [[CiteSeerX]] identifier has the proper format. The expected identifier is the value assigned to the <code>?doi=</code> query key in the URL of a CiteSeerX document. (This query key should not be confused with a [[Digital Object Identifier]]: it should not be input as {{para|doi}}.) For instance, if you want to link to <code>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.220.7880</code>, use {{para|citeseerx|10.1.1.220.7880}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_citeseerx|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_citeseerx_help_text" /> ==<span id="bad_date">Check date values in: |&lt;param1>=, |&lt;param2>=, ...</span>== <section begin="bad_date_help_text" />{{help desk}} {{plainlist}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_date|$1=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, ...}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_date|$1=<code class="cs1-code">{{pipe}}year=</code> / <code class="cs1-code">{{pipe}}date=</code> mismatch}} {{endplainlist}} When {{cs1}} and {{cs2}} templates contain date-holding parameters, an automated test is done to see if the dates are real dates that comply with a [[Help:Citation_Style_1#Date format compliance with Wikipedia's Manual of Style|subset of the date rules]] in Wikipedia's Manual of Style, specifically checking for violations of [[Wikipedia:Manual of Style/Dates and numbers#Dates and years|MOS:DATEFORMAT]]. To resolve this error, ensure that the date is an actual date and that the date format follows the [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]] in the named parameter. See [[Help:CS1 errors#ExamplesOfUnacceptableDates|examples of unacceptable dates and how to fix them]], below. Or, some conceptual issues to look for: * impossible dates, such as 29 February 2011 (2011 was not a leap year) * {{para|access-date}} must specify a day, not just a month or year * {{para|archive-date}} must specify a whole date * misplaced, incorrect, or extraneous punctuation * misplaced, incorrect, or extraneous spacing * extra or missing zeros, such as June 06 instead of June 6 * extraneous text * hyphens or slashes instead of en dashes in date ranges (en dashes are required) * misspelling or improper capitalization (see [[MOS:ALLCAPS]] for more detail that is not in [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]]) * other unacceptable date formats listed in [[MOS:BADDATEFORMAT]] * more than one date in a date-holding parameter * days of the week (such as Monday, June 6 instead of June 6) * years before 100 AD, including BCE/BC dates. Try using parameter {{para|orig-date}} instead. See [[Help:Citation_Style_1#CS1_compliance_with_Wikipedia.27s_Manual_of_Style|Help: Citation Style 1]] for information about limitations in the CS1 citation templates' handling of date formats. [[WP:DATERANGE|The MOS section on date ranges]] describes how to separate dates in a date range. Do not use <code>&amp;nbsp;</code>, <code>&amp;ndash;</code>, or {{tlx|spaced ndash}} as these corrupt the metadata. To add an en dash, use the [[Help:CharInsert#Insert|CharInsert]] edit tool or see [[Wikipedia:How to make dashes]]. You may also copy and paste this one: &ndash;. A bot is often able to correct the separator, provided the overall format is unambiguous. Future dates in {{para|date}} in CS1|2 citations are limited to current year + 1; that is, for {{#time:Y}}, citation dates in {{#time:Y|now +1 year}} are acceptable but citation dates in {{#time:Y|now +2 year}} and beyond are not. Dates prior to 1582 are treated as [[Julian calendar]] dates. Dates from 1582 onward are treated as [[Gregorian calendar]] dates. The Julian calendar was used in some places until approximately 1923. Three Julian calendar dates in the overlap period, 29 February in the years 1700, 1800, and 1900, will cause this error message because those years are not leap years in the Gregorian calendar. The access date (in {{para|access-date}}) is checked to ensure that it contains a full date (day, month, and year) and is between 15 January 2001 (the founding date of Wikipedia) and today's date plus one day, because it represents the date that an editor viewed a web-based source to verify a statement on Wikipedia. Because editors may be in time zones that are one day ahead of the UTC date, one extra day is accepted. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_date_help_text" /> {{anchor|Date Fix Table|Dates|DateFixTable}} {{anchor|ExamplesOfUnacceptableDates}} {| class="wikitable" |+ Examples of unacceptable dates and how to fix them |- ! Issue !! Unacceptable !! Acceptable |- | Hyphen in date range (use en dash) || {{para|plain=y|date|2002{{red|-}}2003}} || {{para|plain=y|date|2002{{green|–}}2003}} |- | Slash in date range (use en dash) || {{para|plain=y|date|2002{{red|/}}2003}} or {{para|plain=y|date|July{{red|/}}August 2003}}||{{para|plain=y|date|2002{{green|–}}2003}} or {{para|plain=y|date|July{{green|–}}August 2003}} |- | Hyphen in date range (use en dash) || {{para|plain=y|date|April{{red|-}}May 2004}} || {{para|plain=y|date|April{{green|–}}May 2004}} |- | Missing space around en dash for range of full dates || {{para|plain=y|date|April 2003{{red|–}}May 2004}} || {{para|plain=y|date|April 2003 {{green|–}} May 2004}} |- | Month capitalization || {{para|plain=y|date|28 {{red|f}}ebruary 1900}} || {{para|plain=y|date|28 {{green|F}}ebruary 1900}} |- | Month capitalization || {{para|plain=y|date|28 F{{red|EBRUARY}} 1900}} || {{para|plain=y|date|28 F{{green|ebruary}} 1900}} |- | Season capitalization || {{para|plain=y|date|{{red|s}}pring 2011}} || {{para|plain=y|date|{{green|S}}pring 2011}} |- | Future date (typo) || {{para|plain=y|date|2{{red|10}}2}} || {{para|plain=y|date|2{{green|01}}2}} |- | Access date in future (see note above) || {{para|plain=y|access-date|{{red|{{day+1|{{day+1}}}}, {{CURRENTYEAR}}}}}} || {{para|plain=y|access-date|{{Currentmonthday}}, {{CURRENTYEAR}}}} |- | Access date impossibly far in the past (typo) || {{para|plain=y|access-date|1 January 20{{red|01}}}} || {{para|plain=y|access-date|1 January 20{{green|10}}}} |- | Access date only specifies month || {{para|plain=y|access-date|{{red|January}} 2015}} || {{para|plain=y|access-date|{{green|12 January}} 2015}} |- | Ambiguous date range or year and month || {{para|plain=y|date|2002-{{red|03}}}} || {{plainlist| * {{para|plain=y|date|2002–{{green|20}}03}} * {{para|plain=y|date|{{green|March}} 2002}}}} |- | Bad abbreviation || {{para|plain=y|date|{{red|Febr.}} 28, 1900}} || {{plainlist| * {{para|plain=y|date|{{green|Feb}} 28, 1900}} * {{para|plain=y|date|{{green|February}} 28, 1900}}}} |- | Nonexistent date || {{para|plain=y|date|{{red|February 29, 1900}}}} || |- | Undated || {{para|plain=y|date|{{red|Undated}}}} || {{para|plain=y|date|{{green|n.d.}}}} |- | Comma in month and year || {{para|plain=y|date|February{{red|,}} 1900}} || {{para|plain=y|date|February 1900}} |- | Comma in season || {{para|plain=y|date|Winter{{red|,}} 1900–1901}} || {{para|plain=y|date|Winter 1900–1901}} |- | Missing comma in format which requires it || {{para|plain=y|date|{{red|February 28 1900}}}} || {{para|plain=y|date|February 28{{green|,}} 1900}} or {{para|plain=y|date|28 February 1900}} or {{para|plain=y|date|1900-02-28}} |- | Non-date text || {{para|plain=y|date|2008{{red|, originally 2000}}}} || {{para|plain=y|date|2008}} {{green|{{para|plain=y|orig-date|2000}}}} |- | Zero-padding || {{para|plain=y|date|January {{red|04}}, 1987}} || {{para|plain=y|date|January {{green|4}}, 1987}} |- | Date with slashes || {{para|plain=y|date|12{{red|/}}6{{red|/}}87}} || {{para|plain=y|date|{{green|December 6, 19}}87}} or {{para|plain=y|date|{{green|6 December 19}}87}} or {{para|plain=y|date|{{green|1987-12-06}}}}<br/>or<br/>{{para|plain=y|date|{{green|12 June 19}}87}} or {{para|plain=y|date|{{green|June 12, 19}}87}} or {{para|plain=y|date|{{green|1987-06-12}}}} |- | Two-digit year || {{para|plain=y|date|{{red|87}}-12-06}} || {{para|plain=y|date|{{green|19}}87-12-06}} |- | One-digit month or day || {{para|plain=y|date|2007-{{red|3}}-{{red|6}}}} || {{para|plain=y|date|2007-{{green|03}}-{{green|06}}}} |- | Wikified date || {{para|plain=y|date|{{red|<nowiki>[[</nowiki>}}April 1{{red|<nowiki>]]</nowiki>}}, {{red|<nowiki>[[</nowiki>}}1999{{red|<nowiki>]]</nowiki>}} }} || {{para|plain=y|date|{{green|April 1, 1999}}}} |- | "mm-dd-yyyy" or "dd-mm-yyyy" date format || {{para|plain=y|date|{{red|07-12-}}2009}} || {{para|plain=y|date|{{green|7 December}} 2009}} or {{para|plain=y|date|{{green|12 July}} 2009}}<br />or<br />{{para|plain=y|date|{{green|July 12,}} 2009}} or {{para|plain=y|date|{{green|December 7,}} 2009}}<br />or <br />{{para|plain=y|date|2009-{{green|07-12}}}} or {{para|plain=y|date|2009-{{green|12-07}}}} |- | Quarters || {{para|plain=y|date|{{red|3Q}} 1984}} or {{para|plain=y|date|{{red|3rd Qtr.,}} 1984}} or {{para|plain=y|date|{{red|Third quarter}} 1984}} || {{para|plain=y|date|{{green|Third Quarter}} 1984}} |- | Named dates || {{para|plain=y|date|{{red|Xmas}} 1984}} or {{para|plain=y|date|{{red|christmas}} 1984}} || {{para|plain=y|date|{{green|Christmas}} 1984}} |- | Approximate or uncertain dates || {{para|plain=y|date|{{red|circa}} 1970}} or {{para|plain=y|date|{{red|<nowiki>{{circa}}</nowiki>}} 1970}} || {{para|plain=y|date|{{green|c.}} 1970}} |- |} ==<span id="bad_doi">Check |doi= value</span>== <section begin="bad_doi_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_doi}} When {{cs1}} and {{cs2}} templates contain {{para|doi}}, a test is done to see if the prefix portion of the [[Digital object identifier|DOI]] value is correctly formatted and has what appears to be a valid registrant code. A proper DOI prefix begins with the <code>10.</code> directory indicator. The remaining portion of the prefix is a string of digits and the dot character which form the registrant code. When the directory indicator is <code>10.</code>, the CS1|2 templates test for a valid registrant code. Valid registrant codes: * must be composed of digits * must be in the range: ** 1000–9999 ** 10000–89999 * may have one or more subcodes that begin with a dot followed by digits (1000.10) * must not be 5555 (invalid/temporary/test) Additionally, the {{para|doi}} value is checked to make sure that it does not contain spaces, en dashes, does not end with punctuation. Further validation of the DOI is not performed. Do not include the <code><nowiki>https://doi.org/</nowiki></code> scheme and domain name from a URL. A proper {{para|doi}} value looks like {{para|doi|10.1103/PhysRevLett.80.904}}. To resolve this error, ensure that the {{para|doi}} value is correct. In very rare cases, publishers have released works with a DOI deviating from the standard form. If you are certain that such a non-conforming DOI truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. (Do not use this markup for DOIs which are ''inactive'' rather than ''non-conforming''. Instead, use {{para|doi-broken-date}} for them.) Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_doi|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_doi_help_text" /> ==<span id="bad_hdl">Check |hdl= value</span>== <section begin="bad_hdl_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_hdl}} When {{cs1}} and {{cs2}} templates contain {{para|hdl}}, a test is done to see if the [[Handle System|hdl]] value looks like a properly defined value. The {{para|hdl}} value is checked to make sure that it does not contain spaces or en dashes and does not end with punctuation. Further validation of the hdl is not performed. To resolve this error, ensure that the {{para|hdl}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_hdl|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_hdl_help_text" /> ==<span id="bad_isbn">Check |isbn= value</span>== <section begin="bad_isbn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_isbn|$1=&lt;type>}} {{cs1}} and {{cs2}} templates that contain {{para|isbn}} are checked to ensure that the [[ISBN]] is the proper length (ten or thirteen digits), that the ISBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISBN specification. Only one ISBN is allowed in this field because the whole {{para|isbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISBN, or characters that are not part of the ISBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]]. (If relevant, they can be specified using {{para|id|{{tlp|ISBN|...}}}} instead.) The error message &lt;type> indicator can be: : {{error-small|length}} – ISBN is not 10 or 13 digits : {{error-small|checksum}} – ISBN has one or more incorrect digits; look for typos and transposition : {{error-small|invalid character}} – ISBN has one or more 'digits' that is not in the allowed set appropriate to ISBN length : {{error-small|invalid prefix}} – 13-digit ISBNs must begin with '978' or '979' : {{error-small|invalid form}} – 10-digit ISBNs with the mis-positioned 'X' character : {{error-small|invalid group id}} – 13-digit ISBN begins with '9790'; this prefix / group ID combination is reserved to [[ISMN]] To resolve this error, ensure that the {{para|isbn}} value is correct, that only one ISBN is used, that the proper optional separators are used, and that no other text is included. Use the ISBN printed on the work rather than one retrieved from third-party sources. If ''both are available'', use the 13-digit ISBN. When a 10-digit ISBN is used, if the check digit is a lowercase 'x', change it to an uppercase 'X'. * '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the ISBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere). * If you only have a 10-digit ISBN, '''do''' use the number as-is, do not try to convert it to the 13-digit form. * If the ISBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for ISBNs. It is not uncommon for the ISBN to be misprinted in the front matter but correct on the cover. * '''Do''' preview your edit and check that the new ISBN does now link to the correct source. * Bad ISBNs are a [[Wikipedia:Signs_of_AI_writing#Invalid DOI and ISBNs|possible indicator of LLM-generated text]]. '''Do''' consider reviewing the surrounding text, the entire article, or recent edits to that article for AI [[Hallucination (artificial intelligence)|hallucinations]] and [[Wikipedia:Signs_of_AI_writing|other hallmarks of LLM generation]]. In very rare cases, publishers have released books with malformed ISBNs. If you are certain that a non-conforming ISBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected ISBN. Use a corrected ISBN when possible. Sometimes there are numbers assigned to {{para|isbn}} that appear to be legitimate – length is right, check digit is correct – but that aren't true ISBN numbers. This [http://isbn.org/ISBN_converter tool] may be helpful. See also [[Wikipedia:ISBN]]. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_isbn|pages=yes}}.<ref group="lower-alpha" name="categories" /><!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISBN, and #ifeq: --><section end="bad_isbn_help_text" /> ==<span id="bad_ismn">Check |ismn= value</span>== <section begin="bad_ismn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ismn}} {{cs1}} and {{cs2}} templates that contain {{para|ismn}} are checked to ensure that the [[ISMN]] is the proper length (thirteen digits), that the ISMN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISMN specification. Only one ISMN is allowed in this field because the whole {{para|ismn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISMN, or characters that are not part of the ISMN, corrupt the COinS metadata. (If relevant, they can be specified using {{para|id|{{tlp|ISMN|...}}}} instead.) To resolve this error, ensure that the {{para|ismn}} value is correct, that only one ISMN is used, that the proper optional separators are used, and that no other text is included. Make sure that the ISMN contains exactly 13 digits. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ismn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ismn_help_text" /> ==<span id="bad_issn">Check |issn= value</span>== <section begin="bad_issn_help_text" />{{help desk}} {{plainlist}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} {{endplainlist}} {{cs1}} and {{cs2}} templates that contain {{para|issn}} and/or {{para|eissn}} are checked to ensure that the [[ISSN]] is the proper length (eight digits) and that the final [[check digit]] validates according to the ISSN specification. Only one each of ISSN and eISSN is allowed in this field because the whole {{para|issn}} and {{para|eissn}} values are included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. (If relevant, they can be specified using {{para|id|{{tlp|ISSN|...}} {{tlp|EISSN|...}}}} instead.) The ISSN and eISSN are always rendered as two four-digit numbers separated with a hyphen. To resolve this error, ensure that the {{para|issn}} and {{para|eissn}} values are correct, that only one value per parameter is used, and that no other text is included (allowable characters are 0–9, X, and -). If the check-digit is a lowercase 'x', change it to an uppercase 'X'. It may also be worth checking an actual [[hyphen]] (-) has been used, and not a hyphen-like character like an [[endash]] (–). In very rare cases, publishers have released works with a malformed identifier. If you are certain that a non-conforming identifier truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In some cases, works may have been reissued with a corrected identifier. Use the corrected one when possible. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_issn|pages=yes}}.<ref group="lower-alpha" name="categories" /><!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISSN, and #ifeq: --><section end="bad_issn_help_text" /> ==<span id="bad_jfm">Check |jfm= value</span>== <section begin="bad_jfm_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_jfm}} When {{cs1}} and {{cs2}} templates contain {{para|jfm}}, a test is done to see if the [[Jahrbuch über die Fortschritte der Mathematik|JFM]] identifier value looks like a properly defined value. The {{para|jfm}} identifier is checked to make sure that it has the form: <code>nn.nnnn.nn</code> where <code>n</code> is any digit 0–9. Further validation of the JFM identifier is not performed. To resolve this error, ensure that the {{para|jfm}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_jfm|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_jfm_help_text" /> ==<span id="bad_jstor">Check |jstor= value</span>== <section begin="bad_jstor_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_jstor}} When {{cs1}} and {{cs2}} templates contain {{para|jstor}}, a test is done to see if the [[JSTOR (identifier)|JSTOR]] identifier value looks like a properly defined value. Error messages are emitted when the assigned value has some form of the string 'jstor' (case-agnostic), or has a URI scheme (<code>http://</code> or <code>https://</code>), or has any space characters. To resolve this error, ensure that the {{para|jstor}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_jstor|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_jstor_help_text" /> ==<span id="bad_lccn">Check |lccn= value</span>== <section begin="bad_lccn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_lccn}} The {{para|lccn}} parameter is for the [[Library of Congress Control Number]] identifier. It is checked to ensure that the identifier is the proper length and has the correct initial digits. LCCN is a character string 8–12 characters long. The length of the LCCN dictates the character type of the initial 1–3 characters; the rightmost eight are always digits.<ref>{{cite web |url=https://www.loc.gov/marc/lccn-namespace.html#syntax |title=The LCCN Namespace |website=Network Development and MARC Standards Office |publisher=[[Library of Congress]] |date=November 2003}}</ref> {|class="wikitable" |+ LCCN format description ! Length !! Description |- | 8 || all characters are digits |- | 9 || first character is a lower case letter |- | 10|| first two characters are either both lower case letters or both digits |- | 11|| first character is a lower case letter, second and third characters are either both lower case letters or both digits |- | 12|| first two characters are both lower case letters |- |} Further validation is not performed. To resolve this error, ensure that the {{para|lccn}} value is correct and that there are no other letters, punctuation, or other characters. When receiving this error, be on the lookout for publishers who omitted leading zeros in the LCCN following the two or four digit year. For example, an LCCN that is [https://catalog.loc.gov/vwebv/search?searchCode=LCCN&searchArg=92035247&searchType=1&permalink=y properly 92-035427] could be shortened in the printed work to [https://books.google.com/books?id=3ocPU-S9gloC&q=35247 92-35247]. When experimenting with inserting omitted zeroes, cross-check the finished number against the LCCN permalinks online. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_lccn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_lccn_help_text" /> ==<span id="bad_medrxiv">Check |medrxiv= value</span>== <section begin="bad_medrxiv_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_medrxiv}} When {{cs1}} and {{cs2}} templates contain {{para|medrxiv}}, a test is done to see if the [[medRxiv]] identifier has the proper form. The medRxiv identifier begins with medRxiv's doi directory indicator and registrant code (10.1101 or 10.64898) and followed by: : ymd format date prefix followed by eight numeric characters without punctuation or spaces followed by optional version: :: {{para|medrxiv|10.1101/yyyy.mm.dd.########v#}} where: ::: <code>yyyy.mm.dd.</code> – represents a date no earlier than 1 January 2020 (<code>2020.01.01.</code>) and no later than tomorrow's date; date must be a valid date ::: <code>########</code> – 8-digit medRxiv identifier ::: <code>v#</code> – optional version indicator A common error is to include the medRxiv ''URL'' (<code>{{red|<nowiki>https://dx.doi.org/</nowiki>}}10.1101/yyyy.mm.dd.########}}</code>). To resolve this error, ensure that the {{para|medrxiv}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_medrxiv|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_medrxiv_help_text" /> ==<span id="bad_message_id">Check |message-id= value</span>== <section begin="bad_message_id_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_usenet_id}} The {{para|message-id}} parameter holds the unique identifier associated with a netnews message.<ref>{{cite web |url=https://tools.ietf.org/html/rfc5536 |title=Netnews Article Format |website=[[Internet Engineering Task Force]] |at=[https://tools.ietf.org/html/rfc5536#section-3.1.3 3.1.3] |rfc=5536 |date=November 2009}}</ref> The value in {{para|message-id}} is checked to make sure that it contains <code>@</code> between left and right identifiers. {{para|message-id}} is also checked to make sure that the first character is not <code>&lt;</code> and the last character is not <code>></code>. [[Module:Citation/CS1]] adds the [[URI scheme]] <code>news:</code> to the value in {{para|message-id}}. If the value in {{para|message-id}} is wrapped in <code><...></code> characters, the link created fails. Further validation is not performed. To resolve this error, ensure that the {{para|message-id}} value is correct, that it contains <code>@</code> and is not wrapped in <code><...></code> characters. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_usenet_id|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_message_id_help_text" /> ==<span id="bad_mr">Check |mr= value</span>== <section begin="bad_mr_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_mr}} When {{cs1}} and {{cs2}} templates contain {{para|mr}}, a test is done to see if the [[Mathematical Reviews|MR]] identifier value looks like a properly defined value. The {{para|mr}} identifier is checked to make sure that it contains only digits and that it is no more than seven digits in length. Further validation of the MR identifier is not performed. To resolve this error, ensure that the {{para|mr}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_mr|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_mr_help_text" /> ==<span id="bad_oclc">Check |oclc= value</span>== <section begin="bad_oclc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_oclc}} The {{para|oclc}} parameter is for the [[OCLC]] identifier. Only a single OCLC identifier is allowed. (If relevant, multiple OCLCs can be specified using {{para|id|{{tlp|OCLC|...}}}} instead.) The identifier must be in one of these forms: # prefix <code>ocm</code> followed by 8 digits # prefix <code>ocn</code> followed by 9 digits # prefix <code>on</code> followed by 10 (or more) digits # prefix <code>(OCoLC)</code> followed by a variable number of digits without leading zeros # 1 to 10 (or more) digits without prefix Further validation is not performed. To resolve this error, ensure that the {{para|oclc}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|oclc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. A tip for fixing this error: Editors sometimes place valid [[ISBN]], [[LCCN]], [[ASIN]], or other identifiers in {{para|oclc}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_oclc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_oclc_help_text" /> ==<span id="bad_ol">Check |ol= value</span>== <section begin="bad_ol_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ol}} The {{para|ol}} parameter is for the [[Open Library]] identifier. The identifier is one or more digits followed by a last character that is either <code>A</code> (authors), <code>M</code> (books), or <code>W</code> (works). Further validation is not performed. To resolve this error, ensure that the {{para|ol}} value is correct. Do not include "OL" in the value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ol|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ol_help_text" /> ==<span id="bad_osti">Check |osti= value</span>== <section begin="bad_osti_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_osti}} The {{para|osti}} parameter is for the [[Office of Scientific and Technical Information]] (OSTI) identifier. OSTIs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1018 and {{#invoke:Cs1 documentation support|id_limits_get|osti}}. Further validation is not performed. A common error is to include the OSTI ''URL'' (<code><nowiki>https://dx.doi.org/10.2172/</nowiki>{{red|&lt;{{var|OSTI>}}}}</code>), or the OSTI ''DOI'' (<code>10.2172/{{red|&lt;{{var|OSTI>}}}}</code>). To resolve this error, ensure that the {{para|osti}} value is correct. If the value is correct and lower than 1018 or larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|osti}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_osti|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_osti_help_text" /> ==<span id="bad_paramlink">Check |&lt;param>-link= value</span>== <section begin="bad_paramlink_help_text" />{{help desk}} {{plainlist}} * {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=<code class="cs1-code">&lt;param>-link</code>}} * {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=<code class="cs1-code">&lt;param></code>}} {{endplainlist}} These link-holding parameters and their matching title-/name-holding parameters are combined to create a working [[wikilink]] to a related article. {| class="wikitable" |+Parameters combined to make wikilinks !Link-holding parameter !! title-/name-holding parameter(s) |- | {{para|author-link}}{{dagger}} || {{para|author}}, {{para|last}}, {{para|last}} + {{para|first}} |- | {{para|contributor-link}}{{dagger}} || {{para|contributor}}, {{para|contributor-last}}, {{para|contributor-last}} + {{para|contributor-first}} |- | {{para|editor-link}}{{dagger}} || {{para|editor}}, {{para|editor-last}}, {{para|editor-last}} + {{para|editor-first}} |- | {{para|episode-link}} || {{para|episode}} |- | {{para|interviewer-link}}{{dagger}} || {{para|interviewer}}, {{para|interviewer-last}}, {{para|interviewer-last}} + {{para|interviewer-first}} |- | {{para|series-link}} || {{para|series}} |- | {{para|subject-link}}{{dagger}} || {{para|subject}} |- | {{para|title-link}} || {{para|title}} |- | {{para|translator-link}}{{dagger}} || {{para|translator}}, {{para|translator-last}}, {{para|translator-last}} + {{para|translator-first}} |- |colspan="2"|{{dagger}} Parameters checked for this error may also have the enumerated forms: {{para|author-link{{var|n}}}} or {{para|author{{var|n}}-link}} etc. |} This error occurs when any of these {{para|&lt;param>-link}} parameters contain a wikilink or a URL, or they contain any of the characters not permitted in Wikipedia article titles per [[WP:TITLESPECIALCHARACTERS]] (except <code>_</code> (underscore), used as a replacement for spaces, and <code>#</code>, used as a [[fragment identifier]] when linking to article sections). The prohibited characters are: <code>&lt; > [ ] | { }</code>. The {{para|&lt;param>-link}} parameter value should contain only the title of a Wikipedia article or a link to a section of a Wikipedia article. [[Module:Citation/CS1]] checks the {{para|&lt;param>-link}} parameter values for wikimarkup and for a [[URI scheme]] (<code>http://</code>, <code>https://</code>, the protocol relative scheme <code>//</code>, etc.). Interlanguage links in any of the {{para|&lt;param>-link}} parameters require a leading colon: : <code><nowiki>:fr:Période d'exil de Caravage</nowiki></code> While primarily intended to catch the errors mentioned above, Module:Citation/CS1 will also catch malformed interlanguage wikilinks wherever they occur. Interlanguage wikilinks that have the form: : <code><nowiki>[[fr:Période d'exil de Caravage]]</nowiki></code> do not create visible clickable links in the article text. Instead, these links appear in the left pane in the languages list. Module:Citation/CS1 disables interlanguage links in this form and emits an error message. The correct form is: : <code><nowiki>[[:fr:Période d'exil de Caravage]]</nowiki></code> This error can also be caused when: * there is a {{para|&lt;param>-link}} value and the matching {{para|&lt;param>}} parameter contains a wikilink.<!--formatting template such as {{tl|smallcaps}} or {{tl|IAST}}, which should not be used in CS1 or CS2 templates.--> * {{para|first}} and {{para|&lt;param>-first}} (and enumerated forms) contain a wikilink To resolve this error, do one of the following: * Ensure that the {{para|&lt;param>-link}} value is the full name of a Wikipedia article (without brackets) or a section of an article, and not a link to an external web site. * Make sure that there are no wikilinks in the matching {{para|&lt;param>}} parameters. * If you want to link to a URL outside of Wikipedia, move the link to {{para|url}} or a similar parameter, if one is available in the template you are using. <!--* Make sure that there are no illegal characters in the paired parameters. These templates or HTML entities can be used to replace illegal characters in the title-holding parameter: {| class="wikitable" style="margin-left: 6.4em" |+ Replacements for prohibited wikilink title characters ! < !! > !! [ !! ] !! {{pipe}} !! { !! } |- | &amp;lt; || &amp;gt; || &amp;#91; || &amp;#93; || &amp;#124; || &amp;#123; || &amp;#125; |- | colspan="2"|&nbsp;||colspan="2" style="text-align: center;" | [[Template:Bracket|<nowiki>{{bracket|text}}</nowiki>]] || [[Template:Pipe|<nowiki>{{pipe}}</nowiki>]] ||colspan="2" | &nbsp; |}--> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_paramlink|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_paramlink_help_text" /> ==<span id="bad_pmc">Check |pmc= value</span>== <section begin="bad_pmc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmc}} The {{para|pmc}} parameter is for the [[PubMed Central]] identifier. PMCs are sequential numbers beginning at 1 and counting up. [[Module:Citation/CS1]] checks the PMC identifier to make sure that the value is a number greater than zero and less than {{#invoke:Cs1 documentation support|id_limits_get|pmc}} and that the identifier contains only digits. Further validation is not performed. To resolve this error, ensure that the {{para|pmc}} value is correct, and that there are no letters, punctuation, or other characters. Do not include "PMC" in the value. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_pmc_help_text" /> ==<span id="bad_pmid">Check |pmid= value</span>== <section begin="bad_pmid_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmid}} The {{para|pmid}} parameter is for the [[PubMed#PubMed identifier|PubMed identifier]]. PMIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|pmid}}. Further validation is not performed. To resolve this error, ensure that the {{para|pmid}} value is correct. If you find something that looks like a PMID and begins with "PMC", use {{para|pmc}} instead of {{para|pmid}}. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmid|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_pmid_help_text" /> ==<span id="bad_rfc">Check |rfc= value</span>== <section begin="bad_rfc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_rfc}} The {{para|rfc}} parameter is for the Internet Engineering Task Force (IETF) [[IETF RFC|RFC]] identifier (unrelated to Wikipedia's internal RfCs). IETF RFCs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|rfc}}. Further validation is not performed. To resolve this error, ensure that the {{para|rfc}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|rfc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_rfc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_rfc_help_text" /> ==<span id="bad_sbn">Check |sbn= value</span>== <section begin="bad_sbn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_sbn|$1=&lt;type>}} {{cs1}} and {{cs2}} templates that contain {{para|sbn}} are checked to ensure that the [[Standard Book Number|SBN]] is the proper length (nine digits), that the SBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the SBN specification. Only one SBN is allowed in this field because the whole {{para|sbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one SBN, or characters that are not part of the SBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]]. The error message &lt;type> indicator can be: : <span class="error" style="font-size:100%">length</span> – SBN is not 9 digits : <span class="error" style="font-size:100%">checksum</span> – SBN has one or more incorrect digits; look for typos and transposition : <span class="error" style="font-size:100%">invalid character</span> – SBN has one or more 'digits' that is not in the allowed set : <span class="error" style="font-size:100%">invalid form</span> – mis-positioned 'X' check digit To resolve this error, ensure that the {{para|sbn}} value is correct, that only one SBN is used, that the proper optional separators are used, and that no other text is included. If the check digit is a lowercase 'x', change it to an uppercase 'X'. * '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the SBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere). * If the SBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for SBNs. It is not uncommon for the SBN to be misprinted in the front matter but correct on the cover. * '''Do''' preview your edit and check that the new SBN does now link to the correct source. In very rare cases, publishers have released books with malformed SBNs. If you are certain that a non-conforming SBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected SBN. Use a corrected SBN when possible. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_sbn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_sbn_help_text" /> ==<span id="bad_ssrn">Check |ssrn= value</span>== <section begin="bad_ssrn_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ssrn}} The {{para|ssrn}} parameter is for the [[Social Science Research Network|Social Science Research Network identifier]]. SSRNs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 100 and {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}. Further validation is not performed. To resolve this error, ensure that the {{para|ssrn}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ssrn|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_ssrn_help_text" /> ==<span id="bad_s2cid">Check |s2cid= value</span>== <section begin="bad_s2cid_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_s2cid}} The {{para|s2cid}} parameter is for the [[Semantic Scholar]] corpus identifier. S2CIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}. Further validation is not performed. To resolve this error, ensure that the {{para|s2cid}} value is correct. If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_s2cid|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_s2cid_help_text" /> ==<span id="bad_url">Check |url= value</span>== <section begin="bad_url_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_url|$1=<code class="cs1-code">{{pipe}}url=</code>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_url|$1=<code class="cs1-code">{{pipe}}archive-url=</code>}}}} External links in {{cs1}} and {{cs2}} templates are made from two parts: the ''title'' ({{para|title}}, {{para|chapter}}, etc.) and the ''URL'' ({{para|url}}, {{para|archive-url}}, {{para|chapter-url}}, etc.). The {{para|url}} parameter and other URL parameters must begin with a supported [[URI scheme]]. The URI schemes <code>http://</code>, <code>https://</code>, and the protocol relative scheme <code>//</code> are most commonly used; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news:</code>, <code>mailto:</code> and <code>gopher://</code> are also supported. The URL scheme and host are checked to ensure that they contain only Latin characters, certain (required) punctuation, and do not contain spaces. The URL may be protocol relative (begins with <code>//</code>). If there are no spaces and the URL is not protocol relative, then the scheme must comply with <nowiki>RFC 3986</nowiki>.<ref>{{citation |mode=cs1 |contribution-url=http://tools.ietf.org/html/std66#section-3.1 |contribution=Scheme |title=Uniform Resource Identifier (URI): Generic Syntax |publisher=[[Internet Engineering Task Force]] |date=January 2005 |rfc=3986}}</ref> Some URL domains are written with non-Latin characters. cs1|2 does not accept those kinds of URLs so they must be '[[Internationalized domain name|internationalized]]'. Online tools are available to internationalize URLs that are written in non-Latin scripts: * {{cite web |url=https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml?loc=en_US |title=IDN Conversion Tool |website=Verisign }} Only enter the domain in the tool and not the full url. Top- and second-level domain names are checked for proper form. Generally, top-level domain names must be two or more letters; second-level domain names must be two or more letters, digits, or hyphens (first and last character must be a letter or digit). [[Single-letter second-level domain]]s are supported for: * all [[Country code top-level domain|cc TLD]]s (the country code is not validated) * the [[.org]] [[TLD]] * certain letters of the [[.com]] TLD (q, x, z) * certain letters of the [[.net]] TLD (i, q) * certain other TLDs ({{#invoke:cs1 documentation support|single_ltr_2nd_lvl_domain_lister}}) Third- and subsequent-level domain names are not checked. The path portion of the URL is not checked. There is an additional test for {{para|archive-url}}. The cs1|2 templates expect that {{para|archive-url}} will hold a unique URL for an archived snapshot of the source identified by {{para|url}} or {{para|chapter-url}} (or any of its aliases). This error message is emitted when the value assigned to {{para|archive-url}} is the same as the matching title or chapter URL. To resolve this error, ensure that: *{{para|url}} and other URL parameters contain valid URLs *URLs copy-pasted from elsewhere include the URI scheme *that the domain name uses only Latin characters *Any space characters (" ") in the URL are replaced with "%20" Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_url_help_text" /> ==<span id="bad_zbl">Check |zbl= value</span>== <section begin="bad_zbl_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_zbl}} When {{cs1}} and {{cs2}} templates contain {{para|zbl}}, a test is done to see if the [[Zentralblatt MATH|Zbl]] identifier value looks like a properly defined value. The {{para|zbl}} identifier is checked to make sure that it has the form: <code>nnnn.nnnnn</code> where <code>n</code> is any digit 0–9. Up to three leading zeros in the first quartet may be omitted. Further validation of the Zbl identifier is not performed. To resolve this error, ensure that the {{para|zbl}} value is correct. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_zbl|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bad_zbl_help_text" /> ==<span id="param_unknown_empty">Cite has empty unknown parameter: &lt;param></span>== <section begin="param_unknown_empty_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=_|$2=<code class="cs1-code">{{pipe}}&lt;param>=</code>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=s|$2=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, ...}}}} This error message highlights CS1|2 templates that hold empty parameters with names that are not known to a given CS1|2 template. This error message is a companion to [[Help:CS1 errors#parameter_ignored|Unknown parameter {{pipe}}xxxx= ignored]]. Empty positional parameters, which typically look like two adjacent pipes in a template, <code><nowiki>| |</nowiki></code>, or a pipe and then the end of the template, <code><nowiki>|}}</nowiki></code>, are identified as numbered parameters: {{error-small|{{para|1|plain=yes}}}}. Similarly, a pipe followed by an HTML comment that encloses everything before the next pipe or closing brace, <code>| &lt;!--&lt;{{var|param name/value pair}}>--> |</code> will be identified as an empty numbered parameter. Parameters that have both a pipe and an equal sign but do not have a name are identified as empty-string parameters: <code>|=</code> or <code>| =</code> → {{error-small|{{para|(empty string)|plain=yes}}}}. Various templates that wrap CS1|2 templates may cause this error when they use constructs like this: <syntaxhighlight lang="wikitext" inline>|{{#if:{{{2|}}}|title}}={{{2|}}}</syntaxhighlight>. When <code><nowiki>{{{2|}}}</nowiki></code> does not have a value, the template creates <code>|=</code>. To resolve this error: * remove the extra pipe, * correct the parameter name, * remove the parameter from the CS1|2 template, or * change the citation to use a more appropriate template (e.g. change {{tl|Cite document}} to {{tl|Cite web}}) Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_unknown_empty|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_unknown_empty_help_text" /> ==<span id="missing_publisher"></span>Cite document requires |publisher=== <section begin="missing_publisher_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_publisher|$1=document|$2=publisher}} This error message is displayed when {{tlx|Cite document}} does not have {{para|publisher}}. Usually, there is a more appropriate template that can be used in place of {{tld|cite document}}. When {{tld|cite document}} is used, it accepts a limited subset of the cs1|2 parameter suite but requires {{para|publisher}}. To resolve this error, use a more appropriate template (preferred solution) or provide {{para|publisher}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_publisher|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_publisher_help_text" /> ==<span id="missing_periodical"></span>Cite &lt;template> requires |&lt;param>=== <section begin="missing_periodical_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_periodical|$1=&lt;template>|$2=&lt;param>}} These CS1 periodical templates require a periodical parameter. The periodical templates are: : {{tlx|cite journal}} <!-- : {{tlx|cite news}} -->:{{tlx|cite magazine}} <!-- : {{tlx|cite web}} -->The error message suggests a periodical parameter that matches the template, but there is no requirement to use the suggested parameter; any one of these periodical parameters may be used: * {{para|journal}} * {{para|magazine}} * {{para|newspaper}} * {{para|periodical}} * {{para|website}} * {{para|work}} In some cases, an incorrect template has been used (e.g. {{tlx|cite journal}} for a web page, book, or standalone document). The appropriate resolution in these cases is to change the incorrect template to {{tlx|cite web}}, {{tlx|cite book}}, {{tlx|cite document}}, or a different, more appropriate template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_periodical|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_periodical_help_text" /> ==<span id="deprecated_params"></span>Cite uses deprecated parameter |&lt;param>= == <section begin="deprecated_params_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_deprecated_params|$1=&lt;param>}} Over time, some parameters have become obsolete or unnecessary. When this happens, the parameters are identified as deprecated. Editors are encouraged to use other parameters that accomplish the same purpose as those that have been deprecated. The CS1|2 deprecated parameters are listed in the following table, along with recommended replacement parameters. Parameter names are case-sensitive. Editors should expect that support for deprecated parameters will soon be withdrawn. To resolve this error, use a supported parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_deprecated_params|pages=yes}}.<ref group="lower-alpha" name="categories" /><section begin="deprecated_params_table" /> {|class="wikitable" |+ Deprecated CS1/CS2 parameters ! style="width: 12em;" | Deprecated parameter ! Replace with ! style="width: 6em;" | Date |- | none deprecated at present || || |}<section end="deprecated_params_table" /><section end="deprecated_params_help_text" /><section begin="deleted_params_table" /> <!-- Support for the following parameter aliases was recently removed. Usage in mainspace should be about zero, and hints for them added to the suggestion list. However, as they may occasionally pop up again through copy&paste or usage of old scripts for some while, list them here as well for users coming here searching for help. --> {|class="wikitable" |+ Recently removed CS1/CS2 parameters ! style="width: 12em;" | Removed parameter !! Replace with !! style="width: 6em;" | Date !! Note <!-- |- | none removed at present | --> |- | {{para|authors}} | {{para|last{{var|n}}}} / {{para|first{{var|n}}}}, {{para|author{{var|n}}}}, {{para|vauthors}} | August 2024 | |}<section end="deleted_params_table" /> ==<span id="generic_name">Cite uses generic name</span>== <section begin="generic_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_generic_name|$1=&lt;param>}} Articles are listed in this category when [[Module:Citation/CS1]] identifies template author or editor name parameters that use place-holder names. Such names may have been provided by bots or other tools that are unable to identify the source's correct names. Pages in this category should only be added by Module:Citation/CS1. CS1|2 maintains a short list of 'names' that are typically not the correct names for the cited source. Some examples are: {{div col begin |colwidth=15em}} *<code>about us</code> *<code>author</code> *<code>bureau</code> *<code>collaborator</code> *<code>contributor</code> *<code>contact us</code> *<code>directory</code> *<code>editor</code> *<code>email</code> *<code>facebook</code> *<code>google</code> *<code>home page</code> *<code>instagram</code> *<code>interviewer</code> *<code>linkedIn</code> *<code>pinterest</code> *<code>policy</code> *<code>privacy</code> *<code>site name</code> *<code>statement</code> *<code>submitted</code> *<code>super user</code> *<code>translator</code> *<code>tumblr</code> *<code>twitter</code> *<code>user</code> *<code>verfasser</code> {{div col end}} If you are aware of other common place-holder names, please report them at [[Help talk:Citation Style 1]], so that they can be added to the list. To resolve this error, replace the place-holder name with the source's actual author or editor name, or use a more appropriate parameter. Example fixes: * Replace {{para|author|Smith, Jane, editor}} with {{para|editor|Smith, Jane}} False positives are possible. When the name is valid, wrap the parameter value in the [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]]: :{{para|author|((Super User))}} Please do not use this markup when it is not appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_generic_name|pages=yes}}.<ref group="lower-alpha" name="categories" /> See also the error category [[:Category:CS1 errors: generic title]].<section end="generic_name_help_text" /> ==<span id="generic_title">Cite uses generic title</span>== <section begin="generic_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_generic_title}} Articles are listed in this category when [[Module:Citation/CS1]] identifies template {{para|title}} parameters that use place-holder titles. Such titles may have been provided by bots or other tools that are unable to identify the source's correct title. Pages in this category should only be added by Module:Citation/CS1. CS1|2 maintains a short list of 'titles' that are typically not the title of the cited source. Some examples are: {{div col begin |colwidth=15em}} *<code>404</code> *<code>are you a robot</code> *<code>hugedomains.com</code> *<code>internet archive wayback machine</code> *<code>log into facebook</code> *<code>login • instagram</code> *<code>no title</code> – various forms *<code>page not found</code> *<code>redirecting...</code> *<code>subscribe to read</code> *<code>unknown</code> – various forms *<code>usurped title</code> *<code>wayback machine</code> *<code>webcite query result</code> *<code>website is for sale</code> *<code>wikiwix's cache</code> {{div col end}} If you are aware of other common place-holder titles, please report them at [[Help talk:Citation Style 1]], so that they can be added to the list. To resolve this error, replace the place-holder title with the source's actual title. False positives are possible. When the name is valid, wrap the parameter value in the [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]]: :{{para|title|((404th Fighter Aviation Regiment))}} Please do not use this markup when it is not appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_generic_title|pages=yes}}.<ref group="lower-alpha" name="categories" /> See also the maintenance category [[:Category:CS1 maint: archived copy as title]] and the similar error category [[:Category:CS1 errors: generic name]].<section end="generic_title_help_text" /> ==<span id="citeseerx_missing">|citeseerx= required</span>== <section begin="citeseerx_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_citeseerx_missing}} {{tlx|cite citeseerx}} requires the identifier parameter {{para|citeseerx}}. To resolve this error, ensure that the template has {{para|citeseerx}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citeseerx_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="citeseerx_missing_help_text" /> ==<span id="class_ignored">|class= ignored</span>== <section begin="class_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_class_ignored}} Only used in {{tlx|cite arXiv}} templates, {{para|class}} is only appropriate when the template uses {{para|arxiv|YYMM.NNNN}} or {{para|arxiv|YYMM.NNNNN}} identifier formats; see [[Template:Cite arXiv#Usage|Cite arXiv §Usage]]. To resolve this error, remove {{para|class}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_class_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="class_ignored_help_text" /> ==<span id="contributor_ignored">|contributor= ignored</span>== <section begin="contributor_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_ignored}} Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. This error occurs when {{para|contributor}} is used in a template that is not {{tlx|cite book}} or {{tlx|citation}} or is one of these two templates and one of the {{para|work}} parameter aliases is set. To resolve this error, consider the {{para|others}} parameter, choose a more appropriate CS1 or CS2 template or remove {{para|contributor}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="contributor_ignored_help_text" /> ==<span id="contributor_missing_required_param">|contributor= requires |&lt;param>= </span>== <section begin="contributor_missing_required_param_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=author}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=contribution}}}} Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. As such, the primary author is required ({{para|author}} or appropriate alias) as is the title of the contribution ({{para|contribution}}). To resolve this error, include the book's primary author in {{para|author1}}, or {{para|last1}}, {{para|first1}}, or {{para|vauthors}} and include the contribution title in {{para|contribution}}; or consider the {{para|others}} parameter or remove {{para|contributor}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_missing_required_param|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="contributor_missing_required_param_help_text" /> ==<span id="doibroken_missing_doi">|doi-broken-date= requires |doi=</span>== <section begin="doibroken_missing_doi_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_doibroken_missing_doi|$1=doi-broken-date}} When {{para|doi-broken-date}} is used in a CS1|2 template, {{para|doi}} (with value) must also be present. To resolve this error, either add the missing DOI or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_doibroken_missing_doi|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="doibroken_missing_doi_help_text" /> ==<span id="extra_text_edition">|edition= has extra text </span>== <section begin="extra_text_edition_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_edition}} The templates are responsible for static text rendered in the citation. When {{para|edition}} is used in a template, cs1|2 adds the abbreviation 'ed.' to the value in the parameter so: :{{para|edition|1st}} renders as: :1st ed. The templates emit this error message when various forms of <code>ed</code>, <code>edn</code>, or <code>edition</code> are found in the value assigned to {{para|edition}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_edition|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_edition_help_text" /> ==<span id="empty_citation">Empty citation</span>== <section begin="empty_citation_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_empty_citation}} A {{cs1}} or {{cs2}} template marked as "Empty" contains no recognizable parameter identifiers. For example, this citation is marked as "empty" even though it contains usable information: :<code><nowiki>{{cite web |http://www.foobar.com |The Foobar News}}</nowiki></code> The citation is "empty" because it does not contain the necessary parameter identifiers (in this case {{para|url}} and {{para|title}}) that tell {{tlx|cite web}} how to use the information that the citation contains. A citation is also marked as "empty" when it contains only parameters that it doesn't recognize: : <code><nowiki>{{cite book |titolo=The Bazquux Uprising |anno=2015}}</nowiki></code> This citation is "empty" because the Italian-language parameters {{para|titolo}} and {{para|anno}} are not recognized as valid parameter names on the English Wikipedia. "Empty citation" may also mean that an editor meant to use another template entirely. Perhaps the editor used {{tlx|citation}} when the intent was to use {{tlx|citation needed}} or {{tlx|quote}}. To resolve this error, add appropriate parameter identifiers, translate foreign language parameter names to their English equivalents, or replace the CS1/CS2 template with a more appropriate template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_empty_citation|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="empty_citation_help_text" /> == <span id="explicit_et_al">Explicit use of et al.</span> == <section begin="explicit_etal_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_etal|$1=&lt;param>}} This error occurs where a {{cs1}} or {{cs2}} template detects that one of the names parameters contains some form of "et al." either as a separate name parameter ({{para|author6|et al.}}) or as a suffix added to a name list ({{para|author|Smith, A.B. et al.}}) or first name ({{para|first|John, et al.}}). This error can occur in any of the author, editor, interviewer, translator, or contributor parameters. Use the {{para|display-authors}} parameter instead (or other applicable {{para|display-&lt;{{var|names}}>}} parameter), as documented at [[Help:Citation Style 1#Display options]]. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_etal|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="explicit_etal_help_text" /> ==<span id="param_has_ext_link">External link in |&lt;param>=</span>== <section begin="param_has_ext_link_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_ext_link|$1={{pipe}}&lt;param>=}} This error occurs when a URL is found in any parameter that is not one of these URL-holding parameters: {{div col begin}} *{{para|archive-url}} *{{para|article-url}} *{{para|chapter-url}} *{{para|conference-url}} *{{para|contribution-url}} *{{para|entry-url}} *{{para|map-url}} *{{para|section-url}} *{{para|transcript-url}} *{{para|url}} {{div col end}} or any of these insource locator parameters: {{div col begin}} *{{para|page}} *{{para|p}} *{{para|pages}} *{{para|pp}} *{{para|at}} *{{para|quote-page}} *{{para|quote-pages}} {{div col end}} To resolve this error, remove the external link from the identified parameter. Consider placing the external link in a more appropriate parameter: * for {{para|chapter}}, the URL may belong in {{para|chapter-url}}. * for other parameters, it may belong in {{para|url}}. Wrapping the parameter value in double parentheses (i.e. "accept as written" markup) does not work around this error message. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_ext_link|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_has_ext_link_help_text" /> ==<span id="first_missing_last">|&lt;first>''n''= missing |&lt;last>''n''=</span>== <section begin="first_missing_last_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_first_missing_last|$1=&lt;first>{{var|n}}|$2=&lt;last>{{var|n}}}} {{cs1}} and {{cs2}} templates requires a {{para|&lt;last>''n''}} parameter for each {{para|&lt;first>''n''}} parameter in a citation. Author, contributor, editor, interviewer, and translator lists are checked for proper last/first pairing. CS1|2 will emit this error message for the first mismatch it detects. If there are more last/first mismatches in a citation, subsequent mismatches are not detected. There is no requirement that each {{para|&lt;last>''n''}} have a matching {{para|&lt;first>''n''}}. To resolve this error, ensure that each {{para|&lt;first>''n''}} has a corresponding {{para|&lt;last>''n''}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_first_missing_last|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="first_missing_last_help_text" /> ==<span id="format_missing_url">|format= requires |url= </span>== <section begin="format_missing_url_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=format|$2=url}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=...-format|$2=...-url}}}} These errors occur when {{cs1}} and {{cs2}} templates use {{para|format}} or {{para|...-format}} without also providing a corresponding URL for {{para|url}} or {{para|...-url}}, respectively. The {{para|format}} and {{para|...-format}} parameters are used to specify the file format of a web resource, such as [[PDF]], [[Doc (computing)|DOC]], or [[Microsoft Excel file format|XLS]]. In some cases an editor may have intended to use {{para|type}} to specify a kind of document, such as hard cover, paperback, or pamphlet. The {{para|format}} and {{para|...-format}} value is always displayed. The list of {{para|...-format}} parameters is: : {{para|archive-format}}, {{para|article-format}}, {{para|chapter-format}}, {{para|conference-format}}, {{para|contribution-format}}, {{para|entry-format}}, {{para|event-format}}, {{para|map-format}}, {{para|section-format}}, {{para|transcript-format}} (<!-- TBD: Ia this still necessary to be mentioned? -->Citations that relied on the pre-2014<!-- 2014-11-29 -->, somewhat odd use of {{para|url}} and {{para|format}} may need adjustment in regard to {{para|chapter-format}}.) To resolve this error, remove {{para|format}} or {{para|chapter-format}}; define {{para|url}} or {{para|chapter-url}}; or change {{para|format}} to {{para|type}} (or to {{para|chapter-format}} if {{para|chapter-url}} is used without {{para|url}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_format_missing_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="format_missing_url_help_text" /> ==<span id="disp_name">Invalid |display-&lt;names>=&lt;value></span>== <section begin="disp_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_disp_name|$1=display-&lt;names>|$2=&lt;value>}} These error messages are emitted when [[Module:Citation/CS1]] identifies citations that use one or more of the {{para|display-&lt;names>}} parameters with an invalid assigned <code>&lt;value></code>. An invalid assigned <code>&lt;value></code> is a number that is greater than or equal to the number of <code>&lt;names></code> in the associated name-list or it is non-numeric text that Module:Citation/CS1 cannot recognize as a form of the keyword <code>etal</code>. To resolve this error, do one of the following: * Remove the {{para|display-&lt;names>}} parameter from the citation (typically because "et al." is not appropriate in the citation) * Change the <code>&lt;value></code> of the {{para|display-&lt;names>}} parameter such that it is less than the number of <code>&lt;names></code> in the name-list (thereby truncating the displayed list to the number) * Change the <code>&lt;value></code> of the {{para|display-&lt;names>}} parameter to <code>etal</code>, which will cause "et al" to display after the last <code>&lt;name></code>. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_disp_name|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="disp_name_help_text" /> ==<span id="invalid_param_val">Invalid &lt;param>=&lt;value></span>== <section begin="invalid_param_val_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_param_val|$1=&lt;param>|$2=&lt;value>}} To function properly, some parameters are limited to a certain set of acceptable values. This error message indicates that a parameter has been assigned a value that is not a member of the parameter's defined set of acceptable values. Letters in values must all be in lower case, as shown below. {|class="wikitable" |+ Parameters with limited acceptable values |- ! Parameter !! Acceptable values |- | {{para|df}} ||<code>dmy</code>, <code>dmy-all</code>, <code>mdy</code>, <code>mdy-all</code>, <code>ymd</code>, <code>ymd-all</code> |- | {{para|mode}}||<code>cs1</code>, <code>cs2</code> |- | {{para|name-list-style}} || <code>amp</code>, <code>ampersand</code>, <code>and</code>, <code>&</code>, <code>serial</code>, <code>vanc</code> |- | {{para|no-pp}}||rowspan=2|<code>true</code>, <code>y</code>, <code>yes</code> |- | {{para|no-tracking}} |- | {{para|bibcode-access}}||rowspan=8|<code>free</code> |- | {{para|doi-access}} |- | {{para|hdl-access}} |- | {{para|jstor-access}} |- | {{para|ol-access}} |- | {{para|osti-access}} |- | {{para|ssrn-access}} |- | {{para|s2cid-access}} |- | {{para|url-access}}||rowspan=7|<code>subscription</code>, <code>registration</code>, <code>limited</code> |- | {{para|article-url-access}} |- | {{para|chapter-url-access}} |- | {{para|contribution-url-access}} |- | {{para|entry-url-access}} |- | {{para|map-url-access}} |- | {{para|section-url-access}} |- | {{para|url-status}}||<code>dead</code>, <code>live</code>, <code>deviated</code>, <code>unfit</code>, <code>usurped</code> (see [[Template:Citation_Style_documentation#csdoc_urlstatus|documentation]]) |} To resolve this error for the parameters in the table, use an appropriate value. Support for {{para|ref|harv}} is withdrawn because cs1|2 templates now automatically create the <code>CITEREF</code> anchor value that {{para|ref|harv}} controlled. To resolve this error, remove {{para|ref|harv}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_param_val|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invalid_param_val_help_text" /> ==<span id="script_parameter">Invalid |script-&lt;param>=: &lt;type></span>== <section begin="script_parameter_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_script_parameter|$1=script-&lt;param>|$2=&lt;type>}} The various {{para|script-&lt;{{var|param}}>}} parameters are checked for proper form. When an error is detected, the error message briefly identifies the type of the error: : <span class="error" style="font-size:100%">missing title part</span> – the {{para|script-&lt;{{var|param}}>}} parameter has a language-code prefix but is otherwise empty : <span class="error" style="font-size:100%">missing prefix</span> – the {{para|script-&lt;{{var|param}}>}} parameter has text but is missing the required language-code prefix; the prefix has the form <code>xx:</code> or <code>xxx:</code> where <code>xx</code> or <code>xxx</code> is a valid [[ISO 639-1]] or [[ISO 639-3]] language code known to CS1|2 as a language that uses a non-Latin script; the colon (<code>:</code>) is required : <span class="error" style="font-size:100%">unknown language code</span> – the {{para|script-&lt;{{var|param}}>}} parameter has a (possibly valid) language code that CS1|2 does not recognize as a language using a non-Latin script Language codes known to CS1|2 for languages that do not use a Latin script are: {{#invoke:Cs1 documentation support|script_lang_lister}}<!-- makes a language code: name list from the master list in [[Module:Citation/CS1/Configuration]] --> Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_script_parameter|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="script_parameter_help_text" /> ==<span id="invalid_isbn_date">ISBN / Date incompatibility</span>== <section begin="invalid_isbn_date_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_isbn_date}} – this error message hidden by default [[ISBN]]s were created c. 1965. Books published before that date will not have been issued an ISBN. However, reissues of pre-ISBN publications <em>are</em> issued ISBNs, even barring the publication of a new edition. Consider double-checking whether the ISBN is valid before removing it. To resolve this error: * Remove the ISBN when citing a source published before 1965. ** If the cited edition or reissue of the book was published after 1965, ensure that {{para|date}} or {{para|year}} has the correct publication year. The reissue date is typically available by querying [[WorldCat]] with the reissue's ISBN. Adding {{para|orig-date}} may be appropriate in such cases; e.g., {{para|orig-date|1st Pub. 1929}}. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_isbn_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invalid_isbn_date_help_text" /> ==<span id="extra_text_issue">|issue=/|number= has extra text</span>== <section begin="extra_text_issue_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_issue|$1=issue}}<br/> {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_issue|$1=number}} The templates are responsible for static text rendered in the citation. When {{para|issue}} or {{para|number}} is used in a template, cs1|2 formats the issue number according to the style corresponding with the publication type associated with the used citation template. The templates emit this error message when various forms of issue or number prefixes (like <code>Iss.</code> or <code>No.</code>) are found in the value assigned to {{para|issue}} or {{para|number}}. To resolve this error, remove the extraneous text from the parameter value. If the extraneous text removed is related to issues, please use the {{para|issue}} parameter rather than {{para|number}} for this, and vice versa. At present, the output is the same for both parameters, but this may not hold true in future versions, therefore it is important that issues and number values are used with the proper parameter as per what nomenclature is used in the actual publication. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_issue|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_issue_help_text" /> ==<span id="apostrophe_markup">Italic or bold markup not allowed in: |&lt;param>=</span>== <section begin="apostrophe_markup_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_apostrophe_markup|$1=&lt;param>{{var|n}}}} Italic (<code><nowiki>''</nowiki></code>) or bold (<code><nowiki>'''</nowiki></code>) wikimarkup is not allowed in publisher and periodical parameters. These parameters include: * {{para|publisher}} * {{para|journal}} * {{para|magazine}} * {{para|newspaper}} * {{para|periodical}} * {{para|website}} * {{para|work}} To resolve this error, remove wiki markup from the named parameter's value and ensure that the template is using the correct parameters; when citing a newspaper, use {{para|newspaper}} for the newspaper's name, not {{para|publisher}}, etc. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_apostrophe_markup|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="apostrophe_markup_help_text" /> ==<span id="medrxiv_missing">|medrxiv= required</span>== <section begin="medrxiv_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_medrxiv_missing}} {{tlx|cite medRxiv}} requires the identifier parameter {{para|medrxiv}}. To resolve this error, ensure that the template has {{para|medrxiv}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_medrxiv_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="medrxiv_missing_help_text" /> ==<span id="missing_name">Missing |&lt;name>''n''=</span>== <section begin="missing_name_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_name|$1=&lt;name>|$2={{var|n}}}} So that all names are listed in a rendered citation, {{cs1}} and {{cs2}} templates require ''n'' in {{para|&lt;last>{{var|n}}}} (and its aliases) to increment by 1 for each name in the list (author, contributor, editor, interviewer, translator). This error message is emitted when there is a 'hole' in the numbering (an author list made up of {{para|author1}} and {{para|author3}} but without {{para|author2}} for example). The test will not detect a 'hole' that is larger than 1. It is presumed that when {{para|author{{var|n}}}} and {{para|author{{var|n+1}}}} are both not present, then the test has reached the end of the list. To resolve this error, ensure that the numbering of the {{para|&lt;last>{{var|n}}}} parameters increments properly. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_name|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_name_help_text" /> ==<span id="missing_title">Missing or empty |title= </span>== There are two slightly different error conditions that can arise when [[Help:Citation Style 1|CS1 citations]] lack appropriate titles. In each case, CS1 reports this error message. The necessary resolution may vary depending on the cause of the error. The error message links to the appropriate description below. ===<span id="bare_url_missing_title">Bare URL without a title</span>=== <section begin="bare_url_missing_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bare_url_missing_title|$1=<code class="cs1-code">{{pipe}}&lt;param>=</code>}} All {{cs1}} and {{cs2}} templates report this error when one of the [[URL]]-containing parameters cannot be paired with an associated title. This error may also occur when {{para|title}} cannot be linked with {{para|url}} because the citation also contains a conflicting {{para|title-link}} parameter. {|class="wikitable" |+ URL-containing parameters and associated title parameters |- ! URL parameters ! Title parameters |- | {{para|archive-url}} | {{para|title}} |- | {{para|article-url}} | {{para|article}}, {{para|chapter}}, {{para|contribution}}, {{para|entry}}, {{para|section}} |- | {{para|chapter-url}} | {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}}, {{para|section}} |- | {{para|conference-url}} | {{para|conference}}, {{para|event}} |- | {{para|contribution-url}} | {{para|contribution}}, {{para|chapter}}, {{para|article}}, {{para|entry}}, {{para|section}} |- | {{para|entry-url}} | {{para|entry}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|section}} |- | {{para|event-url}} | {{para|event}}, {{para|conference}} <!-- |- | {{para|lay-url}} | &nbsp;&nbsp;({{para|lay-source}}) --> |- | {{para|map-url}} | {{para|map}} |- | {{para|section-url}} | {{para|section}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}} |- | {{para|transcript-url}} | {{para|transcript}} |- | {{para|url}} | {{para|title}} |} A unique case exists for {{tl|cite journal}}: if {{para|pmc}} or {{para|doi}} has a value, {{para|url}} is omitted or empty, and {{para|title-link}} does not point to an article, then {{para|title}} is automatically linked with the same URL as the PMC or DOI. This default behaviour can be overridden using {{para|title-link|none/pmc/doi}}. Because URLs are ugly and generally uninformative, it is expected that editors should provide a meaningful title for each URL. In most cases this can be accomplished by using the {{para|title}} parameter. To resolve this error, provide an appropriate title for the URL-containing parameter. In the case where {{para|url}} and {{para|title-link}} are contending for {{para|title}} you must choose which one to keep. Consider moving {{para|url}} or {{para|title-link}} to a more suitable parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bare_url_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="bare_url_missing_title_help_text" /> ===<span id="citation_missing_title">Citation without a title of any form</span>=== <section begin="citation_missing_title_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=title}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=series}}}} This error occurs for {{cs1}} and {{cs2}} templates when all of {{para|title}}, {{para|trans-title}}, and {{para|script-title}} are omitted or left blank. At least one of these title parameters must be provided for each citation. {{tlx|cite episode}} will show this error if {{para|series}} is omitted or left blank (even if a {{para|title}} is provided). {{tlx|cite encyclopedia}} will show this error if {{para|encyclopedia}} has a value but {{para|entry}} (or another {{para|chapter}} alias) is omitted or left blank. Sometimes this error occurs because an editor has used a CS1|2 citation as a [[Help:Shortened footnotes|shortened footnote]] when {{tlx|sfn}} or one of the {{tlx|harv}} family of templates would have been more appropriate. This error also occurs when an editor used {{tlx|citation}} but intended to use {{tlx|citation needed}}. To resolve this error, provide a value for {{para|title}}, {{para|trans-title}}, and/or {{para|script-title}} or replace the CS1|2 template with a more appropriate template. If you are listing a periodical or an issue of a periodical in a bibliography rather than within {{tag|ref}} tags, {{tlx|List journal}} may be more appropriate. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citation_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="citation_missing_title_help_text" /> ==<span id="cite_web_url">Missing or empty |url= </span>== <section begin="cite_web_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_cite_web_url}} This error message is reported by {{tlx|cite web}}, {{tlx|cite podcast}}, and {{tlx|cite mailing list}} when the template parameters {{para|url}} and {{para|archive-url}} are both missing, blank or not properly entered. Note that {{para|website}} or {{para|work}} is the name of the site, not the URL. To resolve this error, provide a value for {{para|url}} or use a more appropriate template such as {{tl|cite book}}, {{tl|cite journal}} or other {{cs1}} or {{cs2}} template. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_cite_web_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="cite_web_url_help_text" /> ==<span id="missing_pipe">Missing pipe</span>== <section begin="missing_pipe_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_pipe|$1=&lt;param>}} {{cs1}} and {{cs2}} templates report this error when one parameter has text that looks like it is a parameter missing a pipe (<code>|</code>). This error occurs when a template parameter value contains characters and digits followed by an equal sign. If the alphanumeric text immediately preceding the equal sign is a valid CS1|2 parameter name, the module assumes that the template is missing a pipe and emits this error message. Some legitimate titles will contain a CS1|2 parameter name followed by an equal sign. In that case, enclose the equal sign in nowiki tags, like this: {{tag|nowiki|content={{=}}}}. For most other cases, simply add the missing pipe. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_pipe|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="missing_pipe_help_text" /> ==<span id="redundant_parameters">More than one of |&lt;param1>=, |&lt;param2>=, and |&lt;param3>= specified</span>== <section begin="redundant_parameters_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=<code class="cs1-code">{{pipe}}&lt;param1>=</code>, <code class="cs1-code">{{pipe}}&lt;param2>=</code>, and <code class="cs1-code">{{pipe}}&lt;param3>=</code>}} This error occurs when a {{cs1}} or {{cs2}} template includes more than one parameter that maps to the same meaning. For example, {{para|author}}, {{para|last}}, and {{para|last1}} are all synonyms of each other, so no more than one of these parameters should ever be used in a single template. To resolve this error, remove or modify the redundant parameter(s). {{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=author-name-list parameters}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=editor-name-list parameters}}}} This error occurs when a CS1 or CS2 template uses more than one type of author or editor name-list style. There are three kinds of incompatible author-name-list styles: : {{para|author''n''}} and {{para|last''n''}} / {{para|first''n''}} (and their various aliases), {{para|vauthors}}, and {{para|authors}} and similarly, three editor-name-list styles: : {{para|editor''n''}} and {{para|editor-last''n''}} / {{para|editor-first''n''}} (and their various aliases) as well as {{para|veditors}} To resolve this error, choose one name-list-style. Use the chosen style for both of the author and editor name-lists. Pages with these errors are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_redundant_parameters|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="redundant_parameters_help_text" /> ==<span id="extra_text_pages">|page(s)= has extra text</span>== <section begin="extra_text_pages_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_pages|$1=&lt;param>}} The templates are responsible for static text rendered in the citation. When {{para|page}}/{{para|p}}, {{para|pages}}/{{para|pp}}, {{para|quote-page}} or {{para|quote-pages}} is used in a template, cs1|2 inserts the appropriate pagination prefix 'p.' or 'pp.' ahead of the value in the parameter so: :{{para|page|123}} renders as: :p. 123 and: :{{para|page|123–125}} renders as: :pp. 123–125 The templates emit this error message when various forms of <code>p</code>, <code>pp</code>, <code>pg</code>, <code>pgs</code>, <code>page</code>, or <code>pages</code> are found in the value assigned to {{para|page}}/{{para|p}}, {{para|pages}}/{{para|pp}}, {{para|quote-page}} or {{para|quote-pages}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_pages|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_pages_help_text" /> ==<span id="param_access_requires_param">&#124;&lt;param>-access= requires &#124;&lt;param>=</span>== <section begin="param_access_requires_param_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_access_requires_param|$1=&lt;param>|$2=&lt;param>}} This error is reported when an [[Help:Citation Style 1#Registration or subscription required|access level]] has been specified for some external link, but the corresponding required parameter is missing or empty. The parameter can be one of {| class="wikitable" |+ Access-level specifier required parameter |- ! Specifier !! Required parameter |- | {{para|article-url-access}} || {{para|article-url}} |- | {{para|bibcode-access}} || {{para|bibcode}} |- | {{para|chapter-url-access}} || {{para|chapter-url}} |- | {{para|contribution-url-access}} || {{para|contribution-url}} |- | {{para|doi-access}} || {{para|doi}} |- | {{para|entry-url-access}} || {{para|entry-url}} |- | {{para|hdl-access}} || {{para|hdl}} |- | {{para|jstor-access}} || {{para|jstor}} |- | {{para|map-url-access}} || {{para|map-url}} |- | {{para|ol-access}} || {{para|ol}} |- | {{para|osti-access}} || {{para|osti}} |- | {{para|section-url-access}} || {{para|section-url}} |- | {{para|s2cid-access}} || {{para|s2cid}} |- | {{para|url-access}} || {{para|url}} |} To resolve this error, either provide a value for the parameter, or remove the access level specification. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_access_requires_param|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_access_requires_param_help_text" /> ==<span id="numeric_names">|&lt;param>= has numeric name</span>== <section begin="numeric_names_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_numeric_names|$1=&lt;param>}} This error is reported when a name-list parameter {{para|author{{var|n}}}}, {{para|contributor{{var|n}}}}, {{para|editor{{var|n}}}}, {{para|interviewer{{var|n}}}}, {{para|translator{{var|n}}}} (including aliases) has an assigned value that is composed solely of digits and / or punctuation. Errors of this type are often the result of automated or semi-automated edits where the source metadata is misplaced or improperly translated. To resolve this error, make sure that the value assigned to the name-list parameter is a name and only a name. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_numeric_names|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="numeric_names_help_text" /> ==<span id="periodical_ignored">|&lt;periodical>= ignored</span>== <section begin="periodical_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_periodical_ignored|$1=periodical}} {{cs1}} templates {{tlx|cite book}} and {{tlx|cite encyclopedia}} do not support {{para|periodical}} (and aliases {{para|journal}}, {{para|magazine}}, {{para|newspaper}}, {{para|website}}, {{para|work}}) and associated {{para|script-periodical}} and {{para|trans-periodical}} (and their aliases). To resolve this error: * use a more appropriate citation template, or * most common: change {{para|title}} to {{para|chapter}} (or appropriate alias) and then change {{para|periodical}} to {{para|title}}, or * change {{para|work}} to {{para|series}} if {{para|title}} is the actual title of the book and {{para|work}} contains the name of a book series, or * change {{para|work}} to another appropriate parameter (it has been used to hold values for {{para|publisher}}, {{para|editor}}, {{para|via}}, and more), or * move the content of the {{para|periodical}} parameter out of the template, before the closing <nowiki></ref></nowiki>, or * delete the {{para|periodical}} parameter Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_periodical_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="periodical_ignored_help_text" /> ==<span id="embargo_missing_pmc">|pmc-embargo-date= requires |pmc=</span>== <section begin="embargo_missing_pmc_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_embargo_missing_pmc|$1=pmc-embargo-date}} When {{para|pmc-embargo-date}} is used in a CS1|2 template, {{para|pmc}} (with value) must also be present. To resolve this error, either add the missing PMC or remove the 'broken' parameter. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_embargo_missing_pmc|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="embargo_missing_pmc_help_text" /> ==<span id="ssrn_missing">|ssrn= required</span>== <section begin="ssrn_missing_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_ssrn_missing}} {{tlx|cite SSRN}} requires the identifier parameter {{para|ssrn}}. To resolve this error, ensure that the template has {{para|ssrn}} with a properly constructed value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_ssrn_missing|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="ssrn_missing_help_text" /> ==<span id="text_ignored">Text "????" ignored</span>== <section begin="text_ignored_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_text_ignored|$1=????}} Unlike many Wikipedia templates, the {{cs1}} and {{cs2}} templates do not use unnamed or positional parameters. When a citation contains text between [[vertical bar]]s and that text does not contain an equal sign (=), CS1|2 ignores the text and reports the error. This is true even when the text is the name of a valid parameter. This error can also be caused by vertical bars (pipe characters) that are part of URLs or titles. When vertical bars occur in URLs, replace each vertical bar with <code>%7C</code>. When vertical bars occur in parameter values that are not URLs, replace each vertical bar with <code>&amp;#124;</code> or <code>{{tl|!}}</code>. To resolve this error, remove the extraneous text, add '=', add an appropriate parameter name from the template you're using to complete the parameter, or properly encode vertical bars in URLs and titles. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_text_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="text_ignored_help_text" /> ==<span id="trans_missing_title">|trans-&lt;param>= requires |&lt;param>= or |script-&lt;param>=</span>== <section begin="trans_missing_title_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_trans_missing_title|$1=&lt;param>|$2=&lt;param>|$3=&lt;param>}} {{cs1}} and {{cs2}} templates report this error when the citation has an English translation of the title in {{para|trans-title}} or chapter title in {{para|trans-chapter}} but does not have the original-language title in {{para|title}} or original-language chapter title in {{para|chapter}}. To resolve this error, provide the original language title for {{para|title}} or chapter title for {{para|chapter}}. Consider adding {{para|language}} if not already part of the citation. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_trans_missing_title|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="trans_missing_title_help_text" /> ==<span id="parameter_ignored">Unknown parameter |&lt;param>= ignored<span id="parameter_ignored_suggest"> </span></span>== <section begin="parameter_ignored_help_text" />{{help desk}}{{plainlist| *{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored|$1=&lt;param>}} *{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored_suggest|$1=&lt;param>|$2=&lt;sparam>}}}} {{cs1}} and {{cs2}} templates report this error when the name portion of a parameter's {{para|name|value}} pair is not recognized as a valid name. Typically, this is caused by spelling or capitalization errors or when a page is reverted to a version where the citation template did support the parameter. It can also be caused by the use of parameters that are valid in some, but not all, CS1|2 templates. For example, {{tl|cite book}} citations are sometimes erroneously created using {{para|title}} and {{para|work}} when they should use {{para|chapter}} and {{para|title}} instead. The CS1|2 engine does not ignore unrecognized parameters. The purpose of the citation is to properly identify the source, not to act as a repository of notes and ancillary information. CS1|2 template parameters are lower case. CS1|2 will report this error when the parameter's name contains uppercase letters ({{!xt|Xxxx, xxXx, XXXX}}) but the parameter's name is defined as lowercase ({{xt|xxxx}}). Some identifier parameters, like {{para|isbn}}, {{para|pmc}}, {{para|doi}}, etc., can be either lower case or upper case, but not of mixed case ({{para|isbn|mxt=y}} or {{para|ISBN|mxt=y}} but not {{para|Isbn|!mxt=y}}). For [[Module:Citation/CS1/Suggestions|common parameter misspellings]], like {{para|pubisher}} instead of {{para|publisher}} and some former template parameters, CS1|2 will suggest a valid parameter name. The [[Help:CS1_errors#deprecated_params|list of deprecated and recently removed parameters]] may contain additional information as well. Reported unknown parameters following a {{para|DUPLICATE_&lt;param>}} scheme are created by [[User:Citation bot|Citation Bot]] when it finds duplicate parameters {{para|&lt;param>}} in a template. To resolve this error, replace the erroneous parameter name with a correct one, possibly using the suggested name. Ensure that the parameter's name is correctly spelled and that there are no characters except spaces between the parameter's name and the leading vertical bar (|) or trailing equals sign (=). A list of valid parameters can be found by consulting [[Help:Citation Style 1]] or visiting the description page of the specific template being used, such as {{tlx|cite web}}, {{tlx|cite book}}, {{tlx|cite journal}}, etc. Consider moving information associated with the unknown parameter into an appropriate parameter or to a section of the article's talk page for preservation. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_parameter_ignored|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="parameter_ignored_help_text" /> ==<span id="wikilink_in_url">URL–wikilink conflict</span>== <section begin="wikilink_in_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_wikilink_in_url}} External links in a rendered citation are a combination of url-holding parameters, {{para|url}}, {{para|chapter-url}}, etc., with title-holding parameters, {{para|title}}, {{para|chapter}}, etc. Title-holding parameters may be [[wikilink]]ed to another Wikipedia article but not when there is a matching url-holding parameter in the citation. When this condition occurs, the wikilink is suppressed, the wiki markup ignored, and the rendered citation links to the external site. With {{tlx|cite journal}}, auto-linking of the {{para|pmc}} or {{para|doi}} parameter value can cause this condition to occur implicitly without a specific url-holding parameter. Some [[Help:Template|templates]] will also cause this error if they are part of a title-holding parameter. The error occurs when the template produces wikilinked content. For example, {{tlx|lang}} templates output a wikilinked category. Templates in title-holding parameters may also corrupt the citation's [[WP:COinS|COinS]] metadata. As a general rule, avoid using templates in title-holding parameters unless you know that the template's effects are entirely visual ({{tlx|!}} and the like). This type of error may also occur in identifier-based templates ({{tlx|cite doi}}, etc.). When this happens, the error message is shown in the article but the error is actually located in the identifier-based citation template. To resolve this error, remove wikilinks from title-holding parameters that are intended to be externally linked or remove the external URL, which will allow the internal wikilinks to work as expected. If the conflict is implicitly caused through auto-linking (see above), this can be disabled using {{para|title-link|none}}. If wikilink-producing templates are important to the citation, move them out of the CS1 template but leave them inside the citation's {{tag|ref}} tags. Some of the functionality provided by templates may also be available through CS1 parameters. To resolve errors in identifier-based citation templates, the template must be edited to correct the error. Exercise caution when editing these templates because identifier-based citation templates are often used in multiple articles. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_wikilink_in_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="wikilink_in_url_help_text" /> ==<span id="vancouver">Vancouver style error</span>== <section begin="vancouver_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_vancouver|$1=&lt;type>|$2=&lt;number>}} This error is reported for citations that use {{para|vauthors}}, {{para|veditors}}, {{para|name-list-style|vanc}}. [[Vancouver style]] restricts author or editor names to the Latin alphabet. For the purposes of this test, [[Module:Citation/CS1]] defines the Latin alphabet as the letters defined in the [[Unicode]] Latin character sets: : C0 Controls and Basic Latin<ref>{{cite web |title=C0 Controls and Basic Latin |website=[[Unicode]] |url=https://www.unicode.org/charts/PDF/U0000.pdf |access-date=2015-04-19}}</ref> (0041–005A, 0061–007A) : C1 Controls and Latin-1 Supplement<ref>{{cite web |title=C1 Controls and Latin-1 Supplement |website=Unicode |url=https://www.unicode.org/charts/PDF/U0080.pdf |access-date=2015-04-19}}</ref> (00C0–00D6, 00D8–00F6, 00F8–00FF) : Latin Extended-A<ref>{{cite web |title=Latin Extended-A |website=Unicode |url=https://www.unicode.org/charts/PDF/U0100.pdf |access-date=2015-04-19}}</ref> (0100–017F) : Latin Extended-B<ref>{{cite web |title=Latin Extended-B |website=Unicode |url=https://www.unicode.org/charts/PDF/U0180.pdf |access-date=2015-04-19}}</ref> (0180–01BF, 01C4–024F) : Latin Extended Additional<ref>{{cite web |title=Latin Extended Additional |website=Unicode |url=https://www.unicode.org/charts/PDF/U1E00.pdf |access-date=2025-06-02}}</ref> (1E00–1EFF) This error is also reported when more than two initials are used: in case of more than two initials, list only the first two. This error is also reported when a corporate or institutional author is listed in {{para|vauthors}} without proper delimiters. Corporate authors should be listed this way: : {{para|vauthors|First Surname FM, Surname AB, {{green|((}}Corporate or institutional Author{{green|))}}, Last Surname XY}} While normally correct, sometimes the names listed on a PMID page contain errors when the author surname has a lowercase [[nobiliary particle]]. For example, {{PMID|17726700}} lists Magnus von Knebel Doeberitz as Doeberitz Mv which is not correct. This author's name should be listed as {{para|vauthors|von Knebel Doeberitz M}}.<ref>{{cite web |title=Other surname rules |website=National Center for Biotechnology Information |date=2018-05-18 |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/}}</ref> Certain punctuation will be flagged as an error. For example, Unicode U+2019, right single quotation mark, causes an error because it is not a member of the Latin character sets identified above: {{para|vauthors|Van{{red|’}}t Veer M}}. Replace this character with the straight (or typewriter) apostrophe: {{para|vauthors|Van{{green|'}}t Veer M}}. To resolve this error, Romanize author and editor names.<ref>{{cite book |chapter=Names in non-roman alphabets or character-based languages |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers |author-last=Patrias |author-first=Karen |editor-last=Wendling |editor-first=Dan |location=Bethesda, Maryland, USA |publisher=[[National Library of Medicine]] |date=2007 |edition=2nd |chapter-url=https://www.ncbi.nlm.nih.gov/books/NBK7258/box/A48818/}}</ref> Romanizing can result in two-letter initials, for example, the Greek letter 'Θ' Romanizes to 'Th'.<ref>{{cite web |title=Greek |website=Library of Congress |url=https://www.loc.gov/catdir/cpso/romanization/greek.pdf}}</ref> When author names have this kind of initial, Module:Citation/CS1 can't know if this kind of initial is a typo or a legitimate Romanized character so it will emit the Vancouver error. To suppress the error after determining that the two-character initial is correct and not a typo, treat the name as if it were a corporate name by wrapping it in [[Help:Citation_Style_1#Accept-this-as-written_markup|doubled parentheses]]: {{para|vauthors|..., Tatarinov IuS, ...}} → {{para|vauthors|..., ((Tatarinov IuS)), ...}} Similarly, Chinese hyphenated given names may appear in PubMed listings. For example: 'Wang Hsien-yu' may be listed on PubMed as 'Wang Hy' which will result in a Vancouver error. When this occurs, and upon verification that such names are correct, wrap them in doubled parentheses. Specific rules for names:<ref>{{cite book |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers [Internet] |edition=2nd |author-first=Karen |author-last=Patrias |editor-first=Dan |editor-last=Wendling |location=Bethesda, Maryland, USA |publisher=National Library of Medicine |date=2007 |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/ |access-date=2019-03-31}}</ref> * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33071/?report=objectonly Surnames with hyphens and other punctuation in them] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/?report=objectonly Other surname rules] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33104/?report=objectonly Given names containing punctuation, a prefix, a preposition, or particle] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33118/?report=objectonly Degrees, titles, and honors before or after a personal name] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33127/?report=objectonly Designations of rank within a family, such as Jr and III] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33134/?report=objectonly Names appearing in non-roman alphabets (Cyrillic, Greek, Arabic, Hebrew, Korean) or character-based languages (Chinese, Japanese)] * [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33152/?report=objectonly Organizations as author] ** CS1|2 does not obey the semicolon-as-separator rule. Separate corporate and organizational names from each other and from individual names with a comma; wrap corporate and organizational names in doubled parentheses as described above. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_vancouver|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="vancouver_help_text" /> ==<span id="extra_text_volume">|volume= has extra text</span>== <section begin="extra_text_volume_help_text" />{{help desk}} {{#invoke:Cs1 documentation support|help_text_error_messages|err_extra_text_volume|$1=volume}} The templates are responsible for static text rendered in the citation. When {{para|volume}} is used in a template, cs1|2 formats the volume value according to the style corresponding with the publication type associated with the used citation template. The templates emit this error message when some form of the word "volume" ("volume", "vol.") is found in the value assigned to {{para|volume}}. To resolve this error, remove the extraneous text from the parameter value. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_volume|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_volume_help_text" /> ==<span id="param_has_twl_url">Wikipedia Library link in &lt;param></span>== <section begin="twl_url_help_text" />{{Shortcut|WP:WLERROR}}{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_twl_url|$1=&lt;{{var|param}}>}} This error is reported when a URL-holding parameter has a URL that links to [[Wikipedia:The Wikipedia Library|The Wikipedia Library]]. These urls include this text: :<code>wikipedialibrary.idm.oclc.org</code> When these sorts of URLs are encountered, [[Module:Citation/CS1]] emits this error message and automatically sets {{para|url-access|subscription}} because these URLs are not accessible by readers. To resolve this error, make sure that the value assigned to the URL parameter is {{em|not}} the Wikipedia Library URL but {{em|is}} the URL of the source. Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_twl_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="twl_url_help_text" /> ==<span id="module_cite">#invoke:Cite errors</span>== <section begin="module_cite_help_text" />{{help desk}} {{hatnote|These error messages are emitted by [[Module:Cite]], a helper module for [[Module:Citation/CS1]] that may be used to replace cs1{{!}}2 templates in articles that have or will exceed the [[Help:Template limits#Post-expand include size|Post-expand include size]] limit.}} <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">missing template name as first positional parameter</span> [[Module:Cite]] requires as its first positional parameter the canonical name of one of the cs1 templates (without the <code>cite</code> prefix) or the name of the cs2 template (<code>citation</code>). The module emits this error message when the first positional parameter is missing or empty. <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">unknown template name: &lt;{{var|template name}}></span> The module emits this error message when the first positional parameter is not the canonical name of a recognized cs1|2 template. To resolve either of these errors, make sure that the module call has one of these canonical template names as its first positional parameter value: {{div col|colwidth=20em}} *<code>arxiv</code> *<code>av media</code> *<code>av media notes</code> *<code>biorxiv</code> *<code>book</code> *<code>citation</code> *<code>citeseerx</code> *<code>conference</code> *<code>document</code> *<code>encyclopedia</code> *<code>episode</code> *<code>interview</code> *<code>journal</code> *<code>magazine</code> *<code>mailing list</code> *<code>map</code> *<code>medrxiv</code> *<code>news</code> *<code>newsgroup</code> *<code>podcast</code> *<code>press release</code> *<code>report</code> *<code>serial</code> *<code>sign</code> *<code>speech</code> *<code>ssrn</code> *<code>tech report</code> *<code>thesis</code> *<code>web</code> {{div col end}} Pages with this error are automatically placed in {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: cite module|Category:CS1 errors: cite module|[[:Category:CS1 errors: cite module]]}} ({{PAGESINCATEGORY:CS1 errors: cite module}} pages).<ref group="lower-alpha" name="categories" /><section end="module_cite_help_text" /><!--When moving this section keep the following attached to the Notes section below --><section begin="notes_help_text" /> ==Notes== <!-- When moving this section keep <section begin="notes_help_text"> (located above this section header) attacted --> {{reflist |group=lower-alpha |refs= <ref group="lower-alpha" name="categories">Pages in the Category talk, Draft talk, File talk, Help talk, MediaWiki talk, Module talk, Portal talk, Talk, Template talk, User, User talk, and Wikipedia talk namespaces are not included in the tracking categories. In addition, pages with names matching the patterns '/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', and '/[Aa]rchive' are not included in the tracking categories.<!--See Module:Citation/CS1/Configuration in uncategorized_namespaces{}--></ref> }}<section end="notes_help_text" /><!-- When moving this section keep the following attached to the References section below --><section begin="references_help_text" /> ==References== <!-- When moving this section keep <section begin="references_help_text"> (located above this section header) attacted --> {{reflist |refs= <ref name="archive.org">{{cite web |url=https://archive.org |title=archive.org website |website=Internet Archive}}</ref> <ref name="webcitation.org">{{cite web |url=https://www.webcitation.org |title=webcitation.org website |website=WebCite}}</ref> }}<section end="references_help_text" /> {{Wikipedia referencing}} {{Help navigation}} 4du5wc3ntufj63ko3hk2c9pyg1fv2v0 Module:Cs1 documentation support 828 29396 117212 106821 2026-02-24T19:24:53Z en>Headbomb 0 test? 117212 Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load the configuration module local whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); -- load the whitelist module local exclusion_lists = { -- TODO: move these tables into a separate ~/data module and mw.loadData() it ['cite book'] = { ['agency'] = true, ['air-date'] = true, ['arxiv'] = true, ['biorxiv'] = true, ['citeseerx'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['episode'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['ismn'] = true, ['issn'] = true, ['issue'] = true, ['jfm'] = true, ['journal'] = true, ['jstor'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['MR'] = true, ['network'] = true, ['number'] = true, ['RFC'] = true, ['script-journal'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['SSRN'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['trans-journal'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, ['ZBL'] = true, }, ['cite journal'] = { ['agency'] = true, ['air-date'] = true, ['book-title'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapter-url'] = true, ['chapter-url-access'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['contribution'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor-link#'] = true, ['contributor-mask#'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['edition'] = true, ['editor#'] = true, ['editor-first#'] = true, ['editor-link#'] = true, ['editor-mask#'] = true, ['editors'] = true, ['encyclopedia'] = true, ['episode'] = true, ['ignore-isbn-error'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['isbn'] = true, ['ismn'] = true, ['LCCN'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['network'] = true, ['script-chapter'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, }, } --[[-------------------------< A D D _ T O _ L I S T >--------------------------------------------------------- adds code/name pair to code_list and name/code pair to name_list; code/name pairs in override_list replace those taken from the MediaWiki list; these are marked with a superscripted dagger. |script-<param>= lang codes always use override names so dagger is omitted ]] local function add_to_list (code_list, name_list, override_list, code, name, dagger) if false == dagger then dagger = ''; -- no dagger for |script-<param>= codes and names else dagger = '<sup>†</sup>'; -- dagger for all other lists using override end if override_list[code] then -- look in the override table for this code code_list[code] = override_list[code] .. dagger; -- use the name from the override table; mark with dagger name_list[override_list[code]] = code .. dagger; else code_list[code] = name; -- use the MediaWiki name and code name_list[name] = code; end end --[[-------------------------< L I S T _ F O R M A T >--------------------------------------------------------- formats key/value pair into a string for rendering ['k'] = 'v' → k: v ]] local function list_format (result, list) for k, v in pairs (list) do table.insert (result, k .. ': ' .. v); end end --[[-------------------------< L A N G _ L I S T E R >--------------------------------------------------------- Module entry point Crude documentation tool that returns one of several lists of language codes and names. Used in Template:Citation Style documentation/language/doc {{#invoke:cs1 documentation support|lang_lister|list=<selector>|lang=<code>}} where <selector> is one of the values: 2char – list of ISO 639-1 codes and names sorted by code 3char – list of ISO 639-2, -3 codes and names sorted by code ietf – list of IETF language tags and names sorted by tag ietf2 – list of ISO 639-1 based IETF language tags and names sorted by tag ietf3 – list of list of ISO 639-2, -3 based IETF language tags and names sorted by tag name – list of language names and codes sorted by name all - list all language codes/tags and names sorted by code/tag where <code> is a MediaWiki supported 2, 3, or ietf-like language code; because of fall-back, language names may be the English-language names. ]] local function lang_lister (frame) local lang = (frame.args.lang and '' ~= frame.args.lang) and frame.args.lang or mw.getContentLanguage():getCode() local source_list = mw.language.fetchLanguageNames(lang, 'all'); local override = cfg.lang_tag_remap; local code_1_list={}; local code_2_list={}; local ietf_list={}; local ietf_list2={}; local ietf_list3={}; local name_list={}; if not ({['2char']=true, ['3char']=true, ['ietf']=true, ['ietf2']=true, ['ietf3']=true, ['name']=true, ['all']=true})[frame.args.list] then return '<span style="color:#d33">unknown list selector: ' .. frame.args.list .. '</span>'; end for code, name in pairs (source_list) do if 'all' == frame.args.list then add_to_list (code_1_list, name_list, override, code, name); -- use the code_1_list because why not? elseif 2 == code:len() then add_to_list (code_1_list, name_list, override, code, name); elseif 3 == code:len() then add_to_list (code_2_list, name_list, override, code, name); elseif code:match ('^%a%a%-.+') then -- ietf with 2-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list2, name_list, override, code, name); -- add to ietf2 list elseif code:match ('^%a%a%a%-.+') then -- ietf with 3-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list3, name_list, override, code, name); -- add to ietf3 list end end local result = {}; local out = {}; if '2char' == frame.args.list or 'all' == frame.args.list then -- iso 639-1 list_format (result, code_1_list); elseif '3char' == frame.args.list then -- iso 639-2, 3 list_format (result, code_2_list); elseif 'ietf' == frame.args.list then -- all ietf tags list_format (result, ietf_list); elseif 'ietf2' == frame.args.list then -- 2-character ietf tags list_format (result, ietf_list2); elseif 'ietf3' == frame.args.list then -- 3 character ietf tags list_format (result, ietf_list3); else --must be 'name' list_format (result, name_list); end local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< S C R I P T _ L A N G _ L I S T E R >------------------------------------------ Module entry point Crude documentation tool that returns list of language codes and names supported by the various |script-<param>= parameters. used in Help:CS1 errors {{#invoke:cs1 documentation support|script_lang_lister}} ]] local function script_lang_lister (frame) local lang_code_src = cfg.script_lang_codes ; -- get list of allowed script language codes local override = cfg.lang_tag_remap; local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language local code_list = {}; -- interim list of aliases local name_list={}; -- not used; defined here so that we can reuse add_to_list() local out = {}; -- final output (for now an unordered list) for _, code in ipairs (lang_code_src) do -- loop through the list of codes local name = mw.language.fetchLanguageName (code, this_wiki_lang); -- get the language name associated with this code add_to_list (code_list, name_list, override, code, name, false); -- name_list{} not used but provided so that we can reuse add_to_list(); don't add superscript dagger end local result = {}; local out = {}; list_format (result, code_list); local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< A L I A S _ L I S T E R >------------------------------------------------------ experimental code that lists parameters and their aliases. Perhaps basis for some sort of documentation? {{#invoke:cs1 documentation support|alias_lister}} ]] local function alias_lister () local alias_src = cfg.aliases; -- get master list of aliases local key; -- key for k/v in a new table local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop throu the master list of aliases if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do -- loop through all of the aliases if 1 == i then -- first 'alias' is the canonical parameter name key = alias; -- so it becomes the key in list else list[key] = list[key] and (list[key] .. ', ' .. alias) or alias; -- make comma-separated list of aliases list[alias] = 'see ' .. key; -- make a back reference from this alias to the canonical parameter end end end end for k, v in pairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', k, ': ', v})); end table.sort (out); -- sort it return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ P A R A M _ L I S T E R >---------------------------------- experimental code that lists canonical parameter names. Perhaps basis for some sort of documentation? returns a comma separated, alpha sorted, list of the canonical parameters. If given a template name, excludes parameters listed in that template's exclusion_list[<template>]{} table (if a table has been defined). {{#invoke:cs1 documentation support|canonical_param_lister|<template>}} ]] local function canonical_param_lister (frame) local template = frame.args[1]; if '' == template then template = nil; end if template then template = mw.text.trim (template:lower()); end local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop through the master list of aliases local name; if 'table' == type (aliases) then -- table only when there are aliases name = aliases[1]; -- first member of an aliases table is declared canonical else name = aliases; -- for those parameters that do not have any aliases, the parameter is declared canonical end if not template then -- no template name, add this parameter table.insert (list, name); elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); end end for k, ids in pairs (id_src) do -- spin through the list of identifiers local name = id_src[k].parameters[1]; -- get the first (left-most) parameter name local access = id_src[k].custom_access; -- get the access-icon parameter if it exists for this identifier if not template then -- no template name table.insert (list, name); -- add this parameter if access then table.insert (list, access); -- add this access-icon parameter end elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); if access then table.insert (list, access); end elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); if access then table.insert (list, access); end end end for _, param in ipairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', param})); end local function comp( a, b ) -- used in following table.sort() return a:lower() < b:lower(); end table.sort (out, comp); -- sort the list return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ N A M E _ G E T >------------------------------------------ returns first (canonical) name when metaparameter is assigned a table of names returns name when metaparameter is assigned a single name returns empty string when metaparameter name not found in alias_src{}, id_src{}, or id_src[meta].custom_access metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Because access-icon don't have <metaparam> keys, per se, we create pseudo <metaparam> keys by appending 'access' to the identifier <metaparam>: the <metaparam> for |doi-access= is, for the purposes of this function, DOIaccess, etc Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the parameter best suited for that template so we can specify magazine in the override (frame.args[2]) While for this function, it would be just as simple to not use the function, this mechanism is implemented here to match similar functionality in alias_names_get() (there are slight differences) <override> must exist in the alias list does not apply to the access icon parameters (ignored - these have no aliases) (and which would be best for {{cite news}}? |newspaper= or |work=? can't solve all of the worlds problems at once). output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} {{#invoke:cs1 documentation support|canonical_name_get|<metaparam>|<override>|id=<attribute>|format=[plain|para]}} ]] local function canonical_name_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local name; local meta = args[1] local override = args[2]; local access; -- for id-access parameters if meta:match ('^(%u+)access') then -- the metaparameter (which is not used in ~/Configuration) is id_handlers key concatenated with access: BIBCODEaccess meta, access = meta:gsub ('^(%u+)access', '%1'); -- strip 'access' text from meta and use returned count value as a flag end if alias_src[meta] then name = alias_src[meta]; -- name is a string or a table if 'table' == type (name) then -- table only when there are aliases if not override then name = name[1]; -- first member of an aliases table is declared canonical else for _, v in ipairs (name) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end elseif id_src[meta]then -- if there is an id handler if access then -- and if this is a request for the handler's custom access parameter if id_src[meta].custom_access then -- if there is a custom access parameter name = id_src[meta].custom_access; -- use it else return ''; -- nope, return empty string end else if not override then name = id_src[meta].parameters[1]; -- get canonical id handler parameter else for _, v in ipairs (id_src[meta].parameters) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end else return ''; -- metaparameter not specified, or no such metaparameter end if 'plain' == args.format then -- format and return the output if args.id then return string.format ('<span id="%s">%s</span>', args.id, name); -- plain text with id attribute else return name; -- plain text end elseif 'para' == args.format then return string.format ('<code class="nowrap">|%s=</code>', name); -- same as {{para|<param>}} end return string.format ('<b id="%s">%s</b>', args.id or '', name); -- because {{csdoc}} bolds param names end --[[--------------------------< A L I A S _ N A M E S _ G E T >------------------------------------------------ returns list of aliases for metaparameter <metaparam> returns empty string when there are no aliases returns empty string when <metaparam> name not found in alias_src{} or id_src{}; access icon parameters have no aliases so ignored metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the aliases that are not best suited for that template so we can specify magazine in the override (frame.args[2]) to be the canonical parameter so it won't be listed with the rest of the aliases (normal canonical journal will be) <override> must exist in the alias list except: when <override> value is 'all', returns the canonical parameter plus all of the aliases output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} when not specified, refurns the default bold format used for {{csdoc}} {{#invoke:cs1 documentation support|alias_name_get|<metaparam>|<override>|format=[plain|para]}} ]] local function alias_names_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local meta = args[1]; local override = args[2]; local out = {}; local source; -- selected parameter or id aliases list local aliases; source = alias_src[meta] or (id_src[meta] and id_src[meta].parameters); if not source then if meta:match ('%u+access') then return 'no' == args.none and '' or 'none'; -- custom access parameters don't have aliases else return ''; -- no such meta end elseif not source[2] then -- id_source[meta] is always a table; if no second member, no aliases return 'no' == args.none and '' or 'none'; end if not override then aliases = source; -- normal skip-canonical param case else local flag = 'all' == override and true or nil; -- so that we know that <override> parameter is a valid alias; spoof when override == 'all' aliases = {[1] = ''}; -- spoof to push alias_src[meta][1] and id_src[meta][1] into aliases[2] for _, v in ipairs (source) do -- here when override is set; spin through the aliases to make sure override matches alias in table if v ~= override then table.insert (aliases, v); -- add all but overridden param to the the aliases list for this use case else flag = true; -- set the flag so we know that <override> is a valid alias end end if not flag then aliases = {} -- unset the table as error indicator end end if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do if 1 ~= i then -- aliases[1] is the canonical name; don't include it if 'plain' == args.format then -- format and return the output table.insert (out, alias); -- plain text elseif 'para' == args.format then table.insert (out, string.format ('<code class="nowrap">|%s=</code>', alias)); -- same as {{para|<param>}} else table.insert (out, string.format ("'''%s'''", alias)); -- because csdoc bolds param names end end end return table.concat (out, ', '); -- make pretty list and quit end return 'no' == args.none and '' or 'none'; -- no metaparameter with that name or no aliases end --[[--------------------------< I S _ B O O K _ C I T E _ T E M P L A T E >------------------------------------ fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local book_cite_templates = { ['citation'] = true, ['cite book'] = true, } local function is_book_cite_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return book_cite_templates[title] or ''; end --[[--------------------------< I S _ L I M I T E D _ P A R A M _ T E M P L A T E >---------------------------- fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local limited_param_templates = { -- if ever there is a need to fetch info from ~/Whitelist then ['cite arxiv'] = true, -- this list could also be fetched from there ['cite biorxiv'] = true, ['cite citeseerx'] = true, ['cite medrxiv'] = true, ['cite ssrn'] = true, } local function is_limited_param_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return limited_param_templates[title] or ''; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function _header_make (args) if not args[1] then return ''; -- no header text end local level = args[2] and tonumber (args[2]) or 2; level = string.rep ('=', level); return level .. args[1] .. level; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- Entry from an {{#invoke:}} makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function header_make (frame) local args = getArgs (frame); return _header_make (args); end --[[--------------------------< I D _ L I M I T S _ G E T >---------------------------------------------------- return the limit values for named identifier parameters that have <id> limits (pmc, pmid, ssrn, s2cid, oclc, osti, rfc); the return value used in template documentation and error message help-text {{#invoke:Cs1 documentation support|id_limits_get|<id>}} ]] local function id_limits_get (frame) local args = getArgs (frame); local handlers = cfg.id_handlers; -- get id_handlers {} table from ~/Configuration return args[1] and handlers[args[1]:upper()].id_limit or ('<span style="color:#d33">No limit defined for identifier: ' .. (args[1] or '<unknown name>') .. '</span>'); end --[[--------------------------< C A T _ L I N K _ M A K E >---------------------------------------------------- ]] local function cat_link_make (cat) return table.concat ({'[[:Category:', cat, ']]'}); end --[[--------------------------< S C R I P T _ C A T _ L I S T E R >-------------------------------------------- utility function to get script-language categories ]] local lang_list_t = mw.language.fetchLanguageNames ('en', 'all'); local function script_cat_lister (script_lang_codes_t, lang_tag_remap_t, cats_list_t) for _, lang_code in ipairs (script_lang_codes_t) do local lang_name = lang_tag_remap_t[lang_code] or lang_list_t[lang_code]; -- use remap table to get Bengali instead of Bangla and the like; else use standard MediaWiki names local cat = 'CS1 uses ' .. lang_name .. '-language script (' .. lang_code .. ')'; -- build a category name cats_list_t[cat] = 1; -- and save it end end --[[--------------------------< C S 1 _ C A T _ L I S T E R >-------------------------------------------------- This is a crude tool that reads the category names from Module:Citation/CS1/Configuration, makes links of them, and then lists them in sorted lists. A couple of parameters control the rendering of the output: |select= -- (required) takes one of three values: error, maint, prop |sandbox= -- takes one value: no |hdr-lvl= -- base header level (number of == that make a header); default:2 min:2 This tool will automatically attempt to load a sandbox version of ~/Configuration if one exists. Setting |sandbox=no will defeat this. {{#invoke:cs1 documentation support|cat_lister|select=<error|maint|prop>|sandbox=<no>}} ]] local function cat_lister (frame) local args = getArgs (frame); local list_live_cats = {}; -- list of live categories local list_sbox_cats = {}; -- list of sandbox categories local live_sbox_out = {} -- list of categories that are common to live and sandbox modules local live_not_in_sbox_out = {} -- list of categories in live but not sandbox local sbox_not_in_live_out = {} -- list of categories in sandbox but not live local out = {}; -- final output assembled here local sandbox; -- boolean; true: evaluate the sandbox module local hdr_lvl; -- local sb_cfg; local sandbox, sb_cfg = pcall (mw.loadData, 'Module:Citation/CS1/Configuration/sandbox'); -- get sandbox configuration local cat; local select = args.select; if 'no' == args.sandbox then -- list sandbox? sandbox = false; -- no, live only end if hdr_lvl then -- if set and if tonumber (hdr_lvl) then -- can be converted to number if 2 > tonumber (hdr_lvl) then -- min is 2 hdr_lvl = 2; -- so set to min end else -- can't be converted hdr_lvl = 2; -- so default to min end else hdr_lvl = 2; -- not set so default to min end if 'error' == select or 'maint' == select then -- error and main categorys handling different from poperties cats for _, t in pairs (cfg.error_conditions) do -- get the live module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end end if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, t in pairs (sb_cfg.error_conditions) do -- get the sandbox module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end end end elseif 'prop' == select then -- prop cats for _, cat in pairs (cfg.prop_cats) do -- get the live module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end script_cat_lister (cfg.script_lang_codes, cfg.lang_tag_remap, list_live_cats); -- get live module's foriegn language script cats if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, cat in pairs (sb_cfg.prop_cats) do -- get the sandbox module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end script_cat_lister (sb_cfg.script_lang_codes, sb_cfg.lang_tag_remap, list_sbox_cats); -- get sandbox module's foriegn language script cats end else return '<span style="color:#d33; font-style:normal;">error: unknown selector: ' .. select .. '</span>' end for k, _ in pairs (list_live_cats) do -- separate live/sbox common cats from cats not in sbox if not list_sbox_cats[k] and sandbox then table.insert (live_not_in_sbox_out, cat_link_make (k)); -- in live but not in sbox else table.insert (live_sbox_out, cat_link_make (k)); -- in both live and sbox end end for k, _ in pairs (list_sbox_cats) do -- separate sbox/live common cats from cats not in live if not list_live_cats[k] then table.insert (sbox_not_in_live_out, cat_link_make (k)); -- in sbox but not in live end end local function comp (a, b) -- local function for case-agnostic category name sorting return a:lower() < b:lower(); end local header; -- initialize section header with name of selected category list if 'error' == select then header = 'error'; elseif 'maint' == select then header = 'maintenance'; else header = 'properties'; end header = table.concat ({ -- build the main header 'Live ', -- always include this ((sandbox and 'and sandbox ') or ''), -- if sandbox evaluated, mention that header, -- add the list name ' categories (', -- finish the name and add #live_sbox_out, -- count of categories listed ')' -- close }) local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl}), '\n' .. templatestyles .. '<div class="div-col">' -- opening <div> for columns }); table.sort (live_sbox_out, comp); -- sort case agnostic acsending table.insert (live_sbox_out, 1, header); -- insert the header at the top table.insert (out, table.concat (live_sbox_out, '\n*')); -- make a big string of unordered list markup table.insert (out, '</div>\n'); -- close the </div> and add new line so the next header works if 0 ~= #live_not_in_sbox_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In live but not in sandbox (', #live_not_in_sbox_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (live_not_in_sbox_out, comp); table.insert (live_not_in_sbox_out, 1, header); table.insert (out, table.concat (live_not_in_sbox_out, '\n*')); table.insert (out, '</div>\n'); end if 0 ~= #sbox_not_in_live_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In sandbox but not in live (', #sbox_not_in_live_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (sbox_not_in_live_out, comp); table.insert (sbox_not_in_live_out, 1, header); table.insert (out, table.concat (sbox_not_in_live_out, '\n*')); table.insert (out, '</div>\n'); end return table.concat (out); -- concat into a huge string and done end --[=[--------------------------< H E L P _ T E X T _ C A T S >-------------------------------------------------- To create category links at the bottom of each error help text section and on the individual error category pages; fetches category names from ~/Configuration; replaces this: {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: bioRxiv|Category:CS1 errors: bioRxiv|[[:Category:CS1 errors: bioRxiv]]}} with this: {{#invoke:Cs1 documentation support|help_text_cats|err_bad_biorxiv}} where {{{1}}} is the error_conditions key from Module:Citation/CS1/Configuration add |pages=yes to append the number of pages in the category ]=] local function help_text_cats (frame) local args_t = getArgs (frame); local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local replacements_t = {}; -- table to hold replacement parameters for $1 etc placeholders in category names for k, v in pairs (args_t) do -- look for |$1=<replacement> parameters if 'string' == type (k) and k:match ('^$%d+$') then -- if found replacements_t[k] = v; -- save key and value end end if args_t[1] and error_conditions_t[args_t[1]] then -- must have error_condition key and it must exist local error_cat = error_conditions_t[args_t[1]].category; -- get error category from cs1|2 configuration if error_cat:match ('$%d') then -- look for placeholders in <error_cat> error_cat = error_cat:gsub ('$%d', replacements_t) -- replace place holders with matching value from replacements_t end local title_obj = mw.title.getCurrentTitle(); -- get a title object for the currently displayed page local name_space = title_obj.nsText; if ('Category' == name_space) and (error_cat == title_obj.text) then -- if this is the category page for the error message return table.concat ({'Category:', error_cat}); -- no link; just category name else -- here when currently displayed page is other than the error message category local pages = ''; -- default empty strin for concatenation if 'yes' == args_t.pages then -- if we should display category page count: TODO: do we need to keep this? pages = mw.site.stats.pagesInCategory (error_cat, 'all'); -- get category page count pages = table.concat ({' (', mw.language.getContentLanguage():formatNum (pages), ' page', (1 == pages) and ')' or 's)'}); -- make renderable text end return table.concat ({'[[:Category:', error_cat, ']]', pages}); -- link to category with or without page count end else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end end --[[--------------------------< H E L P _ T E X T _ E R R O R _ M E S S A G E >-------------------------------- to render help text example error messages {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}} assign a single underscore to any of the |$n= parameters to insert an empty string in the error message: {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} -> Check |issn= value {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} -> Check |eissn= value error message is rendered at 120% font size; to specify another font size use |size=; must include unit specifier (%, em, etc) ]] local function help_text_error_messages (frame) local args_t = getArgs (frame); local error_conditions = mw.loadData ('Module:Citation/CS1/Configuration').error_conditions; -- local span_o = '<span class="cs1-visible-error citation-comment">'; local span_o = '<span class="citation-comment" style="color:#d33; font-size:' .. ((args_t.size and args_t.size) or '120%') .. '">'; local span_c = '</span>'; local message; local out = {}; -- output goes here if args_t[1] and error_conditions[args_t[1]] then -- must have error_condition key and it must exist message = error_conditions[args_t[1]].message; local i=1; local count; local rep; repeat rep = '$'..i args_t[rep] = args_t[rep] and args_t[rep]:gsub ('^%s*_%s*$', '') or nil; -- replace empty string marker with actual empty string message, count = message:gsub (rep, args_t[rep] or rep) i = i + 1; until (0 == count); table.insert (out, span_o); table.insert (out, message); table.insert (out, span_c); else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end local out_str = table.concat (out); return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), out_str}); end --[[--------------------------< T E M P L A T E S _ T >-------------------------------------------------------- This table is a k/v table of sequence tables. The keys in this table are collapsed lowercase form of the cs1|2 template names ({{ROOTPAGENAME}}): Template:Cite AV media -> citeavmedia Each subsequence table holds: [1] documentation page where the TemplateData json is stored ({{cite book}} is the oddball) [2] key to 'preprint_arguments_t' and unique_arguments_t' tables in Module:Citation/CS1/Whitelist; these keys dictate which of the basic or limited arguments and numbered arguments tables will be used to validate the content of the TemplateData ]] local templates_t = { citearxiv = {'Template:Cite_arXiv/doc', 'arxiv'}, -- preprint arguments citeavmedia = {'Template:Cite AV media/doc', 'audio-visual'}, -- unique arguments citeavmedianotes = {'Template:Cite AV media notes/doc'}, -- no template data citebiorxiv = {'Template:Cite bioRxiv/doc', 'biorxiv'}, -- preprint arguments citebook = {'Template:Cite book/TemplateData'}, citeciteseerx = {'Template:Cite CiteSeerX/doc', 'citeseerx'}, -- no template data; preprint uses limited arguments citeconference = {'Template:Cite conference/doc', 'conference'}, -- unique arguments citedocument = {'Template:Cite document/doc', 'document'}, -- special case; uses whitelist.document_parameters_t citeencyclopedia = {'Template:Cite encyclopedia/doc'}, citeepisode = {'Template:Cite episode/doc', 'episode'}, -- unique arguments citeinterview = {'Template:Cite interview/doc'}, citejournal = {'Template:Cite journal/doc'}, citemagazine = {'Template:Cite magazine/doc'}, citemailinglist = {'Template:Cite mailing list/doc', 'mailinglist'}, -- unique arguments -- no template data citemap = {'Template:Cite map/TemplateData', 'map'}, -- unique arguments citemedrxiv = {'Template:Cite medRxiv/doc', 'medrxiv'}, -- preprint arguments citenews = {'Template:Cite news/doc'}, citenewsgroup = {'Template:Cite newsgroup/doc', 'newsgroup'}, -- unique arguments citepodcast = {'Template:Cite podcast/doc'}, citepressrelease = {'Template:Cite press release/doc'}, citereport = {'Template:Cite report/doc', 'report'}, -- unique arguments citeserial = {'Template:Cite serial/doc', 'serial'}, -- unique arguments -- no template data citesign = {'Template:Cite sign/doc'}, citespeech = {'Template:Cite speech/doc', 'speech'}, -- unique arguments -- no template data citessrn = {'Template:Cite SSRN/doc', 'ssrn'}, -- preprint arguments -- no template data citetechreport = {'Template:Cite tech report/doc'}, citethesis = {'Template:Cite thesis/doc', 'thesis'}, -- unique arguments citeweb = {'Template:Cite web/doc'}, citation = {'Template:Citation/doc'}, } --[[--------------------------< N O _ P A G E _ T E M P L A T E S _ T >---------------------------------------- ]] local no_page_templates_t = {}; --[[--------------------------< I D E N T I F I E R _ A L I A S E S _ T >-------------------------------------- a table of the identifier aliases ]] local identifier_aliases_t = {} for identifier, handler in pairs (cfg.id_handlers) do -- for each identifier local aliases_t = {}; -- create a table for _, alias in ipairs (handler.parameters) do -- get the alaises aliases_t[alias] = true; -- and add them to the table in a form that mimics the whitelist tables end identifier_aliases_t[identifier:lower()] = aliases_t; -- add new table to the identifier aliases table; use lowercase identifier base name for the key end --[[--------------------------< T E M P L A T E _ D A T A _ J S O N _ G E T >---------------------------------- get template doc page content and extract the content of the TemplateData tags (case insensitive) <template> is the canonical name of the template doc page (with namespace) that holds the template data; usually Template:Cite xxx/doc (except Template:Cite book/TemplateData) ]] local function template_data_json_get (template) local json = mw.title.new (template):getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 json = json:match ('<[Tt]emplate[Dd]ata>(.-)</[Tt]emplate[Dd]ata>'); -- remove everything exept the content of the TemplatData tags return json and mw.text.jsonDecode (json); -- decode the json string and return as a table; nil if not found end --[[--------------------------< V A L I D A T E _ D O C U M E N T _ P A R A M >-------------------------------- looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.document_parameters_t. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData ]] local function validate_document_param (param) if true == whitelist.document_parameters_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.basic_arguments{} and if necessary in whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData ]] local function validate_basic_param (param) if true == whitelist.common_parameters_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ P R E P R I N T _ P A R A M >-------------------------------- looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.preprint_arguments_t{} or whitelist.limited_basic_arguments{} or whitelist.limited_numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.preprint_arguments_t{} ]] local function validate_preprint_param (param, key) if true == whitelist.preprint_arguments_t[key][param] or true == whitelist.limited_parameters_t[param] then -- true == whitelist.limited_basic_arguments_t[param] or -- true == whitelist.limited_numbered_arguments_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.unique_arguments_t{} or whitelist.basic_arguments{} or whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.unique_arguments_t{} ]] local function validate_unique_param (param, key, cfg_aliases_t) if true == whitelist.unique_arguments_t[key][param] or true == validate_basic_param (param) then return true; end end --[[--------------------------< V A L I D A T E _ I D _ P A R A M >-------------------------------------------- looks for <param> <alias> in identifier_aliases_t{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <alias> is the alias that we're looking for ]] local function validate_id_alias (param, alias) return identifier_aliases_t[param] and identifier_aliases_t[param][alias]; end --[[--------------------------< P A R A M _ E R R O R_ M S G >------------------------------------------------- ]] local function param_error_msg (param) return '<span style="font-family:"monospace">|' .. param .. '=</span> is not a valid parameter'; end --[[--------------------------< D U P _ A L I A S _ E R R O R_ M S G >----------------------------------------- ]] local function dup_alias_error_msg (param, alias) return '<span style="font-family:"monospace">|' .. param .. '=</span> has duplicate aliases: <span font-family:"monospace";>|' .. alias .. '=</span>'; end --[[--------------------------< D U P _ A L I A S E S _ C H E C K >-------------------------------------------- create an associative array of <param> aliases. if <alias> already present in <aliases_t> add an error message to <out> ]] local function dup_aliases_check (param, alias, aliases_t, out_t) if not aliases_t[alias] then aliases_t[alias] = true; else table.insert (out_t, dup_alias_error_msg (param, alias)); end end --[[--------------------------< A L I A S _ E R R O R_ M S G >------------------------------------------------- ]] local function alias_error_msg (param, alias) return '<code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. alias .. '=</code> is not a valid alias of: <code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. param .. '=</code>'; end --[[--------------------------< C F G _ A L I A S E S _ T _ M A K E >------------------------------------------ convert this from cfg.aliases{}: ['AccessDate'] = {'access-date', 'accessdate'} to this in out_t{} ['access-date'] = 'AccessDate', ['accessdate'] = 'AccessDate', to test if |access-date= is an aliases of |accessdate=: if out_t['access-date'] == out_t['accessdate'] ]] local function cfg_aliasts_t_make () local out_t = {}; for meta, params_t in pairs (cfg.aliases) do if 'table' == type (params_t) then -- metaparameters that are assigned string values do not have aliases for _, param in ipairs (params_t) do -- for each alias param = param:gsub ('#', ''); -- get rid of enumerators out_t[param] = meta; -- add it to the output table end end end --error (mw.dumpObject (out_t)) return out_t; end --[[--------------------------< T E M P L A T E _ D A T A _ V A L I D A T E >---------------------------------- compairs parameter names listed in a cs1|2 template's TemplateData structure (everything between <TemplateData> and </TemplateData> tag case insensitive). Returns error messages when errors found, empty string else. {{#invoke:Cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}} When called from a different page: {{#invoke:cs1 documentation support|template_data_validate|<canonical template name>}} where the <canonical template name> is the template's canonical name with or without namespace and or subpages ]] local function template_data_validate (frame) local args_t = getArgs (frame); if not args_t[1] then return '<span style="color:#d33">Error: cs1|2 template name required</span>'; end local template_idx = args_t[1]:lower():match ('cit[ae][^/]+'); -- args_t[1] has something if not template_idx then -- but if not a cs1|2 template abandon with error message return '<span style="color:#d33">Error: cs1|2 template name required</span>'; else template_idx = template_idx:gsub (' ', ''); -- is what appears to be a cs1|2 template so strip spaces end local cfg_aliases_t = cfg_aliasts_t_make (); local template_t = templates_t[template_idx]; local out = {}; local template_doc = template_t[1]; local json_t = template_data_json_get (template_doc); if not json_t then table.insert (out, 'Error: can\'t find TemplateData'); else for param, param_t in pairs (json_t['params']) do local param_i; -- this will be the parameter name that gets validated if param:find ('[Ss]2[Cc][Ii][Dd]') then -- |s2cid*= parameters are not enumerated ... param_i = param; -- ... so don't convert the '2' to '#' else param_i = param:gsub ('%d+', '#'); -- for enumerated parameters, convert the enumerator digits to a single '#' character; all others unmolested end local param_is_valid; -- boolean true when param is valid; nil else if template_t[2] then -- if template is a preprint or uses unique parameters of 'document' parameters if 'document' == template_t[2] then -- if a {{cite document}} template param_is_valid = validate_document_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerator digits to a single '#' character if not validate_document_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); -- may be known but is not supported elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid preprint param table.insert (out, param_error_msg (param)) end elseif whitelist.preprint_arguments_t[template_t[2]] then -- if a preprint template param_is_valid = validate_preprint_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerator digits to a single '#' character if not validate_preprint_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); -- may be known but is not supported elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid preprint param table.insert (out, param_error_msg (param)) end elseif whitelist.unique_arguments_t[template_t[2]] then -- if a unique parameters template param_is_valid = validate_unique_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_unique_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid unique parameter table.insert (out, param_error_msg (param)) end else -- should never be here if coder is doing the right thing ... table.insert (out, 'internal error: unexpected keyword in templates_t: ' .. template_t[2]); break; end else -- here when not unique or preprint param_is_valid = validate_basic_param (param_i); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out) local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_basic_param (alias_i) and not validate_id_alias (param, alias) then -- for isbn13 (while still supported) must not mask the digits table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid table.insert (out, param_error_msg (param)) end end end end ---------- this emits errors when page/pages/at listed in templatedata of templates that don't support those parameters ---------- -- if json_t then -- if ({['citeavmedia']=true, ['citeepisode']=true, ['citemailinglist']=true, ['citenewsgroup']=true, ['citepodcast']=true, ['citeserial']=true, ['citesign']=true, ['citespeech']=true})[template_idx] then -- local insource_params_t = {}; -- build sequence of pagination params not supported by these templates -- for _, meta_param in ipairs ({'At', 'Page', 'Pages', 'QuotePage', 'QuotePages'}) do -- if 'table' == type (cfg.aliases[meta_param]) then -- for _, alias in ipairs (cfg.aliases[meta_param]) do -- metaparameter is a sequence -- table.insert (insource_params_t, alias); -- add the aliases from the metaparameter sequence to the table -- end -- else -- metaparameter is plain text -- table.insert (insource_params_t, cfg.aliases[meta_param]); -- add the alias to the table -- end -- end -- -- for _, param in ipairs (insource_params_t) do -- if json_t.params[param] then -- table.insert (out, param_error_msg (param)); -- error; this parameter not supported by this template -- end -- end -- end -- end ---------- end page/pages/at error detection ---------- if 0 ~= #out then table.sort (out); out[1] = '*' .. out[1]; -- add a splat to the first error message -- return table.concat ({'[[' .. template_doc .. ']] TemplateData has errors:<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>'}); return table.concat ({ '[[Template:' .. args_t[1] .. ']] uses ', whitelist.preprint_arguments_t[template_t[2]] and 'preprint and limited parameter sets' or (whitelist.unique_arguments_t[template_t[2]] and 'unique and standard parameter sets' or 'standard parameter set'), '; TemplateData has errors:\n', '<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>' }); else return; -- no errors detected; return nothing end end --[[--------------------------< E R R O R _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|error_cat_page_tally}} ]] local function error_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted for k, v_t in pairs (error_conditions_t) do if k:match ('^err') then if not cat_t[v_t.category] then cat_t[v_t.category] = true; tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< M A I N T _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|maint_cat_page_tally}} Dynamic subcats of CS1 maint: DOI inactive not counted because these names come and go as time goes by. ]] local function maint_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local i = 0; -- number of categories for k, v_t in pairs (error_conditions_t) do if not k:match ('^err') then -- if not an error key its a maint key if not cat_t[v_t.category] then cat_t[v_t.category] = true; if 'maint_mult_names' == k or 'maint_numeric_names' == k then local special_case_translation_t = cfg.special_case_translation; for _, name in ipairs ({'AuthorList', 'ContributorList', 'EditorList', 'InterviewerList', 'TranslatorList'}) do local cat_name = v_t.category:gsub ('$1', special_case_translation_t[name]); -- replace $1 with translated list name tally = tally + mw.site.stats.pagesInCategory (cat_name, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end else tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< M O S T _ C O M M O N _ E R R _ C A T S >------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category get the number of pages in the category and make a list in descending order of categories by the number of pages in the category. Render the list when done. List is truncated to 10 categories. {{#invoke:cs1 documentation support|most_common_error_cats}} ]] local function most_common_error_cats () local lang_obj = mw.language.getContentLanguage(); local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local most_common_t = {}; -- sorted list of categorys by count local fmt_str = '* [[:Category:%s|%s]]: %s'; -- output string format for unordered list for k, v_t in pairs (error_conditions_t) do if k:match ('^err') then if not cat_t[v_t.category] then cat_t[v_t.category] = true; local number_of_pages = mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files table.insert (most_common_t, {number_of_pages, v_t.category}); end end end local function special_sort (a, b) if a[1] == b[1] then -- if page counts are the same return a[2] < b[2]; -- ascending sort by category name else return a[1] > b[1] -- descending sort by page count end end table.sort (most_common_t, special_sort); -- descending sort most_common_t[11] = nil; -- we only care about the 10 most common local out_t = {}; for i, v_t in ipairs (most_common_t) do table.insert (out_t, string.format (fmt_str, v_t[2], v_t[2], lang_obj:formatNum (v_t[1]))); end return table.concat (out_t, '\n'); end --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E _ L I S T E R >------------------ For use in the Help:CS1 error §Notes Get namespace names and identifiers from MediaWiki. Make a human readable list of namespace names and identifiers that cs1|2 does not categorize. {{#invoke:cs1 documentation support|uncategorized_namespace_lister}} For convenience, {{#invoke:cs1 documentation support|uncategorized_namespace_lister|all=<anything>}} returns a list of all namespace names and identifiers used on the current wiki. Any namespace with an identifier less than 1, currently Mainspace (0), Special (-1), and Media (-2), is excluded from the list. ]] local function uncategorized_namespace_lister (frame) local list_t = {}; local function compare (a, b) -- local function to sort namespaces numerically by the identifiers local a_num = tonumber (a:match ('%d+')); -- get identifiers and convert to numbers local b_num = tonumber (b:match ('%d+')); return a_num < b_num; -- do the comparison end for i, _ in pairs (mw.site.namespaces) do -- for each namespace in the table if '' == frame.args.all or not frame.args.all then -- when |all= not set, make a list of uncategorized namespaces if cfg.uncategorized_namespaces[i] then -- if the identifier is listed in our uncategorized namespace list table.insert (list_t, table.concat ({mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier to our local list end elseif 0 < i then -- |all=<anything>: all namespace names and identifiers; ignore identifiers less than 1 table.insert (list_t, table.concat ({'*', mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier as an unordered list item end end table.sort (list_t, compare); -- ascending numerical sort by identifier if not frame.args.all then -- when |all= not set, format list of uncategorized namespaces and identifiers list_t[#list_t] = 'and ' .. list_t[#list_t]; -- add 'and ' to the last name/identifier pair return table.concat (list_t, ', '); -- make a big string and done else -- make list of all namespaces and identifiers return table.concat (list_t, '\n'); -- make a big string and done end end --[[--------------------------< S I N G L E _ L T R _ 2 N D _ L V L _ D O M A I N _ L I S T E R >------------- for Help:CS1_errors#bad_url, list the supported top level domains that support single-letter 2nd level names {{#invoke:Module:cs1 documentation support|single_ltr_2nd_lvl_domain_lister}} ]] local function single_ltr_2nd_lvl_domain_lister () local out_t = {}; -- output goes here for _, tld in ipairs (cfg.single_letter_2nd_lvl_domains_t) do -- fetch each tld table.insert (out_t, '.' .. tld); -- prefix with a dot and save in out_t{} end return table.concat (out_t, ', '); -- make a big string and done end --[[--------------------------< C O D E _ N A M E _ P A I R _ E X I S T S >---------------------------------------- Returns language code if pair exists, nil if either code doesn't exist or the name doesn't match. Intended for use by Template:CS1 language sources/core args[1] is language code args[2] is language name ]] local function code_name_pair_exists(frame) local wiki_language = mw.getContentLanguage():getCode() local source_list = mw.language.fetchLanguageNames(wiki_language, 'all'); local code_list = {}; local name_list = {}; local override = cfg.lang_tag_remap; for code, name in pairs(source_list) do add_to_list(code_list, name_list, override, code, name); end local args = getArgs(frame); local language_code = args[1] local language_name = args[2] -- Check if the language code exists and the corresponding name matches if code_list[language_code] == language_name then -- Both code and name are a valid pair return language_code else if override[language_code] == language_name then -- Code and name are a valid pair found in override table return language_code else -- Either code doesn't exist or the name doesn't match return nil end end end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { alias_lister = alias_lister, alias_names_get = alias_names_get, canonical_param_lister = canonical_param_lister, canonical_name_get = canonical_name_get, cat_lister = cat_lister, code_name_pair_exists = code_name_pair_exists, error_cat_page_tally = error_cat_page_tally, header_make = header_make, help_text_cats = help_text_cats, help_text_error_messages = help_text_error_messages, id_limits_get = id_limits_get, is_book_cite_template = is_book_cite_template, is_limited_param_template = is_limited_param_template, lang_lister = lang_lister, maint_cat_page_tally = maint_cat_page_tally, most_common_error_cats = most_common_error_cats, script_lang_lister = script_lang_lister, single_ltr_2nd_lvl_domain_lister = single_ltr_2nd_lvl_domain_lister, template_data_validate = template_data_validate, uncategorized_namespace_lister = uncategorized_namespace_lister, }; akfqjbs81nvp9w6qfmoi9fysdlixv5r 117213 117212 2026-07-16T11:41:56Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Cs1_documentation_support]] 117212 Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load the configuration module local whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); -- load the whitelist module local exclusion_lists = { -- TODO: move these tables into a separate ~/data module and mw.loadData() it ['cite book'] = { ['agency'] = true, ['air-date'] = true, ['arxiv'] = true, ['biorxiv'] = true, ['citeseerx'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['episode'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['ismn'] = true, ['issn'] = true, ['issue'] = true, ['jfm'] = true, ['journal'] = true, ['jstor'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['MR'] = true, ['network'] = true, ['number'] = true, ['RFC'] = true, ['script-journal'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['SSRN'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['trans-journal'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, ['ZBL'] = true, }, ['cite journal'] = { ['agency'] = true, ['air-date'] = true, ['book-title'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapter-url'] = true, ['chapter-url-access'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['contribution'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor-link#'] = true, ['contributor-mask#'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['edition'] = true, ['editor#'] = true, ['editor-first#'] = true, ['editor-link#'] = true, ['editor-mask#'] = true, ['editors'] = true, ['encyclopedia'] = true, ['episode'] = true, ['ignore-isbn-error'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['isbn'] = true, ['ismn'] = true, ['LCCN'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['network'] = true, ['script-chapter'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, }, } --[[-------------------------< A D D _ T O _ L I S T >--------------------------------------------------------- adds code/name pair to code_list and name/code pair to name_list; code/name pairs in override_list replace those taken from the MediaWiki list; these are marked with a superscripted dagger. |script-<param>= lang codes always use override names so dagger is omitted ]] local function add_to_list (code_list, name_list, override_list, code, name, dagger) if false == dagger then dagger = ''; -- no dagger for |script-<param>= codes and names else dagger = '<sup>†</sup>'; -- dagger for all other lists using override end if override_list[code] then -- look in the override table for this code code_list[code] = override_list[code] .. dagger; -- use the name from the override table; mark with dagger name_list[override_list[code]] = code .. dagger; else code_list[code] = name; -- use the MediaWiki name and code name_list[name] = code; end end --[[-------------------------< L I S T _ F O R M A T >--------------------------------------------------------- formats key/value pair into a string for rendering ['k'] = 'v' → k: v ]] local function list_format (result, list) for k, v in pairs (list) do table.insert (result, k .. ': ' .. v); end end --[[-------------------------< L A N G _ L I S T E R >--------------------------------------------------------- Module entry point Crude documentation tool that returns one of several lists of language codes and names. Used in Template:Citation Style documentation/language/doc {{#invoke:cs1 documentation support|lang_lister|list=<selector>|lang=<code>}} where <selector> is one of the values: 2char – list of ISO 639-1 codes and names sorted by code 3char – list of ISO 639-2, -3 codes and names sorted by code ietf – list of IETF language tags and names sorted by tag ietf2 – list of ISO 639-1 based IETF language tags and names sorted by tag ietf3 – list of list of ISO 639-2, -3 based IETF language tags and names sorted by tag name – list of language names and codes sorted by name all - list all language codes/tags and names sorted by code/tag where <code> is a MediaWiki supported 2, 3, or ietf-like language code; because of fall-back, language names may be the English-language names. ]] local function lang_lister (frame) local lang = (frame.args.lang and '' ~= frame.args.lang) and frame.args.lang or mw.getContentLanguage():getCode() local source_list = mw.language.fetchLanguageNames(lang, 'all'); local override = cfg.lang_tag_remap; local code_1_list={}; local code_2_list={}; local ietf_list={}; local ietf_list2={}; local ietf_list3={}; local name_list={}; if not ({['2char']=true, ['3char']=true, ['ietf']=true, ['ietf2']=true, ['ietf3']=true, ['name']=true, ['all']=true})[frame.args.list] then return '<span style="color:#d33">unknown list selector: ' .. frame.args.list .. '</span>'; end for code, name in pairs (source_list) do if 'all' == frame.args.list then add_to_list (code_1_list, name_list, override, code, name); -- use the code_1_list because why not? elseif 2 == code:len() then add_to_list (code_1_list, name_list, override, code, name); elseif 3 == code:len() then add_to_list (code_2_list, name_list, override, code, name); elseif code:match ('^%a%a%-.+') then -- ietf with 2-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list2, name_list, override, code, name); -- add to ietf2 list elseif code:match ('^%a%a%a%-.+') then -- ietf with 3-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list3, name_list, override, code, name); -- add to ietf3 list end end local result = {}; local out = {}; if '2char' == frame.args.list or 'all' == frame.args.list then -- iso 639-1 list_format (result, code_1_list); elseif '3char' == frame.args.list then -- iso 639-2, 3 list_format (result, code_2_list); elseif 'ietf' == frame.args.list then -- all ietf tags list_format (result, ietf_list); elseif 'ietf2' == frame.args.list then -- 2-character ietf tags list_format (result, ietf_list2); elseif 'ietf3' == frame.args.list then -- 3 character ietf tags list_format (result, ietf_list3); else --must be 'name' list_format (result, name_list); end local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< S C R I P T _ L A N G _ L I S T E R >------------------------------------------ Module entry point Crude documentation tool that returns list of language codes and names supported by the various |script-<param>= parameters. used in Help:CS1 errors {{#invoke:cs1 documentation support|script_lang_lister}} ]] local function script_lang_lister (frame) local lang_code_src = cfg.script_lang_codes ; -- get list of allowed script language codes local override = cfg.lang_tag_remap; local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language local code_list = {}; -- interim list of aliases local name_list={}; -- not used; defined here so that we can reuse add_to_list() local out = {}; -- final output (for now an unordered list) for _, code in ipairs (lang_code_src) do -- loop through the list of codes local name = mw.language.fetchLanguageName (code, this_wiki_lang); -- get the language name associated with this code add_to_list (code_list, name_list, override, code, name, false); -- name_list{} not used but provided so that we can reuse add_to_list(); don't add superscript dagger end local result = {}; local out = {}; list_format (result, code_list); local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< A L I A S _ L I S T E R >------------------------------------------------------ experimental code that lists parameters and their aliases. Perhaps basis for some sort of documentation? {{#invoke:cs1 documentation support|alias_lister}} ]] local function alias_lister () local alias_src = cfg.aliases; -- get master list of aliases local key; -- key for k/v in a new table local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop throu the master list of aliases if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do -- loop through all of the aliases if 1 == i then -- first 'alias' is the canonical parameter name key = alias; -- so it becomes the key in list else list[key] = list[key] and (list[key] .. ', ' .. alias) or alias; -- make comma-separated list of aliases list[alias] = 'see ' .. key; -- make a back reference from this alias to the canonical parameter end end end end for k, v in pairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', k, ': ', v})); end table.sort (out); -- sort it return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ P A R A M _ L I S T E R >---------------------------------- experimental code that lists canonical parameter names. Perhaps basis for some sort of documentation? returns a comma separated, alpha sorted, list of the canonical parameters. If given a template name, excludes parameters listed in that template's exclusion_list[<template>]{} table (if a table has been defined). {{#invoke:cs1 documentation support|canonical_param_lister|<template>}} ]] local function canonical_param_lister (frame) local template = frame.args[1]; if '' == template then template = nil; end if template then template = mw.text.trim (template:lower()); end local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop through the master list of aliases local name; if 'table' == type (aliases) then -- table only when there are aliases name = aliases[1]; -- first member of an aliases table is declared canonical else name = aliases; -- for those parameters that do not have any aliases, the parameter is declared canonical end if not template then -- no template name, add this parameter table.insert (list, name); elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); end end for k, ids in pairs (id_src) do -- spin through the list of identifiers local name = id_src[k].parameters[1]; -- get the first (left-most) parameter name local access = id_src[k].custom_access; -- get the access-icon parameter if it exists for this identifier if not template then -- no template name table.insert (list, name); -- add this parameter if access then table.insert (list, access); -- add this access-icon parameter end elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); if access then table.insert (list, access); end elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); if access then table.insert (list, access); end end end for _, param in ipairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', param})); end local function comp( a, b ) -- used in following table.sort() return a:lower() < b:lower(); end table.sort (out, comp); -- sort the list return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ N A M E _ G E T >------------------------------------------ returns first (canonical) name when metaparameter is assigned a table of names returns name when metaparameter is assigned a single name returns empty string when metaparameter name not found in alias_src{}, id_src{}, or id_src[meta].custom_access metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Because access-icon don't have <metaparam> keys, per se, we create pseudo <metaparam> keys by appending 'access' to the identifier <metaparam>: the <metaparam> for |doi-access= is, for the purposes of this function, DOIaccess, etc Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the parameter best suited for that template so we can specify magazine in the override (frame.args[2]) While for this function, it would be just as simple to not use the function, this mechanism is implemented here to match similar functionality in alias_names_get() (there are slight differences) <override> must exist in the alias list does not apply to the access icon parameters (ignored - these have no aliases) (and which would be best for {{cite news}}? |newspaper= or |work=? can't solve all of the worlds problems at once). output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} {{#invoke:cs1 documentation support|canonical_name_get|<metaparam>|<override>|id=<attribute>|format=[plain|para]}} ]] local function canonical_name_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local name; local meta = args[1] local override = args[2]; local access; -- for id-access parameters if meta:match ('^(%u+)access') then -- the metaparameter (which is not used in ~/Configuration) is id_handlers key concatenated with access: BIBCODEaccess meta, access = meta:gsub ('^(%u+)access', '%1'); -- strip 'access' text from meta and use returned count value as a flag end if alias_src[meta] then name = alias_src[meta]; -- name is a string or a table if 'table' == type (name) then -- table only when there are aliases if not override then name = name[1]; -- first member of an aliases table is declared canonical else for _, v in ipairs (name) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end elseif id_src[meta]then -- if there is an id handler if access then -- and if this is a request for the handler's custom access parameter if id_src[meta].custom_access then -- if there is a custom access parameter name = id_src[meta].custom_access; -- use it else return ''; -- nope, return empty string end else if not override then name = id_src[meta].parameters[1]; -- get canonical id handler parameter else for _, v in ipairs (id_src[meta].parameters) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end else return ''; -- metaparameter not specified, or no such metaparameter end if 'plain' == args.format then -- format and return the output if args.id then return string.format ('<span id="%s">%s</span>', args.id, name); -- plain text with id attribute else return name; -- plain text end elseif 'para' == args.format then return string.format ('<code class="nowrap">|%s=</code>', name); -- same as {{para|<param>}} end return string.format ('<b id="%s">%s</b>', args.id or '', name); -- because {{csdoc}} bolds param names end --[[--------------------------< A L I A S _ N A M E S _ G E T >------------------------------------------------ returns list of aliases for metaparameter <metaparam> returns empty string when there are no aliases returns empty string when <metaparam> name not found in alias_src{} or id_src{}; access icon parameters have no aliases so ignored metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the aliases that are not best suited for that template so we can specify magazine in the override (frame.args[2]) to be the canonical parameter so it won't be listed with the rest of the aliases (normal canonical journal will be) <override> must exist in the alias list except: when <override> value is 'all', returns the canonical parameter plus all of the aliases output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} when not specified, refurns the default bold format used for {{csdoc}} {{#invoke:cs1 documentation support|alias_name_get|<metaparam>|<override>|format=[plain|para]}} ]] local function alias_names_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local meta = args[1]; local override = args[2]; local out = {}; local source; -- selected parameter or id aliases list local aliases; source = alias_src[meta] or (id_src[meta] and id_src[meta].parameters); if not source then if meta:match ('%u+access') then return 'no' == args.none and '' or 'none'; -- custom access parameters don't have aliases else return ''; -- no such meta end elseif not source[2] then -- id_source[meta] is always a table; if no second member, no aliases return 'no' == args.none and '' or 'none'; end if not override then aliases = source; -- normal skip-canonical param case else local flag = 'all' == override and true or nil; -- so that we know that <override> parameter is a valid alias; spoof when override == 'all' aliases = {[1] = ''}; -- spoof to push alias_src[meta][1] and id_src[meta][1] into aliases[2] for _, v in ipairs (source) do -- here when override is set; spin through the aliases to make sure override matches alias in table if v ~= override then table.insert (aliases, v); -- add all but overridden param to the the aliases list for this use case else flag = true; -- set the flag so we know that <override> is a valid alias end end if not flag then aliases = {} -- unset the table as error indicator end end if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do if 1 ~= i then -- aliases[1] is the canonical name; don't include it if 'plain' == args.format then -- format and return the output table.insert (out, alias); -- plain text elseif 'para' == args.format then table.insert (out, string.format ('<code class="nowrap">|%s=</code>', alias)); -- same as {{para|<param>}} else table.insert (out, string.format ("'''%s'''", alias)); -- because csdoc bolds param names end end end return table.concat (out, ', '); -- make pretty list and quit end return 'no' == args.none and '' or 'none'; -- no metaparameter with that name or no aliases end --[[--------------------------< I S _ B O O K _ C I T E _ T E M P L A T E >------------------------------------ fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local book_cite_templates = { ['citation'] = true, ['cite book'] = true, } local function is_book_cite_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return book_cite_templates[title] or ''; end --[[--------------------------< I S _ L I M I T E D _ P A R A M _ T E M P L A T E >---------------------------- fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local limited_param_templates = { -- if ever there is a need to fetch info from ~/Whitelist then ['cite arxiv'] = true, -- this list could also be fetched from there ['cite biorxiv'] = true, ['cite citeseerx'] = true, ['cite medrxiv'] = true, ['cite ssrn'] = true, } local function is_limited_param_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return limited_param_templates[title] or ''; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function _header_make (args) if not args[1] then return ''; -- no header text end local level = args[2] and tonumber (args[2]) or 2; level = string.rep ('=', level); return level .. args[1] .. level; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- Entry from an {{#invoke:}} makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function header_make (frame) local args = getArgs (frame); return _header_make (args); end --[[--------------------------< I D _ L I M I T S _ G E T >---------------------------------------------------- return the limit values for named identifier parameters that have <id> limits (pmc, pmid, ssrn, s2cid, oclc, osti, rfc); the return value used in template documentation and error message help-text {{#invoke:Cs1 documentation support|id_limits_get|<id>}} ]] local function id_limits_get (frame) local args = getArgs (frame); local handlers = cfg.id_handlers; -- get id_handlers {} table from ~/Configuration return args[1] and handlers[args[1]:upper()].id_limit or ('<span style="color:#d33">No limit defined for identifier: ' .. (args[1] or '<unknown name>') .. '</span>'); end --[[--------------------------< C A T _ L I N K _ M A K E >---------------------------------------------------- ]] local function cat_link_make (cat) return table.concat ({'[[:Category:', cat, ']]'}); end --[[--------------------------< S C R I P T _ C A T _ L I S T E R >-------------------------------------------- utility function to get script-language categories ]] local lang_list_t = mw.language.fetchLanguageNames ('en', 'all'); local function script_cat_lister (script_lang_codes_t, lang_tag_remap_t, cats_list_t) for _, lang_code in ipairs (script_lang_codes_t) do local lang_name = lang_tag_remap_t[lang_code] or lang_list_t[lang_code]; -- use remap table to get Bengali instead of Bangla and the like; else use standard MediaWiki names local cat = 'CS1 uses ' .. lang_name .. '-language script (' .. lang_code .. ')'; -- build a category name cats_list_t[cat] = 1; -- and save it end end --[[--------------------------< C S 1 _ C A T _ L I S T E R >-------------------------------------------------- This is a crude tool that reads the category names from Module:Citation/CS1/Configuration, makes links of them, and then lists them in sorted lists. A couple of parameters control the rendering of the output: |select= -- (required) takes one of three values: error, maint, prop |sandbox= -- takes one value: no |hdr-lvl= -- base header level (number of == that make a header); default:2 min:2 This tool will automatically attempt to load a sandbox version of ~/Configuration if one exists. Setting |sandbox=no will defeat this. {{#invoke:cs1 documentation support|cat_lister|select=<error|maint|prop>|sandbox=<no>}} ]] local function cat_lister (frame) local args = getArgs (frame); local list_live_cats = {}; -- list of live categories local list_sbox_cats = {}; -- list of sandbox categories local live_sbox_out = {} -- list of categories that are common to live and sandbox modules local live_not_in_sbox_out = {} -- list of categories in live but not sandbox local sbox_not_in_live_out = {} -- list of categories in sandbox but not live local out = {}; -- final output assembled here local sandbox; -- boolean; true: evaluate the sandbox module local hdr_lvl; -- local sb_cfg; local sandbox, sb_cfg = pcall (mw.loadData, 'Module:Citation/CS1/Configuration/sandbox'); -- get sandbox configuration local cat; local select = args.select; if 'no' == args.sandbox then -- list sandbox? sandbox = false; -- no, live only end if hdr_lvl then -- if set and if tonumber (hdr_lvl) then -- can be converted to number if 2 > tonumber (hdr_lvl) then -- min is 2 hdr_lvl = 2; -- so set to min end else -- can't be converted hdr_lvl = 2; -- so default to min end else hdr_lvl = 2; -- not set so default to min end if 'error' == select or 'maint' == select then -- error and main categorys handling different from poperties cats for _, t in pairs (cfg.error_conditions) do -- get the live module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end end if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, t in pairs (sb_cfg.error_conditions) do -- get the sandbox module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end end end elseif 'prop' == select then -- prop cats for _, cat in pairs (cfg.prop_cats) do -- get the live module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end script_cat_lister (cfg.script_lang_codes, cfg.lang_tag_remap, list_live_cats); -- get live module's foriegn language script cats if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, cat in pairs (sb_cfg.prop_cats) do -- get the sandbox module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end script_cat_lister (sb_cfg.script_lang_codes, sb_cfg.lang_tag_remap, list_sbox_cats); -- get sandbox module's foriegn language script cats end else return '<span style="color:#d33; font-style:normal;">error: unknown selector: ' .. select .. '</span>' end for k, _ in pairs (list_live_cats) do -- separate live/sbox common cats from cats not in sbox if not list_sbox_cats[k] and sandbox then table.insert (live_not_in_sbox_out, cat_link_make (k)); -- in live but not in sbox else table.insert (live_sbox_out, cat_link_make (k)); -- in both live and sbox end end for k, _ in pairs (list_sbox_cats) do -- separate sbox/live common cats from cats not in live if not list_live_cats[k] then table.insert (sbox_not_in_live_out, cat_link_make (k)); -- in sbox but not in live end end local function comp (a, b) -- local function for case-agnostic category name sorting return a:lower() < b:lower(); end local header; -- initialize section header with name of selected category list if 'error' == select then header = 'error'; elseif 'maint' == select then header = 'maintenance'; else header = 'properties'; end header = table.concat ({ -- build the main header 'Live ', -- always include this ((sandbox and 'and sandbox ') or ''), -- if sandbox evaluated, mention that header, -- add the list name ' categories (', -- finish the name and add #live_sbox_out, -- count of categories listed ')' -- close }) local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl}), '\n' .. templatestyles .. '<div class="div-col">' -- opening <div> for columns }); table.sort (live_sbox_out, comp); -- sort case agnostic acsending table.insert (live_sbox_out, 1, header); -- insert the header at the top table.insert (out, table.concat (live_sbox_out, '\n*')); -- make a big string of unordered list markup table.insert (out, '</div>\n'); -- close the </div> and add new line so the next header works if 0 ~= #live_not_in_sbox_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In live but not in sandbox (', #live_not_in_sbox_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (live_not_in_sbox_out, comp); table.insert (live_not_in_sbox_out, 1, header); table.insert (out, table.concat (live_not_in_sbox_out, '\n*')); table.insert (out, '</div>\n'); end if 0 ~= #sbox_not_in_live_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In sandbox but not in live (', #sbox_not_in_live_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (sbox_not_in_live_out, comp); table.insert (sbox_not_in_live_out, 1, header); table.insert (out, table.concat (sbox_not_in_live_out, '\n*')); table.insert (out, '</div>\n'); end return table.concat (out); -- concat into a huge string and done end --[=[--------------------------< H E L P _ T E X T _ C A T S >-------------------------------------------------- To create category links at the bottom of each error help text section and on the individual error category pages; fetches category names from ~/Configuration; replaces this: {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: bioRxiv|Category:CS1 errors: bioRxiv|[[:Category:CS1 errors: bioRxiv]]}} with this: {{#invoke:Cs1 documentation support|help_text_cats|err_bad_biorxiv}} where {{{1}}} is the error_conditions key from Module:Citation/CS1/Configuration add |pages=yes to append the number of pages in the category ]=] local function help_text_cats (frame) local args_t = getArgs (frame); local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local replacements_t = {}; -- table to hold replacement parameters for $1 etc placeholders in category names for k, v in pairs (args_t) do -- look for |$1=<replacement> parameters if 'string' == type (k) and k:match ('^$%d+$') then -- if found replacements_t[k] = v; -- save key and value end end if args_t[1] and error_conditions_t[args_t[1]] then -- must have error_condition key and it must exist local error_cat = error_conditions_t[args_t[1]].category; -- get error category from cs1|2 configuration if error_cat:match ('$%d') then -- look for placeholders in <error_cat> error_cat = error_cat:gsub ('$%d', replacements_t) -- replace place holders with matching value from replacements_t end local title_obj = mw.title.getCurrentTitle(); -- get a title object for the currently displayed page local name_space = title_obj.nsText; if ('Category' == name_space) and (error_cat == title_obj.text) then -- if this is the category page for the error message return table.concat ({'Category:', error_cat}); -- no link; just category name else -- here when currently displayed page is other than the error message category local pages = ''; -- default empty strin for concatenation if 'yes' == args_t.pages then -- if we should display category page count: TODO: do we need to keep this? pages = mw.site.stats.pagesInCategory (error_cat, 'all'); -- get category page count pages = table.concat ({' (', mw.language.getContentLanguage():formatNum (pages), ' page', (1 == pages) and ')' or 's)'}); -- make renderable text end return table.concat ({'[[:Category:', error_cat, ']]', pages}); -- link to category with or without page count end else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end end --[[--------------------------< H E L P _ T E X T _ E R R O R _ M E S S A G E >-------------------------------- to render help text example error messages {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}} assign a single underscore to any of the |$n= parameters to insert an empty string in the error message: {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} -> Check |issn= value {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} -> Check |eissn= value error message is rendered at 120% font size; to specify another font size use |size=; must include unit specifier (%, em, etc) ]] local function help_text_error_messages (frame) local args_t = getArgs (frame); local error_conditions = mw.loadData ('Module:Citation/CS1/Configuration').error_conditions; -- local span_o = '<span class="cs1-visible-error citation-comment">'; local span_o = '<span class="citation-comment" style="color:#d33; font-size:' .. ((args_t.size and args_t.size) or '120%') .. '">'; local span_c = '</span>'; local message; local out = {}; -- output goes here if args_t[1] and error_conditions[args_t[1]] then -- must have error_condition key and it must exist message = error_conditions[args_t[1]].message; local i=1; local count; local rep; repeat rep = '$'..i args_t[rep] = args_t[rep] and args_t[rep]:gsub ('^%s*_%s*$', '') or nil; -- replace empty string marker with actual empty string message, count = message:gsub (rep, args_t[rep] or rep) i = i + 1; until (0 == count); table.insert (out, span_o); table.insert (out, message); table.insert (out, span_c); else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end local out_str = table.concat (out); return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), out_str}); end --[[--------------------------< T E M P L A T E S _ T >-------------------------------------------------------- This table is a k/v table of sequence tables. The keys in this table are collapsed lowercase form of the cs1|2 template names ({{ROOTPAGENAME}}): Template:Cite AV media -> citeavmedia Each subsequence table holds: [1] documentation page where the TemplateData json is stored ({{cite book}} is the oddball) [2] key to 'preprint_arguments_t' and unique_arguments_t' tables in Module:Citation/CS1/Whitelist; these keys dictate which of the basic or limited arguments and numbered arguments tables will be used to validate the content of the TemplateData ]] local templates_t = { citearxiv = {'Template:Cite_arXiv/doc', 'arxiv'}, -- preprint arguments citeavmedia = {'Template:Cite AV media/doc', 'audio-visual'}, -- unique arguments citeavmedianotes = {'Template:Cite AV media notes/doc'}, -- no template data citebiorxiv = {'Template:Cite bioRxiv/doc', 'biorxiv'}, -- preprint arguments citebook = {'Template:Cite book/TemplateData'}, citeciteseerx = {'Template:Cite CiteSeerX/doc', 'citeseerx'}, -- no template data; preprint uses limited arguments citeconference = {'Template:Cite conference/doc', 'conference'}, -- unique arguments citedocument = {'Template:Cite document/doc', 'document'}, -- special case; uses whitelist.document_parameters_t citeencyclopedia = {'Template:Cite encyclopedia/doc'}, citeepisode = {'Template:Cite episode/doc', 'episode'}, -- unique arguments citeinterview = {'Template:Cite interview/doc'}, citejournal = {'Template:Cite journal/doc'}, citemagazine = {'Template:Cite magazine/doc'}, citemailinglist = {'Template:Cite mailing list/doc', 'mailinglist'}, -- unique arguments -- no template data citemap = {'Template:Cite map/TemplateData', 'map'}, -- unique arguments citemedrxiv = {'Template:Cite medRxiv/doc', 'medrxiv'}, -- preprint arguments citenews = {'Template:Cite news/doc'}, citenewsgroup = {'Template:Cite newsgroup/doc', 'newsgroup'}, -- unique arguments citepodcast = {'Template:Cite podcast/doc'}, citepressrelease = {'Template:Cite press release/doc'}, citereport = {'Template:Cite report/doc', 'report'}, -- unique arguments citeserial = {'Template:Cite serial/doc', 'serial'}, -- unique arguments -- no template data citesign = {'Template:Cite sign/doc'}, citespeech = {'Template:Cite speech/doc', 'speech'}, -- unique arguments -- no template data citessrn = {'Template:Cite SSRN/doc', 'ssrn'}, -- preprint arguments -- no template data citetechreport = {'Template:Cite tech report/doc'}, citethesis = {'Template:Cite thesis/doc', 'thesis'}, -- unique arguments citeweb = {'Template:Cite web/doc'}, citation = {'Template:Citation/doc'}, } --[[--------------------------< N O _ P A G E _ T E M P L A T E S _ T >---------------------------------------- ]] local no_page_templates_t = {}; --[[--------------------------< I D E N T I F I E R _ A L I A S E S _ T >-------------------------------------- a table of the identifier aliases ]] local identifier_aliases_t = {} for identifier, handler in pairs (cfg.id_handlers) do -- for each identifier local aliases_t = {}; -- create a table for _, alias in ipairs (handler.parameters) do -- get the alaises aliases_t[alias] = true; -- and add them to the table in a form that mimics the whitelist tables end identifier_aliases_t[identifier:lower()] = aliases_t; -- add new table to the identifier aliases table; use lowercase identifier base name for the key end --[[--------------------------< T E M P L A T E _ D A T A _ J S O N _ G E T >---------------------------------- get template doc page content and extract the content of the TemplateData tags (case insensitive) <template> is the canonical name of the template doc page (with namespace) that holds the template data; usually Template:Cite xxx/doc (except Template:Cite book/TemplateData) ]] local function template_data_json_get (template) local json = mw.title.new (template):getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 json = json:match ('<[Tt]emplate[Dd]ata>(.-)</[Tt]emplate[Dd]ata>'); -- remove everything exept the content of the TemplatData tags return json and mw.text.jsonDecode (json); -- decode the json string and return as a table; nil if not found end --[[--------------------------< V A L I D A T E _ D O C U M E N T _ P A R A M >-------------------------------- looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.document_parameters_t. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData ]] local function validate_document_param (param) if true == whitelist.document_parameters_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.basic_arguments{} and if necessary in whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData ]] local function validate_basic_param (param) if true == whitelist.common_parameters_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ P R E P R I N T _ P A R A M >-------------------------------- looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.preprint_arguments_t{} or whitelist.limited_basic_arguments{} or whitelist.limited_numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.preprint_arguments_t{} ]] local function validate_preprint_param (param, key) if true == whitelist.preprint_arguments_t[key][param] or true == whitelist.limited_parameters_t[param] then -- true == whitelist.limited_basic_arguments_t[param] or -- true == whitelist.limited_numbered_arguments_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.unique_arguments_t{} or whitelist.basic_arguments{} or whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.unique_arguments_t{} ]] local function validate_unique_param (param, key, cfg_aliases_t) if true == whitelist.unique_arguments_t[key][param] or true == validate_basic_param (param) then return true; end end --[[--------------------------< V A L I D A T E _ I D _ P A R A M >-------------------------------------------- looks for <param> <alias> in identifier_aliases_t{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <alias> is the alias that we're looking for ]] local function validate_id_alias (param, alias) return identifier_aliases_t[param] and identifier_aliases_t[param][alias]; end --[[--------------------------< P A R A M _ E R R O R_ M S G >------------------------------------------------- ]] local function param_error_msg (param) return '<span style="font-family:"monospace">|' .. param .. '=</span> is not a valid parameter'; end --[[--------------------------< D U P _ A L I A S _ E R R O R_ M S G >----------------------------------------- ]] local function dup_alias_error_msg (param, alias) return '<span style="font-family:"monospace">|' .. param .. '=</span> has duplicate aliases: <span font-family:"monospace";>|' .. alias .. '=</span>'; end --[[--------------------------< D U P _ A L I A S E S _ C H E C K >-------------------------------------------- create an associative array of <param> aliases. if <alias> already present in <aliases_t> add an error message to <out> ]] local function dup_aliases_check (param, alias, aliases_t, out_t) if not aliases_t[alias] then aliases_t[alias] = true; else table.insert (out_t, dup_alias_error_msg (param, alias)); end end --[[--------------------------< A L I A S _ E R R O R_ M S G >------------------------------------------------- ]] local function alias_error_msg (param, alias) return '<code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. alias .. '=</code> is not a valid alias of: <code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. param .. '=</code>'; end --[[--------------------------< C F G _ A L I A S E S _ T _ M A K E >------------------------------------------ convert this from cfg.aliases{}: ['AccessDate'] = {'access-date', 'accessdate'} to this in out_t{} ['access-date'] = 'AccessDate', ['accessdate'] = 'AccessDate', to test if |access-date= is an aliases of |accessdate=: if out_t['access-date'] == out_t['accessdate'] ]] local function cfg_aliasts_t_make () local out_t = {}; for meta, params_t in pairs (cfg.aliases) do if 'table' == type (params_t) then -- metaparameters that are assigned string values do not have aliases for _, param in ipairs (params_t) do -- for each alias param = param:gsub ('#', ''); -- get rid of enumerators out_t[param] = meta; -- add it to the output table end end end --error (mw.dumpObject (out_t)) return out_t; end --[[--------------------------< T E M P L A T E _ D A T A _ V A L I D A T E >---------------------------------- compairs parameter names listed in a cs1|2 template's TemplateData structure (everything between <TemplateData> and </TemplateData> tag case insensitive). Returns error messages when errors found, empty string else. {{#invoke:Cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}} When called from a different page: {{#invoke:cs1 documentation support|template_data_validate|<canonical template name>}} where the <canonical template name> is the template's canonical name with or without namespace and or subpages ]] local function template_data_validate (frame) local args_t = getArgs (frame); if not args_t[1] then return '<span style="color:#d33">Error: cs1|2 template name required</span>'; end local template_idx = args_t[1]:lower():match ('cit[ae][^/]+'); -- args_t[1] has something if not template_idx then -- but if not a cs1|2 template abandon with error message return '<span style="color:#d33">Error: cs1|2 template name required</span>'; else template_idx = template_idx:gsub (' ', ''); -- is what appears to be a cs1|2 template so strip spaces end local cfg_aliases_t = cfg_aliasts_t_make (); local template_t = templates_t[template_idx]; local out = {}; local template_doc = template_t[1]; local json_t = template_data_json_get (template_doc); if not json_t then table.insert (out, 'Error: can\'t find TemplateData'); else for param, param_t in pairs (json_t['params']) do local param_i; -- this will be the parameter name that gets validated if param:find ('[Ss]2[Cc][Ii][Dd]') then -- |s2cid*= parameters are not enumerated ... param_i = param; -- ... so don't convert the '2' to '#' else param_i = param:gsub ('%d+', '#'); -- for enumerated parameters, convert the enumerator digits to a single '#' character; all others unmolested end local param_is_valid; -- boolean true when param is valid; nil else if template_t[2] then -- if template is a preprint or uses unique parameters of 'document' parameters if 'document' == template_t[2] then -- if a {{cite document}} template param_is_valid = validate_document_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerator digits to a single '#' character if not validate_document_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); -- may be known but is not supported elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid preprint param table.insert (out, param_error_msg (param)) end elseif whitelist.preprint_arguments_t[template_t[2]] then -- if a preprint template param_is_valid = validate_preprint_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerator digits to a single '#' character if not validate_preprint_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); -- may be known but is not supported elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid preprint param table.insert (out, param_error_msg (param)) end elseif whitelist.unique_arguments_t[template_t[2]] then -- if a unique parameters template param_is_valid = validate_unique_param (param_i, template_t[2]); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out); local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_unique_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid unique parameter table.insert (out, param_error_msg (param)) end else -- should never be here if coder is doing the right thing ... table.insert (out, 'internal error: unexpected keyword in templates_t: ' .. template_t[2]); break; end else -- here when not unique or preprint param_is_valid = validate_basic_param (param_i); if param_is_valid then local aliases_t = {}; -- used by dup_aliases_check if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do dup_aliases_check (param, alias, aliases_t, out) local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_basic_param (alias_i) and not validate_id_alias (param, alias) then -- for isbn13 (while still supported) must not mask the digits table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid table.insert (out, param_error_msg (param)) end end end end ---------- this emits errors when page/pages/at listed in templatedata of templates that don't support those parameters ---------- -- if json_t then -- if ({['citeavmedia']=true, ['citeepisode']=true, ['citemailinglist']=true, ['citenewsgroup']=true, ['citepodcast']=true, ['citeserial']=true, ['citesign']=true, ['citespeech']=true})[template_idx] then -- local insource_params_t = {}; -- build sequence of pagination params not supported by these templates -- for _, meta_param in ipairs ({'At', 'Page', 'Pages', 'QuotePage', 'QuotePages'}) do -- if 'table' == type (cfg.aliases[meta_param]) then -- for _, alias in ipairs (cfg.aliases[meta_param]) do -- metaparameter is a sequence -- table.insert (insource_params_t, alias); -- add the aliases from the metaparameter sequence to the table -- end -- else -- metaparameter is plain text -- table.insert (insource_params_t, cfg.aliases[meta_param]); -- add the alias to the table -- end -- end -- -- for _, param in ipairs (insource_params_t) do -- if json_t.params[param] then -- table.insert (out, param_error_msg (param)); -- error; this parameter not supported by this template -- end -- end -- end -- end ---------- end page/pages/at error detection ---------- if 0 ~= #out then table.sort (out); out[1] = '*' .. out[1]; -- add a splat to the first error message -- return table.concat ({'[[' .. template_doc .. ']] TemplateData has errors:<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>'}); return table.concat ({ '[[Template:' .. args_t[1] .. ']] uses ', whitelist.preprint_arguments_t[template_t[2]] and 'preprint and limited parameter sets' or (whitelist.unique_arguments_t[template_t[2]] and 'unique and standard parameter sets' or 'standard parameter set'), '; TemplateData has errors:\n', '<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>' }); else return; -- no errors detected; return nothing end end --[[--------------------------< E R R O R _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|error_cat_page_tally}} ]] local function error_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted for k, v_t in pairs (error_conditions_t) do if k:match ('^err') then if not cat_t[v_t.category] then cat_t[v_t.category] = true; tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< M A I N T _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|maint_cat_page_tally}} Dynamic subcats of CS1 maint: DOI inactive not counted because these names come and go as time goes by. ]] local function maint_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local i = 0; -- number of categories for k, v_t in pairs (error_conditions_t) do if not k:match ('^err') then -- if not an error key its a maint key if not cat_t[v_t.category] then cat_t[v_t.category] = true; if 'maint_mult_names' == k or 'maint_numeric_names' == k then local special_case_translation_t = cfg.special_case_translation; for _, name in ipairs ({'AuthorList', 'ContributorList', 'EditorList', 'InterviewerList', 'TranslatorList'}) do local cat_name = v_t.category:gsub ('$1', special_case_translation_t[name]); -- replace $1 with translated list name tally = tally + mw.site.stats.pagesInCategory (cat_name, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end else tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< M O S T _ C O M M O N _ E R R _ C A T S >------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category get the number of pages in the category and make a list in descending order of categories by the number of pages in the category. Render the list when done. List is truncated to 10 categories. {{#invoke:cs1 documentation support|most_common_error_cats}} ]] local function most_common_error_cats () local lang_obj = mw.language.getContentLanguage(); local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local most_common_t = {}; -- sorted list of categorys by count local fmt_str = '* [[:Category:%s|%s]]: %s'; -- output string format for unordered list for k, v_t in pairs (error_conditions_t) do if k:match ('^err') then if not cat_t[v_t.category] then cat_t[v_t.category] = true; local number_of_pages = mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files table.insert (most_common_t, {number_of_pages, v_t.category}); end end end local function special_sort (a, b) if a[1] == b[1] then -- if page counts are the same return a[2] < b[2]; -- ascending sort by category name else return a[1] > b[1] -- descending sort by page count end end table.sort (most_common_t, special_sort); -- descending sort most_common_t[11] = nil; -- we only care about the 10 most common local out_t = {}; for i, v_t in ipairs (most_common_t) do table.insert (out_t, string.format (fmt_str, v_t[2], v_t[2], lang_obj:formatNum (v_t[1]))); end return table.concat (out_t, '\n'); end --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E _ L I S T E R >------------------ For use in the Help:CS1 error §Notes Get namespace names and identifiers from MediaWiki. Make a human readable list of namespace names and identifiers that cs1|2 does not categorize. {{#invoke:cs1 documentation support|uncategorized_namespace_lister}} For convenience, {{#invoke:cs1 documentation support|uncategorized_namespace_lister|all=<anything>}} returns a list of all namespace names and identifiers used on the current wiki. Any namespace with an identifier less than 1, currently Mainspace (0), Special (-1), and Media (-2), is excluded from the list. ]] local function uncategorized_namespace_lister (frame) local list_t = {}; local function compare (a, b) -- local function to sort namespaces numerically by the identifiers local a_num = tonumber (a:match ('%d+')); -- get identifiers and convert to numbers local b_num = tonumber (b:match ('%d+')); return a_num < b_num; -- do the comparison end for i, _ in pairs (mw.site.namespaces) do -- for each namespace in the table if '' == frame.args.all or not frame.args.all then -- when |all= not set, make a list of uncategorized namespaces if cfg.uncategorized_namespaces[i] then -- if the identifier is listed in our uncategorized namespace list table.insert (list_t, table.concat ({mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier to our local list end elseif 0 < i then -- |all=<anything>: all namespace names and identifiers; ignore identifiers less than 1 table.insert (list_t, table.concat ({'*', mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier as an unordered list item end end table.sort (list_t, compare); -- ascending numerical sort by identifier if not frame.args.all then -- when |all= not set, format list of uncategorized namespaces and identifiers list_t[#list_t] = 'and ' .. list_t[#list_t]; -- add 'and ' to the last name/identifier pair return table.concat (list_t, ', '); -- make a big string and done else -- make list of all namespaces and identifiers return table.concat (list_t, '\n'); -- make a big string and done end end --[[--------------------------< S I N G L E _ L T R _ 2 N D _ L V L _ D O M A I N _ L I S T E R >------------- for Help:CS1_errors#bad_url, list the supported top level domains that support single-letter 2nd level names {{#invoke:Module:cs1 documentation support|single_ltr_2nd_lvl_domain_lister}} ]] local function single_ltr_2nd_lvl_domain_lister () local out_t = {}; -- output goes here for _, tld in ipairs (cfg.single_letter_2nd_lvl_domains_t) do -- fetch each tld table.insert (out_t, '.' .. tld); -- prefix with a dot and save in out_t{} end return table.concat (out_t, ', '); -- make a big string and done end --[[--------------------------< C O D E _ N A M E _ P A I R _ E X I S T S >---------------------------------------- Returns language code if pair exists, nil if either code doesn't exist or the name doesn't match. Intended for use by Template:CS1 language sources/core args[1] is language code args[2] is language name ]] local function code_name_pair_exists(frame) local wiki_language = mw.getContentLanguage():getCode() local source_list = mw.language.fetchLanguageNames(wiki_language, 'all'); local code_list = {}; local name_list = {}; local override = cfg.lang_tag_remap; for code, name in pairs(source_list) do add_to_list(code_list, name_list, override, code, name); end local args = getArgs(frame); local language_code = args[1] local language_name = args[2] -- Check if the language code exists and the corresponding name matches if code_list[language_code] == language_name then -- Both code and name are a valid pair return language_code else if override[language_code] == language_name then -- Code and name are a valid pair found in override table return language_code else -- Either code doesn't exist or the name doesn't match return nil end end end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { alias_lister = alias_lister, alias_names_get = alias_names_get, canonical_param_lister = canonical_param_lister, canonical_name_get = canonical_name_get, cat_lister = cat_lister, code_name_pair_exists = code_name_pair_exists, error_cat_page_tally = error_cat_page_tally, header_make = header_make, help_text_cats = help_text_cats, help_text_error_messages = help_text_error_messages, id_limits_get = id_limits_get, is_book_cite_template = is_book_cite_template, is_limited_param_template = is_limited_param_template, lang_lister = lang_lister, maint_cat_page_tally = maint_cat_page_tally, most_common_error_cats = most_common_error_cats, script_lang_lister = script_lang_lister, single_ltr_2nd_lvl_domain_lister = single_ltr_2nd_lvl_domain_lister, template_data_validate = template_data_validate, uncategorized_namespace_lister = uncategorized_namespace_lister, }; akfqjbs81nvp9w6qfmoi9fysdlixv5r Template:Help desk 10 29488 117208 77864 2025-09-22T16:57:34Z en>Waddie96 0 adjust look 117208 wikitext text/x-wiki <div style="margin: 0.1em; margin-right: 0; float: right; box-sizing: border-box; border: 1px solid #aaa; padding: 3px 4px; background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border-radius: 2px; white-space: nowrap;"><span>[[File:Symbol question.svg|20px|alt=|link=Wikipedia:Help desk]]</span> [[Wikipedia:Help desk|Help desk]]</div><noinclude>{{documentation}}</noinclude> 9y3mri9028gyunaygrq3tsf7jhyw5ml 117209 117208 2026-07-16T11:41:54Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Help_desk]] 117208 wikitext text/x-wiki <div style="margin: 0.1em; margin-right: 0; float: right; box-sizing: border-box; border: 1px solid #aaa; padding: 3px 4px; background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border-radius: 2px; white-space: nowrap;"><span>[[File:Symbol question.svg|20px|alt=|link=Wikipedia:Help desk]]</span> [[Wikipedia:Help desk|Help desk]]</div><noinclude>{{documentation}}</noinclude> 9y3mri9028gyunaygrq3tsf7jhyw5ml Template:Template rating 10 30373 117276 111059 2026-06-25T04:39:27Z en>Jonesey95 0 Fix name of error category that is not an unknown parameter category 117276 wikitext text/x-wiki <includeonly>{{#if:{{{1|}}}<!-- Escape empty required first unnamed parameter -->|{{#switch:{{Namespace detect|template=t|module=m|demospace={{{demospace|}}}|page={{{demopage|}}}}} |m |t = <!-- ***** IF IN MODULE OR TEMPLATE NAMESPACE ***** -->{{ombox | type = notice | image = {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=]] | alpha | a = [[File:Greek lc alpha icon.svg|class=skin-invert|26x26px|link=|alt=]] | beta | b = [[File:Greek lc beta icon.svg|class=skin-invert|40x40px|link=|alt=]] | release | r | general | g | stable | protected | protect | p | semiprotected | semiprotect | semi = [[File:Green check.svg|40x40px|link=|alt=]] | broken | br | unstable = [[File:Red x.svg|40x40px|link=|alt=]] | deprecated | d | defunct = [[File:Historical.svg|40x40px|link=|alt=]] }} | style = | textstyle = | text = {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in pre-alpha development|pre-alpha]]. It is incomplete and may or may not be in active development. Do not use it in [[Wikipedia:Article namespace|article namespace]] pages. A {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}} remains in pre-alpha until its developer, or another editor who adopts it if it is abandoned for some time, considers the basic structure complete. | alpha | a = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in alpha|alpha]]. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. | beta | b = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in beta|beta]]. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. | release | r | general | g | stable | protected | protect | p | semiprotected | semiprotect | semi = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s for general use|ready for general use]]. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on [[Wikipedia:Help pages|help pages]] and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing. | broken | br | unstable = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:Unstable {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|unstable]]. It has missing dependencies, compatibility issues, or output errors that make it unusable. Editors are encouraged to [[Special:EditPage/{{FULLPAGENAME}}|improve its compatibility]] or [[Wikipedia:Templates for discussion|nominate it for deletion]] if it cannot be fixed. | deprecated | d | defunct = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as '''[[:Category:Deprecated {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|deprecated]]''' and defunct.{{#if:{{{replaced|}}}|{{space}}It is recommended editors use [[{{{replaced}}}]].}}{{#if:{{{message|}}}|{{space}}{{{message}}}}} | #default = {{error|Page using [[Template:Template rating]] with <u>invalid</u> template or module rating in {{para|1}} parameter.}}[[Category:Pages using template rating template with invalid rating|{{FULLPAGENAME}}]] }} }}<!-- Categorize. -->{{#if:{{{demopage|}}}{{{demospace|}}}|| {{#switch: {{lc:{{SUBPAGENAME}}}} | doc | sandbox =<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in pre-alpha development|{{PAGENAME}}]] | alpha | a = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in alpha|{{PAGENAME}}]] | beta | b = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in beta|{{PAGENAME}}]] | release | r | general | g | stable | protected | p | semiprotected | semiprotect | semi = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s for general use|{{PAGENAME}}]] | deprecated | d | defunct = [[Category:Deprecated {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|{{PAGENAME}}]] | broken | br | unstable = [[Category:Unstable {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|{{PAGENAME}}]] }} }} }} }} | #default = <!-- ***** Error not in Template or Module namespaces ***** -->{{if preview|1={{error|Error: {{tl|Template rating}} can only be used on pages in the [[Wikipedia:Template namespace|Template:]] or [[Wikipedia:Module namespace|Module: namespaces]].}}}}[[Category:Pages with templates in the wrong namespace]] }}<!-- End switch. -->|{{If preview|1={{error|Page using [[Template:Template rating]] with <u>empty</u> {{para|1}} module rating parameter.}}}}[[Category:Pages using template rating template with invalid rating|{{FULLPAGENAME}}]]<!-- -->}}<!-- End if. Display protection template if necessary, this will obviously show it for /doc page too since it uses {{FULLPAGENAME}}: -->{{#switch:{{Namespace detect|template=t|module=m|demospace={{{demospace|}}}}} |t|m = {{#if:{{{suppress-pp|}}} | |{{#switch:{{#invoke:Effective protection level|edit|1={{{demopage|{{FULLPAGENAME}}}}}}} |*|user = <!-- If not protected page, do nothing. --> |#default = {{#ifeq:{{lc:{{SUBPAGENAME}}}}|doc |<!-- {{#if:{{{2|}}}{{{doc-reason|}}}{{{3|}}}{{{doc-action|}}} --><!-- --><!-- | -->{{pp|{{{2|{{{doc-reason|}}}}}}|action={{{3|{{{doc-action|}}}}}}}}<!-- --><!-- }} --> -->|{{pp|1={{{reason|{{{doc-reason|}}}}}}|action={{{action|{{{doc-action|}}}}}}|demolevel={{{demolevel|}}}}}<!-- -->}}<!-- -->}}<!-- -->}} |#default = <!-- If not in template or module namespace, do nothing -->}}<!-- End template, start tracking. -->{{#invoke:Check for unknown parameters| check | unknown = {{#if:{{{demopage|}}}{{{demospace|}}}||{{#switch:{{Namespace detect|template=t|module=m}}|m|t=[[Category:Pages using template rating template with unknown parameters|_VALUE_{{FULLPAGENAME}}]]}}}} | preview = Page using [[Template:Template rating]] with unknown parameter "_VALUE_" | ignoreblank=y | demospace | demopage | 1 | 2 | 3 | reason | action | doc-reason | doc-action | nocat | replaced | message | demolevel | suppress-pp | demopage }}</includeonly><!-- End tracking. --><noinclude> {{template rating/sandbox|release|nocat=true|demospace=template|demopage=template:template rating|demolevel=edit}} {{mbox|text=The above template is a demo.}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 1uyrkb0aphrohrsebghuak589eymdnp 117277 117276 2026-07-16T11:45:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Template_rating]] 117276 wikitext text/x-wiki <includeonly>{{#if:{{{1|}}}<!-- Escape empty required first unnamed parameter -->|{{#switch:{{Namespace detect|template=t|module=m|demospace={{{demospace|}}}|page={{{demopage|}}}}} |m |t = <!-- ***** IF IN MODULE OR TEMPLATE NAMESPACE ***** -->{{ombox | type = notice | image = {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=]] | alpha | a = [[File:Greek lc alpha icon.svg|class=skin-invert|26x26px|link=|alt=]] | beta | b = [[File:Greek lc beta icon.svg|class=skin-invert|40x40px|link=|alt=]] | release | r | general | g | stable | protected | protect | p | semiprotected | semiprotect | semi = [[File:Green check.svg|40x40px|link=|alt=]] | broken | br | unstable = [[File:Red x.svg|40x40px|link=|alt=]] | deprecated | d | defunct = [[File:Historical.svg|40x40px|link=|alt=]] }} | style = | textstyle = | text = {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in pre-alpha development|pre-alpha]]. It is incomplete and may or may not be in active development. Do not use it in [[Wikipedia:Article namespace|article namespace]] pages. A {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}} remains in pre-alpha until its developer, or another editor who adopts it if it is abandoned for some time, considers the basic structure complete. | alpha | a = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in alpha|alpha]]. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. | beta | b = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in beta|beta]]. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. | release | r | general | g | stable | protected | protect | p | semiprotected | semiprotect | semi = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s for general use|ready for general use]]. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on [[Wikipedia:Help pages|help pages]] and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing. | broken | br | unstable = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as [[:Category:Unstable {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|unstable]]. It has missing dependencies, compatibility issues, or output errors that make it unusable. Editors are encouraged to [[Special:EditPage/{{FULLPAGENAME}}|improve its compatibility]] or [[Wikipedia:Templates for discussion|nominate it for deletion]] if it cannot be fixed. | deprecated | d | defunct = This [[Wikipedia:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}|{{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}]] is rated as '''[[:Category:Deprecated {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|deprecated]]''' and defunct.{{#if:{{{replaced|}}}|{{space}}It is recommended editors use [[{{{replaced}}}]].}}{{#if:{{{message|}}}|{{space}}{{{message}}}}} | #default = {{error|Page using [[Template:Template rating]] with <u>invalid</u> template or module rating in {{para|1}} parameter.}}[[Category:Pages using template rating template with invalid rating|{{FULLPAGENAME}}]] }} }}<!-- Categorize. -->{{#if:{{{demopage|}}}{{{demospace|}}}|| {{#switch: {{lc:{{SUBPAGENAME}}}} | doc | sandbox =<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | {{#switch: {{lc:{{{1|}}}}} | pre-alpha | prealpha | pa | experimental = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in pre-alpha development|{{PAGENAME}}]] | alpha | a = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in alpha|{{PAGENAME}}]] | beta | b = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s in beta|{{PAGENAME}}]] | release | r | general | g | stable | protected | p | semiprotected | semiprotect | semi = [[Category:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}s for general use|{{PAGENAME}}]] | deprecated | d | defunct = [[Category:Deprecated {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|{{PAGENAME}}]] | broken | br | unstable = [[Category:Unstable {{lc:{{NAMESPACE:{{{demopage|{{FULLPAGENAME}}}}}}}}}s|{{PAGENAME}}]] }} }} }} }} | #default = <!-- ***** Error not in Template or Module namespaces ***** -->{{if preview|1={{error|Error: {{tl|Template rating}} can only be used on pages in the [[Wikipedia:Template namespace|Template:]] or [[Wikipedia:Module namespace|Module: namespaces]].}}}}[[Category:Pages with templates in the wrong namespace]] }}<!-- End switch. -->|{{If preview|1={{error|Page using [[Template:Template rating]] with <u>empty</u> {{para|1}} module rating parameter.}}}}[[Category:Pages using template rating template with invalid rating|{{FULLPAGENAME}}]]<!-- -->}}<!-- End if. Display protection template if necessary, this will obviously show it for /doc page too since it uses {{FULLPAGENAME}}: -->{{#switch:{{Namespace detect|template=t|module=m|demospace={{{demospace|}}}}} |t|m = {{#if:{{{suppress-pp|}}} | |{{#switch:{{#invoke:Effective protection level|edit|1={{{demopage|{{FULLPAGENAME}}}}}}} |*|user = <!-- If not protected page, do nothing. --> |#default = {{#ifeq:{{lc:{{SUBPAGENAME}}}}|doc |<!-- {{#if:{{{2|}}}{{{doc-reason|}}}{{{3|}}}{{{doc-action|}}} --><!-- --><!-- | -->{{pp|{{{2|{{{doc-reason|}}}}}}|action={{{3|{{{doc-action|}}}}}}}}<!-- --><!-- }} --> -->|{{pp|1={{{reason|{{{doc-reason|}}}}}}|action={{{action|{{{doc-action|}}}}}}|demolevel={{{demolevel|}}}}}<!-- -->}}<!-- -->}}<!-- -->}} |#default = <!-- If not in template or module namespace, do nothing -->}}<!-- End template, start tracking. -->{{#invoke:Check for unknown parameters| check | unknown = {{#if:{{{demopage|}}}{{{demospace|}}}||{{#switch:{{Namespace detect|template=t|module=m}}|m|t=[[Category:Pages using template rating template with unknown parameters|_VALUE_{{FULLPAGENAME}}]]}}}} | preview = Page using [[Template:Template rating]] with unknown parameter "_VALUE_" | ignoreblank=y | demospace | demopage | 1 | 2 | 3 | reason | action | doc-reason | doc-action | nocat | replaced | message | demolevel | suppress-pp | demopage }}</includeonly><!-- End tracking. --><noinclude> {{template rating/sandbox|release|nocat=true|demospace=template|demopage=template:template rating|demolevel=edit}} {{mbox|text=The above template is a demo.}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 1uyrkb0aphrohrsebghuak589eymdnp Template:Category see also/Category pair check 10 30599 117236 80361 2023-12-28T12:53:00Z en>Tom.Reding 0 {{High-use}} 117236 wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}</noinclude><includeonly>{{#ifeq: {{NAMESPACE}} | Category |<!-- -->{{#if: {{#invoke:String|match|{{BASEPAGENAME}}|%d+[snrt][tdh]%-century.+$|ignore_errors=true}}<!-- -->|<!-- it's on a century category -->{{#if: {{#invoke:String|match|{{{1|}}}|{{#invoke:String|match|{{BASEPAGENAME}}|-century.+$|ignore_errors=true}}|ignore_errors=true|plain=true}}<!-- -->|<!-- the link is to a similar century category -->[[Category:Template Category see also used when Template Category pair probably should be]]<!-- -->}}<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation|content= {{High-use}} Check whether [[Template:Category see also]] has been used when [[Template:Category pair]] probably should be use. The test is: #Is this page in the Category namespace? #Does this page's title end in "nn(st{{!}}nd{{!}}rd{{!}}th)-century something" #does the first linked cat's title end in the same "-century something" as the title of the page it is used on? If the answer to all 3 is yes, then categorise the page in the hidden tracking category [[:Category:Template Category see also used when Template Category pair probably should be]] }}</noinclude> sy2a5do8m2dxdahfpu0o5zkc6g98erj 117237 117236 2026-07-16T11:42:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Category_see_also/Category_pair_check]] 117236 wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}</noinclude><includeonly>{{#ifeq: {{NAMESPACE}} | Category |<!-- -->{{#if: {{#invoke:String|match|{{BASEPAGENAME}}|%d+[snrt][tdh]%-century.+$|ignore_errors=true}}<!-- -->|<!-- it's on a century category -->{{#if: {{#invoke:String|match|{{{1|}}}|{{#invoke:String|match|{{BASEPAGENAME}}|-century.+$|ignore_errors=true}}|ignore_errors=true|plain=true}}<!-- -->|<!-- the link is to a similar century category -->[[Category:Template Category see also used when Template Category pair probably should be]]<!-- -->}}<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation|content= {{High-use}} Check whether [[Template:Category see also]] has been used when [[Template:Category pair]] probably should be use. The test is: #Is this page in the Category namespace? #Does this page's title end in "nn(st{{!}}nd{{!}}rd{{!}}th)-century something" #does the first linked cat's title end in the same "-century something" as the title of the page it is used on? If the answer to all 3 is yes, then categorise the page in the hidden tracking category [[:Category:Template Category see also used when Template Category pair probably should be]] }}</noinclude> sy2a5do8m2dxdahfpu0o5zkc6g98erj Module:Category see also 828 30600 117238 80363 2025-04-24T14:18:15Z en>Pppery 0 Allow lowercase label per request 117238 Scribunto text/plain -- This module implements {{Category see also}} local mHatnote = require('Module:Hatnote') local p = {} local function makeWikitextError(msg) return string.format( '<strong class="error">Error: %s ([[Template:Category see also]])</strong>', msg ) end -- Gets the length of the sequence seq. Usually this should be done with the # -- operator, but we need to work with tables that get their values through an -- __index metamethod. local function getSequenceLength(seq) local length = 0 for i in ipairs(seq) do length = i end return length end -- Given a table of options, returns a function that formats categories for -- those options. -- -- Options: -- project - a project code such as "fr" (for the French Wikipedia) -- showPrefix - a boolean value for whether to show the "Category:" prefix -- (and the project prefix if specified) -- -- This is implemented as a function generator rather than a simple function -- so that we can just process the options once, instead of every time we -- generate a category. local function newCategoryLinker(options) local formatString if options.project then if options.showPrefix then formatString = '[[:' .. options.project .. ':Category:%s]]' else formatString = '[[:' .. options.project .. ':Category:%s|%s]]' end else if options.showPrefix then formatString = '[[:Category:%s]]' else formatString = '[[:Category:%s|%s]]' end end return function (category) local title = mw.title.new(category) local pageName, display if not title then -- category is not a valid title, usually because of invalid -- characters like < or [. Raise an error and suppress the stack -- level information so that we can catch it and format the error -- message as wikitext. error(string.format( "'%s' is not a valid category name", category ), 0) elseif title.namespace == 14 then -- Category namespace pageName = title.text display = title.text else pageName = title.prefixedText display = category end -- We can get away with using two arguments even when -- options.showDisplay is false, as string.format ignores extra -- arguments as long as there is an argument for each flag in the -- format string. return formatString:format(pageName, display) end end function p._main(args) local nLinks = getSequenceLength(args) if nLinks < 1 then return makeWikitextError('at least one parameter required') end local makeCategoryLink = newCategoryLinker{ project = args.project, showPrefix = nLinks == 1, } local links = {} for i, cat in ipairs(args) do local success, categoryLink = pcall(makeCategoryLink, cat) if success then links[i] = categoryLink else -- If there was an error, then categoryLink is the error message. return makeWikitextError(categoryLink) end end local formatString if nLinks == 1 then formatString = '%s: %s' else formatString = '%s the categories %s' end -- Don't output a comma before the "and" if we have only two links. local conjunction if nLinks == 2 then conjunction = ' and ' else conjunction = ', and ' end local hatnoteText = formatString:format( args.LABEL or args.label or 'See also', mw.text.listToText(links, ', ', conjunction) ) return mHatnote._hatnote(hatnoteText, {selfref = true}) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Category see also', }) return p._main(args) end return p kkbwy4jmfwvbvmnt1uro29sn23t0jca 117239 117238 2026-07-16T11:42:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Category_see_also]] 117238 Scribunto text/plain -- This module implements {{Category see also}} local mHatnote = require('Module:Hatnote') local p = {} local function makeWikitextError(msg) return string.format( '<strong class="error">Error: %s ([[Template:Category see also]])</strong>', msg ) end -- Gets the length of the sequence seq. Usually this should be done with the # -- operator, but we need to work with tables that get their values through an -- __index metamethod. local function getSequenceLength(seq) local length = 0 for i in ipairs(seq) do length = i end return length end -- Given a table of options, returns a function that formats categories for -- those options. -- -- Options: -- project - a project code such as "fr" (for the French Wikipedia) -- showPrefix - a boolean value for whether to show the "Category:" prefix -- (and the project prefix if specified) -- -- This is implemented as a function generator rather than a simple function -- so that we can just process the options once, instead of every time we -- generate a category. local function newCategoryLinker(options) local formatString if options.project then if options.showPrefix then formatString = '[[:' .. options.project .. ':Category:%s]]' else formatString = '[[:' .. options.project .. ':Category:%s|%s]]' end else if options.showPrefix then formatString = '[[:Category:%s]]' else formatString = '[[:Category:%s|%s]]' end end return function (category) local title = mw.title.new(category) local pageName, display if not title then -- category is not a valid title, usually because of invalid -- characters like < or [. Raise an error and suppress the stack -- level information so that we can catch it and format the error -- message as wikitext. error(string.format( "'%s' is not a valid category name", category ), 0) elseif title.namespace == 14 then -- Category namespace pageName = title.text display = title.text else pageName = title.prefixedText display = category end -- We can get away with using two arguments even when -- options.showDisplay is false, as string.format ignores extra -- arguments as long as there is an argument for each flag in the -- format string. return formatString:format(pageName, display) end end function p._main(args) local nLinks = getSequenceLength(args) if nLinks < 1 then return makeWikitextError('at least one parameter required') end local makeCategoryLink = newCategoryLinker{ project = args.project, showPrefix = nLinks == 1, } local links = {} for i, cat in ipairs(args) do local success, categoryLink = pcall(makeCategoryLink, cat) if success then links[i] = categoryLink else -- If there was an error, then categoryLink is the error message. return makeWikitextError(categoryLink) end end local formatString if nLinks == 1 then formatString = '%s: %s' else formatString = '%s the categories %s' end -- Don't output a comma before the "and" if we have only two links. local conjunction if nLinks == 2 then conjunction = ' and ' else conjunction = ', and ' end local hatnoteText = formatString:format( args.LABEL or args.label or 'See also', mw.text.listToText(links, ', ', conjunction) ) return mHatnote._hatnote(hatnoteText, {selfref = true}) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Category see also', }) return p._main(args) end return p kkbwy4jmfwvbvmnt1uro29sn23t0jca Template:Cat main 10 30635 117054 80433 2023-12-30T07:49:37Z en>Extraordinary Writ 0 Extraordinary Writ moved page [[Template:Cat main]] to [[Template:Category main article]]: [[Special:Permalink/1192599282|Requested]] by MaterialWorks at [[WP:RM/TR]]: Per [[Template_talk:Cat_main#Requested_move_22_December_2023]]. 117054 wikitext text/x-wiki #REDIRECT [[Template:Category main article]] {{Redirect category shell| {{R from move}} }} tg662avf9vuhh5ym7velxdmjruydey9 117055 117054 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Cat_main]] 117054 wikitext text/x-wiki #REDIRECT [[Template:Category main article]] {{Redirect category shell| {{R from move}} }} tg662avf9vuhh5ym7velxdmjruydey9 Template:Demo inline 10 30691 116848 80561 2025-12-26T18:00:26Z en>MusikBot II 0 Protected "[[Template:Demo inline]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 250 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) 80560 wikitext text/x-wiki <includeonly>{{#invoke:Demo|inline}}</includeonly><noinclude>{{documentation}}</noinclude> hqe22q1vieijy9gk67hvln12qqp82za 116849 116848 2026-07-16T10:36:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Demo_inline]] 80560 wikitext text/x-wiki <includeonly>{{#invoke:Demo|inline}}</includeonly><noinclude>{{documentation}}</noinclude> hqe22q1vieijy9gk67hvln12qqp82za Module:Documentation 828 31060 116712 114420 2026-06-18T22:38:35Z en>Stjn 0 as a hotfix for [[phab:T268900]] issue, feel free to replace with some solution restoring separate [] at a later point if needed 116712 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return viewLink .. editLink .. historyLink .. purgeLink else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return createLink .. purgeLink end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p bo74oekmmsj1xtpw7dlzkvkhc0k05g6 116713 116712 2026-07-15T17:38:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Documentation]] 116712 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return viewLink .. editLink .. historyLink .. purgeLink else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return createLink .. purgeLink end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p bo74oekmmsj1xtpw7dlzkvkhc0k05g6 Template:North America topic 10 31633 116763 82511 2025-05-16T05:31:23Z en>The Bushranger 0 Undid revision [[Special:Diff/1290656786|1290656786]] by [[Special:Contributions/The Bushranger|The Bushranger]] ([[User talk:The Bushranger|talk]]) ...whoops. Wrong tab! 116763 wikitext text/x-wiki {{#invoke:navbox|navbox |name = {{{name|North America topic}}} | state = {{{state<includeonly>|collapsed</includeonly>}}} |border = {{{border|}}} |navbar = {{{navbar|}}} |titlestyle = {{{titlestyle|}}} |title = {{#if:{{{title|}}} | {{{title}}} | {{#ifexist:{{{1|{{{prefix|}}}}}}_North_America{{{2| {{{suffix|}}}}}} | [[{{{1|{{{prefix|}}}}}} North America{{{2| {{{suffix|}}}}}}]] | {{{1|{{{prefix|}}}}}} North America{{{2| {{{suffix|}}}}}} }} }} |image = {{{image|}}} |groupstyle = {{{groupstyle|}}} |liststyle = {{{liststyle|}}} |listclass = hlist |group1 = Sovereign states |list1 = * [[{{{1|{{{prefix|}}}}}} Antigua and Barbuda{{{2| {{{suffix|}}}}}}|Antigua and Barbuda]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Bahamas{{{2| {{{suffix|}}}}}}|Bahamas]] * [[{{{1|{{{prefix|}}}}}} Barbados{{{2| {{{suffix|}}}}}}|Barbados]] * [[{{{1|{{{prefix|}}}}}} Belize{{{2| {{{suffix|}}}}}}|Belize]] * [[{{{1|{{{prefix|}}}}}} Canada{{{2| {{{suffix|}}}}}}|Canada]] * [[{{{1|{{{prefix|}}}}}} Costa Rica{{{2| {{{suffix|}}}}}}|Costa Rica]] * [[{{{1|{{{prefix|}}}}}} Cuba{{{2| {{{suffix|}}}}}}|Cuba]] * [[{{{1|{{{prefix|}}}}}} Dominica{{{2| {{{suffix|}}}}}}|Dominica]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Dominican Republic{{{2| {{{suffix|}}}}}}|Dominican Republic]] * [[{{{1|{{{prefix|}}}}}} El Salvador{{{2| {{{suffix|}}}}}}|El Salvador]] * [[{{{1|{{{prefix|}}}}}} Grenada{{{2| {{{suffix|}}}}}}|Grenada]] * [[{{{1|{{{prefix|}}}}}} Guatemala{{{2| {{{suffix|}}}}}}|Guatemala]] * [[{{{1|{{{prefix|}}}}}} Haiti{{{2| {{{suffix|}}}}}}|Haiti]] * [[{{{1|{{{prefix|}}}}}} Honduras{{{2| {{{suffix|}}}}}}|Honduras]] * [[{{{1|{{{prefix|}}}}}} Jamaica{{{2| {{{suffix|}}}}}}|Jamaica]] * [[{{{1|{{{prefix|}}}}}} Mexico{{{2| {{{suffix|}}}}}}|Mexico]] * [[{{{1|{{{prefix|}}}}}} Nicaragua{{{2| {{{suffix|}}}}}}|Nicaragua]] * [[{{{1|{{{prefix|}}}}}} Panama{{{2| {{{suffix|}}}}}}|Panama]] * [[{{{1|{{{prefix|}}}}}} Saint Kitts and Nevis{{{2| {{{suffix|}}}}}}|Saint Kitts and Nevis]] * [[{{{1|{{{prefix|}}}}}} Saint Lucia{{{2| {{{suffix|}}}}}}|Saint Lucia]] * [[{{{1|{{{prefix|}}}}}} Saint Vincent and the Grenadines{{{2| {{{suffix|}}}}}}|Saint Vincent and the Grenadines]] * [[{{{1|{{{prefix|}}}}}} Trinidad and Tobago{{{2| {{{suffix|}}}}}}|Trinidad and Tobago]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}United States{{{2| {{{suffix|}}}}}}|United States]] |group2 = {{#if:{{{countries_only|}}} | |{{longitem|Dependencies and<br/>other territories}}}} |list2 = {{#if:{{{countries_only|}}} | | * [[{{{1|{{{prefix|}}}}}} Anguilla{{{2| {{{suffix|}}}}}}|Anguilla]] * [[{{{1|{{{prefix|}}}}}} Aruba{{{2| {{{suffix|}}}}}}|Aruba]] * [[{{{1|{{{prefix|}}}}}} Bermuda{{{2| {{{suffix|}}}}}}|Bermuda]] * [[{{{1|{{{prefix|}}}}}} Bonaire{{{2| {{{suffix|}}}}}}|Bonaire]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}British Virgin Islands{{{2| {{{suffix|}}}}}}|British Virgin Islands]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Cayman Islands{{{2| {{{suffix|}}}}}}|Cayman Islands]] * [[{{{1|{{{prefix|}}}}}} Curaçao{{{2| {{{suffix|}}}}}}|Curaçao]] * [[{{{1|{{{prefix|}}}}}} Greenland{{{2| {{{suffix|}}}}}}|Greenland]] * [[{{{1|{{{prefix|}}}}}} Guadeloupe{{{2| {{{suffix|}}}}}}|Guadeloupe]] * [[{{{1|{{{prefix|}}}}}} Martinique{{{2| {{{suffix|}}}}}}|Martinique]] * [[{{{1|{{{prefix|}}}}}} Montserrat{{{2| {{{suffix|}}}}}}|Montserrat]] * [[{{{1|{{{prefix|}}}}}} Puerto Rico{{{2| {{{suffix|}}}}}}|Puerto Rico]] * [[{{{1|{{{prefix|}}}}}} Saint Barthélemy{{{2| {{{suffix|}}}}}}|Saint Barthélemy]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Collectivity of Saint Martin{{{2| {{{suffix|}}}}}}|Saint Martin]] * [[{{{1|{{{prefix|}}}}}} Saint Pierre and Miquelon{{{2| {{{suffix|}}}}}}|Saint Pierre and Miquelon]] * [[{{{1|{{{prefix|}}}}}} Saba (island){{{2| {{{suffix|}}}}}}|Saba]] * [[{{{1|{{{prefix|}}}}}} Sint Eustatius{{{2| {{{suffix|}}}}}}|Sint Eustatius]] * [[{{{1|{{{prefix|}}}}}} Sint Maarten{{{2| {{{suffix|}}}}}}|Sint Maarten]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Turks and Caicos Islands{{{2| {{{suffix|}}}}}}|Turks and Caicos Islands]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}United States Virgin Islands{{{2| {{{suffix|}}}}}}|United States Virgin Islands]] <!--end #if:-->}} }}{{#if:{{{2|}}}{{{suffix|}}}|[[Category:Region topic template using suffix]]}}<noinclude> {{documentation}} <!---Please add categories/metadata to the <includeonly> section at the end of the /doc subpage; interwikis go to Wikidata, thank you!---> </noinclude> jn04vnl35dm23ump8o9kbgvwrc8n6xr 116764 116763 2026-07-15T18:13:34Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:North_America_topic]] 116763 wikitext text/x-wiki {{#invoke:navbox|navbox |name = {{{name|North America topic}}} | state = {{{state<includeonly>|collapsed</includeonly>}}} |border = {{{border|}}} |navbar = {{{navbar|}}} |titlestyle = {{{titlestyle|}}} |title = {{#if:{{{title|}}} | {{{title}}} | {{#ifexist:{{{1|{{{prefix|}}}}}}_North_America{{{2| {{{suffix|}}}}}} | [[{{{1|{{{prefix|}}}}}} North America{{{2| {{{suffix|}}}}}}]] | {{{1|{{{prefix|}}}}}} North America{{{2| {{{suffix|}}}}}} }} }} |image = {{{image|}}} |groupstyle = {{{groupstyle|}}} |liststyle = {{{liststyle|}}} |listclass = hlist |group1 = Sovereign states |list1 = * [[{{{1|{{{prefix|}}}}}} Antigua and Barbuda{{{2| {{{suffix|}}}}}}|Antigua and Barbuda]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Bahamas{{{2| {{{suffix|}}}}}}|Bahamas]] * [[{{{1|{{{prefix|}}}}}} Barbados{{{2| {{{suffix|}}}}}}|Barbados]] * [[{{{1|{{{prefix|}}}}}} Belize{{{2| {{{suffix|}}}}}}|Belize]] * [[{{{1|{{{prefix|}}}}}} Canada{{{2| {{{suffix|}}}}}}|Canada]] * [[{{{1|{{{prefix|}}}}}} Costa Rica{{{2| {{{suffix|}}}}}}|Costa Rica]] * [[{{{1|{{{prefix|}}}}}} Cuba{{{2| {{{suffix|}}}}}}|Cuba]] * [[{{{1|{{{prefix|}}}}}} Dominica{{{2| {{{suffix|}}}}}}|Dominica]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Dominican Republic{{{2| {{{suffix|}}}}}}|Dominican Republic]] * [[{{{1|{{{prefix|}}}}}} El Salvador{{{2| {{{suffix|}}}}}}|El Salvador]] * [[{{{1|{{{prefix|}}}}}} Grenada{{{2| {{{suffix|}}}}}}|Grenada]] * [[{{{1|{{{prefix|}}}}}} Guatemala{{{2| {{{suffix|}}}}}}|Guatemala]] * [[{{{1|{{{prefix|}}}}}} Haiti{{{2| {{{suffix|}}}}}}|Haiti]] * [[{{{1|{{{prefix|}}}}}} Honduras{{{2| {{{suffix|}}}}}}|Honduras]] * [[{{{1|{{{prefix|}}}}}} Jamaica{{{2| {{{suffix|}}}}}}|Jamaica]] * [[{{{1|{{{prefix|}}}}}} Mexico{{{2| {{{suffix|}}}}}}|Mexico]] * [[{{{1|{{{prefix|}}}}}} Nicaragua{{{2| {{{suffix|}}}}}}|Nicaragua]] * [[{{{1|{{{prefix|}}}}}} Panama{{{2| {{{suffix|}}}}}}|Panama]] * [[{{{1|{{{prefix|}}}}}} Saint Kitts and Nevis{{{2| {{{suffix|}}}}}}|Saint Kitts and Nevis]] * [[{{{1|{{{prefix|}}}}}} Saint Lucia{{{2| {{{suffix|}}}}}}|Saint Lucia]] * [[{{{1|{{{prefix|}}}}}} Saint Vincent and the Grenadines{{{2| {{{suffix|}}}}}}|Saint Vincent and the Grenadines]] * [[{{{1|{{{prefix|}}}}}} Trinidad and Tobago{{{2| {{{suffix|}}}}}}|Trinidad and Tobago]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}United States{{{2| {{{suffix|}}}}}}|United States]] |group2 = {{#if:{{{countries_only|}}} | |{{longitem|Dependencies and<br/>other territories}}}} |list2 = {{#if:{{{countries_only|}}} | | * [[{{{1|{{{prefix|}}}}}} Anguilla{{{2| {{{suffix|}}}}}}|Anguilla]] * [[{{{1|{{{prefix|}}}}}} Aruba{{{2| {{{suffix|}}}}}}|Aruba]] * [[{{{1|{{{prefix|}}}}}} Bermuda{{{2| {{{suffix|}}}}}}|Bermuda]] * [[{{{1|{{{prefix|}}}}}} Bonaire{{{2| {{{suffix|}}}}}}|Bonaire]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}British Virgin Islands{{{2| {{{suffix|}}}}}}|British Virgin Islands]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Cayman Islands{{{2| {{{suffix|}}}}}}|Cayman Islands]] * [[{{{1|{{{prefix|}}}}}} Curaçao{{{2| {{{suffix|}}}}}}|Curaçao]] * [[{{{1|{{{prefix|}}}}}} Greenland{{{2| {{{suffix|}}}}}}|Greenland]] * [[{{{1|{{{prefix|}}}}}} Guadeloupe{{{2| {{{suffix|}}}}}}|Guadeloupe]] * [[{{{1|{{{prefix|}}}}}} Martinique{{{2| {{{suffix|}}}}}}|Martinique]] * [[{{{1|{{{prefix|}}}}}} Montserrat{{{2| {{{suffix|}}}}}}|Montserrat]] * [[{{{1|{{{prefix|}}}}}} Puerto Rico{{{2| {{{suffix|}}}}}}|Puerto Rico]] * [[{{{1|{{{prefix|}}}}}} Saint Barthélemy{{{2| {{{suffix|}}}}}}|Saint Barthélemy]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Collectivity of Saint Martin{{{2| {{{suffix|}}}}}}|Saint Martin]] * [[{{{1|{{{prefix|}}}}}} Saint Pierre and Miquelon{{{2| {{{suffix|}}}}}}|Saint Pierre and Miquelon]] * [[{{{1|{{{prefix|}}}}}} Saba (island){{{2| {{{suffix|}}}}}}|Saba]] * [[{{{1|{{{prefix|}}}}}} Sint Eustatius{{{2| {{{suffix|}}}}}}|Sint Eustatius]] * [[{{{1|{{{prefix|}}}}}} Sint Maarten{{{2| {{{suffix|}}}}}}|Sint Maarten]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}Turks and Caicos Islands{{{2| {{{suffix|}}}}}}|Turks and Caicos Islands]] * [[{{{1|{{{prefix|}}}}}} {{#if:{{{2|}}}{{{suffix|}}}|{{#ifeq:{{{article|}}}|yes|the_|}}|{{#ifeq:{{{article|}}}|no||the_}}}}United States Virgin Islands{{{2| {{{suffix|}}}}}}|United States Virgin Islands]] <!--end #if:-->}} }}{{#if:{{{2|}}}{{{suffix|}}}|[[Category:Region topic template using suffix]]}}<noinclude> {{documentation}} <!---Please add categories/metadata to the <includeonly> section at the end of the /doc subpage; interwikis go to Wikidata, thank you!---> </noinclude> jn04vnl35dm23ump8o9kbgvwrc8n6xr Module:Wikitext Parsing 828 32397 117058 84144 2025-05-05T17:47:12Z en>Dinoguy1000 0 the Lua # operator recalculates the length every time it's accessed (including on every loop in a for), so cache its value in cheaptrim since the string isn't modified in-place 117058 Scribunto text/plain require("strict") --Helper functions local function startswith(text, subtext) return string.sub(text, 1, #subtext) == subtext end local function endswith(text, subtext) return string.sub(text, -#subtext, -1) == subtext end local function allcases(s) return s:gsub("%a", function(c) return "["..c:upper()..c:lower().."]" end) end local trimcache = {} local whitespace = {[" "]=1, ["\n"]=1, ["\t"]=1, ["\r"]=1} local function cheaptrim(str) --mw.text.trim is surprisingly expensive, so here's an alternative approach local quick = trimcache[str] if quick then return quick else -- local out = string.gsub(str, "^%s*(.-)%s*$", "%1") local lowEnd local strlen = #str for i = 1,strlen do if not whitespace[string.sub(str, i, i)] then lowEnd = i break end end if not lowEnd then trimcache[str] = "" return "" end for i = strlen,1,-1 do if not whitespace[string.sub(str, i, i)] then local out = string.sub(str, lowEnd, i) trimcache[str] = out return out end end end end --[=[ Implementation notes ---- NORMAL HTML TAGS ---- Tags are very strict on how they want to start, but loose on how they end. The start must strictly follow <[tAgNaMe](%s|>) with no room for whitespace in the tag's name, but may then flow as they want afterwards, making <div\nclass\n=\n"\nerror\n"\n> valid There's no sense of escaping < or > E.g. <div class="error\>"> will end at \> despite it being inside a quote <div class="<span class="error">error</span>"> will not process the larger div If a tag has no end, it will consume all text instead of not processing ---- NOPROCESSING TAGS (nowiki, pre, syntaxhighlight, source, etc.) ---- (In most comments, <source> will not be mentioned. This is because it is the deprecated version of <syntaxhighlight>) No-Processing tags have some interesting differences to the above rules. For example, their syntax is a lot stricter. While an opening tag appears to follow the same set of rules, A closing tag can't have any sort of extra formatting period. While </div a/a> is valid, </nowiki a/a> isn't - only newlines and spaces/tabs are allowed in closing tags. Note that, even though <pre> tags cause a visual change when the ending tag has extra formatting, it won't cause the no-processing effects. For some reason, the format must be strict for that to apply. Both the content inside the tag pair and the content inside each side of the pair is not processed. E.g. <nowiki |}}>|}}</nowiki> would have both of the |}} escaped in practice. When something in the code is referenced to as a "Nowiki Tag", it means a tag which causes wiki text to not be processed, which includes <nowiki>, <pre>, and <syntaxhighlight> Since we only care about these tags, we can ignore the idea of an intercepting tag preventing processing, and just go straight for the first ending we can find If there is no ending to find, the tag will NOT consume the rest of the text in terms of processing behaviour (though <pre> will appear to have an effect). Even if there is no end of the tag, the content inside the opening half will still be unprocessed, meaning {{X20|<nowiki }}>}} wouldn't end at the first }} despite there being no ending to the tag. Note that there are some tags, like <math>, which also function like <nowiki> which are included in this aswell. Some other tags, like <ref>, have far too unpredictable behaviour to be handled currently (they'd have to be split and processed as something seperate - its complicated, but maybe not impossible.) I suspect that every tag listed in [[Special:Version]] may behave somewhat like this, but that's far too many cases worth checking for rarely used tags that may not even have a good reason to contain {{ or }} anyways, so we leave them alone. ---- HTML COMMENTS AND INCLUDEONLY ---- HTML Comments are about as basic as it could get for this Start at <!--, end at -->, no extra conditions. Simple enough If a comment has no end, it will eat all text instead of not being processed includeonly tags function mostly like a regular nowiki tag, with the exception that the tag will actually consume all future text if not given an ending as opposed to simply giving up and not changing anything. Due to complications and the fact that this is far less likely to be present on a page, aswell as being something that may not want to be escaped, includeonly tags are ignored during our processing --]=] local validtags = {nowiki=1, pre=1, syntaxhighlight=1, source=1, math=1} --This function expects the string to start with the tag local function TestForNowikiTag(text, scanPosition) local tagName = (string.match(text, "^<([^\n />]+)", scanPosition) or ""):lower() if not validtags[tagName] then return nil end local nextOpener = string.find(text, "<", scanPosition+1) or -1 local nextCloser = string.find(text, ">", scanPosition+1) or -1 if nextCloser > -1 and (nextOpener == -1 or nextCloser < nextOpener) then local startingTag = string.sub(text, scanPosition, nextCloser) --We have our starting tag (E.g. '<pre style="color:red">') --Now find our ending... if endswith(startingTag, "/>") then --self-closing tag (we are our own ending) return { Tag = tagName, Start = startingTag, Content = "", End = "", Length = #startingTag } else local endingTagStart, endingTagEnd = string.find(text, "</"..allcases(tagName).."[ \t\n]*>", scanPosition) if endingTagStart then --Regular tag formation local endingTag = string.sub(text, endingTagStart, endingTagEnd) local tagContent = string.sub(text, nextCloser+1, endingTagStart-1) return { Tag = tagName, Start = startingTag, Content = tagContent, End = endingTag, Length = #startingTag + #tagContent + #endingTag } else --Content inside still needs escaping (also linter error!) return { Tag = tagName, Start = startingTag, Content = "", End = "", Length = #startingTag } end end end return nil end local function TestForComment(text, scanPosition) --Like TestForNowikiTag but for <!-- --> if string.match(text, "^<!%-%-", scanPosition) then local commentEnd = string.find(text, "-->", scanPosition+4, true) if commentEnd then return { Start = "<!--", End = "-->", Content = string.sub(text, scanPosition+4, commentEnd-1), Length = commentEnd-scanPosition+3 } else --Consumes all text if not given an ending return { Start = "<!--", End = "", Content = string.sub(text, scanPosition+4), Length = #text-scanPosition+1 } end end return nil end --[[ Implementation notes The goal of this function is to escape all text that wouldn't be parsed if it was preprocessed (see above implementation notes). Using keepComments will keep all HTML comments instead of removing them. They will still be escaped regardless to avoid processing errors --]] local function PrepareText(text, keepComments) local newtext = {} local scanPosition = 1 while true do local NextCheck = string.find(text, "<[NnSsPpMm!]", scanPosition) --Advance to the next potential tag we care about if not NextCheck then --Done newtext[#newtext+1] = string.sub(text,scanPosition) break end newtext[#newtext+1] = string.sub(text,scanPosition,NextCheck-1) scanPosition = NextCheck local Comment = TestForComment(text, scanPosition) if Comment then if keepComments then newtext[#newtext+1] = Comment.Start .. mw.text.nowiki(Comment.Content) .. Comment.End end scanPosition = scanPosition + Comment.Length else local Tag = TestForNowikiTag(text, scanPosition) if Tag then local newTagStart = "<" .. mw.text.nowiki(string.sub(Tag.Start,2,-2)) .. ">" local newTagEnd = Tag.End == "" and "" or --Respect no tag ending "</" .. mw.text.nowiki(string.sub(Tag.End,3,-2)) .. ">" local newContent = mw.text.nowiki(Tag.Content) newtext[#newtext+1] = newTagStart .. newContent .. newTagEnd scanPosition = scanPosition + Tag.Length else --Nothing special, move on... newtext[#newtext+1] = string.sub(text, scanPosition, scanPosition) scanPosition = scanPosition + 1 end end end return table.concat(newtext, "") end --[=[ Implementation notes This function is an alternative to Transcluder's getParameters which considers the potential for a singular { or } or other odd syntax that %b doesn't like to be in a parameter's value. When handling the difference between {{ and {{{, mediawiki will attempt to match as many sequences of {{{ as possible before matching a {{ E.g. {{{{A}}}} -> { {{{A}}} } {{{{{{{{Text|A}}}}}}}} -> {{ {{{ {{{Text|A}}} }}} }} If there aren't enough triple braces on both sides, the parser will compromise for a template interpretation. E.g. {{{{A}} }} -> {{ {{ A }} }} While there are technically concerns about things such as wikilinks breaking template processing (E.g. {{[[}}]]}} doesn't stop at the first }}), it shouldn't be our job to process inputs perfectly when the input has garbage ({ / } isn't legal in titles anyways, so if something's unmatched in a wikilink, it's guaranteed GIGO) Setting dontEscape will prevent running the input text through EET. Avoid setting this to true if you don't have to set it. Returned values: A table of all templates. Template data goes as follows: Text: The raw text of the template Name: The name of the template Args: A list of arguments Children: A list of immediate template children --]=] --Helper functions local function boundlen(pair) return pair.End-pair.Start+1 end --Main function local function ParseTemplates(InputText, dontEscape) --Setup if not dontEscape then InputText = PrepareText(InputText) end local function finalise(text) if not dontEscape then return mw.text.decode(text) else return text end end local function CreateContainerObj(Container) Container.Text = {} Container.Args = {} Container.ArgOrder = {} Container.Children = {} -- Container.Name = nil -- Container.Value = nil -- Container.Key = nil Container.BeyondStart = false Container.LastIndex = 1 Container.finalise = finalise function Container:HandleArgInput(character, internalcall) if not internalcall then self.Text[#self.Text+1] = character end if character == "=" then if self.Key then self.Value[#self.Value+1] = character else self.Key = cheaptrim(self.Value and table.concat(self.Value, "") or "") self.Value = {} end else --"|" or "}" if not self.Name then self.Name = cheaptrim(self.Value and table.concat(self.Value, "") or "") self.Value = nil else self.Value = self.finalise(self.Value and table.concat(self.Value, "") or "") if self.Key then self.Key = self.finalise(self.Key) self.Args[self.Key] = cheaptrim(self.Value) self.ArgOrder[#self.ArgOrder+1] = self.Key else local Key = tostring(self.LastIndex) self.Args[Key] = self.Value self.ArgOrder[#self.ArgOrder+1] = Key self.LastIndex = self.LastIndex + 1 end self.Key = nil self.Value = nil end end end function Container:AppendText(text, ftext) self.Text[#self.Text+1] = (ftext or text) if not self.Value then self.Value = {} end self.BeyondStart = self.BeyondStart or (#table.concat(self.Text, "") > 2) if self.BeyondStart then self.Value[#self.Value+1] = text end end function Container:Clean(IsTemplate) self.Text = table.concat(self.Text, "") if self.Value and IsTemplate then self.Value = {string.sub(table.concat(self.Value, ""), 1, -3)} --Trim ending }} self:HandleArgInput("|", true) --Simulate ending end self.Value = nil self.Key = nil self.BeyondStart = nil self.LastIndex = nil self.finalise = nil self.HandleArgInput = nil self.AppendText = nil self.Clean = nil end return Container end --Step 1: Find and escape the content of all wikilinks on the page, which are stronger than templates (see implementation notes) local scannerPosition = 1 local wikilinks = {} local openWikilinks = {} while true do local Position, _, Character = string.find(InputText, "([%[%]])%1", scannerPosition) if not Position then --Done break end scannerPosition = Position+2 --+2 to pass the [[ / ]] if Character == "[" then --Add a [[ to the pending wikilink queue openWikilinks[#openWikilinks+1] = Position else --Pair up the ]] to any available [[ if #openWikilinks >= 1 then local start = table.remove(openWikilinks) --Pop the latest [[ wikilinks[start] = {Start=start, End=Position+1, Type="Wikilink"} --Note the pair end end end --Step 2: Find the bounds of every valid template and variable ({{ and {{{) local scannerPosition = 1 local templates = {} local variables = {} local openBrackets = {} while true do local Start, _, Character = string.find(InputText, "([{}])%1", scannerPosition) if not Start then --Done (both 9e9) break end local _, End = string.find(InputText, "^"..Character.."+", Start) scannerPosition = Start --Get to the {{ / }} set if Character == "{" then --Add the {{+ set to the queue openBrackets[#openBrackets+1] = {Start=Start, End=End} else --Pair up the }} to any available {{, accounting for {{{ / }}} local BracketCount = End-Start+1 while BracketCount >= 2 and #openBrackets >= 1 do local OpenSet = table.remove(openBrackets) if boundlen(OpenSet) >= 3 and BracketCount >= 3 then --We have a {{{variable}}} (both sides have 3 spare) variables[OpenSet.End-2] = {Start=OpenSet.End-2, End=scannerPosition+2, Type="Variable"} --Done like this to ensure chronological order BracketCount = BracketCount - 3 OpenSet.End = OpenSet.End - 3 scannerPosition = scannerPosition + 3 else --We have a {{template}} (both sides have 2 spare, but at least one side doesn't have 3 spare) templates[OpenSet.End-1] = {Start=OpenSet.End-1, End=scannerPosition+1, Type="Template"} --Done like this to ensure chronological order BracketCount = BracketCount - 2 OpenSet.End = OpenSet.End - 2 scannerPosition = scannerPosition + 2 end if boundlen(OpenSet) >= 2 then --Still has enough data left, leave it in openBrackets[#openBrackets+1] = OpenSet end end end scannerPosition = End --Now move past the bracket set end --Step 3: Re-trace every object using their known bounds, collecting our parameters with (slight) ease local scannerPosition = 1 local activeObjects = {} local finalObjects = {} while true do local LatestObject = activeObjects[#activeObjects] --Commonly needed object local NNC, _, Character --NNC = NextNotableCharacter if LatestObject then NNC, _, Character = string.find(InputText, "([{}%[%]|=])", scannerPosition) else NNC, _, Character = string.find(InputText, "([{}])", scannerPosition) --We are only after templates right now end if not NNC then break end if NNC > scannerPosition and LatestObject then local scannedContent = string.sub(InputText, scannerPosition, NNC-1) LatestObject:AppendText(scannedContent, finalise(scannedContent)) end scannerPosition = NNC+1 if Character == "{" or Character == "[" then local Container = templates[NNC] or variables[NNC] or wikilinks[NNC] if Container then CreateContainerObj(Container) if Container.Type == "Template" then Container:AppendText("{{") scannerPosition = NNC+2 elseif Container.Type == "Variable" then Container:AppendText("{{{") scannerPosition = NNC+3 else --Wikilink Container:AppendText("[[") scannerPosition = NNC+2 end if LatestObject and Container.Type == "Template" then --Only templates count as children LatestObject.Children[#LatestObject.Children+1] = Container end activeObjects[#activeObjects+1] = Container elseif LatestObject then LatestObject:AppendText(Character) end elseif Character == "}" or Character == "]" then if LatestObject then LatestObject:AppendText(Character) if LatestObject.End == NNC then if LatestObject.Type == "Template" then LatestObject:Clean(true) finalObjects[#finalObjects+1] = LatestObject else LatestObject:Clean(false) end activeObjects[#activeObjects] = nil local NewLatest = activeObjects[#activeObjects] if NewLatest then NewLatest:AppendText(LatestObject.Text) --Append to new latest end end end else --| or = if LatestObject then LatestObject:HandleArgInput(Character) end end end --Step 4: Fix the order local FixedOrder = {} local SortableReference = {} for _,Object in next,finalObjects do SortableReference[#SortableReference+1] = Object.Start end table.sort(SortableReference) for i = 1,#SortableReference do local start = SortableReference[i] for n,Object in next,finalObjects do if Object.Start == start then finalObjects[n] = nil Object.Start = nil --Final cleanup Object.End = nil Object.Type = nil FixedOrder[#FixedOrder+1] = Object break end end end --Finished, return return FixedOrder end local p = {} --Main entry points p.PrepareText = PrepareText p.ParseTemplates = ParseTemplates --Extra entry points, not really required p.TestForNowikiTag = TestForNowikiTag p.TestForComment = TestForComment return p --[==[ console tests local s = [=[Hey!{{Text|<nowiki | ||> Hey! }} A</nowiki>|<!--AAAAA|AAA-->Should see|Shouldn't see}}]=] local out = p.PrepareText(s) mw.logObject(out) local s = [=[B<!-- Hey! -->A]=] local out = p.TestForComment(s, 2) mw.logObject(out); mw.log(string.sub(s, 2, out.Length)) local a = p.ParseTemplates([=[ {{User:Aidan9382/templates/dummy |A|B|C {{{A|B}}} { } } { |<nowiki>D</nowiki> |<pre>E |F</pre> |G|=|a=|A = [[{{PAGENAME}}|A=B]]{{Text|1==<nowiki>}}</nowiki>}}|A B=Success}} ]=]) mw.logObject(a) ]==] 1pc5nwfjm9r5mkdrg3s2ci608uixfb7 117059 117058 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Wikitext_Parsing]] 117058 Scribunto text/plain require("strict") --Helper functions local function startswith(text, subtext) return string.sub(text, 1, #subtext) == subtext end local function endswith(text, subtext) return string.sub(text, -#subtext, -1) == subtext end local function allcases(s) return s:gsub("%a", function(c) return "["..c:upper()..c:lower().."]" end) end local trimcache = {} local whitespace = {[" "]=1, ["\n"]=1, ["\t"]=1, ["\r"]=1} local function cheaptrim(str) --mw.text.trim is surprisingly expensive, so here's an alternative approach local quick = trimcache[str] if quick then return quick else -- local out = string.gsub(str, "^%s*(.-)%s*$", "%1") local lowEnd local strlen = #str for i = 1,strlen do if not whitespace[string.sub(str, i, i)] then lowEnd = i break end end if not lowEnd then trimcache[str] = "" return "" end for i = strlen,1,-1 do if not whitespace[string.sub(str, i, i)] then local out = string.sub(str, lowEnd, i) trimcache[str] = out return out end end end end --[=[ Implementation notes ---- NORMAL HTML TAGS ---- Tags are very strict on how they want to start, but loose on how they end. The start must strictly follow <[tAgNaMe](%s|>) with no room for whitespace in the tag's name, but may then flow as they want afterwards, making <div\nclass\n=\n"\nerror\n"\n> valid There's no sense of escaping < or > E.g. <div class="error\>"> will end at \> despite it being inside a quote <div class="<span class="error">error</span>"> will not process the larger div If a tag has no end, it will consume all text instead of not processing ---- NOPROCESSING TAGS (nowiki, pre, syntaxhighlight, source, etc.) ---- (In most comments, <source> will not be mentioned. This is because it is the deprecated version of <syntaxhighlight>) No-Processing tags have some interesting differences to the above rules. For example, their syntax is a lot stricter. While an opening tag appears to follow the same set of rules, A closing tag can't have any sort of extra formatting period. While </div a/a> is valid, </nowiki a/a> isn't - only newlines and spaces/tabs are allowed in closing tags. Note that, even though <pre> tags cause a visual change when the ending tag has extra formatting, it won't cause the no-processing effects. For some reason, the format must be strict for that to apply. Both the content inside the tag pair and the content inside each side of the pair is not processed. E.g. <nowiki |}}>|}}</nowiki> would have both of the |}} escaped in practice. When something in the code is referenced to as a "Nowiki Tag", it means a tag which causes wiki text to not be processed, which includes <nowiki>, <pre>, and <syntaxhighlight> Since we only care about these tags, we can ignore the idea of an intercepting tag preventing processing, and just go straight for the first ending we can find If there is no ending to find, the tag will NOT consume the rest of the text in terms of processing behaviour (though <pre> will appear to have an effect). Even if there is no end of the tag, the content inside the opening half will still be unprocessed, meaning {{X20|<nowiki }}>}} wouldn't end at the first }} despite there being no ending to the tag. Note that there are some tags, like <math>, which also function like <nowiki> which are included in this aswell. Some other tags, like <ref>, have far too unpredictable behaviour to be handled currently (they'd have to be split and processed as something seperate - its complicated, but maybe not impossible.) I suspect that every tag listed in [[Special:Version]] may behave somewhat like this, but that's far too many cases worth checking for rarely used tags that may not even have a good reason to contain {{ or }} anyways, so we leave them alone. ---- HTML COMMENTS AND INCLUDEONLY ---- HTML Comments are about as basic as it could get for this Start at <!--, end at -->, no extra conditions. Simple enough If a comment has no end, it will eat all text instead of not being processed includeonly tags function mostly like a regular nowiki tag, with the exception that the tag will actually consume all future text if not given an ending as opposed to simply giving up and not changing anything. Due to complications and the fact that this is far less likely to be present on a page, aswell as being something that may not want to be escaped, includeonly tags are ignored during our processing --]=] local validtags = {nowiki=1, pre=1, syntaxhighlight=1, source=1, math=1} --This function expects the string to start with the tag local function TestForNowikiTag(text, scanPosition) local tagName = (string.match(text, "^<([^\n />]+)", scanPosition) or ""):lower() if not validtags[tagName] then return nil end local nextOpener = string.find(text, "<", scanPosition+1) or -1 local nextCloser = string.find(text, ">", scanPosition+1) or -1 if nextCloser > -1 and (nextOpener == -1 or nextCloser < nextOpener) then local startingTag = string.sub(text, scanPosition, nextCloser) --We have our starting tag (E.g. '<pre style="color:red">') --Now find our ending... if endswith(startingTag, "/>") then --self-closing tag (we are our own ending) return { Tag = tagName, Start = startingTag, Content = "", End = "", Length = #startingTag } else local endingTagStart, endingTagEnd = string.find(text, "</"..allcases(tagName).."[ \t\n]*>", scanPosition) if endingTagStart then --Regular tag formation local endingTag = string.sub(text, endingTagStart, endingTagEnd) local tagContent = string.sub(text, nextCloser+1, endingTagStart-1) return { Tag = tagName, Start = startingTag, Content = tagContent, End = endingTag, Length = #startingTag + #tagContent + #endingTag } else --Content inside still needs escaping (also linter error!) return { Tag = tagName, Start = startingTag, Content = "", End = "", Length = #startingTag } end end end return nil end local function TestForComment(text, scanPosition) --Like TestForNowikiTag but for <!-- --> if string.match(text, "^<!%-%-", scanPosition) then local commentEnd = string.find(text, "-->", scanPosition+4, true) if commentEnd then return { Start = "<!--", End = "-->", Content = string.sub(text, scanPosition+4, commentEnd-1), Length = commentEnd-scanPosition+3 } else --Consumes all text if not given an ending return { Start = "<!--", End = "", Content = string.sub(text, scanPosition+4), Length = #text-scanPosition+1 } end end return nil end --[[ Implementation notes The goal of this function is to escape all text that wouldn't be parsed if it was preprocessed (see above implementation notes). Using keepComments will keep all HTML comments instead of removing them. They will still be escaped regardless to avoid processing errors --]] local function PrepareText(text, keepComments) local newtext = {} local scanPosition = 1 while true do local NextCheck = string.find(text, "<[NnSsPpMm!]", scanPosition) --Advance to the next potential tag we care about if not NextCheck then --Done newtext[#newtext+1] = string.sub(text,scanPosition) break end newtext[#newtext+1] = string.sub(text,scanPosition,NextCheck-1) scanPosition = NextCheck local Comment = TestForComment(text, scanPosition) if Comment then if keepComments then newtext[#newtext+1] = Comment.Start .. mw.text.nowiki(Comment.Content) .. Comment.End end scanPosition = scanPosition + Comment.Length else local Tag = TestForNowikiTag(text, scanPosition) if Tag then local newTagStart = "<" .. mw.text.nowiki(string.sub(Tag.Start,2,-2)) .. ">" local newTagEnd = Tag.End == "" and "" or --Respect no tag ending "</" .. mw.text.nowiki(string.sub(Tag.End,3,-2)) .. ">" local newContent = mw.text.nowiki(Tag.Content) newtext[#newtext+1] = newTagStart .. newContent .. newTagEnd scanPosition = scanPosition + Tag.Length else --Nothing special, move on... newtext[#newtext+1] = string.sub(text, scanPosition, scanPosition) scanPosition = scanPosition + 1 end end end return table.concat(newtext, "") end --[=[ Implementation notes This function is an alternative to Transcluder's getParameters which considers the potential for a singular { or } or other odd syntax that %b doesn't like to be in a parameter's value. When handling the difference between {{ and {{{, mediawiki will attempt to match as many sequences of {{{ as possible before matching a {{ E.g. {{{{A}}}} -> { {{{A}}} } {{{{{{{{Text|A}}}}}}}} -> {{ {{{ {{{Text|A}}} }}} }} If there aren't enough triple braces on both sides, the parser will compromise for a template interpretation. E.g. {{{{A}} }} -> {{ {{ A }} }} While there are technically concerns about things such as wikilinks breaking template processing (E.g. {{[[}}]]}} doesn't stop at the first }}), it shouldn't be our job to process inputs perfectly when the input has garbage ({ / } isn't legal in titles anyways, so if something's unmatched in a wikilink, it's guaranteed GIGO) Setting dontEscape will prevent running the input text through EET. Avoid setting this to true if you don't have to set it. Returned values: A table of all templates. Template data goes as follows: Text: The raw text of the template Name: The name of the template Args: A list of arguments Children: A list of immediate template children --]=] --Helper functions local function boundlen(pair) return pair.End-pair.Start+1 end --Main function local function ParseTemplates(InputText, dontEscape) --Setup if not dontEscape then InputText = PrepareText(InputText) end local function finalise(text) if not dontEscape then return mw.text.decode(text) else return text end end local function CreateContainerObj(Container) Container.Text = {} Container.Args = {} Container.ArgOrder = {} Container.Children = {} -- Container.Name = nil -- Container.Value = nil -- Container.Key = nil Container.BeyondStart = false Container.LastIndex = 1 Container.finalise = finalise function Container:HandleArgInput(character, internalcall) if not internalcall then self.Text[#self.Text+1] = character end if character == "=" then if self.Key then self.Value[#self.Value+1] = character else self.Key = cheaptrim(self.Value and table.concat(self.Value, "") or "") self.Value = {} end else --"|" or "}" if not self.Name then self.Name = cheaptrim(self.Value and table.concat(self.Value, "") or "") self.Value = nil else self.Value = self.finalise(self.Value and table.concat(self.Value, "") or "") if self.Key then self.Key = self.finalise(self.Key) self.Args[self.Key] = cheaptrim(self.Value) self.ArgOrder[#self.ArgOrder+1] = self.Key else local Key = tostring(self.LastIndex) self.Args[Key] = self.Value self.ArgOrder[#self.ArgOrder+1] = Key self.LastIndex = self.LastIndex + 1 end self.Key = nil self.Value = nil end end end function Container:AppendText(text, ftext) self.Text[#self.Text+1] = (ftext or text) if not self.Value then self.Value = {} end self.BeyondStart = self.BeyondStart or (#table.concat(self.Text, "") > 2) if self.BeyondStart then self.Value[#self.Value+1] = text end end function Container:Clean(IsTemplate) self.Text = table.concat(self.Text, "") if self.Value and IsTemplate then self.Value = {string.sub(table.concat(self.Value, ""), 1, -3)} --Trim ending }} self:HandleArgInput("|", true) --Simulate ending end self.Value = nil self.Key = nil self.BeyondStart = nil self.LastIndex = nil self.finalise = nil self.HandleArgInput = nil self.AppendText = nil self.Clean = nil end return Container end --Step 1: Find and escape the content of all wikilinks on the page, which are stronger than templates (see implementation notes) local scannerPosition = 1 local wikilinks = {} local openWikilinks = {} while true do local Position, _, Character = string.find(InputText, "([%[%]])%1", scannerPosition) if not Position then --Done break end scannerPosition = Position+2 --+2 to pass the [[ / ]] if Character == "[" then --Add a [[ to the pending wikilink queue openWikilinks[#openWikilinks+1] = Position else --Pair up the ]] to any available [[ if #openWikilinks >= 1 then local start = table.remove(openWikilinks) --Pop the latest [[ wikilinks[start] = {Start=start, End=Position+1, Type="Wikilink"} --Note the pair end end end --Step 2: Find the bounds of every valid template and variable ({{ and {{{) local scannerPosition = 1 local templates = {} local variables = {} local openBrackets = {} while true do local Start, _, Character = string.find(InputText, "([{}])%1", scannerPosition) if not Start then --Done (both 9e9) break end local _, End = string.find(InputText, "^"..Character.."+", Start) scannerPosition = Start --Get to the {{ / }} set if Character == "{" then --Add the {{+ set to the queue openBrackets[#openBrackets+1] = {Start=Start, End=End} else --Pair up the }} to any available {{, accounting for {{{ / }}} local BracketCount = End-Start+1 while BracketCount >= 2 and #openBrackets >= 1 do local OpenSet = table.remove(openBrackets) if boundlen(OpenSet) >= 3 and BracketCount >= 3 then --We have a {{{variable}}} (both sides have 3 spare) variables[OpenSet.End-2] = {Start=OpenSet.End-2, End=scannerPosition+2, Type="Variable"} --Done like this to ensure chronological order BracketCount = BracketCount - 3 OpenSet.End = OpenSet.End - 3 scannerPosition = scannerPosition + 3 else --We have a {{template}} (both sides have 2 spare, but at least one side doesn't have 3 spare) templates[OpenSet.End-1] = {Start=OpenSet.End-1, End=scannerPosition+1, Type="Template"} --Done like this to ensure chronological order BracketCount = BracketCount - 2 OpenSet.End = OpenSet.End - 2 scannerPosition = scannerPosition + 2 end if boundlen(OpenSet) >= 2 then --Still has enough data left, leave it in openBrackets[#openBrackets+1] = OpenSet end end end scannerPosition = End --Now move past the bracket set end --Step 3: Re-trace every object using their known bounds, collecting our parameters with (slight) ease local scannerPosition = 1 local activeObjects = {} local finalObjects = {} while true do local LatestObject = activeObjects[#activeObjects] --Commonly needed object local NNC, _, Character --NNC = NextNotableCharacter if LatestObject then NNC, _, Character = string.find(InputText, "([{}%[%]|=])", scannerPosition) else NNC, _, Character = string.find(InputText, "([{}])", scannerPosition) --We are only after templates right now end if not NNC then break end if NNC > scannerPosition and LatestObject then local scannedContent = string.sub(InputText, scannerPosition, NNC-1) LatestObject:AppendText(scannedContent, finalise(scannedContent)) end scannerPosition = NNC+1 if Character == "{" or Character == "[" then local Container = templates[NNC] or variables[NNC] or wikilinks[NNC] if Container then CreateContainerObj(Container) if Container.Type == "Template" then Container:AppendText("{{") scannerPosition = NNC+2 elseif Container.Type == "Variable" then Container:AppendText("{{{") scannerPosition = NNC+3 else --Wikilink Container:AppendText("[[") scannerPosition = NNC+2 end if LatestObject and Container.Type == "Template" then --Only templates count as children LatestObject.Children[#LatestObject.Children+1] = Container end activeObjects[#activeObjects+1] = Container elseif LatestObject then LatestObject:AppendText(Character) end elseif Character == "}" or Character == "]" then if LatestObject then LatestObject:AppendText(Character) if LatestObject.End == NNC then if LatestObject.Type == "Template" then LatestObject:Clean(true) finalObjects[#finalObjects+1] = LatestObject else LatestObject:Clean(false) end activeObjects[#activeObjects] = nil local NewLatest = activeObjects[#activeObjects] if NewLatest then NewLatest:AppendText(LatestObject.Text) --Append to new latest end end end else --| or = if LatestObject then LatestObject:HandleArgInput(Character) end end end --Step 4: Fix the order local FixedOrder = {} local SortableReference = {} for _,Object in next,finalObjects do SortableReference[#SortableReference+1] = Object.Start end table.sort(SortableReference) for i = 1,#SortableReference do local start = SortableReference[i] for n,Object in next,finalObjects do if Object.Start == start then finalObjects[n] = nil Object.Start = nil --Final cleanup Object.End = nil Object.Type = nil FixedOrder[#FixedOrder+1] = Object break end end end --Finished, return return FixedOrder end local p = {} --Main entry points p.PrepareText = PrepareText p.ParseTemplates = ParseTemplates --Extra entry points, not really required p.TestForNowikiTag = TestForNowikiTag p.TestForComment = TestForComment return p --[==[ console tests local s = [=[Hey!{{Text|<nowiki | ||> Hey! }} A</nowiki>|<!--AAAAA|AAA-->Should see|Shouldn't see}}]=] local out = p.PrepareText(s) mw.logObject(out) local s = [=[B<!-- Hey! -->A]=] local out = p.TestForComment(s, 2) mw.logObject(out); mw.log(string.sub(s, 2, out.Length)) local a = p.ParseTemplates([=[ {{User:Aidan9382/templates/dummy |A|B|C {{{A|B}}} { } } { |<nowiki>D</nowiki> |<pre>E |F</pre> |G|=|a=|A = [[{{PAGENAME}}|A=B]]{{Text|1==<nowiki>}}</nowiki>}}|A B=Success}} ]=]) mw.logObject(a) ]==] 1pc5nwfjm9r5mkdrg3s2ci608uixfb7 Template:Large category TOC 10 32425 117102 84206 2026-06-26T04:48:09Z en>Gonnym 0 Undid revision [[Special:Diff/1361177328|1361177328]] by [[Special:Contributions/Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 117102 wikitext text/x-wiki <div role="navigation" style="margin-top: 1em" id="toc">{{#invoke:Large category TOC|aejot}}</div><includeonly>{{Category other<!-- -->|{{Large category TOC/tracking<!-- -->|pagecount={{{pagecount|{{PAGESINCATEGORY:{{#invoke:HTMLDecode | HTMLDecode | text={{PAGENAME}} }}|R}}}}}<!-- -->|CatAutoTOC={{lc:{{{CatAutoTOC|}}}}}<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation}} </noinclude> f1iivqevqo6qug2zcd2sp9ly2td2ela 117103 117102 2026-07-16T11:39:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Large_category_TOC]] 117102 wikitext text/x-wiki <div role="navigation" style="margin-top: 1em" id="toc">{{#invoke:Large category TOC|aejot}}</div><includeonly>{{Category other<!-- -->|{{Large category TOC/tracking<!-- -->|pagecount={{{pagecount|{{PAGESINCATEGORY:{{#invoke:HTMLDecode | HTMLDecode | text={{PAGENAME}} }}|R}}}}}<!-- -->|CatAutoTOC={{lc:{{{CatAutoTOC|}}}}}<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation}} </noinclude> f1iivqevqo6qug2zcd2sp9ly2td2ela Module:Large category TOC 828 32426 117106 84208 2025-10-15T13:40:33Z en>Rich Farmbrough 0 Non-breaking space after letter "header". 117106 Scribunto text/plain local p = {} local azupper = mw.text.split('ABCDEFGHIJKLMNOPQRSTUVWXYZ','') local azlower = mw.text.split('abcdefghijklmnopqrstuvwxyz','') local aejot = mw.text.split('aejot','') local function main(toc_type) local toc_frame = mw.html.create('div') :addClass('large-cat-toc') :addClass('plainlinks') :addClass('toc') -- :attr('id','toc') -- Contains "Content: Top 0-9 A - Z" local header = toc_frame:tag('div') :attr('class', 'toctitle') -- Contains all the rest local body_wrapper local body = toc_frame:tag('div') :addClass('large-cat-toc-body') local jumpy_collapse = mw.html.create('div') :addClass('large-cat-toc-jumpy-title') if toc_type == 'collapsible' then toc_frame:addClass('mw-collapsible mw-collapsed') body:addClass('mw-collapsible-content') elseif toc_type == 'scrollable' then toc_frame:addClass('large-cat-toc-scroll') end local pageurl = mw.title.getCurrentTitle():fullUrl() local header_content = { string.format( '<span class="large-cat-toc-title">%s:</span> [%s Top] [%s?from=0 0–9]', mw.message.new('Toc'):plain(), pageurl, pageurl ) } for _, v in ipairs(azupper) do table.insert(header_content, string.format( ' [%s?from=%s %s]', pageurl, v, v )) end if toc_type == 'collapsible' then jumpy_collapse:wikitext(table.concat(header_content)) header:node(jumpy_collapse) else header:wikitext(table.concat(header_content)) end local body_content = {} if toc_type ~= 'collapsible' then table.insert(body_content, ' <span class="large-cat-toc-anum">['..pageurl..'?from=* *]</span>') end table.insert(body_content, ' <span class="large-cat-toc-anum">#</span>') body_wrapper = body:tag('span') for i=0,9 do table.insert(body_content,string.format(' [%s?from=%s %s]',pageurl,i,i)) end local function atoz(letter) local azlist = {} local letterlist if toc_type == 'aejot' then letterlist = aejot else letterlist = azlower end if toc_type == 'aejot' or toc_type == 'scrollable' then table.insert(azlist,' • <span class="large-cat-toc-anum">'..letter..'</span>') else table.insert(azlist,' <br /><span class="large-cat-toc-anum">'..letter..'</span>') end for i, v in ipairs(letterlist) do local lead = (i == 1) and '&nbsp;' or ' ' -- non-breaking space before the first link table.insert(azlist, string.format( '%s[%s?from=%s%s %s%s]', lead, pageurl, letter, v, letter, v )) end return table.concat(azlist) end for _, v in ipairs(azupper) do table.insert(body_content, atoz(v)) end body_wrapper:wikitext(table.concat(body_content)) return '__NOTOC__\n' .. mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Large category TOC/styles.css' } } .. tostring(toc_frame) end function p.scrollable(frame) return main('scrollable') end function p.collapsible(frame) return main('collapsible') end function p.aejot(frame) return main('aejot') end return p 2hh8f24w01cysa7sydllw8noadml5s5 117107 117106 2026-07-16T11:39:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Large_category_TOC]] 117106 Scribunto text/plain local p = {} local azupper = mw.text.split('ABCDEFGHIJKLMNOPQRSTUVWXYZ','') local azlower = mw.text.split('abcdefghijklmnopqrstuvwxyz','') local aejot = mw.text.split('aejot','') local function main(toc_type) local toc_frame = mw.html.create('div') :addClass('large-cat-toc') :addClass('plainlinks') :addClass('toc') -- :attr('id','toc') -- Contains "Content: Top 0-9 A - Z" local header = toc_frame:tag('div') :attr('class', 'toctitle') -- Contains all the rest local body_wrapper local body = toc_frame:tag('div') :addClass('large-cat-toc-body') local jumpy_collapse = mw.html.create('div') :addClass('large-cat-toc-jumpy-title') if toc_type == 'collapsible' then toc_frame:addClass('mw-collapsible mw-collapsed') body:addClass('mw-collapsible-content') elseif toc_type == 'scrollable' then toc_frame:addClass('large-cat-toc-scroll') end local pageurl = mw.title.getCurrentTitle():fullUrl() local header_content = { string.format( '<span class="large-cat-toc-title">%s:</span> [%s Top] [%s?from=0 0–9]', mw.message.new('Toc'):plain(), pageurl, pageurl ) } for _, v in ipairs(azupper) do table.insert(header_content, string.format( ' [%s?from=%s %s]', pageurl, v, v )) end if toc_type == 'collapsible' then jumpy_collapse:wikitext(table.concat(header_content)) header:node(jumpy_collapse) else header:wikitext(table.concat(header_content)) end local body_content = {} if toc_type ~= 'collapsible' then table.insert(body_content, ' <span class="large-cat-toc-anum">['..pageurl..'?from=* *]</span>') end table.insert(body_content, ' <span class="large-cat-toc-anum">#</span>') body_wrapper = body:tag('span') for i=0,9 do table.insert(body_content,string.format(' [%s?from=%s %s]',pageurl,i,i)) end local function atoz(letter) local azlist = {} local letterlist if toc_type == 'aejot' then letterlist = aejot else letterlist = azlower end if toc_type == 'aejot' or toc_type == 'scrollable' then table.insert(azlist,' • <span class="large-cat-toc-anum">'..letter..'</span>') else table.insert(azlist,' <br /><span class="large-cat-toc-anum">'..letter..'</span>') end for i, v in ipairs(letterlist) do local lead = (i == 1) and '&nbsp;' or ' ' -- non-breaking space before the first link table.insert(azlist, string.format( '%s[%s?from=%s%s %s%s]', lead, pageurl, letter, v, letter, v )) end return table.concat(azlist) end for _, v in ipairs(azupper) do table.insert(body_content, atoz(v)) end body_wrapper:wikitext(table.concat(body_content)) return '__NOTOC__\n' .. mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Large category TOC/styles.css' } } .. tostring(toc_frame) end function p.scrollable(frame) return main('scrollable') end function p.collapsible(frame) return main('collapsible') end function p.aejot(frame) return main('aejot') end return p 2hh8f24w01cysa7sydllw8noadml5s5 Template:Single namespace 10 33371 117010 86131 2025-08-04T23:24:15Z en>Theknightwho 0 Avoid displaying template guts on the template's page. 117010 wikitext text/x-wiki <includeonly>{{safesubst:<noinclude/>{{{1}}} other|{{safesubst:<noinclude/>#if:{{{2|}}}|{{{2}}}}}|{{safesubst:<noinclude/>Incorrect namespace|{{{1}}}|nocat={{{nocat|}}}|category={{{category|¬}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 01lhtyimo3nd7hhkd1c78c9wlwps9mi 117011 117010 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Single_namespace]] 117010 wikitext text/x-wiki <includeonly>{{safesubst:<noinclude/>{{{1}}} other|{{safesubst:<noinclude/>#if:{{{2|}}}|{{{2}}}}}|{{safesubst:<noinclude/>Incorrect namespace|{{{1}}}|nocat={{{nocat|}}}|category={{{category|¬}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 01lhtyimo3nd7hhkd1c78c9wlwps9mi Template:Auto category TOC 10 33373 117116 86139 2024-05-07T07:06:54Z en>EmausBot 0 Bot: Fixing double redirect to [[Template:Automatic category TOC]] 117116 wikitext text/x-wiki #REDIRECT [[Template:Automatic category TOC]] {{Redirect category shell| {{R from move}} }} flwxvl44lq5fraqekkqblentr7whc9z 117117 117116 2026-07-16T11:39:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Auto_category_TOC]] 117116 wikitext text/x-wiki #REDIRECT [[Template:Automatic category TOC]] {{Redirect category shell| {{R from move}} }} flwxvl44lq5fraqekkqblentr7whc9z Template:Maintenance category 10 33573 117020 86551 2026-04-24T23:43:17Z en>FlightTime 0 Update lnk trgt(s) 117020 wikitext text/x-wiki __EXPECTUNUSEDCATEGORY____NOINDEX__ {{Cmbox |type=notice | image = [[File:Twemoji 1f527.svg|35px|link=|alt=]] |text=<div>This is an '''[[Wikipedia:Categorization#Wikipedia administrative categories|administrative category]]''', used for maintenance of the Wikipedia project. It is not part of the encyclopedia and contains [[Wikipedia:What is an article?|non-article pages]], or groups articles by status rather than subject. Do not include this category in content categories (except for [[Wikipedia:Categorization#Eponymous categories|eponymous]] maintenance categories).</div>{{#if: {{Yesno|{{{container|}}}}} | <div>This is a '''[[:Category:Container categories|container category]]'''. Due to its scope, '''it should only contain [[WP:SUBCAT|subcategories]]'''.</div>{{#ifeq: {{{container_category|}}} | no | | {{Category other|{{{category|[[Category:Container categories]]}}}}} }} }}{{#if: {{Yesno|{{{tracking|}}}}} | __HIDDENCAT__ <div>This is a '''[[:Category:Tracking categories|tracking category]]'''. It builds and maintains a list of pages primarily for the sake of the list itself. They are not part of the '''[[Wikipedia:Categorization|encyclopedia's categorization scheme]]'''.</div> {{#if: {{{purpose|}}}{{{description|}}} | <div>{{{purpose|{{{description}}}}}}</div> }}<div> * This category is '''[[Wikipedia:Categorization#Hiding categories|hidden]]''' on its [[:Category:Hidden categories|member pages]]&mdash;unless the corresponding [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. * These categories can be used to track, build and organize lists of pages needing "attention ''en masse''" (for example, pages using deprecated syntax), or that may need to be edited at someone's earliest convenience. * These categories also serve to aggregate members of several lists or sub-categories into a larger, more efficient list (''discriminated by classifications'').</div>{{#ifeq: {{{tracking_category|}}} | no | | {{Category other|{{{category|[[Category:Tracking categories]]}}}}} }} | {{#if: {{Yesno|{{{hidden|}}}}} | __HIDDENCAT__ <div>This is a '''[[:Category:Hidden categories|hidden category]]'''. It is not shown on its member pages, unless the corresponding [[Special:Preferences#mw-prefsection-rendering|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set.</div> }} }}{{#if: {{Yesno|{{{empty|}}}}} | {{Possibly empty category|hide=true}} <div><span class="sysop-show" style="font-size:15px;">'''Administrators: Please do not delete this category even if it is empty!'''</span> This category may be empty occasionally or even most of the time. {{{empty_text|}}}</div> }}{{#if: {{Yesno|{{{polluted|}}}}} | {{Polluted category}} }} |imageright={{#if: {{{shortcut|{{{shortcut1|}}}}}} | {{Shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}} }} }}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}} | false | {{Single namespace|category}}{{#if: {{{desc|}}}{{{1|}}} | <div>{{{alt|{{{ALTTEXT|'''Description''':}}}}}} {{{desc|{{{1|}}}}}}</div> }} | <!-- Category suppressed --> }}</includeonly><noinclude>{{Documentation}}<!-- Please add categories to the /doc sub-page, not here. --></noinclude> qd96tidz40npvmg4udc06mkvpsefuzi 117021 117020 2026-07-16T11:37:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Maintenance_category]] 117020 wikitext text/x-wiki __EXPECTUNUSEDCATEGORY____NOINDEX__ {{Cmbox |type=notice | image = [[File:Twemoji 1f527.svg|35px|link=|alt=]] |text=<div>This is an '''[[Wikipedia:Categorization#Wikipedia administrative categories|administrative category]]''', used for maintenance of the Wikipedia project. It is not part of the encyclopedia and contains [[Wikipedia:What is an article?|non-article pages]], or groups articles by status rather than subject. Do not include this category in content categories (except for [[Wikipedia:Categorization#Eponymous categories|eponymous]] maintenance categories).</div>{{#if: {{Yesno|{{{container|}}}}} | <div>This is a '''[[:Category:Container categories|container category]]'''. Due to its scope, '''it should only contain [[WP:SUBCAT|subcategories]]'''.</div>{{#ifeq: {{{container_category|}}} | no | | {{Category other|{{{category|[[Category:Container categories]]}}}}} }} }}{{#if: {{Yesno|{{{tracking|}}}}} | __HIDDENCAT__ <div>This is a '''[[:Category:Tracking categories|tracking category]]'''. It builds and maintains a list of pages primarily for the sake of the list itself. They are not part of the '''[[Wikipedia:Categorization|encyclopedia's categorization scheme]]'''.</div> {{#if: {{{purpose|}}}{{{description|}}} | <div>{{{purpose|{{{description}}}}}}</div> }}<div> * This category is '''[[Wikipedia:Categorization#Hiding categories|hidden]]''' on its [[:Category:Hidden categories|member pages]]&mdash;unless the corresponding [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. * These categories can be used to track, build and organize lists of pages needing "attention ''en masse''" (for example, pages using deprecated syntax), or that may need to be edited at someone's earliest convenience. * These categories also serve to aggregate members of several lists or sub-categories into a larger, more efficient list (''discriminated by classifications'').</div>{{#ifeq: {{{tracking_category|}}} | no | | {{Category other|{{{category|[[Category:Tracking categories]]}}}}} }} | {{#if: {{Yesno|{{{hidden|}}}}} | __HIDDENCAT__ <div>This is a '''[[:Category:Hidden categories|hidden category]]'''. It is not shown on its member pages, unless the corresponding [[Special:Preferences#mw-prefsection-rendering|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set.</div> }} }}{{#if: {{Yesno|{{{empty|}}}}} | {{Possibly empty category|hide=true}} <div><span class="sysop-show" style="font-size:15px;">'''Administrators: Please do not delete this category even if it is empty!'''</span> This category may be empty occasionally or even most of the time. {{{empty_text|}}}</div> }}{{#if: {{Yesno|{{{polluted|}}}}} | {{Polluted category}} }} |imageright={{#if: {{{shortcut|{{{shortcut1|}}}}}} | {{Shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}} }} }}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}} | false | {{Single namespace|category}}{{#if: {{{desc|}}}{{{1|}}} | <div>{{{alt|{{{ALTTEXT|'''Description''':}}}}}} {{{desc|{{{1|}}}}}}</div> }} | <!-- Category suppressed --> }}</includeonly><noinclude>{{Documentation}}<!-- Please add categories to the /doc sub-page, not here. --></noinclude> qd96tidz40npvmg4udc06mkvpsefuzi Template:Large category TOC/tracking 10 34194 117104 87656 2024-06-28T10:06:39Z en>WOSlinker 0 fix tracking 117104 wikitext text/x-wiki <includeonly><!-- ############################################################################ # NOTE: The sort key {{PAGENAME}} is used on all these tracking categories # # to override any {{DEFAULTSORT}} used in the category # ############################################################################ -->{{#ifexpr: {{{pagecount|}}} <= 20000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 10000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 5000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 2000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 1200<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 0<!-- -->|[[Category:Template Large category TOC on pages where PAGESINCATEGORY returns zero|{{PAGENAME}}]]<!-- -->|[[Category:Template Large category TOC on category with up to 1200 pages|{{PAGENAME}}]]<!-- -->}}<!-- -->|<!-- # 1,201–2,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 1,201–2,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 2,001–5,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 2,001–5,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 5,001–10,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 5,001–10,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 10,001–20,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 10,001–20,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 20,000 or more pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with over 20,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}</includeonly><!-- --><noinclude><!-- -->{{documentation|content=This is a sub-template for [[Template:{{ROOTPAGENAME}}]]. All the tracking is done via this template. == See also == * [[:Template:Category TOC/tracking]] }}<!-- <!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> p017nsxv72ajdf7g5pmpsjnofcorf2g 117105 117104 2026-07-16T11:39:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Large_category_TOC/tracking]] 117104 wikitext text/x-wiki <includeonly><!-- ############################################################################ # NOTE: The sort key {{PAGENAME}} is used on all these tracking categories # # to override any {{DEFAULTSORT}} used in the category # ############################################################################ -->{{#ifexpr: {{{pagecount|}}} <= 20000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 10000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 5000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 2000<!-- -->|<!-- -->{{#ifexpr: {{{pagecount|}}} <= 1200<!-- -->|{{#ifexpr: {{{pagecount|}}} <= 0<!-- -->|[[Category:Template Large category TOC on pages where PAGESINCATEGORY returns zero|{{PAGENAME}}]]<!-- -->|[[Category:Template Large category TOC on category with up to 1200 pages|{{PAGENAME}}]]<!-- -->}}<!-- -->|<!-- # 1,201–2,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 1,201–2,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 2,001–5,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 2,001–5,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 5,001–10,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 5,001–10,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 10,001–20,000 pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with 10,001–20,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}<!-- -->|<!-- # 20,000 or more pages -->{{#ifeq: {{{CatAutoTOC|}}} |yes<!-- -->|[[Category:Template Large category TOC via Automatic category TOC on category with over 20,000 pages|{{PAGENAME}}]]<!-- -->|[[Category:Categories which use Large category TOC without Automatic category TOC|{{PAGENAME}}]]<!-- -->}}<!-- -->}}</includeonly><!-- --><noinclude><!-- -->{{documentation|content=This is a sub-template for [[Template:{{ROOTPAGENAME}}]]. All the tracking is done via this template. == See also == * [[:Template:Category TOC/tracking]] }}<!-- <!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> p017nsxv72ajdf7g5pmpsjnofcorf2g Module:Sidebar 828 36860 116702 114903 2025-12-29T18:10:22Z en>Ahecht 0 Re-add optimizations for child=yes (avoid duplicated templatestyles and categories). Implement :attr('role', 'navigation') per edit request on talk page. 116702 Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function detectChild(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.templatestyles.plainlist) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.templatestyles.hlist) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles.hlist} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gmatch = string.gmatch local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gmatch(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleClass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :attr('role', 'navigation') :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end local hasChild = false for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then local baseContentClass = cfg.i18n.class.content if detectChild(content) then baseContentClass = cfg.i18n.class.content_with_subgroup hasChild = true end root :tag('tr') :tag('td') :addClass(baseContentClass) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = '' if not child then base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles.sidebar } } end local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (hasChild and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText('color: var(--color-base)') :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 4esitsmrbrm92s3g3av1dblfso2ifay 116703 116702 2026-07-15T17:38:39Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Sidebar]] 116702 Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function detectChild(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.templatestyles.plainlist) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.templatestyles.hlist) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles.hlist} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gmatch = string.gmatch local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gmatch(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleClass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :attr('role', 'navigation') :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end local hasChild = false for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then local baseContentClass = cfg.i18n.class.content if detectChild(content) then baseContentClass = cfg.i18n.class.content_with_subgroup hasChild = true end root :tag('tr') :tag('td') :addClass(baseContentClass) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = '' if not child then base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles.sidebar } } end local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (hasChild and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText('color: var(--color-base)') :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 4esitsmrbrm92s3g3av1dblfso2ifay Template:Backlog 10 38627 117198 96164 2025-11-17T22:04:46Z en>Jonesey95 0 fixed 60px size to be more consistent with similar templates; see talk 117198 wikitext text/x-wiki {{Category other|{{CatTrack}}|}}{{#ifeq:{{yesno|{{{disabled|no}}}}}|yes||{{#ifexpr:{{PAGESINCATEGORY:{{PAGENAME}}|R}} < {{{1|0}}} | {{#ifeq:{{yesno|{{{silent|no}}}}}|yes|| {{cmbox <!-- Cmbox since autoreport is only for category pages. --> | image = [[File:Less busy desk red.svg|frameless|60px|link=|alt=]] | textstyle = text-align: center; | text = If this category has {{#ifeq:{{{2|{{{1|}}}}}} | 1 | any items | {{{2|{{{1|}}}}}} {{plural:{{{2|{{{1|}}}}}}|item|items}} or more }}, it will be reported as {{#ifeq:{{yesno|{{{admin|no}}}}}|yes|an [[{{{backloglink|:Category:Administrative backlog}}}|administrative backlog]]|a [[{{{backloglink|:Category:Wikipedia backlog}}}|backlog]]}}. <small>({{purge|recount}})</small> }} }} | {{mbox | demospace = {{{demospace|}}} <!-- For the examples in the /doc. --> | type = style | style = text-align: center; | image = [[File:Busy desk red.svg|frameless|60px|link=|alt=]] | text = {{{page|This {{#ifeq:{{NAMESPACE}}|Category|category|page}}}}} has {{#ifeq:{{yesno|{{{admin|no}}}}}|yes|an '''[[{{{backloglink|:Category:Administrative backlog}}}|administrative backlog]]''' that requires the attention of willing administrators|a '''[[{{{backloglink|:Category:Wikipedia backlog}}}|backlog]]''' that requires the attention of willing editors}}.<br />{{{message|{{ #if:{{{1|}}} | ''This notice will hide itself when this category has {{plural:{{{2|{{{1|}}}}}}|no|fewer than {{{2|{{{1|}}}}}}}} items.'' <small>({{purge|recount}})</small> | {{#if:{{{bot|{{yesno|{{{auto|no}}}}}}}}<!-- If given any bot param, return the first case. If not, look at the auto param. If the auto param is truthy, also return the first case. Otherwise, default to the second case.--> |<small>This notice {{#if:{{{bot|}}}|will be automatically removed by [[User:{{{bot}}}|{{{bot}}}]] ([[User talk:{{{bot}}}|talk]])|will automatically hide itself}} when the backlog is cleared.</small> | {{#if:{{yesno|{{{remove|yes}}}}} |''Please remove this notice when the backlog is cleared.'' |''Please replace this notice with {{t|no {{#if:{{yesno|{{{admin|no}}}}}|admin}} backlog}} when the backlog is cleared.'' }} }} }}}}} }}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}} | false | {{#ifeq:{{SUBJECTSPACE}}|{{ns:user}} | <!-- Don't categorise when on user or user talk pages. --> | {{{category |{{#ifeq:{{yesno|{{{admin|no}}}}}|yes |[[Category:Administrative backlog|{{PAGENAME}}]] |[[Category:Wikipedia backlog|{{PAGENAME}}]] }} }}} }} |<!-- Category suppressed by nocat -->}}</includeonly> }} }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwikis go to wikidata --> </noinclude> qrwdv76vnq8y0mfska3uf2diqv78vx8 117199 117198 2026-07-16T11:41:16Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Backlog]] 117198 wikitext text/x-wiki {{Category other|{{CatTrack}}|}}{{#ifeq:{{yesno|{{{disabled|no}}}}}|yes||{{#ifexpr:{{PAGESINCATEGORY:{{PAGENAME}}|R}} < {{{1|0}}} | {{#ifeq:{{yesno|{{{silent|no}}}}}|yes|| {{cmbox <!-- Cmbox since autoreport is only for category pages. --> | image = [[File:Less busy desk red.svg|frameless|60px|link=|alt=]] | textstyle = text-align: center; | text = If this category has {{#ifeq:{{{2|{{{1|}}}}}} | 1 | any items | {{{2|{{{1|}}}}}} {{plural:{{{2|{{{1|}}}}}}|item|items}} or more }}, it will be reported as {{#ifeq:{{yesno|{{{admin|no}}}}}|yes|an [[{{{backloglink|:Category:Administrative backlog}}}|administrative backlog]]|a [[{{{backloglink|:Category:Wikipedia backlog}}}|backlog]]}}. <small>({{purge|recount}})</small> }} }} | {{mbox | demospace = {{{demospace|}}} <!-- For the examples in the /doc. --> | type = style | style = text-align: center; | image = [[File:Busy desk red.svg|frameless|60px|link=|alt=]] | text = {{{page|This {{#ifeq:{{NAMESPACE}}|Category|category|page}}}}} has {{#ifeq:{{yesno|{{{admin|no}}}}}|yes|an '''[[{{{backloglink|:Category:Administrative backlog}}}|administrative backlog]]''' that requires the attention of willing administrators|a '''[[{{{backloglink|:Category:Wikipedia backlog}}}|backlog]]''' that requires the attention of willing editors}}.<br />{{{message|{{ #if:{{{1|}}} | ''This notice will hide itself when this category has {{plural:{{{2|{{{1|}}}}}}|no|fewer than {{{2|{{{1|}}}}}}}} items.'' <small>({{purge|recount}})</small> | {{#if:{{{bot|{{yesno|{{{auto|no}}}}}}}}<!-- If given any bot param, return the first case. If not, look at the auto param. If the auto param is truthy, also return the first case. Otherwise, default to the second case.--> |<small>This notice {{#if:{{{bot|}}}|will be automatically removed by [[User:{{{bot}}}|{{{bot}}}]] ([[User talk:{{{bot}}}|talk]])|will automatically hide itself}} when the backlog is cleared.</small> | {{#if:{{yesno|{{{remove|yes}}}}} |''Please remove this notice when the backlog is cleared.'' |''Please replace this notice with {{t|no {{#if:{{yesno|{{{admin|no}}}}}|admin}} backlog}} when the backlog is cleared.'' }} }} }}}}} }}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}} | false | {{#ifeq:{{SUBJECTSPACE}}|{{ns:user}} | <!-- Don't categorise when on user or user talk pages. --> | {{{category |{{#ifeq:{{yesno|{{{admin|no}}}}}|yes |[[Category:Administrative backlog|{{PAGENAME}}]] |[[Category:Wikipedia backlog|{{PAGENAME}}]] }} }}} }} |<!-- Category suppressed by nocat -->}}</includeonly> }} }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwikis go to wikidata --> </noinclude> qrwdv76vnq8y0mfska3uf2diqv78vx8 Template:Progression 10 38747 117152 96409 2026-04-21T02:24:53Z en>Oklopfer 0 add param to show estimate text 117152 wikitext text/x-wiki <includeonly><templatestyles src="Progression/styles.css"/><table role="presentation" class="progression" {{#if:{{{width|}}}|style="width: {{{width}}}"}}> <tr> <td class="progression-header">{{#if:{{{task|}}}|{{{task|}}}:&#32;}}<span>{{formatnum:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round {{{decimal|1}}}}}}}}}%</span>{{#if:{{yesno|{{{hidecomplete|}}}}}||&#32;complete{{#if:{{yesno|{{{estimate|}}}}}|<small>&#32;(estimate)</small>}}}} </td></tr> <tr><td><table role="progressbar" class="progression-bar" aria-valuenow="{{{1|0}}}" aria-valuemax="{{{2|{{{total|100}}}}}}"> <tr>{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| |<td class="progression-done" {{#ifexpr:({{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}}}}}<1)|style="width: 1%"|{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|style="width: {{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round 1}}}}%"}}></td>}}{{#ifeq:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}}}}}|100||<td class="progression-undone"></td>}} </tr></table></td></tr></table></includeonly><noinclude> {{documentation}} </noinclude> esxx9g9nrf2726u2ihjwajrfmt6vls5 117153 117152 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Progression]] 117152 wikitext text/x-wiki <includeonly><templatestyles src="Progression/styles.css"/><table role="presentation" class="progression" {{#if:{{{width|}}}|style="width: {{{width}}}"}}> <tr> <td class="progression-header">{{#if:{{{task|}}}|{{{task|}}}:&#32;}}<span>{{formatnum:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round {{{decimal|1}}}}}}}}}%</span>{{#if:{{yesno|{{{hidecomplete|}}}}}||&#32;complete{{#if:{{yesno|{{{estimate|}}}}}|<small>&#32;(estimate)</small>}}}} </td></tr> <tr><td><table role="progressbar" class="progression-bar" aria-valuenow="{{{1|0}}}" aria-valuemax="{{{2|{{{total|100}}}}}}"> <tr>{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| |<td class="progression-done" {{#ifexpr:({{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}}}}}<1)|style="width: 1%"|{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|style="width: {{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round 1}}}}%"}}></td>}}{{#ifeq:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}}}}}|100||<td class="progression-undone"></td>}} </tr></table></td></tr></table></includeonly><noinclude> {{documentation}} </noinclude> esxx9g9nrf2726u2ihjwajrfmt6vls5 Template:Progression/styles.css 10 38748 117154 96411 2026-05-27T05:22:11Z en>Oklopfer 0 import mobile repair from sandbox 117154 sanitized-css text/css /* {{pp-template}} */ .progression { width: 50%; margin: 0 auto; background: transparent; } .progression-header { text-align: center; } .progression-header > span { font-size: 120%; font-weight: bold; } .progression-bar { border: 1px solid var( --border-color-subtle, #c8ccd1 ); height: 10px; width: 100%; border-spacing: 1px; } .progression-done { background: #00af32; } .progression-undone { background: var( --background-color-neutral, #eaecf0 ); } @media (max-width: 639px) { .progression, .progression-bar { display: table; } } ij2vo1rlfs6dh6fpqq9zqc9gtwnw583 117155 117154 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Progression/styles.css]] 117154 sanitized-css text/css /* {{pp-template}} */ .progression { width: 50%; margin: 0 auto; background: transparent; } .progression-header { text-align: center; } .progression-header > span { font-size: 120%; font-weight: bold; } .progression-bar { border: 1px solid var( --border-color-subtle, #c8ccd1 ); height: 10px; width: 100%; border-spacing: 1px; } .progression-done { background: #00af32; } .progression-undone { background: var( --background-color-neutral, #eaecf0 ); } @media (max-width: 639px) { .progression, .progression-bar { display: table; } } ij2vo1rlfs6dh6fpqq9zqc9gtwnw583 Template:Backlog progress bar 10 38767 117158 96455 2026-04-21T02:32:42Z en>Oklopfer 0 allow estimate tagging 117158 wikitext text/x-wiki <includeonly> <!-- {{Backlog progress bar}} -->{| style="width: 100%; background-color: var(--background-color-base, #fff); color: var( --color-base, #202122 ); border: 1px solid var(--border-color-base, #a2a9b1)" | align="center" | {{progression|{{#expr:{{{initial|500}}}-{{<!--- subst: --->PAGESINCATEGORY:{{{category|Articles that need to be wikified from February 2011}}}|R}}}}|{{#expr:{{{initial|500}}}-{{{goal|0}}}}}|estimate={{{estimate|}}}}} '''Backlog:''' [[:Category:{{{category|}}}|{{{category|}}}]]<br/> '''Goal:''' {{formatnum:{{{goal|0}}}}} {{{unit|articles}}}<br/> '''Current:''' {{<!--- subst: --->PAGESINCATEGORY:{{{category|}}}}} {{{unit|articles}}}<br/> '''Initial:''' {{formatnum:{{{initial|500}}}}} {{{unit|articles}}} <br/> <small>{{purge|(Refresh)}}</small> |}</includeonly><noinclude> {{Documentation}} </noinclude> a1ctmn9ipzxdux2dz2pm3t8t6rgm3zl 117159 117158 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Backlog_progress_bar]] 117158 wikitext text/x-wiki <includeonly> <!-- {{Backlog progress bar}} -->{| style="width: 100%; background-color: var(--background-color-base, #fff); color: var( --color-base, #202122 ); border: 1px solid var(--border-color-base, #a2a9b1)" | align="center" | {{progression|{{#expr:{{{initial|500}}}-{{<!--- subst: --->PAGESINCATEGORY:{{{category|Articles that need to be wikified from February 2011}}}|R}}}}|{{#expr:{{{initial|500}}}-{{{goal|0}}}}}|estimate={{{estimate|}}}}} '''Backlog:''' [[:Category:{{{category|}}}|{{{category|}}}]]<br/> '''Goal:''' {{formatnum:{{{goal|0}}}}} {{{unit|articles}}}<br/> '''Current:''' {{<!--- subst: --->PAGESINCATEGORY:{{{category|}}}}} {{{unit|articles}}}<br/> '''Initial:''' {{formatnum:{{{initial|500}}}}} {{{unit|articles}}} <br/> <small>{{purge|(Refresh)}}</small> |}</includeonly><noinclude> {{Documentation}} </noinclude> a1ctmn9ipzxdux2dz2pm3t8t6rgm3zl Template:Force singular 10 39207 117114 97393 2025-11-06T18:00:13Z en>MusikBot II 0 Changed protection settings for "[[Template:Force singular]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2728 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) 97392 wikitext text/x-wiki <span style="display:none" data-plural="0"></span><noinclude> {{documentation}} </noinclude> ewzg4ka7f7yytuobvjjcuhlzqnkigmb 117115 117114 2026-07-16T11:39:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Force_singular]] 97392 wikitext text/x-wiki <span style="display:none" data-plural="0"></span><noinclude> {{documentation}} </noinclude> ewzg4ka7f7yytuobvjjcuhlzqnkigmb Template:Navbox documentation 10 39477 116796 98035 2026-04-20T00:10:29Z en>Chaotic Enby 0 Reverted edits by [[Special:Contribs/Chaotic Enby|Chaotic Enby]] ([[User talk:Chaotic Enby|talk]]) to last version by Danny 1994 116796 wikitext text/x-wiki <div style="border: 2px dashed #666666;"><div style="margin: 3em;"><onlyinclude>{{documentation | 1 = Template:Navbox documentation | content = {{{hatnotes|}}} {{Template display|nomobile}} {{{intro|{{{2|}}}}}} This is a [[Wikipedia:Navigation template|navigational template]] created using {{template link|navbox}}. It can be [[Help:Transclusion|transcluded]] on pages by placing <code><nowiki>{{</nowiki>{{{template|{{PAGENAME}}}}}<nowiki>}}</nowiki></code> below the [[Wikipedia:Manual of Style/Layout#Standard appendices and footers|standard article appendices]] and above [[WP:CAT|categories]]. {{#if:{{{stateless|}}}|| ==Initial visibility== {{Collapsible option|parameter_name={{{parameter_name|state}}}|default={{{1|{{{state|autocollapse}}}}}}|nobase={{{nobase|}}}}} {{Navbox visibility}} ==TemplateData== <templatedata> { "params": { "state": { "label": "State", "description": "The initial visibility of the navbox", "suggestedvalues": [ "collapsed", "expanded", "autocollapse" ], "suggested": true, "type": "string" } }, "description": "A navigational box that can be placed at the bottom of articles." } </templatedata> }} ==Template transclusions== {{Check completeness of transclusions}} {{{3|}}} }}</onlyinclude></div></div><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage --> </noinclude> 4r6wliorrn5vdrufwjfhooc9ciswymw 116797 116796 2026-07-15T19:07:02Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Navbox_documentation]] 116796 wikitext text/x-wiki <div style="border: 2px dashed #666666;"><div style="margin: 3em;"><onlyinclude>{{documentation | 1 = Template:Navbox documentation | content = {{{hatnotes|}}} {{Template display|nomobile}} {{{intro|{{{2|}}}}}} This is a [[Wikipedia:Navigation template|navigational template]] created using {{template link|navbox}}. It can be [[Help:Transclusion|transcluded]] on pages by placing <code><nowiki>{{</nowiki>{{{template|{{PAGENAME}}}}}<nowiki>}}</nowiki></code> below the [[Wikipedia:Manual of Style/Layout#Standard appendices and footers|standard article appendices]] and above [[WP:CAT|categories]]. {{#if:{{{stateless|}}}|| ==Initial visibility== {{Collapsible option|parameter_name={{{parameter_name|state}}}|default={{{1|{{{state|autocollapse}}}}}}|nobase={{{nobase|}}}}} {{Navbox visibility}} ==TemplateData== <templatedata> { "params": { "state": { "label": "State", "description": "The initial visibility of the navbox", "suggestedvalues": [ "collapsed", "expanded", "autocollapse" ], "suggested": true, "type": "string" } }, "description": "A navigational box that can be placed at the bottom of articles." } </templatedata> }} ==Template transclusions== {{Check completeness of transclusions}} {{{3|}}} }}</onlyinclude></div></div><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage --> </noinclude> 4r6wliorrn5vdrufwjfhooc9ciswymw Template:Wikipedia category 10 39779 117018 98697 2024-06-22T03:34:52Z en>SilverLocust 0 Remove inapplicable redirect category per [[Template talk:Maintenance category#Template-protected edit request on 21 June 2024|edit request]] 117018 wikitext text/x-wiki #REDIRECT [[Template:Maintenance category]] {{Rcat shell| {{R from move}} }} syc9hyokfzjd0pbn5y89iw5xfvsdy23 117019 117018 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Wikipedia_category]] 117018 wikitext text/x-wiki #REDIRECT [[Template:Maintenance category]] {{Rcat shell| {{R from move}} }} syc9hyokfzjd0pbn5y89iw5xfvsdy23 Template:Tracking category 10 39786 117112 98711 2026-04-18T04:08:49Z en>Pppery 0 Changed protection settings for "[[Template:Tracking category]]" ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 117112 wikitext text/x-wiki {{Cmbox | type = notice | image = [[File:Category.svg|80px|alt=|link=]] | text =<div style="text-align: center; font-size: larger; font-weight: bold; width: 87%; margin: 0px auto 0px 0px">This is a [[:Category:Tracking categories|tracking category]]{{#if:{{{template|}}}|<br />for the template {{tl|{{{template}}}}}|}}.</div>''It is used to build and maintain a list or lists of pages{{#if:{{{template|}}}|&#32;that use {{tl|{{{template}}}}}|}}&mdash;primarily for the sake of the lists themselves and their use in article and category maintenance. It is not part of the '''[[Wikipedia:Categorization|encyclopedia's categorization scheme]]'''.''{{#if:{{{text|}}}|<br />{{{text|}}}}}__HIDDENCAT__ {{Hidden begin|title=More information:|style=width:95%;margin:auto;font-size:100%}} * This category is '''[[Wikipedia:Categorization#Hiding categories|hidden]]''' on its [[:Category:Hidden categories|member pages]]&mdash;unless the corresponding [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. * These categories are used to track, build and organize lists of pages needing "attention ''en masse''" (for example, pages using deprecated syntax), or that may need to be edited at someone's earliest convenience. * These categories also serve to aggregate members of several lists or subcategories into a larger, more efficient list (''discriminated by classifications''). * Typically, tracking categories are automatically populated by templates invoked in pages or by the MediaWiki software (see [[Special:TrackingCategories]] for an overview of the latter). {{Hidden end}}}} {{#ifeq:{{{container}}}|yes|{{Cmbox | type = notice | text = This is a '''[[:Category:Container categories|container category]]'''. Due to its scope, it should contain ''only'' '''[[Wikipedia:Categorization#Subcategorization|subcategories]]'''. <includeonly>{{Category other|[[Category:Container categories]]}}</includeonly>}}{{#if:{{{1|}}}|<p>{{{1}}}</p>|}} }} {{#if: {{{delete-empty|}}} | {{#ifeq: {{{delete-empty}}} | yes | | {{Possibly empty category}} }} | {{Possibly empty category}} }} <includeonly>{{Single namespace|category|{{#ifeq:{{{category|}}}|no||{{{category|[[Category:Tracking categories]] __NOGALLERY__}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> f5dd5ggczcy3gd7uxo133xjvn5jnlem 117113 117112 2026-07-16T11:39:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Tracking_category]] 117112 wikitext text/x-wiki {{Cmbox | type = notice | image = [[File:Category.svg|80px|alt=|link=]] | text =<div style="text-align: center; font-size: larger; font-weight: bold; width: 87%; margin: 0px auto 0px 0px">This is a [[:Category:Tracking categories|tracking category]]{{#if:{{{template|}}}|<br />for the template {{tl|{{{template}}}}}|}}.</div>''It is used to build and maintain a list or lists of pages{{#if:{{{template|}}}|&#32;that use {{tl|{{{template}}}}}|}}&mdash;primarily for the sake of the lists themselves and their use in article and category maintenance. It is not part of the '''[[Wikipedia:Categorization|encyclopedia's categorization scheme]]'''.''{{#if:{{{text|}}}|<br />{{{text|}}}}}__HIDDENCAT__ {{Hidden begin|title=More information:|style=width:95%;margin:auto;font-size:100%}} * This category is '''[[Wikipedia:Categorization#Hiding categories|hidden]]''' on its [[:Category:Hidden categories|member pages]]&mdash;unless the corresponding [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. * These categories are used to track, build and organize lists of pages needing "attention ''en masse''" (for example, pages using deprecated syntax), or that may need to be edited at someone's earliest convenience. * These categories also serve to aggregate members of several lists or subcategories into a larger, more efficient list (''discriminated by classifications''). * Typically, tracking categories are automatically populated by templates invoked in pages or by the MediaWiki software (see [[Special:TrackingCategories]] for an overview of the latter). {{Hidden end}}}} {{#ifeq:{{{container}}}|yes|{{Cmbox | type = notice | text = This is a '''[[:Category:Container categories|container category]]'''. Due to its scope, it should contain ''only'' '''[[Wikipedia:Categorization#Subcategorization|subcategories]]'''. <includeonly>{{Category other|[[Category:Container categories]]}}</includeonly>}}{{#if:{{{1|}}}|<p>{{{1}}}</p>|}} }} {{#if: {{{delete-empty|}}} | {{#ifeq: {{{delete-empty}}} | yes | | {{Possibly empty category}} }} | {{Possibly empty category}} }} <includeonly>{{Single namespace|category|{{#ifeq:{{{category|}}}|no||{{{category|[[Category:Tracking categories]] __NOGALLERY__}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> f5dd5ggczcy3gd7uxo133xjvn5jnlem Template:Hidden category 10 39788 117242 98715 2025-05-06T21:29:04Z en>Andrybak 0 use [[MediaWiki:prefs-rendering]] and [[MediaWiki:tog-showhiddencats]] 117242 wikitext text/x-wiki __HIDDENCAT__{{cmbox | type = notice | textstyle = text-align: center; | text = This category is [[:Category:Hidden categories|not shown]] on its member pages unless the appropriate [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> rl66m1sddtd7k2mrcs6kid5um31d0qf 117243 117242 2026-07-16T11:42:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hidden_category]] 117242 wikitext text/x-wiki __HIDDENCAT__{{cmbox | type = notice | textstyle = text-align: center; | text = This category is [[:Category:Hidden categories|not shown]] on its member pages unless the appropriate [[Special:Preferences#mw-input-wpshowhiddencats|user preference]] ({{int:prefs-rendering}} → {{int:tog-showhiddencats}}) is set. }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> rl66m1sddtd7k2mrcs6kid5um31d0qf Category:Articles with hCards 14 41867 117240 2023-03-15T20:54:13Z en>GoingBatty 0 /* top */Added [[Template:Polluted category]] 117240 wikitext text/x-wiki {{polluted category}} {{hidden category}} Articles which include mark-up for one or more [[hCard]] [[microformat]]s. See [[WP:UF|the microformats project]] for background. (Note: this category is not yet widely applied, and so under-represents the number concerned; see [[:Category:Templates generating hCards]] for more.) {{CollapsibleLargeCategoryTOC}} [[Category:Articles with microformats|hCard]] acaob419wucpwg2kilijj4k7lv73ks4 117241 102935 2026-07-16T11:42:50Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles_with_hCards]] 102935 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Module:Params 828 43807 116807 116646 2026-07-16T06:55:10Z Grufo 8824 Update from [[d:Special:GoToLinkedPage/mediawikiwiki/Q122696746|master]] using [[mw:Synchronizer| #Synchronizer]] 116807 Scribunto text/plain require[[strict]] --- --- --- PRIVATE ENVIRONMENT --- --- ________________________________ --- --- --- --[[ Abstract utilities ]]-- ---------------------------- -- Helper function for `string.gsub()` (for managing zero-padded numbers) local function zero_padded (str) return ('%03d%s'):format(#str, str) end -- Helper function for `table.sort()` (for natural sorting) local function natural_sort (var1, var2) return var1:gsub('%d+', zero_padded) < var2:gsub('%d+', zero_padded) end -- Return a copy or a reference to a table local function copy_or_ref_table (src, refonly) if refonly then return src end local newtab = {} for key, val in pairs(src) do newtab[key] = val end return newtab end -- Copy at most N items (of all kinds) from `src` to `dest` and return `dest` local function copy_table_maxn (dest, src, len) local idx = 1 for key, val in pairs(src) do dest[key], idx = val, idx + 1 if idx > len then break end end return dest end -- Remove some numeric elements from a table, shifting everything to the left local function remove_numeric_keys (tbl, idx, len) local cache, tmp = {}, idx + len - 1 for key, val in pairs(tbl) do if type(key) == 'number' and key >= idx then if key > tmp then cache[key - len] = val end tbl[key] = nil end end for key, val in pairs(cache) do tbl[key] = val end end -- Make a reduced copy of a table (shifting in both directions if necessary) local function copy_table_reduced (tbl, idx, len) local ret, tmp = {}, idx + len - 1 if idx > 0 then for key, val in pairs(tbl) do if type(key) ~= 'number' or key < idx then ret[key] = val elseif key > tmp then ret[key - len] = val end end elseif tmp > 0 then local nshift = 1 - idx for key, val in pairs(tbl) do if type(key) ~= 'number' then ret[key] = val elseif key > tmp then ret[key - tmp] = val elseif key < idx then ret[key + nshift] = val end end else for key, val in pairs(tbl) do if type(key) ~= 'number' or key > tmp then ret[key] = val elseif key < idx then ret[key + len] = val end end end return ret end -- Make an expanded copy of a table (shifting in both directions if necessary) local function copy_table_expanded (tbl, idx, len) local ret, tmp = {}, idx + len - 1 if idx > 0 then for key, val in pairs(tbl) do if type(key) ~= 'number' or key < idx then ret[key] = val else ret[key + len] = val end end elseif tmp > 0 then local nshift = idx - 1 for key, val in pairs(tbl) do if type(key) ~= 'number' then ret[key] = val elseif key > 0 then ret[key + tmp] = val elseif key < 1 then ret[key + nshift] = val end end else for key, val in pairs(tbl) do if type(key) ~= 'number' or key > tmp then ret[key] = val else ret[key - len] = val end end end return ret end -- Given a table, create two new tables containing the sorted list of keys local function get_key_list_sorted (tbl, sort_fn) local nums, words, nn, nw = {}, {}, 0, 0 for key, val in pairs(tbl) do if type(key) == 'number' then nn = nn + 1 nums[nn] = key else nw = nw + 1 words[nw] = key end end table.sort(nums) table.sort(words, sort_fn) return nums, words, nn, nw end -- Parse a parameter name string and return it as a string or a number local function get_parameter_name (par_str) local ret = par_str:match'^%s*(.-)%s*$' if ret ~= '0' and ret:find'^%-?[1-9]%d*$' == nil then return ret end return tonumber(ret) end -- Move a key from a table to another, but only if under a different name and -- always parsing numeric strings as numbers local function steal_if_renamed (val, src, skey, dest, dkey) local realkey = get_parameter_name(dkey) if skey ~= realkey then dest[realkey], src[skey] = val, nil end end --[[ Public strings ]]-- ------------------------ -- Special match keywords (functions and modifiers MUST avoid these names) local mkeywords = { ['or'] = 0, pattern = 1, plain = 2, strict = 3 } -- Sort functions (functions and modifiers MUST avoid these names) local sortfunctions = { alphabetically = false, naturally = natural_sort } -- Callback styles for the `mapping_*` and `renaming_*` class of modifiers -- (functions and modifiers MUST avoid these names) --[[ Meanings of the columns: col[1] = Loop type (0-3) col[2] = Number of module arguments that the style requires (1-3) col[3] = Minimum number of sequential parameters passed to the callback col[4] = Name of the callback parameter where to place each parameter name col[5] = Name of the callback parameter where to place each parameter value col[6] = Argument in the modifier's invocation that will override `col[4]` col[7] = Argument in the modifier's invocation that will override `col[5]` A value of `-1` indicates that no meaningful value is stored (i.e. `nil`) ]]-- local mapping_styles = { names_and_values = { 3, 2, 2, 1, 2, -1, -1 }, values_and_names = { 3, 2, 2, 2, 1, -1, -1 }, values_only = { 1, 2, 1, -1, 1, -1, -1 }, names_only = { 2, 2, 1, 1, -1, -1, -1 }, names_and_values_as = { 3, 4, 0, -1, -1, 2, 3 }, names_only_as = { 2, 3, 0, -1, -1, 2, -1 }, values_only_as = { 1, 3, 0, -1, -1, -1, 2 }, blindly = { 0, 2, 0, -1, -1, -1, -1 } } -- Memory slots (functions and modifiers MUST avoid these names) local memoryslots = { h = 'header', f = 'footer', i = 'itersep', l = 'lastsep', n = 'ifngiven', p = 'pairsep', s = 'oxfordsep' } -- Possible trimming modes for the `parsing` modifier local trim_parse_opts = { trim_none = { false, false }, trim_positional = { false, true }, trim_named = { true, false }, trim_all = { true, true } } -- Possible string modes for the iteration separator in the `parsing` and -- `reinterpreting` modifiers local isep_parse_opts = { splitter_pattern = false, splitter_string = true } -- Possible string modes for the key-value separator in the `parsing` and -- `reinterpreting` modifiers local psep_parse_opts = { setter_pattern = false, setter_string = true } -- Possible position references for the `splicing` modifier local position_references = { add_nothing = 0, add_smallest_number = 1, add_last_of_sequence = 2, add_largest_number = 3 } -- Possible modes for the `reassigning` modifier local a_modes = { duplicate = 0, transfer = 1, provide = 2, spare = 3, sacrifice = 4 } -- Functions and modifiers MUST avoid these names too: `here`, `in_substack`, -- `let`, `expose`, `use`, `with_flushed_glue`, `without_flushed_glue` -- `without_sorting` --[[ Private constants ]]-- --------------------------- -- Hard-coded name of the module (to avoid going through `frame:getTitle()`) local modulename = 'Module:Params' -- The functions listed here declare that they don't need the `frame.args` -- metatable to be copied into a regular table; if they are modifiers they also -- guarantee that they will make their own (modified) copy available local refpipe = { call_for_each_group = true, --coins = true, count = true, evaluating = true, for_each = true, list = true, list_values = true, list_maybe_with_names = true, value_of = true } -- The functions listed here declare that they don't need the -- `frame:getParent().args` metatable to be copied into a regular table; if -- they are modifiers they also guarantee that they will make their own -- (modified) copy available local refparams = { call_for_each_group = true, combining = true, combining_by_calling = true, combining_values = true, concat_and_call = true, concat_and_invoke = true, concat_and_magic = true, count = true, grouping_by_calling = true, mixing_names_and_values = true, keeping_at_most = true, renaming_by_mixing = true, renaming_to_sequence = true, renaming_to_uppercase = true, renaming_to_lowercase = true, --renaming_to_values = true, shifting = true, splicing = true, --swapping_names_and_values = true, value_of = true, with_name_matching = true } -- Maximum number of numeric parameters that can be filled, if missing (we -- chose an arbitrary number for this constant; you can discuss about its -- optimal value at Module talk:Params) local maxfill = 1024 -- The private table of functions local library = {} -- Functions and modifiers that can only be invoked in first position local static_iface = {} --[[ Private functions ]]-- --------------------------- -- Create a new context local function context_new (child_frame) local main_frame = child_frame:getParent() return { frame = main_frame, opipe = child_frame.args, oparams = main_frame.args, firstposonly = static_iface, iterfunc = pairs, sorttype = 0, n_parents = 0, n_children = 0, n_available = maxfill } end -- Move to the next action within the user-given list local function context_iterate (ctx, n_forward) local nextfn if ctx.pipe[n_forward] ~= nil then nextfn = ctx.pipe[n_forward]:match'^%s*(.*%S)' end if nextfn == nil then error(modulename .. ': You must specify a function to call', 0) end if library[nextfn] == nil then if ctx.firstposonly[nextfn] == nil then error(modulename .. ': The function ‘' .. nextfn .. '’ does not exist', 0) else error(modulename .. ': The ‘' .. nextfn .. '’ directive can only appear in first position', 0) end end remove_numeric_keys(ctx.pipe, 1, n_forward) return library[nextfn] end -- Main loop local function main_loop (ctx, start_with) local fn = start_with repeat fn = fn(ctx) until not fn if ctx.n_parents > 0 then error(modulename .. ': One or more ‘merging_substack’ directives are missing', 0) end if ctx.n_children > 0 then error(modulename .. ', For some of the snapshots either the ‘flushing’ directive is missing or a group has not been properly closed with ‘merging_substack’', 0) end end -- Load a `setting`-like directive string into the `dest` table local function set_strings_from_opts (dest, opts, start_from) local cmd if opts[start_from] == nil then return start_from - 1 end cmd = opts[start_from]:gsub('%s+', ''):gsub('/+', '/') :match'^/*(.*[^/])' if cmd == nil then return start_from end local vname, chr local amap, sep, argc = {}, string.byte('/'), start_from + 1 for idx = 1, #cmd do chr = cmd:byte(idx) if chr == sep then for key, val in ipairs(amap) do dest[val], amap[key] = opts[argc], nil end argc = argc + 1 else vname = memoryslots[string.char(chr)] if vname == nil then error(modulename .. ', ‘setting’: Unknown slot ‘' .. string.char(chr) .. '’', 0) end table.insert(amap, vname) end end for key, val in ipairs(amap) do dest[val] = opts[argc] end return argc end -- Add a new stack of parameters to `ctx.children` local function new_substack (ctx) local currsnap, newparams = ctx.n_children + 1, {} if ctx.children == nil then ctx.children = { newparams } else ctx.children[currsnap] = newparams end ctx.n_children = currsnap return newparams end -- Parse a raw argument containing a `sortfunctions` directive, or -- `'without_sorting'`, or `nil` local function load_sort_opt (raw_arg) if raw_arg == nil then return nil, 1, false end local trarg = raw_arg:match'^%s*(.-)%s*$' if trarg == 'without_sorting' then return nil, 2, false, trarg end local tmp = sortfunctions[trarg] if tmp == nil then return nil, 1, false, trarg end return tmp or nil, 2, true, trarg end -- Parse optional user arguments of type `...|[let/use]|[...]|[let/use]|[...]| -- [number of additional parameters]|[parameter 1]|[parameter 2]|[...]` local function load_child_opts (src, start_from, append_after, params) local tnamed, tmp1, tmp2 local pin, tbl, mem = start_from, {}, {} while src[pin] ~= nil and src[pin + 1] ~= nil do tmp1 = src[pin]:match'^%s*(.*%S)' if tmp1 == 'let' and src[pin + 2] ~= nil then tmp1 = get_parameter_name(src[pin + 1]) mem[tmp1], tbl[tmp1], pin = nil, src[pin + 2], pin + 3 --[[ elseif tmp1 == 'expose' then tmp1 = get_parameter_name(src[pin + 1]) tmp2 = params[tmp1] mem[tmp1], tbl[tmp1], pin = tmp2, tmp2, pin + 2 ]]-- elseif tmp1 == 'use' and src[pin + 2] ~= nil then tmp1 = get_parameter_name(src[pin + 2]) tmp2 = params[tmp1] mem[tmp1], tbl[get_parameter_name(src[pin + 1])], pin = tmp2, tmp2, pin + 3 else break end end local tnew = copy_or_ref_table(params, next(mem) == nil) for key in pairs(mem) do tnew[key] = nil end if pin ~= start_from then tnamed, tbl = tbl, {} end tmp1 = tonumber(src[pin]) if tmp1 ~= nil and math.floor(tmp1) == tmp1 then if tmp1 < 0 then tmp1 = -1 end tmp2 = append_after - pin for idx = pin + 1, pin + tmp1 do tbl[idx + tmp2] = src[idx] end pin = pin + tmp1 + 1 end if tnamed ~= nil then for key, val in pairs(tnamed) do tbl[key] = val end end return tbl, pin, tnew, mem end -- Load the optional arguments of some of the `mapping_*` and `renaming_*` -- class of modifiers local function load_callback_opts (src, n_skip, default_style, params) local style, shf local tmp = src[n_skip + 1] if tmp ~= nil then style = mapping_styles[tmp:match'^%s*(.-)%s*$'] end if style == nil then style, shf = default_style, n_skip - 1 else shf = n_skip end local n_exist, karg, varg = style[3], style[4], style[5] tmp = style[6] if tmp > -1 then karg = src[tmp + shf]:match'^%s*(.-)%s*$' if karg == '0' or karg:find'^%-?[1-9]%d*$' ~= nil then karg = tonumber(karg) n_exist = math.max(n_exist, karg) end end tmp = style[7] if tmp > -1 then varg = src[tmp + shf]:match'^%s*(.-)%s*$' if varg == '0' or varg:find'^%-?[1-9]%d*$' ~= nil then varg = tonumber(varg) n_exist = math.max(n_exist, varg) end end local dest, argc, tnew, mem = load_child_opts(src, style[2] + shf, n_exist, params) tmp = style[1] if (tmp == 3 or tmp == 2) and dest[karg] ~= nil then tmp = tmp - 2 end if (tmp == 3 or tmp == 1) and dest[varg] ~= nil then tmp = tmp - 1 end return dest, argc, tmp, karg, varg, tnew, mem end -- Parse the arguments of some of the `mapping_*` and `renaming_*` class of -- modifiers local function load_replace_args (opts, whoami) if opts[1] == nil then error(modulename .. ', ‘' .. whoami .. '’: No pattern string was given', 0) end if opts[2] == nil then error(modulename .. ', ‘' .. whoami .. '’: No replacement string was given', 0) end local ptn, repl, nmax, argc = opts[1], opts[2], tonumber(opts[3]), 3 if nmax ~= nil or (opts[3] or ''):match'^%s*$' ~= nil then argc = 4 end local flg = opts[argc] if flg ~= nil then flg = mkeywords[flg:match'^%s*(.-)%s*$'] end if flg == 0 then flg = nil elseif flg ~= nil then argc = argc + 1 end return ptn, repl, nmax, flg, argc, (nmax ~= nil and nmax < 1) or (flg == 3 and ptn == repl) end -- Parse the arguments of the `with_*_matching` class of modifiers local function load_pattern_args (opts, whoami) local keyw local ptns, state, nptns, cnt = {}, 0, 0, 1 for _, val in ipairs(opts) do if state == 0 then nptns, state = nptns + 1, -1 ptns[nptns] = { val, false, false } else keyw = val:match'^%s*(.*%S)' if keyw == nil or mkeywords[keyw] == nil or ( state > 0 and mkeywords[keyw] > 0 ) then break else state = mkeywords[keyw] if state > 1 then ptns[nptns][2] = true end if state == 3 then ptns[nptns][3] = true end end end cnt = cnt + 1 end if state == 0 then error(modulename .. ', ‘' .. whoami .. '’: No pattern was given', 0) end return ptns, nptns, cnt end -- Load the optional arguments of the `parsing`, `reinterpreting` and -- `evaluating` modifiers local function load_parse_opts (opts, start_from, isp, psp) local tmp local optslots, noptslots, argc, trimn, trimu, iplain, pplain = { true, true, true }, 3, start_from, true, false, true, true repeat noptslots, tmp = noptslots - 1, opts[argc] if tmp == nil then break end tmp = tmp:match'^%s*(.-)%s*$' if optslots[1] ~= nil and trim_parse_opts[tmp] ~= nil then tmp = trim_parse_opts[tmp] trimn, trimu, optslots[1] = tmp[1], tmp[2], nil elseif optslots[2] ~= nil and isep_parse_opts[tmp] ~= nil then argc = argc + 1 iplain, isp, optslots[2] = isep_parse_opts[tmp], opts[argc], nil elseif optslots[3] ~= nil and psep_parse_opts[tmp] ~= nil then argc = argc + 1 pplain, psp, optslots[3] = psep_parse_opts[tmp], opts[argc], nil else break end argc = argc + 1 until noptslots < 1 return isp, iplain, psp, pplain, trimn, trimu, argc end -- Map parameters' values using a custom callback and a referenced table local value_maps = { [0] = function (tbl, margs, karg, varg, fn) for key in pairs(tbl) do tbl[key] = fn() end end, [1] = function (tbl, margs, karg, varg, fn) for key, val in pairs(tbl) do margs[varg] = val tbl[key] = fn() end end, [2] = function (tbl, margs, karg, varg, fn) for key in pairs(tbl) do margs[karg] = key tbl[key] = fn() end end, [3] = function (tbl, margs, karg, varg, fn) for key, val in pairs(tbl) do margs[karg], margs[varg] = key, val tbl[key] = fn() end end } -- Private table for `map_names()` local name_thieves = { [0] = function (cache, tbl, rargs, karg, varg, fn) for key, val in pairs(tbl) do steal_if_renamed(val, tbl, key, cache, fn()) end end, [1] = function (cache, tbl, rargs, karg, varg, fn) for key, val in pairs(tbl) do rargs[varg] = val steal_if_renamed(val, tbl, key, cache, fn()) end end, [2] = function (cache, tbl, rargs, karg, varg, fn) for key, val in pairs(tbl) do rargs[karg] = key steal_if_renamed(val, tbl, key, cache, fn()) end end, [3] = function (cache, tbl, rargs, karg, varg, fn) for key, val in pairs(tbl) do rargs[karg], rargs[varg] = key, val steal_if_renamed(val, tbl, key, cache, fn()) end end } -- Map parameters' names using a custom callback and a referenced table local function map_names (tbl, rargs, karg, varg, looptype, fn) local cache = {} name_thieves[looptype](cache, tbl, rargs, karg, varg, fn) for key, val in pairs(cache) do tbl[key] = val end end -- Return a new table that contains `src` regrouped according to the numeric -- suffixes in its keys local function make_groups (src) -- NOTE: `src` might be the original metatable! local prefix, gid local groups = {} for key, val in pairs(src) do -- `key` must only be a string or a number... if type(key) == 'string' then prefix, gid = key:match'^%s*(.-)%s*(%-?%d*)%s*$' gid = tonumber(gid) or '' else prefix, gid = '', key end if groups[gid] == nil then groups[gid] = {} end if prefix == '0' or prefix:find'^%-?[1-9]%d*$' ~= nil then prefix = tonumber(prefix) if prefix < 1 then prefix = prefix - 1 end end groups[gid][prefix] = val end return groups end -- Split into parts a string containing the `$#` and `$@` placeholders and -- return the information as a skeleton table, a canvas table and a length local function parse_placeholder_string (target) local idx, s_pos, skel, canvas = 1, 1, {}, {} local e_pos = string.find(target, '%$[@#]', 1, false) while e_pos ~= nil do canvas[idx] = target:sub(s_pos, e_pos - 1) skel[idx + 1] = target:sub(e_pos, e_pos + 1) == '$@' idx = idx + 2 s_pos = e_pos + 2 e_pos = string.find(target, '%$[@#]', s_pos, false) end if (s_pos > target:len()) then idx = idx - 1 else canvas[idx] = target:sub(s_pos) end return skel, canvas, idx end -- Populate a table by parsing a parameter string (heavy lifting for `parsing`, -- `reinterpreting` and `evaluating`) local function parse_parameter_string (tbl, str, isp, ipl, psp, ppl, trn, tru) local key, val, spos1, spos2, pos1, pos2 local pos3, idx, lenplone = 0, 1, #str + 1 if isp == nil or isp == '' then if psp == nil or psp == '' then if tru then tbl[idx] = str:match'^%s*(.-)%s*$' else tbl[idx] = str end return idx end spos1, spos2 = str:find(psp, 1, ppl) if spos1 == nil then key = idx if tru then val = str:match'^%s*(.-)%s*$' else val = str end idx = idx + 1 else key = get_parameter_name(str:sub(1, spos1 - 1)) val = str:sub(spos2 + 1) if trn then val = val:match'^%s*(.-)%s*$' end end tbl[key] = val return idx end if psp == nil or psp == '' then repeat pos1 = pos3 + 1 pos2, pos3 = str:find(isp, pos1, ipl) val = str:sub(pos1, (pos2 or lenplone) - 1) if tru then val = val:match'^%s*(.-)%s*$' end tbl[idx], idx = val, idx + 1 until pos2 == nil return idx end repeat pos1 = pos3 + 1 pos2, pos3 = str:find(isp, pos1, ipl) val = str:sub(pos1, (pos2 or lenplone) - 1) spos1, spos2 = val:find(psp, 1, ppl) if spos1 == nil then key = idx if tru then val = val:match'^%s*(.-)%s*$' end idx = idx + 1 else key = get_parameter_name(val:sub(1, spos1 - 1)) val = val:sub(spos2 + 1) if trn then val = val:match'^%s*(.-)%s*$' end end tbl[key] = val until pos2 == nil return idx end -- Heavy lifting for `snapshotting` and `remembering` local function make_child (ctx, src, whoami) local len = tonumber(ctx.pipe[1]) if len == nil or len == 0 then local stack = new_substack(ctx) for key, val in pairs(src) do stack[key] = val end return len == nil and 1 or 2 end if len < 0 or math.floor(len) ~= len then error(modulename .. ', ‘' .. whoami .. '’: The number of parameters to copy must be an integer greater than zero', 0) end copy_table_maxn(new_substack(ctx), src, len) return 2 end -- Heavy lifting for `setting_by_flushing`, `combining` and `combining_values` local function set_strings_from_substack (ctx, dest, whoami) if ctx.n_children < 1 then error(modulename .. ', ‘' .. whoami .. '’: There are no substacks to flush', 0) end local currsnap = ctx.n_children local stack = ctx.children[currsnap] for key, val in pairs(memoryslots) do if stack[key] ~= nil then dest[val] = stack[key] end end ctx.children[currsnap], ctx.n_children = nil, currsnap - 1 end -- Heavy lifting for `combining` and `combining_values` local function combine_parameters (ctx, keyval_fn, whoami) -- NOTE: `ctx.params` might be the original metatable! This function -- MUST create a copy of it before returning local opts = ctx.pipe if ctx.pipe[1] == nil then error(modulename .. ', ‘' .. whoami .. '’: No parameter name was provided', 0) end local argc local tbl, vars = ctx.params, {} local sortfn, varsarg0, do_sort, tmp = load_sort_opt(opts[2]) if varsarg0 == 2 then tmp = opts[3] and opts[3]:match'^%s*(.-)%s*$' end if tmp == 'with_flushed_glue' then varsarg0 = varsarg0 + 1 argc = set_strings_from_opts(vars, opts, varsarg0 + 1) set_strings_from_substack(ctx, vars, whoami) else if tmp == 'without_flushed_glue' then varsarg0 = varsarg0 + 1 end argc = set_strings_from_opts(vars, opts, varsarg0 + 1) end if argc < varsarg0 then error(modulename .. ', ‘' .. whoami .. '’: No setting directive was given', 0) end if next(tbl) == nil then if vars.ifngiven ~= nil then ctx.params = { [get_parameter_name(ctx.pipe[1])] = vars.ifngiven } elseif tbl == ctx.oparams then ctx.params = {} end return argc end local cache, len if do_sort then local words cache, words, len, tmp = get_key_list_sorted(tbl, sortfn) for idx = 1, tmp do cache[len + idx] = words[idx] end len = len + tmp else len, cache = 0, {} for key in pairs(tbl) do len = len + 1 cache[len] = key end end local pmap, nss, kvs, pps = {}, 0, vars.pairsep or '', vars.itersep or '' for idx = 1, len do tmp, pmap[nss + 1] = cache[idx], pps pmap[nss + 2] = keyval_fn(tmp, tbl[tmp], kvs) nss = nss + 2 end tmp = vars.oxfordsep or vars.lastsep if tmp ~= nil and nss > 4 then pmap[nss - 1] = tmp elseif nss > 2 and vars.lastsep ~= nil then pmap[nss - 1] = vars.lastsep end pmap[1] = vars.header or '' if vars.footer ~= nil then pmap[nss + 1] = vars.footer end ctx.params = { [get_parameter_name(ctx.pipe[1])] = table.concat(pmap) } return argc end -- Concatenate the numeric keys from the table of parameters to the numeric -- keys from the table of options; non-numeric keys from the table of options -- will prevail over colliding non-numeric keys from the table of parameters local function concat_params (ctx) local retval, tbl, nmax = {}, ctx.params, table.maxn(ctx.pipe) if ctx.subset == 1 then -- We need only the sequence for key, val in ipairs(tbl) do retval[key + nmax] = val end else if ctx.subset == -1 then for key in ipairs(tbl) do tbl[key] = nil end end for key, val in pairs(tbl) do if type(key) == 'number' and key > 0 then retval[key + nmax] = val else retval[key] = val end end end for key, val in pairs(ctx.pipe) do retval[key] = val end return retval end -- Flush the parameters by calling a custom function for each value (after this -- function has been invoked `ctx.params` will be no longer usable) local function flush_params (ctx, fn) local tbl = ctx.params if ctx.subset == 1 then for key, val in ipairs(tbl) do fn(key, val) end return end if ctx.subset == -1 then for key, val in ipairs(tbl) do tbl[key] = nil end end if ctx.sorttype > 0 then local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort) if ctx.sorttype == 2 then for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end return end for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end return end if ctx.subset ~= -1 then for key, val in ipairs(tbl) do fn(key, val) tbl[key] = nil end end for key, val in pairs(tbl) do fn(key, val) end end -- Flush the parameters by calling one of two custom functions for each value -- (after this function has been invoked `ctx.params` will be no longer usable) local function mixed_flush_params (ctx, fn_seq, fn_oth) if ctx.subset == 1 then for key, val in ipairs(ctx.params) do fn_seq(key, val) end return end if ctx.subset == -1 then flush_params(ctx, fn_oth) return end local tbl = ctx.params if ctx.sorttype > 0 then local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort) local sequence = {} for key, val in ipairs(tbl) do sequence[key] = val end if ctx.sorttype == 2 then for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end end for idx = 1, nn do if sequence[nums[idx]] then fn_seq(nums[idx], sequence[nums[idx]]) else fn_oth(nums[idx], tbl[nums[idx]]) end end if ctx.sorttype ~= 2 then for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end end return end for key, val in ipairs(tbl) do fn_seq(key, val) tbl[key] = nil end for key, val in pairs(tbl) do fn_oth(key, val) end end -- Finalize and return a concatenated list local function finalize_and_return_concatenated_list (ctx, lst, len, modsize) if len > 0 then local tmp = ctx.oxfordsep or ctx.lastsep if tmp ~= nil and len > modsize * 2 then lst[len - modsize + 1] = tmp elseif len > modsize and ctx.lastsep ~= nil then lst[len - modsize + 1] = ctx.lastsep end lst[1] = ctx.header or '' if ctx.footer ~= nil then lst[len + 1] = ctx.footer end ctx.text = table.concat(lst) else ctx.text = ctx.ifngiven or '' end end --- --- --- PUBLIC ENVIRONMENT --- --- ________________________________ --- --- --- --[[ Modifiers ]]-- ------------------- -- Syntax: #invoke:params|sequential|pipe to library.sequential = function (ctx) if ctx.subset == 1 then error(modulename .. ': The ‘sequential’ directive has been provided more than once', 0) end if ctx.subset == -1 then error(modulename .. ': The two directives ‘non-sequential’ and ‘sequential’ are in contradiction with each other', 0) end if ctx.sorttype > 0 then error(modulename .. ': The ‘all_sorted’ and ‘reassorted’ directives are redundant when followed by ‘sequential’', 0) end ctx.iterfunc, ctx.subset = ipairs, 1 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|non-sequential|pipe to library['non-sequential'] = function (ctx) if ctx.subset == -1 then error(modulename .. ': The ‘non-sequential’ directive has been provided more than once', 0) end if ctx.subset == 1 then error(modulename .. ': The two directives ‘sequential’ and ‘non-sequential’ are in contradiction with each other', 0) end ctx.iterfunc, ctx.subset = pairs, -1 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|all_sorted|pipe to library.all_sorted = function (ctx) if ctx.sorttype == 1 then error(modulename .. ': The ‘all_sorted’ directive has been provided more than once', 0) end if ctx.subset == 1 then error(modulename .. ': The ‘all_sorted’ directive is redundant after ‘sequential’', 0) end if ctx.sorttype == 2 then error(modulename .. ': The two directives ‘reassorted’ and ‘sequential’ are in contradiction with each other', 0) end ctx.sorttype = 1 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|reassorted|pipe to library.reassorted = function (ctx) if ctx.sorttype == 2 then error(modulename .. ': The ‘reassorted’ directive has been provided more than once', 0) end if ctx.subset == 1 then error(modulename .. ': The ‘reassorted’ directive is redundant after ‘sequential’', 0) end if ctx.sorttype == 1 then error(modulename .. ': The two directives ‘sequential’ and ‘reassorted’ are in contradiction with each other', 0) end ctx.sorttype = 2 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|setting|directives|...|pipe to library.setting = function (ctx) local argc = set_strings_from_opts(ctx, ctx.pipe, 1) if argc < 2 then error(modulename .. ', ‘setting’: No directive was given', 0) end return context_iterate(ctx, argc + 1) end -- Syntax: #invoke:params|scoring|new parameter name|[container]|pipe to library.scoring = function (ctx) if ctx.pipe[1] == nil then error(modulename .. ', ‘scoring’: No parameter name was provided', 0) end local tmp local retval, opts = 0, ctx.pipe for _ in pairs(ctx.params) do retval = retval + 1 end if opts[2] ~= nil then tmp = opts[2]:match'^%s*(.*%S)' end if tmp == 'in_substack' then new_substack(ctx)[get_parameter_name(opts[1])] = tostring(retval) return context_iterate(ctx, 3) end ctx.params[get_parameter_name(opts[1])] = tostring(retval) return context_iterate(ctx, tmp == 'here' and 3 or 2) end -- Syntax: #invoke:params|squeezing|pipe to library.squeezing = function (ctx) local store, indices, tbl, newlen = {}, {}, ctx.params, 0 for key, val in pairs(tbl) do if type(key) == 'number' then newlen = newlen + 1 indices[newlen], store[key], tbl[key] = key, val, nil end end table.sort(indices) for idx = 1, newlen do tbl[idx] = store[indices[idx]] end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|filling_the_gaps|pipe to library.filling_the_gaps = function (ctx) local newval, tbl, tmp, nmin, nmax, nnums = ctx.pipe[1], ctx.params, {}, 1, nil, -1 if newval == nil then error(modulename .. ', ‘filling_the_gaps’: No value was provided', 0) end for key, val in pairs(tbl) do if type(key) == 'number' then if nmax == nil then if key < nmin then nmin = key end nmax = key elseif key > nmax then nmax = key elseif key < nmin then nmin = key end tmp[key], nnums = val, nnums + 1 end end if nmax ~= nil and nmax - nmin > nnums then ctx.n_available = ctx.n_available + nmin + nnums - nmax if ctx.n_available < 0 then error(modulename .. ', ‘filling_the_gaps’: It is possible to fill at most ' .. tostring(maxfill) .. ' parameters', 0) end for idx = nmin, nmax, 1 do tbl[idx] = newval end for key, val in pairs(tmp) do tbl[key] = val end end return context_iterate(ctx, 2) end -- Syntax: #invoke:params|clearing|pipe to library.clearing = function (ctx) local tbl, numerics = ctx.params, {} for key, val in pairs(tbl) do if type(key) == 'number' then numerics[key], tbl[key] = val, nil end end for key, val in ipairs(numerics) do tbl[key] = val end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|cutting|left cut|right cut|pipe to library.cutting = function (ctx) local lcut = tonumber(ctx.pipe[1]) if lcut == nil or math.floor(lcut) ~= lcut then error(modulename .. ', ‘cutting’: Left cut must be an integer number', 0) end local rcut = tonumber(ctx.pipe[2]) if rcut == nil or math.floor(rcut) ~= rcut then error(modulename .. ', ‘cutting’: Right cut must be an integer number', 0) end local tbl = ctx.params local len = #tbl if lcut < 0 then lcut = len + lcut end if rcut < 0 then rcut = len + rcut end local tot = lcut + rcut if tot > 0 then local cache = {} if tot >= len then for key in ipairs(tbl) do tbl[key] = nil end tot = len else for idx = len - rcut + 1, len, 1 do tbl[idx] = nil end for idx = 1, lcut, 1 do tbl[idx] = nil end end for key, val in pairs(tbl) do if type(key) == 'number' and key > 0 then if key > len then cache[key - tot] = val else cache[key - lcut] = val end tbl[key] = nil end end for key, val in pairs(cache) do tbl[key] = val end end return context_iterate(ctx, 3) end -- Syntax: #invoke:params|cropping|left crop|right crop|pipe to library.cropping = function (ctx) local lcut = tonumber(ctx.pipe[1]) if lcut == nil or math.floor(lcut) ~= lcut then error(modulename .. ', ‘cropping’: Left crop must be an integer number', 0) end local rcut = tonumber(ctx.pipe[2]) if rcut == nil or math.floor(rcut) ~= rcut then error(modulename .. ', ‘cropping’: Right crop must be an integer number', 0) end local tbl = ctx.params local nmin, nmax for key in pairs(tbl) do if type(key) == 'number' then if nmin == nil then nmin, nmax = key, key elseif key > nmax then nmax = key elseif key < nmin then nmin = key end end end if nmin ~= nil then local len = nmax - nmin + 1 if lcut < 0 then lcut = len + lcut end if rcut < 0 then rcut = len + rcut end if lcut + rcut - len > -1 then for key in pairs(tbl) do if type(key) == 'number' then tbl[key] = nil end end elseif lcut + rcut > 0 then for idx = nmax - rcut + 1, nmax do tbl[idx] = nil end for idx = nmin, nmin + lcut - 1 do tbl[idx] = nil end local lshift = nmin + lcut - 1 if lshift > 0 then for idx = lshift + 1, nmax, 1 do tbl[idx - lshift], tbl[idx] = tbl[idx], nil end end end end return context_iterate(ctx, 3) end -- Syntax: #invoke:params|purging|start offset|length|pipe to library.purging = function (ctx) local idx = tonumber(ctx.pipe[1]) if idx == nil or math.floor(idx) ~= idx then error(modulename .. ', ‘purging’: Start offset must be an integer number', 0) end local len = tonumber(ctx.pipe[2]) if len == nil or math.floor(len) ~= len then error(modulename .. ', ‘purging’: Length must be an integer number', 0) end local tbl = ctx.params if len < 1 then len = len + table.maxn(tbl) if idx > len then return context_iterate(ctx, 3) end len = len - idx + 1 end ctx.params = copy_table_reduced(tbl, idx, len) return context_iterate(ctx, 3) end -- Syntax: #invoke:params|backpurging|start offset|length|pipe to library.backpurging = function (ctx) local last = tonumber(ctx.pipe[1]) if last == nil or math.floor(last) ~= last then error(modulename .. ', ‘backpurging’: Start offset must be an integer number', 0) end local len = tonumber(ctx.pipe[2]) if len == nil or math.floor(len) ~= len then error(modulename .. ', ‘backpurging’: Length must be an integer number', 0) end local idx local tbl = ctx.params if len > 0 then idx = last - len + 1 else for key in pairs(tbl) do if type(key) == 'number' and (idx == nil or key < idx) then idx = key end end if idx == nil then return context_iterate(ctx, 3) end idx = idx - len if last < idx then return context_iterate(ctx, 3) end len = last - idx + 1 end ctx.params = copy_table_reduced(ctx.params, idx, len) return context_iterate(ctx, 3) end -- Syntax: #invoke:params|shifting|addend|pipe to library.shifting = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local nshift = tonumber(ctx.pipe[1]) if nshift == nil or nshift == 0 or math.floor(nshift) ~= nshift then error(modulename .. ', ‘shifting’: A non-zero integer number must be provided', 0) end local tbl = {} for key, val in pairs(ctx.params) do if type(key) == 'number' then tbl[key + nshift] = val else tbl[key] = val end end ctx.params = tbl return context_iterate(ctx, 2) end -- Syntax: #invoke:params|reversing_numeric_names|pipe to library.reversing_numeric_names = function (ctx) local tbl, numerics, nmax = ctx.params, {}, 0 for key, val in pairs(tbl) do if type(key) == 'number' then numerics[key], tbl[key] = val, nil if key > nmax then nmax = key end end end for key, val in pairs(numerics) do tbl[nmax - key + 1] = val end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|pivoting_numeric_names|pipe to --[[ library.pivoting_numeric_names = function (ctx) local tbl = ctx.params local shift = #tbl + 1 if shift < 2 then return library.reversing_numeric_names(ctx) end local numerics = {} for key, val in pairs(tbl) do if type(key) == 'number' then numerics[key] = val tbl[key] = nil end end for key, val in pairs(numerics) do tbl[shift - key] = val end return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|mirroring_numeric_names|pipe to --[[ library.mirroring_numeric_names = function (ctx) local nmax, nmin local tbl, numerics = ctx.params, {} for key, val in pairs(tbl) do if type(key) == 'number' then numerics[key] = val tbl[key] = nil if nmax == nil then nmin, nmax = key, key elseif key > nmax then nmax = key elseif key < nmin then nmin = key end end end for key, val in pairs(numerics) do tbl[nmax + nmin - key] = val end return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|swapping_numeric_names|pipe to --[[ library.swapping_numeric_names = function (ctx) local tmp local tbl, cache, nsize = ctx.params, {}, 0 for key in pairs(tbl) do if type(key) == 'number' then nsize = nsize + 1 cache[nsize] = key end end table.sort(cache) for idx = math.floor(nsize / 2), 1, -1 do tmp = tbl[cache[idx] ] tbl[cache[idx] ] = tbl[cache[nsize - idx + 1] ] tbl[cache[nsize - idx + 1] ] = tmp end return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|sorting_sequential_values|[criterion]|pipe to library.sorting_sequential_values = function (ctx) local sortfn if ctx.pipe[1] ~= nil then sortfn = sortfunctions[ctx.pipe[1]:match'^%s*(.-)%s*$'] end if sortfn then table.sort(ctx.params, sortfn) else table.sort(ctx.params) end -- i.e. either `false` or `nil` if sortfn == nil then return context_iterate(ctx, 1) end return context_iterate(ctx, 2) end -- Syntax: #invoke:params|splicing|[add to position]|position|increment| -- [number of elements to write]|...|pipe to library.splicing = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local tmp2, argc, pos, refp local opts, tbl = ctx.pipe, ctx.params local tmp1 = opts[1] if tmp1 ~= nil then tmp2 = tonumber(tmp1) if tmp2 == nil or math.floor(tmp2) ~= tmp2 then pos, argc, tmp2 = tonumber(opts[2]), 4, tmp1:match'^%s*(.*%S)' if tmp2 ~= nil then refp = position_references[tmp2] if refp == nil then error(modulename .. ', ‘splicing’: ‘' .. tostring(tmp2) .. '’ is not a valid first argument', 0) end else refp = 0 end else pos, argc, refp = tmp2, 3, 0 end else pos, argc, refp = tonumber(opts[2]), 4, 0 end if pos == nil or math.floor(pos) ~= pos then error(modulename .. ', ‘splicing’: The position must be an integer number', 0) end local len = tonumber(opts[argc - 1]) if len == nil or math.floor(len) ~= len then error(modulename .. ', ‘splicing’: The increment must be an integer number', 0) end if refp == 2 then for _ in ipairs(tbl) do pos = pos + 1 end refp = 0 end tmp1, tmp2 = nil, nil if refp ~= 0 or len ~= 0 then for key, val in pairs(tbl) do if type(key) == 'number' then if tmp1 == nil then tmp1, tmp2 = key, key elseif key < tmp1 then tmp1 = key elseif key > tmp2 then tmp2 = key end end end end if tmp2 == nil then len = 0 elseif refp == 3 then pos = pos + tmp2 elseif refp == 1 then pos = pos + tmp1 end if len > 0 and pos + len > tmp1 and pos <= tmp2 then tbl = copy_table_expanded(tbl, pos, len) elseif len < 0 and pos - len > tmp1 and pos <= tmp2 then tbl = copy_table_reduced(tbl, pos, -len) else tbl = copy_or_ref_table(tbl, tbl ~= ctx.oparams) end ctx.params = tbl tmp1 = tonumber(opts[argc]) if len == 0 and (tmp1 == nil or tmp1 < 1) then error(modulename .. ', ‘splicing’: When the increment is zero the number of elements to add cannot be zero', 0) end if tmp1 == nil or tmp1 < 0 or math.floor(tmp1) ~= tmp1 then return context_iterate(ctx, argc) end tmp2 = argc - pos + 1 for key = pos, pos + tmp1 - 1 do tbl[key] = opts[key + tmp2] end return context_iterate(ctx, argc + tmp1 + 1) end -- Syntax: #invoke:params|imposing|name|value|pipe to library.imposing = function (ctx) if ctx.pipe[1] == nil then error(modulename .. ', ‘imposing’: Missing parameter name to impose', 0) end ctx.params[get_parameter_name(ctx.pipe[1])] = ctx.pipe[2] return context_iterate(ctx, 3) end -- Syntax: #invoke:params|providing|name|value|pipe to library.providing = function (ctx) if ctx.pipe[1] == nil then error(modulename .. ', ‘providing’: Missing parameter name to provide', 0) end local key = get_parameter_name(ctx.pipe[1]) if ctx.params[key] == nil then ctx.params[key] = ctx.pipe[2] end return context_iterate(ctx, 3) end -- Syntax: #invoke:params|reassigning|source|destination|[mode]|pipe to library.reassigning = function (ctx) local opts, tbl = ctx.pipe, ctx.params if opts[1] == nil then error(modulename .. ', ‘reassigning’: Missing source parameter', 0) end if opts[2] == nil then error(modulename .. ', ‘reassigning’: Missing destination parameter', 0) end local mode local src = get_parameter_name(opts[1]) local val = tbl[src] if opts[3] ~= nil then mode = a_modes[opts[3]:match'^%s*(.-)%s*$'] end local argc = mode == nil and 3 or 4 if val == nil then return context_iterate(ctx, argc) end local dest = get_parameter_name(opts[2]) if mode == 1 or mode == 4 or (mode == 3 and tbl[dest] == nil) then tbl[src] = nil end if mode == nil or mode < 2 or tbl[dest] == nil then tbl[dest] = val end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|discarding|name|[how many]|pipe to library.discarding = function (ctx) if ctx.pipe[1] == nil then error(modulename .. ', ‘discarding’: Missing parameter name to discard', 0) end local len = tonumber(ctx.pipe[2]) if len == nil then ctx.params[get_parameter_name(ctx.pipe[1])] = nil return context_iterate(ctx, 2) end local key = tonumber(ctx.pipe[1]) if key == nil or math.floor(key) ~= key then error(modulename .. ', ‘discarding’: A range was provided, but the initial parameter name is not an integer number', 0) end if len < 1 or math.floor(len) ~= len then error(modulename .. ', ‘discarding’: A range can only be an integer number greater than zero', 0) end for idx = key, key + len - 1 do ctx.params[idx] = nil end return context_iterate(ctx, 3) end -- Syntax: #invoke:params|excluding_non-numeric_names|pipe to library['excluding_non-numeric_names'] = function (ctx) local tmp = ctx.params for key, val in pairs(tmp) do if type(key) ~= 'number' then tmp[key] = nil end end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|excluding_numeric_names|pipe to library.excluding_numeric_names = function (ctx) local tmp = ctx.params for key, val in pairs(tmp) do if type(key) == 'number' then tmp[key] = nil end end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|with_name_matching|target 1|[plain flag 1]|[or] -- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag -- N]|pipe to library.with_name_matching = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local tmp, ptn local targets, nptns, argc = load_pattern_args(ctx.pipe, 'with_name_matching') local tbl, newparams = ctx.params, {} for idx = 1, nptns do ptn = targets[idx] if ptn[3] then tmp = ptn[1] if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then tmp = tonumber(tmp) end newparams[tmp] = tbl[tmp] else for key, val in pairs(tbl) do if tostring(key):find(ptn[1], 1, ptn[2]) then newparams[key] = val end end end end ctx.params = newparams return context_iterate(ctx, argc) end -- Syntax: #invoke:params|with_name_not_matching|target 1|[plain flag 1] -- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain -- flag N]|pipe to library.with_name_not_matching = function (ctx) local targets, nptns, argc = load_pattern_args(ctx.pipe, 'with_name_not_matching') local tbl = ctx.params if nptns == 1 and targets[1][3] then local tmp = targets[1][1] if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then tbl[tonumber(tmp)] = nil else tbl[tmp] = nil end return context_iterate(ctx, argc) end local yesmatch, ptn for key in pairs(tbl) do yesmatch = true for idx = 1, nptns do ptn = targets[idx] if ptn[3] then if tostring(key) ~= ptn[1] then yesmatch = false break end elseif not tostring(key):find(ptn[1], 1, ptn[2]) then yesmatch = false break end end if yesmatch then tbl[key] = nil end end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|with_value_matching|target 1|[plain flag 1]|[or] -- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag -- N]|pipe to library.with_value_matching = function (ctx) local nomatch, ptn local tbl = ctx.params local targets, nptns, argc = load_pattern_args(ctx.pipe, 'with_value_matching') for key, val in pairs(tbl) do nomatch = true for idx = 1, nptns do ptn = targets[idx] if ptn[3] then if val == ptn[1] then nomatch = false break end elseif val:find(ptn[1], 1, ptn[2]) then nomatch = false break end end if nomatch then tbl[key] = nil end end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|with_value_not_matching|target 1|[plain flag 1] -- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain -- flag N]|pipe to library.with_value_not_matching = function (ctx) local yesmatch, ptn local tbl = ctx.params local targets, nptns, argc = load_pattern_args(ctx.pipe, 'with_value_not_matching') for key, val in pairs(tbl) do yesmatch = true for idx = 1, nptns do ptn = targets[idx] if ptn[3] then if val ~= ptn[1] then yesmatch = false break end elseif not val:find(ptn[1], 1, ptn[2]) then yesmatch = false break end end if yesmatch then tbl[key] = nil end end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|keeping_at_most|number of parameters to pick|pipe to library.keeping_at_most = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local len = tonumber(ctx.pipe[1]) if len == nil or len < 1 or math.floor(len) ~= len then error(modulename .. ', ‘keeping_at_most’: The number of parameters to keep must be an integer greater than zero', 0) end ctx.params = copy_table_maxn({}, ctx.params, len) return context_iterate(ctx, 2) end -- Syntax: #invoke:params|trimming_values|pipe to library.trimming_values = function (ctx) local tbl = ctx.params for key, val in pairs(tbl) do tbl[key] = val:match'^%s*(.-)%s*$' end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|mapping_to_lowercase|pipe to library.mapping_to_lowercase = function (ctx) local tbl = ctx.params for key, val in pairs(tbl) do tbl[key] = val:lower() end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|mapping_to_uppercase|pipe to library.mapping_to_uppercase = function (ctx) local tbl = ctx.params for key, val in pairs(tbl) do tbl[key] = val:upper() end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|mapping_by_calling|template name|[call -- style]|[let/use]|[...]|[let/use]|[...]|[number of additional -- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to library.mapping_by_calling = function (ctx) local tname local opts = ctx.pipe if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end if tname == nil then error(modulename .. ', ‘mapping_by_calling’: No template name was provided', 0) end local margs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params) local model = { title = tname, args = margs } value_maps[looptype](tbl, margs, karg, varg, function () return ctx.frame:expandTemplate(model) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|mapping_by_invoking|module name|function name|[call -- style]|[let/use]|[...]|[let/use]|[...]|[number of additional -- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to library.mapping_by_invoking = function (ctx) local mname, fname local opts = ctx.pipe if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end if mname == nil then error(modulename .. ', ‘mapping_by_invoking’: No module name was provided', 0) end if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end if fname == nil then error(modulename .. ', ‘mapping_by_invoking’: No function name was provided', 0) end local margs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 2, mapping_styles.values_only, ctx.params) local model = { title = 'Module:' .. mname, args = margs } local mfunc = require(model.title)[fname] if mfunc == nil then error(modulename .. ', ‘mapping_by_invoking’: The function ‘' .. fname .. '’ does not exist', 0) end value_maps[looptype](tbl, margs, karg, varg, function () return tostring(mfunc(ctx.frame:newChild(model))) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|mapping_by_magic|parser function|[call -- style]|[let/use]|[...]|[let/use]|[...]|[number of additional -- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to library.mapping_by_magic = function (ctx) local magic local opts = ctx.pipe if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end if magic == nil then error(modulename .. ', ‘mapping_by_magic’: No parser function was provided', 0) end local margs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params) value_maps[looptype](tbl, margs, karg, varg, function () return ctx.frame:callParserFunction(magic, margs) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|mapping_by_replacing|target|replace|[count]|[plain -- flag]|pipe to library.mapping_by_replacing = function (ctx) local ptn, repl, nmax, flg, argc, die = load_replace_args(ctx.pipe, 'mapping_by_replacing') if die then return context_iterate(ctx, argc) end local tbl = ctx.params if flg == 3 then for key, val in pairs(tbl) do if val == ptn then tbl[key] = repl end end else if flg == 2 then -- Copied from Module:String's `str._escapePattern()` ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0') end for key, val in pairs(tbl) do tbl[key] = val:gsub(ptn, repl, nmax) end end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|mapping_by_mixing|mixing string|pipe to library.mapping_by_mixing = function (ctx) if ctx.pipe[1] == nil then error(modulename .. ', ‘mapping_by_mixing’: No mixing string was provided', 0) end local tbl, mix = ctx.params, ctx.pipe[1] if mix == '$#' then for key in pairs(tbl) do tbl[key] = tostring(key) end return context_iterate(ctx, 2) end local skel, cnv, n_parts = parse_placeholder_string(mix) for key, val in pairs(tbl) do for idx = 2, n_parts, 2 do if skel[idx] then cnv[idx] = val else cnv[idx] = tostring(key) end end tbl[key] = table.concat(cnv) end return context_iterate(ctx, 2) end -- Syntax: #invoke:params|mapping_to_names|pipe to --[[ library.mapping_to_names = function (ctx) local tbl = ctx.params for key in pairs(tbl) do tbl[key] = tostring(key) end return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|renaming_to_lowercase|pipe to library.renaming_to_lowercase = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local cache = {} for key, val in pairs(ctx.params) do if type(key) == 'string' then cache[key:lower()] = val else cache[key] = val end end ctx.params = cache return context_iterate(ctx, 1) end -- Syntax: #invoke:params|renaming_to_uppercase|pipe to library.renaming_to_uppercase = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local cache = {} for key, val in pairs(ctx.params) do if type(key) == 'string' then cache[key:upper()] = val else cache[key] = val end end ctx.params = cache return context_iterate(ctx, 1) end -- Syntax: #invoke:params|renaming_to_sequence|[sort order]|pipe to library.renaming_to_sequence = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local cache, len local tbl = ctx.params local sortfn, argc, do_sort = load_sort_opt(ctx.pipe[1]) if do_sort then local words, wl cache, words, len, wl = get_key_list_sorted(tbl, sortfn) for idx = 1, len do cache[idx] = tbl[cache[idx]] end for idx = 1, wl do cache[len + idx] = tbl[words[idx]] end else len, cache = 0, {} for _, val in pairs(tbl) do len = len + 1 cache[len] = val end end ctx.params = cache return context_iterate(ctx, argc) end -- Syntax: #invoke:params|renaming_by_calling|template name|[call -- style]|[let/use]|[...]|[let/use]|[...]|[number of additional -- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to library.renaming_by_calling = function (ctx) local tname local opts = ctx.pipe if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end if tname == nil then error(modulename .. ', ‘renaming_by_calling’: No template name was provided', 0) end local rargs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params) local model = { title = tname, args = rargs } map_names(tbl, rargs, karg, varg, looptype, function () return ctx.frame:expandTemplate(model) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|renaming_by_invoking|module name|function -- name|[call style]|[let/use]|[...]|[let/use]|[...]|[number of -- additional arguments]|[argument 1]|[argument 2]|[...]|[argument -- N]|pipe to library.renaming_by_invoking = function (ctx) local mname, fname local opts = ctx.pipe if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end if mname == nil then error(modulename .. ', ‘renaming_by_invoking’: No module name was provided', 0) end if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end if fname == nil then error(modulename .. ', ‘renaming_by_invoking’: No function name was provided', 0) end local rargs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 2, mapping_styles.names_only, ctx.params) local model = { title = 'Module:' .. mname, args = rargs } local mfunc = require(model.title)[fname] if mfunc == nil then error(modulename .. ', ‘renaming_by_invoking’: The function ‘' .. fname .. '’ does not exist', 0) end map_names(tbl, rargs, karg, varg, looptype, function () return tostring(mfunc(ctx.frame:newChild(model))) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|renaming_by_magic|parser function|[call -- style]|[let/use]|[...]|[let/use]|[...]|[number of additional -- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to library.renaming_by_magic = function (ctx) local opts = ctx.pipe local magic if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end if magic == nil then error(modulename .. ', ‘renaming_by_magic’: No parser function was provided', 0) end local rargs, argc, looptype, karg, varg, tbl, mem = load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params) map_names(tbl, rargs, karg, varg, looptype, function () return ctx.frame:callParserFunction(magic, rargs) end) for key, val in pairs(mem) do tbl[key] = val end ctx.params = tbl return context_iterate(ctx, argc) end -- Syntax: #invoke:params|renaming_by_replacing|target|replace|[count]|[plain -- flag]|pipe to library.renaming_by_replacing = function (ctx) local ptn, repl, nmax, flg, argc, die = load_replace_args(ctx.pipe, 'renaming_by_replacing') if die then return context_iterate(ctx, argc) end local tbl = ctx.params if flg == 3 then ptn = get_parameter_name(ptn) local val = tbl[ptn] if val ~= nil then tbl[ptn], tbl[get_parameter_name(repl)] = nil, val end else if flg == 2 then -- Copied from Module:String's `str._escapePattern()` ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0') end local cache = {} for key, val in pairs(tbl) do steal_if_renamed(val, tbl, key, cache, tostring(key):gsub(ptn, repl, nmax)) end for key, val in pairs(cache) do tbl[key] = val end end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|renaming_by_mixing|mixing string|pipe to library.renaming_by_mixing = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning if ctx.pipe[1] == nil then error(modulename .. ', ‘renaming_by_mixing’: No mixing string was provided', 0) end local mix = ctx.pipe[1]:match'^%s*(.-)%s*$' local cache = {} if mix == '$@' then for _, val in pairs(ctx.params) do cache[get_parameter_name(val)] = val end else local skel, canvas, n_parts = parse_placeholder_string(mix) for key, val in pairs(ctx.params) do for idx = 2, n_parts, 2 do if skel[idx] then canvas[idx] = val else canvas[idx] = tostring(key) end end cache[get_parameter_name(table.concat(canvas))] = val end end ctx.params = cache return context_iterate(ctx, 2) end -- Syntax: #invoke:params|renaming_to_values|pipe to --[[ library.renaming_to_values = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local cache = {} for _, val in pairs(ctx.params) do cache[val] = val end ctx.params = cache return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|grouping_by_calling|template -- name|[let/use]|[...]|[let/use]|[...]|[number of additional -- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to library.grouping_by_calling = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local tmp, argc, tbl, mem = load_child_opts(ctx.pipe, 2, 0, ctx.params) local gargs = {} for key, val in pairs(tmp) do if type(key) == 'number' and key < 1 then gargs[key - 1] = val else gargs[key] = val end end tmp = ctx.pipe[1] if tmp ~= nil then tmp = tmp:match'^%s*(.*%S)' end if tmp == nil then error(modulename .. ', ‘grouping_by_calling’: No template name was provided', 0) end local model = { title = tmp } local groups = make_groups(tbl) for gid, group in pairs(groups) do for key, val in pairs(gargs) do group[key] = val end group[0], model.args = gid, group groups[gid] = ctx.frame:expandTemplate(model) end for key, val in pairs(mem) do groups[key] = val end ctx.params = groups return context_iterate(ctx, argc) end -- Syntax: #invoke:params|parsing|string to parse|[trim flag]|[iteration -- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to library.parsing = function (ctx) local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘parsing’: No string to parse was provided', 0) end local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc = load_parse_opts(opts, 2, '|', '=') parse_parameter_string(ctx.params, opts[1], isep, iplain, psep, pplain, trimnamed, trimunnamed) return context_iterate(ctx, argc) end -- Syntax: #invoke:params|reinterpreting|parameter to reinterpret|[trim -- flag]|[iteration delimiter setter]|[...]|[key-value delimiter -- setter]|[...]|pipe to library.reinterpreting = function (ctx) local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘reinterpreting’: No parameter to reinterpret was provided', 0) end local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc = load_parse_opts(opts, 2, '|', '=') local tbl, tmp = ctx.params, get_parameter_name(opts[1]) local str = tbl[tmp] if str ~= nil then tbl[tmp] = nil parse_parameter_string(tbl, str, isep, iplain, psep, pplain, trimnamed, trimunnamed) end return context_iterate(ctx, argc) end -- Syntax: #invoke:params|evaluating|string to parse|[trim flag]|[iteration -- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to library.evaluating = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘evaluating’: No string to parse was provided', 0) end local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc = load_parse_opts(opts, 2, '!', ':') if opts[1]:match'^%s*(.*%S)' == nil then ctx.pipe = copy_or_ref_table(opts, opts ~= ctx.opipe) return context_iterate(ctx, argc) end local new_opts, cache = {}, {} local shift = parse_parameter_string(cache, opts[1], isep, iplain, psep, pplain, trimnamed, trimunnamed) - argc for key, val in pairs(opts) do if type(key) ~= 'number' or key < 1 then new_opts[key] = val elseif key >= argc then new_opts[key + shift] = val end end for key, val in pairs(cache) do new_opts[key] = val end ctx.pipe = new_opts return context_iterate(ctx, 1) end -- Syntax: #invoke:params|mixing_names_and_values|mixing string|pipe to library.mixing_names_and_values = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning if ctx.pipe[1] == nil then error(modulename .. ', ‘mixing_names_and_values’: No mixing string was provided for parameter names', 0) end if ctx.pipe[2] == nil then error(modulename .. ', ‘mixing_names_and_values’: No mixing string was provided for parameter values', 0) end local tmp local mix_k = ctx.pipe[1]:match'^%s*(.-)%s*$' local cache, mix_v = {}, ctx.pipe[2] if mix_k == '$@' and mix_v == '$@' then for _, val in pairs(ctx.params) do cache[get_parameter_name(val)] = val end elseif mix_k == '$@' and mix_v == '$#' then for key, val in pairs(ctx.params) do cache[get_parameter_name(val)] = tostring(key) end elseif mix_k == '$#' and mix_v == '$#' then for key in pairs(ctx.params) do cache[key] = tostring(key) end else local skel_k, cnv_k, n_parts_k = parse_placeholder_string(mix_k) local skel_v, cnv_v, n_parts_v = parse_placeholder_string(mix_v) for key, val in pairs(ctx.params) do tmp = tostring(key) for idx = 2, n_parts_k, 2 do if skel_k[idx] then cnv_k[idx] = val else cnv_k[idx] = tmp end end for idx = 2, n_parts_v, 2 do if skel_v[idx] then cnv_v[idx] = val else cnv_v[idx] = tmp end end cache[get_parameter_name(table.concat(cnv_k))] = table.concat(cnv_v) end end ctx.params = cache return context_iterate(ctx, 3) end -- Syntax: #invoke:params|swapping_names_and_values|pipe to --[[ library.swapping_names_and_values = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local cache = {} for key, val in pairs(ctx.params) do cache[val] = key end ctx.params = cache return context_iterate(ctx, 1) end ]]-- -- Syntax: #invoke:params|combining|new parameter name|[sort -- order]|[with/without flushed glue]|setting directives|...|pipe to library.combining = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning return context_iterate(ctx, combine_parameters( ctx, function (key, val, kvs) return key .. kvs .. val end, 'combining' ) + 1) end -- Syntax: #invoke:params|combining_values|new parameter name|[sort -- order]|[with/without flushed glue]|setting directives|...|pipe to library.combining_values = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning return context_iterate(ctx, combine_parameters( ctx, function (key, val, kvs) return val end, 'combining_values' ) + 1) end -- Syntax: #invoke:params|combining_by_calling|template name|new parameter -- name|pipe to library.combining_by_calling = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local tname = ctx.pipe[1] if tname ~= nil then tname = tname:match'^%s*(.*%S)' else error(modulename .. ', ‘combining_by_calling’: No template name was provided', 0) end if ctx.pipe[2] == nil then error(modulename .. ', ‘combining_by_calling’: No parameter name was provided', 0) end ctx.params = { [get_parameter_name(ctx.pipe[2])] = ctx.frame:expandTemplate{ title = tname, args = ctx.params } } return context_iterate(ctx, 3) end -- Syntax: #invoke:params|combining_by_invoking|module name|function name|new -- parameter name|pipe to library.combining_by_invoking = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local mname = ctx.pipe[1] if mname ~= nil then mname = mname:match'^%s*(.*%S)' else error(modulename .. ', ‘combining_by_invoking’: No module name was provided', 0) end local fname = ctx.pipe[2] if fname ~= nil then fname = fname:match'^%s*(.*%S)' else error(modulename .. ', ‘combining_by_invoking’: No function name was provided', 0) end if ctx.pipe[3] == nil then error(modulename .. ', ‘combining_by_invoking’: No parameter name was provided', 0) end local model = { title = 'Module:' .. mname, args = ctx.params } local mfunc = require(model.title)[fname] if mfunc == nil then error(modulename .. ', ‘mapping_by_invoking’: The function ‘' .. fname .. '’ does not exist', 0) end ctx.params = { [get_parameter_name(ctx.pipe[3])] = tostring(mfunc(ctx.frame:newChild(model))) } return context_iterate(ctx, 4) end -- Syntax: #invoke:params|combining_by_magic|parser function|new parameter -- name|pipe to library.combining_by_magic = function (ctx) -- NOTE: `ctx.params` might be the original metatable! As a modifier, -- this function MUST create a copy of it before returning local magic = ctx.pipe[1] if magic ~= nil then magic = magic:match'^%s*(.*%S)' else error(modulename .. ', ‘combining_by_magic’: No parser function was provided', 0) end if ctx.pipe[2] == nil then error(modulename .. ', ‘combining_by_magic’: No parameter name was provided', 0) end ctx.params = { [get_parameter_name(ctx.pipe[2])] = ctx.frame:callParserFunction(magic, ctx.params) } return context_iterate(ctx, 3) end -- Syntax: #invoke:params|snapshotting|[maximum number]|pipe to library.snapshotting = function (ctx) return context_iterate(ctx, make_child(ctx, ctx.params, 'snapshotting')) end -- Syntax: #invoke:params|remembering|[maximum number]|pipe to library.remembering = function (ctx) return context_iterate(ctx, make_child(ctx, ctx.oparams, 'remembering')) end -- Syntax: #invoke:params|entering_substack|[new]|pipe to library.entering_substack = function (ctx) local tbl, ncurrparent = ctx.params, ctx.n_parents + 1 if ctx.parents == nil then ctx.parents = { tbl } else ctx.parents[ncurrparent] = tbl end ctx.n_parents = ncurrparent if ctx.pipe[1] ~= nil and ctx.pipe[1]:match'^%s*new%s*$' then ctx.params = {} return context_iterate(ctx, 2) end local currsnap = ctx.n_children if currsnap > 0 then ctx.params, ctx.children[currsnap], ctx.n_children = ctx.children[currsnap], nil, currsnap - 1 else local newparams = {} for key, val in pairs(tbl) do newparams[key] = val end ctx.params = newparams end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|pulling|parameter name|pipe to library.pulling = function (ctx) local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘pulling’: No parameter to pull was provided', 0) end local tmp = ctx.n_parents local parent = tmp < 1 and ctx.oparams or ctx.parents[tmp] tmp = get_parameter_name(opts[1]) if parent[tmp] ~= nil then ctx.params[tmp] = parent[tmp] end return context_iterate(ctx, 2) end -- Syntax: #invoke:params|recalling|parameter name|pipe to library.recalling = function (ctx) local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘recalling’: No parameter to recall was provided', 0) end local arg = get_parameter_name(opts[1]) if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end return context_iterate(ctx, 2) end -- Syntax: #invoke:params|finding|parameter name|pipe to --[[ library.finding = function (ctx) local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘finding’: No parameter to find was provided', 0) end local arg = get_parameter_name(opts[1]) local parent for idx = ctx.n_parents, 1, -1 do parent = ctx.parents[idx] if parent[arg] ~= nil then ctx.params[arg] = parent[arg] return context_iterate(ctx, 2) end end if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end return context_iterate(ctx, 2) end ]]-- -- Syntax: #invoke:params|picking|number of parameters to pick|pipe to --[[ library.picking = function (ctx) local len = tonumber(ctx.pipe[1]) if len == nil or len < 1 or math.floor(len) ~= len then error(modulename .. ', ‘picking’: The number of parameters to pick must be an integer greater than zero', 0) end if ctx.n_parents < 1 then copy_table_maxn(ctx.params, ctx.oparams, len) else copy_table_maxn(ctx.params, ctx.parents[ctx.n_parents], len) end return context_iterate(ctx, 2) end ]]-- -- Syntax: #invoke:params|detaching_substack|pipe to library.detaching_substack = function (ctx) local ncurrparent = ctx.n_parents if ncurrparent < 1 then error(modulename .. ', ‘detaching_substack’: No substack has been created', 0) end local parent = ctx.parents[ncurrparent] for key in pairs(ctx.params) do parent[key] = nil end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|dropping_substack|pipe to library.dropping_substack = function (ctx) local ncurrparent = ctx.n_parents if ncurrparent < 1 then error(modulename .. ', ‘dropping_substack’: No substack has been created', 0) end ctx.params, ctx.parents[ncurrparent], ctx.n_parents = ctx.parents[ncurrparent], nil, ncurrparent - 1 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|leaving_substack|pipe to library.leaving_substack = function (ctx) local ncurrparent = ctx.n_parents if ncurrparent < 1 then error(modulename .. ', ‘leaving_substack’: No substack has been created', 0) end local currsnap = ctx.n_children + 1 if ctx.children == nil then ctx.children = { ctx.params } else ctx.children[currsnap] = ctx.params end ctx.params, ctx.parents[ncurrparent], ctx.n_parents, ctx.n_children = ctx.parents[ncurrparent], nil, ncurrparent - 1, currsnap return context_iterate(ctx, 1) end -- Syntax: #invoke:params|merging_substack|pipe to library.merging_substack = function (ctx) local ncurrparent = ctx.n_parents if ncurrparent < 1 then error(modulename .. ', ‘merging_substack’: No substack has been created', 0) end local parent, child = ctx.parents[ncurrparent], ctx.params ctx.params, ctx.parents[ncurrparent], ctx.n_parents = parent, nil, ncurrparent - 1 for key, val in pairs(child) do parent[key] = val end return context_iterate(ctx, 1) end -- Syntax: #invoke:params|flushing|pipe to library.flushing = function (ctx) if ctx.n_children < 1 then error(modulename .. ', ‘flushing’: There are no substacks to flush', 0) end local parent, currsnap = ctx.params, ctx.n_children for key, val in pairs(ctx.children[currsnap]) do parent[key] = val end ctx.children[currsnap], ctx.n_children = nil, currsnap - 1 return context_iterate(ctx, 1) end -- Syntax: #invoke:params|setting_by_flushing|pipe to library.setting_by_flushing = function (ctx) set_strings_from_substack(ctx, ctx, 'setting_by_flushing') return context_iterate(ctx, 1) end --[[ Functions ]]-- ----------------------------- -- Syntax: #invoke:params|count library.count = function (ctx) -- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables! local retval = 0 for _ in ctx.iterfunc(ctx.params) do retval = retval + 1 end if ctx.subset == -1 then retval = retval - #ctx.params end ctx.text = retval return false end -- Syntax: #invoke:args|concat_and_call|template name|[prepend 1]|[prepend 2] -- |[...]|[item n]|[named item 1=value 1]|[...]|[named item n=value -- n]|[...] library.concat_and_call = function (ctx) -- NOTE: `ctx.params` might be the original metatable! local tname local opts = ctx.pipe if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end if tname == nil then error(modulename .. ', ‘concat_and_call’: No template name was provided', 0) end remove_numeric_keys(opts, 1, 1) ctx.text = ctx.frame:expandTemplate{ title = tname, args = concat_params(ctx) } return false end -- Syntax: #invoke:args|concat_and_invoke|module name|function name|[prepend -- 1]|[prepend 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named -- item n=value n]|[...] library.concat_and_invoke = function (ctx) -- NOTE: `ctx.params` might be the original metatable! local mname, fname local opts = ctx.pipe if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end if mname == nil then error(modulename .. ', ‘concat_and_invoke’: No module name was provided', 0) end if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end if fname == nil then error(modulename .. ', ‘concat_and_invoke’: No function name was provided', 0) end remove_numeric_keys(opts, 1, 2) local mfunc = require('Module:' .. mname)[fname] if mfunc == nil then error(modulename .. ', ‘concat_and_invoke’: The function ‘' .. fname .. '’ does not exist', 0) end ctx.text = mfunc(ctx.frame:newChild{ title = 'Module:' .. mname, args = concat_params(ctx) }) return false end -- Syntax: #invoke:args|concat_and_magic|parser function|[prepend 1]|[prepend -- 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named item n= -- value n]|[...] library.concat_and_magic = function (ctx) -- NOTE: `ctx.params` might be the original metatable! local magic local opts = ctx.pipe if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end if magic == nil then error(modulename .. ', ‘concat_and_magic’: No parser function was provided', 0) end remove_numeric_keys(opts, 1, 1) ctx.text = ctx.frame:callParserFunction(magic, concat_params(ctx)) return false end -- Syntax: #invoke:params|value_of|parameter name library.value_of = function (ctx) -- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables! local opts = ctx.pipe if opts[1] == nil then error(modulename .. ', ‘value_of’: No parameter name was provided', 0) end local val local key = opts[1]:match'^%s*(.-)%s*$' if key == '0' or key:find'^%-?[1-9]%d*$' ~= nil then key = tonumber(key) val = ctx.params[key] -- No worries: #ctx.params is unused when the modifier is in -- first position (and therefore `ctx.params` is a metatable) if val ~= nil and ( ctx.subset ~= -1 or key > #ctx.params or key < 1 ) and ( ctx.subset ~= 1 or (key <= #ctx.params and key > 0) ) then ctx.text = (ctx.header or '') .. val .. (ctx.footer or '') else ctx.text = ctx.ifngiven or '' end else val = ctx.params[key] if ctx.subset ~= 1 and val ~= nil then ctx.text = (ctx.header or '') .. val .. (ctx.footer or '') else ctx.text = ctx.ifngiven or '' end end return false end -- Syntax: #invoke:params|list library.list = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or '' flush_params(ctx, function (key, val) ret[nss + 1], ret[nss + 2], ret[nss + 3], ret[nss + 4], nss = pps, key, kvs, val, nss + 4 end) finalize_and_return_concatenated_list(ctx, ret, nss, 4) return false end -- Syntax: #invoke:params|list_values library.list_values = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! -- NOTE: `library.coins()` and `library.unique_coins()` rely on us local ret, nss, pps = {}, 0, ctx.itersep or '' flush_params(ctx, function (key, val) ret[nss + 1], ret[nss + 2], nss = pps, val, nss + 2 end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|list_maybe_with_names library.list_maybe_with_names = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or '' mixed_flush_params( ctx, function (key, val) ret[nss + 1], ret[nss + 2], ret[nss + 3], ret[nss + 4], nss = pps, '', '', val, nss + 4 end, function (key, val) ret[nss + 1], ret[nss + 2], ret[nss + 3], ret[nss + 4], nss = pps, key, kvs, val, nss + 4 end ) finalize_and_return_concatenated_list(ctx, ret, nss, 4) return false end -- Syntax: #invoke:params|coins|[first coin = value 1]|[second coin = value -- 2]|[...]|[last coin = value N] --[[ library.coins = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! local opts, tbl = ctx.pipe, ctx.params for key, val in pairs(tbl) do tbl[key] = opts[get_parameter_name(val)] end return library.list_values(ctx) end ]]-- -- Syntax: #invoke:params|unique_coins|[first coin = value 1]|[second coin = -- value 2]|[...]|[last coin = value N] --[[ library.unique_coins = function (ctx) local tmp local opts, tbl = ctx.pipe, ctx.params for key, val in pairs(tbl) do tmp = get_parameter_name(val) tbl[key], opts[tmp] = opts[tmp], nil end return library.list_values(ctx) end ]] -- Syntax: #invoke:params|for_each|wikitext library.for_each = function (ctx) -- NOTE: `ctx.pipe` might be the original metatable! local ret, nss, pps, txt = {}, 0, ctx.itersep or '', ctx.pipe[1] or '' local skel, cnv, n_parts = parse_placeholder_string(txt) flush_params(ctx, function (key, val) for idx = 2, n_parts, 2 do if skel[idx] then cnv[idx] = val else cnv[idx] = tostring(key) end end ret[nss + 1], nss = pps, nss + 2 ret[nss] = table.concat(cnv) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|call_for_each|template name|[append 1]|[append 2] -- |[...]|[append n]|[named param 1=value 1]|[...]|[named param -- n=value n]|[...] library.call_for_each = function (ctx) local tname local opts = ctx.pipe if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end if tname == nil then error(modulename .. ', ‘call_for_each’: No template name was provided', 0) end local model = { title = tname, args = opts } local ret, nss, ccs = {}, 0, ctx.itersep or '' table.insert(opts, 1, true) flush_params(ctx, function (key, val) opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2 ret[nss] = ctx.frame:expandTemplate(model) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|invoke_for_each|module name|module function|[append -- 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...] -- |[named param n=value n]|[...] library.invoke_for_each = function (ctx) local mname, fname local opts = ctx.pipe if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end if mname == nil then error(modulename .. ', ‘invoke_for_each’: No module name was provided', 0) end if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end if fname == nil then error(modulename .. ', ‘invoke_for_each’: No function name was provided', 0) end local model = { title = 'Module:' .. mname, args = opts } local mfunc = require(model.title)[fname] local ret, nss, ccs = {}, 0, ctx.itersep or '' flush_params(ctx, function (key, val) opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2 ret[nss] = mfunc(ctx.frame:newChild(model)) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|magic_for_each|parser function|[append 1]|[append 2] -- |[...]|[append n]|[named param 1=value 1]|[...]|[named param -- n=value n]|[...] library.magic_for_each = function (ctx) local magic local opts = ctx.pipe if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end if magic == nil then error(modulename .. ', ‘magic_for_each’: No parser function was provided', 0) end local ret, nss, ccs = {}, 0, ctx.itersep or '' table.insert(opts, 1, true) flush_params(ctx, function (key, val) opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2 ret[nss] = ctx.frame:callParserFunction(magic, opts) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|call_for_each_value|template name|[append 1]|[append -- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param -- n=value n]|[...] library.call_for_each_value = function (ctx) local tname local opts = ctx.pipe if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end if tname == nil then error(modulename .. ', ‘call_for_each_value’: No template name was provided', 0) end local model = { title = tname, args = opts } local ret, nss, ccs = {}, 0, ctx.itersep or '' flush_params(ctx, function (key, val) opts[1], ret[nss + 1], nss = val, ccs, nss + 2 ret[nss] = ctx.frame:expandTemplate(model) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|invoke_for_each_value|module name|[append 1]|[append -- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param -- n=value n]|[...] library.invoke_for_each_value = function (ctx) local opts = ctx.pipe local mname, fname if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end if mname == nil then error(modulename .. ', ‘invoke_for_each_value’: No module name was provided', 0) end if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end if fname == nil then error(modulename .. ', ‘invoke_for_each_value’: No function name was provided', 0) end local model = { title = 'Module:' .. mname, args = opts } local mfunc = require(model.title)[fname] local ret, nss, ccs = {}, 0, ctx.itersep or '' remove_numeric_keys(opts, 1, 1) flush_params(ctx, function (key, val) opts[1], ret[nss + 1], nss = val, ccs, nss + 2 ret[nss] = mfunc(ctx.frame:newChild(model)) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|magic_for_each_value|parser function|[append 1] -- |[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named -- param n=value n]|[...] library.magic_for_each_value = function (ctx) local opts = ctx.pipe local magic if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end if magic == nil then error(modulename .. ', ‘magic_for_each_value’: No parser function was provided', 0) end local ret, nss, ccs = {}, 0, ctx.itersep or '' flush_params(ctx, function (key, val) opts[1], ret[nss + 1], nss = val, ccs, nss + 2 ret[nss] = ctx.frame:callParserFunction(magic, opts) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end -- Syntax: #invoke:params|call_for_each_group|template name|[append 1]|[append -- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param -- n=value n]|[...] library.call_for_each_group = function (ctx) -- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables! local tmp if ctx.pipe[1] ~= nil then tmp = ctx.pipe[1]:match'^%s*(.*%S)' end if tmp == nil then error(modulename .. ', ‘call_for_each_group’: No template name was provided', 0) end local model = { title = tmp } local opts, ret, nss, ccs = {}, {}, 0, ctx.itersep or '' for key, val in pairs(ctx.pipe) do if type(key) == 'number' then opts[key - 1] = val else opts[key] = val end end ctx.pipe = opts ctx.params = make_groups(ctx.params) flush_params(ctx, function (gid, group) for key, val in pairs(opts) do group[key] = val end group[0], model.args, ret[nss + 1], nss = gid, group, ccs, nss + 2 ret[nss] = ctx.frame:expandTemplate(model) end) finalize_and_return_concatenated_list(ctx, ret, nss, 2) return false end --[[ First-position-only modifiers ]]-- --------------------------------------- -- Syntax: #invoke:params|new|pipe to static_iface.new = function (child_frame) local ctx = context_new(child_frame) ctx.pipe = copy_or_ref_table(ctx.opipe, false) ctx.params = {} main_loop(ctx, context_iterate(ctx, 1)) return ctx.text end --[[ First-position-only functions ]]-- --------------------------------------- -- Syntax: #invoke:params|self static_iface.self = function (frame) return frame:getParent():getTitle() end --[[ Public metatable of functions ]]-- --------------------------------------- return setmetatable({}, { __index = function (_, query) local fname = query:match'^%s*(.*%S)' if fname == nil then error(modulename .. ': You must specify a function to call', 0) end local func = static_iface[fname] if func ~= nil then return func end func = library[fname] if func == nil then error(modulename .. ': The function ‘' .. fname .. '’ does not exist', 0) end return function (child_frame) local ctx = context_new(child_frame) ctx.pipe = copy_or_ref_table(ctx.opipe, refpipe[fname]) ctx.params = copy_or_ref_table(ctx.oparams, refparams[fname]) main_loop(ctx, func) return ctx.text end end }) jm8x5ug81bre69dpt2csm0n3owsmu2i Template:Parameter 10 43857 116726 105740 2026-06-15T14:42:32Z en>Jonesey95 0 noinclude notice on main para template to fix various rendering errors 116726 wikitext text/x-wiki <noinclude>{{Template for merging/dated|page=Parameter|otherpage=Parameter2|link=Wikipedia:Templates for discussion/Log/2026 June 14#Template:Parameter|type=tiny|help=off|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}</noinclude><code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!-- Categories go near the bottom of the /doc subpage – interwikis go to Wikidata, thank you! --> </noinclude> ajepodzuvdrs3oecz2gazhbq31gqfa2 116727 116726 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Parameter]] 116726 wikitext text/x-wiki <noinclude>{{Template for merging/dated|page=Parameter|otherpage=Parameter2|link=Wikipedia:Templates for discussion/Log/2026 June 14#Template:Parameter|type=tiny|help=off|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}</noinclude><code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!-- Categories go near the bottom of the /doc subpage – interwikis go to Wikidata, thank you! --> </noinclude> ajepodzuvdrs3oecz2gazhbq31gqfa2 Module:InfoboxImage 828 44722 117076 114755 2025-10-18T09:45:47Z en>WOSlinker 0 make changes from sandbox requested by [[User:Hike395]] on talk page 117076 Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {} -- List of placeholder images and tracking categories stored in [[Module:InfoboxImage/data]] -- Other constants: -- the system-wide default thumbnail size (in px) local defaultThumbnailSize = 250 -- If page is not a user page, return tracking category. Else return empty. local function trackingCat(cat) local ns = mw.title.getCurrentTitle().nsText:lower() local categories = mw.loadData('Module:InfoboxImage/data').categories return (ns ~= 'user' and ns ~= 'user talk' and categories[cat]) or "" end -- Determine whether image is a placeholder function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); local placeholder_image = mw.loadData('Module:InfoboxImage/data').placeholder_image return placeholder_image[image] end local function isempty(x) return (not x) or x == "" end -- Main entry point function i.InfoboxImage(frame) local image = frame.args["image"]; if isempty(image) then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if string.find(image, "^%[*https?:") then -- Error category. return trackingCat("url_image_links") end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = trackingCat("thumbnail_images") end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local upright = frame.args["upright"] or "" local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if not isempty(maxsize) then -- if no sizedefault nor upright, then set to maxsize if isempty(sizedefault) and isempty(upright) then sizedefault = maxsize end -- check to see if size bigger than maxsize local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if not isempty(size) then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; if sizenumber > maxsizenumber and maxsizenumber > 0 then size = maxsize; end end -- check to see if upright bigger than maxsize (at default preferred size) if not isempty(upright) then local uprightnumber = tonumber(upright) or (upright == "yes" and 0.75) or 0 if uprightnumber*defaultThumbnailSize > maxsizenumber and maxsizenumber > 0 then upright = tostring(maxsizenumber/defaultThumbnailSize) end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if not isempty(page) then result = result .. "|page=" .. page; end if not isempty(size) then result = result .. "|" .. size; elseif not isempty(sizedefault) and isempty(upright) then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if not isempty(alt) then result = result .. "|alt=" .. alt; end if not isempty(link) then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if not isempty(class) then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if not isempty(title) then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if not isempty(title) then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; jhks6vfk9v2iehyrc6dp50ju1s294vf 117077 117076 2026-07-16T11:39:37Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:InfoboxImage]] 117076 Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {} -- List of placeholder images and tracking categories stored in [[Module:InfoboxImage/data]] -- Other constants: -- the system-wide default thumbnail size (in px) local defaultThumbnailSize = 250 -- If page is not a user page, return tracking category. Else return empty. local function trackingCat(cat) local ns = mw.title.getCurrentTitle().nsText:lower() local categories = mw.loadData('Module:InfoboxImage/data').categories return (ns ~= 'user' and ns ~= 'user talk' and categories[cat]) or "" end -- Determine whether image is a placeholder function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); local placeholder_image = mw.loadData('Module:InfoboxImage/data').placeholder_image return placeholder_image[image] end local function isempty(x) return (not x) or x == "" end -- Main entry point function i.InfoboxImage(frame) local image = frame.args["image"]; if isempty(image) then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if string.find(image, "^%[*https?:") then -- Error category. return trackingCat("url_image_links") end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = trackingCat("thumbnail_images") end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local upright = frame.args["upright"] or "" local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if not isempty(maxsize) then -- if no sizedefault nor upright, then set to maxsize if isempty(sizedefault) and isempty(upright) then sizedefault = maxsize end -- check to see if size bigger than maxsize local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if not isempty(size) then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; if sizenumber > maxsizenumber and maxsizenumber > 0 then size = maxsize; end end -- check to see if upright bigger than maxsize (at default preferred size) if not isempty(upright) then local uprightnumber = tonumber(upright) or (upright == "yes" and 0.75) or 0 if uprightnumber*defaultThumbnailSize > maxsizenumber and maxsizenumber > 0 then upright = tostring(maxsizenumber/defaultThumbnailSize) end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if not isempty(page) then result = result .. "|page=" .. page; end if not isempty(size) then result = result .. "|" .. size; elseif not isempty(sizedefault) and isempty(upright) then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if not isempty(alt) then result = result .. "|alt=" .. alt; end if not isempty(link) then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if not isempty(class) then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if not isempty(title) then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if not isempty(title) then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; jhks6vfk9v2iehyrc6dp50ju1s294vf Template:Template display 10 44757 116792 107015 2025-02-08T19:00:50Z en>Jonesey95 0 link to better explanatino 116792 wikitext text/x-wiki <includeonly>{{#invoke:Message box|ombox|type=notice |image={{#switch:{{{1}}}|adaptive=[[File:Different devices simple.svg|65x65px|link=|alt=]]|nomobile=[[File:Handheld devices no.svg|55px|link=|alt=]]|nodesktop=[[File:Desktop devices no.svg|55px|link=|alt=]]}} |text={{#switch:{{{1}}} | adaptive = This template is [[Adaptive web design|responsive]] and <strong>displays differently in mobile and desktop view</strong>. Read the documentation for an explanation of the differences and why they exist. | nomobile = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. See [[Template:Navbox visibility]] for a brief explanation. | nomobile720 = This template does ''not'' display in the mobile view of Wikipedia when the window is less than 720 pixels wide. Read the documentation for an explanation. | nodesktop = This template does ''not'' display in the desktop view of Wikipedia; it is <strong>mobile only</strong>. Read the documentation for an explanation. | nomobilesidebar = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the [[Template:Sidebar/doc|parent documentation]] for an explanation. | badmobile = This template contains coding that is not compatible with [[Help:Mobile access|mobile versions of Wikipedia]], causing display and [[Wikipedia:Manual of Style/Accessibility|accessibility problems]]. Read the documentation for an explanation. | vector2022 = This template does not work properly in the [[Wikipedia:Vector 2022|Vector 2022]] skin. Read the documentation for an explanation. | #default = {{{1}}} }}}}</includeonly><noinclude> {{Documentation}} </noinclude> egx1w755hd3mso4m0o760gw2scpmk9c 116793 116792 2026-07-15T19:07:01Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Template_display]] 116792 wikitext text/x-wiki <includeonly>{{#invoke:Message box|ombox|type=notice |image={{#switch:{{{1}}}|adaptive=[[File:Different devices simple.svg|65x65px|link=|alt=]]|nomobile=[[File:Handheld devices no.svg|55px|link=|alt=]]|nodesktop=[[File:Desktop devices no.svg|55px|link=|alt=]]}} |text={{#switch:{{{1}}} | adaptive = This template is [[Adaptive web design|responsive]] and <strong>displays differently in mobile and desktop view</strong>. Read the documentation for an explanation of the differences and why they exist. | nomobile = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. See [[Template:Navbox visibility]] for a brief explanation. | nomobile720 = This template does ''not'' display in the mobile view of Wikipedia when the window is less than 720 pixels wide. Read the documentation for an explanation. | nodesktop = This template does ''not'' display in the desktop view of Wikipedia; it is <strong>mobile only</strong>. Read the documentation for an explanation. | nomobilesidebar = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the [[Template:Sidebar/doc|parent documentation]] for an explanation. | badmobile = This template contains coding that is not compatible with [[Help:Mobile access|mobile versions of Wikipedia]], causing display and [[Wikipedia:Manual of Style/Accessibility|accessibility problems]]. Read the documentation for an explanation. | vector2022 = This template does not work properly in the [[Wikipedia:Vector 2022|Vector 2022]] skin. Read the documentation for an explanation. | #default = {{{1}}} }}}}</includeonly><noinclude> {{Documentation}} </noinclude> egx1w755hd3mso4m0o760gw2scpmk9c Module:Check for unknown parameters 828 44760 116802 113933 2026-06-28T22:16:03Z en>MSGJ 0 +pushpin_map 116802 Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list require ('strict'); local p = {} local pushpin_map_params = { 'coordinates', 'pushpin_caption', 'pushpin_relief', 'pushpin_label', 'pushpin_label_position', 'pushpin_label_size', 'pushpin_map', 'pushpin_mark', 'pushpin_mark_size', 'pushpin_alt', 'pushpin_background', 'pushpin_map_size' } local mapframe_params = { 'coord', 'coordinates', 'id', 'qid', 'mapframe', 'mapframe-area_km2', 'mapframe-area_mi2', 'mapframe-caption', 'mapframe-coord', 'mapframe-coordinates', 'mapframe-custom', 'mapframe-frame-coord', 'mapframe-frame-coordinates', 'mapframe-frame-height', 'mapframe-frame-width', 'mapframe-geomask', 'mapframe-geomask-fill', 'mapframe-geomask-fill-opacity', 'mapframe-geomask-stroke-color', 'mapframe-geomask-stroke-colour', 'mapframe-geomask-stroke-width', 'mapframe-height', 'mapframe-id', 'mapframe-length_km', 'mapframe-length_mi', 'mapframe-line', 'mapframe-line-stroke-color', 'mapframe-line-stroke-colour', 'mapframe-marker', 'mapframe-marker-color', 'mapframe-marker-colour', 'mapframe-point', 'mapframe-population', 'mapframe-shape', 'mapframe-shape-fill', 'mapframe-shape-fill-opacity', 'mapframe-shape-stroke-color', 'mapframe-shape-stroke-colour', 'mapframe-stroke-color', 'mapframe-stroke-colour', 'mapframe-stroke-width', 'mapframe-switcher', 'mapframe-type', 'mapframe-width', 'mapframe-wikidata', 'mapframe-zoom' } local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} if isnotempty(args['mapframe_args']) then for _, v in ipairs(mapframe_params) do knownargs[v] = 1 end end if isnotempty(args['pushpin_map_args']) then for _, v in ipairs(pushpin_map_params) do knownargs[v] = 1 end end local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview_text == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p kohqf9fxewyce9gq1kljbz0180u8sl1 116803 116802 2026-07-15T19:08:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Check_for_unknown_parameters]] 116802 Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list require ('strict'); local p = {} local pushpin_map_params = { 'coordinates', 'pushpin_caption', 'pushpin_relief', 'pushpin_label', 'pushpin_label_position', 'pushpin_label_size', 'pushpin_map', 'pushpin_mark', 'pushpin_mark_size', 'pushpin_alt', 'pushpin_background', 'pushpin_map_size' } local mapframe_params = { 'coord', 'coordinates', 'id', 'qid', 'mapframe', 'mapframe-area_km2', 'mapframe-area_mi2', 'mapframe-caption', 'mapframe-coord', 'mapframe-coordinates', 'mapframe-custom', 'mapframe-frame-coord', 'mapframe-frame-coordinates', 'mapframe-frame-height', 'mapframe-frame-width', 'mapframe-geomask', 'mapframe-geomask-fill', 'mapframe-geomask-fill-opacity', 'mapframe-geomask-stroke-color', 'mapframe-geomask-stroke-colour', 'mapframe-geomask-stroke-width', 'mapframe-height', 'mapframe-id', 'mapframe-length_km', 'mapframe-length_mi', 'mapframe-line', 'mapframe-line-stroke-color', 'mapframe-line-stroke-colour', 'mapframe-marker', 'mapframe-marker-color', 'mapframe-marker-colour', 'mapframe-point', 'mapframe-population', 'mapframe-shape', 'mapframe-shape-fill', 'mapframe-shape-fill-opacity', 'mapframe-shape-stroke-color', 'mapframe-shape-stroke-colour', 'mapframe-stroke-color', 'mapframe-stroke-colour', 'mapframe-stroke-width', 'mapframe-switcher', 'mapframe-type', 'mapframe-width', 'mapframe-wikidata', 'mapframe-zoom' } local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} if isnotempty(args['mapframe_args']) then for _, v in ipairs(mapframe_params) do knownargs[v] = 1 end end if isnotempty(args['pushpin_map_args']) then for _, v in ipairs(pushpin_map_params) do knownargs[v] = 1 end end local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview_text == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p kohqf9fxewyce9gq1kljbz0180u8sl1 Module:Infobox 828 44761 117074 107027 2026-06-08T00:50:22Z en>Zackmann08 0 hiding un-needed blank rows that show up in child infoboxes per [[Template_talk:Infobox#Blank_rows_on_child_infoboxes....|talk page]] 117074 Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local yesno = require("Module:Yesno") local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function isUntitledChildBox(sval) return sval and ( sval:match( '^%s*<%s*[Tt][Rr]' ) or sval:match( '^%s*\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127%s*<%s*[Tt][Rr]' ) ) end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :addClass( isUntitledChildBox( rowArgs.header ) and 'infobox-hiddenrow' or nil ) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data and not yesno(args.decat) then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() else row:addClass( isUntitledChildBox( rowArgs.data ) and 'infobox-hiddenrow' or nil ) end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :addClass( isUntitledChildBox( args.above ) and 'infobox-hiddenrow' or nil ) :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :addClass( isUntitledChildBox( args.below ) and 'infobox-hiddenrow' or nil ) :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) row:addClass( isUntitledChildBox( subheaderArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) row:addClass( isUntitledChildBox( imageArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if yesno(args.decat) then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p kueb5p6xeoq6x7bxu2zyyl7pmxgesrs 117075 117074 2026-07-16T11:39:37Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Infobox]] 117074 Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local yesno = require("Module:Yesno") local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function isUntitledChildBox(sval) return sval and ( sval:match( '^%s*<%s*[Tt][Rr]' ) or sval:match( '^%s*\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127%s*<%s*[Tt][Rr]' ) ) end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :addClass( isUntitledChildBox( rowArgs.header ) and 'infobox-hiddenrow' or nil ) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data and not yesno(args.decat) then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() else row:addClass( isUntitledChildBox( rowArgs.data ) and 'infobox-hiddenrow' or nil ) end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :addClass( isUntitledChildBox( args.above ) and 'infobox-hiddenrow' or nil ) :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :addClass( isUntitledChildBox( args.below ) and 'infobox-hiddenrow' or nil ) :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) row:addClass( isUntitledChildBox( subheaderArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) row:addClass( isUntitledChildBox( imageArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if yesno(args.decat) then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p kueb5p6xeoq6x7bxu2zyyl7pmxgesrs Template:Hlist/styles.css 10 44764 116732 107036 2026-01-15T22:35:43Z en>Pppery 0 /* {{pp-template}} */ 116732 sanitized-css text/css /* {{pp-template}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: "\a0· "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } c4a9gdxc068l0us4sz11634bne7iv2z 116733 116732 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hlist/styles.css]] 116732 sanitized-css text/css /* {{pp-template}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: "\a0· "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } c4a9gdxc068l0us4sz11634bne7iv2z Template:Center 10 44965 117126 107502 2025-03-27T08:18:08Z en>MSGJ 0 use center class alone, per request 117126 wikitext text/x-wiki <div class="center" {{safesubst<noinclude />:#if: {{{style|}}} | style="{{{style}}}"}}>{{{1|[[Category:Pages using center with no arguments]]}}}</div>{{safesubst<noinclude />:#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using center with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Center]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | style }}<noinclude> {{documentation}} </noinclude> ho0gjr8udacxqdzfdn1t0y3wvnpbco2 117127 117126 2026-07-16T11:40:10Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Center]] 117126 wikitext text/x-wiki <div class="center" {{safesubst<noinclude />:#if: {{{style|}}} | style="{{{style}}}"}}>{{{1|[[Category:Pages using center with no arguments]]}}}</div>{{safesubst<noinclude />:#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using center with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Center]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | style }}<noinclude> {{documentation}} </noinclude> ho0gjr8udacxqdzfdn1t0y3wvnpbco2 Template:Reflist 10 44966 116813 107504 2025-12-17T13:08:01Z en>Anomie 0 VE for some reason requires a div wrapping the references tag. 🤷 116813 wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><!-- -->{{#switch:{{{liststyle}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=<div class="reflist-liststyle-{{{liststyle}}}"> <nowiki/>}}<!-- -->{{#if:{{{1|}}}{{{colwidth|}}}| <div class="mw-references-wrap <!-- -->{{#iferror:{{#ifexpr: {{{1|}}} > 1 }}|mw-references-columns|{{#switch:{{{1|}}}|1=|2=mw-references-columns reflist-columns-2|#default=mw-references-columns reflist-columns-3}} }}" <!-- end class -->{{#if: {{{1|}}}<!-- start style. The multiplication by 0.9 is for [[hysterical raisins]]. --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: calc( 0.9 * {{{1}}} );"}} | {{#if: {{{colwidth|}}}|style="column-width: calc( 0.9 * {{{colwidth}}} );"}} }}>{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive=0}}</div> | <div><!-- VE for some reason requires a div wrapping the references tag. 🤷 --> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive=1}}</div> }}<!-- -->{{#switch:{{{liststyle}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=</div>}}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 6ru6cuze0qz3wvjdrkqztati1gmdgd2 116814 116813 2026-07-16T10:31:05Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Reflist]] 116813 wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><!-- -->{{#switch:{{{liststyle}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=<div class="reflist-liststyle-{{{liststyle}}}"> <nowiki/>}}<!-- -->{{#if:{{{1|}}}{{{colwidth|}}}| <div class="mw-references-wrap <!-- -->{{#iferror:{{#ifexpr: {{{1|}}} > 1 }}|mw-references-columns|{{#switch:{{{1|}}}|1=|2=mw-references-columns reflist-columns-2|#default=mw-references-columns reflist-columns-3}} }}" <!-- end class -->{{#if: {{{1|}}}<!-- start style. The multiplication by 0.9 is for [[hysterical raisins]]. --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: calc( 0.9 * {{{1}}} );"}} | {{#if: {{{colwidth|}}}|style="column-width: calc( 0.9 * {{{colwidth}}} );"}} }}>{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive=0}}</div> | <div><!-- VE for some reason requires a div wrapping the references tag. 🤷 --> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive=1}}</div> }}<!-- -->{{#switch:{{{liststyle}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=</div>}}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 6ru6cuze0qz3wvjdrkqztati1gmdgd2 Module:Portal 828 44967 116745 107525 2025-05-24T18:07:03Z en>Pppery 0 Reapply fixed version 116745 Scribunto text/plain --[==[ This module is a Lua implementation of the old {{Portal}} template. As of February 2019 it is used on nearly 7,900,000 articles. -- Please take care when updating it! It outputs two functions: p.portal, which generates a list of portals, and p.image, which -- produces the image name for an individual portal. -- The portal image data is kept in submodules of [[Module:Portal/images]], listed below: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/p]] - for portal names beginning with "P". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/u]] - for portal names beginning with "U". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- -- The images data pages are separated by the first letter to reduce server load when images are added, changed, or removed. -- Previously all the images were on one data page at [[Module:Portal/images]], but this had the disadvantage that all -- 5,000,000 pages using this module needed to be refreshed every time an image was added or removed. ]==] local p = {} -- determine whether we're being called from a sandbox local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) local sandbox = isSandbox and '/sandbox' or '' local function sandboxVersion(s) return isSandbox and s..'-sand' or s end local templatestyles = 'Module:Portal'..sandbox..'/styles.css' local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') -- List of non-talk namespaces which should not be tracked (Talk pages are never tracked) local badNamespaces = {'user','template','draft','wikipedia'} -- Check whether to do tracking in this namespace -- Returns true unless the page is one of the banned namespaces local function checkTracking(title) local thisPage = title or mw.title.getCurrentTitle() if thisPage.isTalkPage then return false end local ns = thisPage.nsText:lower() for _, v in ipairs(badNamespaces) do if ns == v then return false end end return true end local function matchImagePage(s) -- Finds the appropriate image subpage given a lower-case -- portal name plus the first letter of that portal name. if type(s) ~= 'string' or #s < 1 then return end local firstLetter = mw.ustring.sub(s, 1, 1) local imagePage if mw.ustring.find(firstLetter, '^[a-z]') then imagePage = 'Module:Portal/images/' .. firstLetter .. sandbox else imagePage = 'Module:Portal/images/other' .. sandbox end return mw.loadData(imagePage)[s] end local function getAlias(s) -- Gets an alias from the image alias data page. local aliasData = mw.loadData('Module:Portal/images/aliases'..sandbox) for portal, aliases in pairs(aliasData) do for _, alias in ipairs(aliases) do if alias == s then return portal end end end end local defaultImage = 'Portal-puzzle.svg|link=|alt=' local function getImageName(s) -- Gets the image name for a given string. if type(s) ~= 'string' or #s < 1 then return defaultImage end s = mw.ustring.lower(s) local image = matchImagePage(s) or matchImagePage(getAlias(s)) or defaultImage image = mw.ustring.gsub(image,'^File:','') --- strip mistaken leading File: or Image: image = mw.ustring.gsub(image,'^Image:','') return image end local function exists(title) local success, exists = pcall(function() return title.exists end) -- If success = false, then we're out of expensive parser function calls and can't check whether it exists -- in that case, don't throw a Lua error return not success or exists end -- Function to check argument portals for errors, generate tracking categories if needed -- Function first checks for too few/many portals provided -- Then checks the portal list to purge any portals that don't exist -- Arguments: -- portals: raw list of portals -- args.tracking: is tracking requested? (will not track on bad titles or namespaces) -- args.redlinks: should redlinks be displayed? -- args.minPortals: minimum number of portal arguments -- args.maxPortals: maximum number of portal arguments -- Returns: -- portals = list of portals, with redlinks purged (if args.redlinks=false) -- trackingCat = possible tracking category -- errorMsg = error message function p._checkPortals(portals, args) local trackingCat = '' local errMsg = nil -- Tracking is on by default. -- It is disabled if any of the following is true -- 1/ the parameter "tracking" is set to 'no, 'n', or 'false' -- 2/ the current page fails the namespace or pagename tests local trackingEnabled = args.tracking and checkTracking() args.minPortals = args.minPortals or 1 args.maxPortals = args.maxPortals or -1 -- check for too few portals if #portals < args.minPortals then errMsg = 'please specify at least '..args.minPortals..' portal'..(args.minPortals > 1 and 's' or '') trackingCat = (trackingEnabled and '[[Category:Portal templates with too few portals]]' or '') return portals, trackingCat, errMsg end -- check for too many portals if args.maxPortals >= 0 and #portals > args.maxPortals then errMsg = 'too many portals (maximum = '..args.maxPortals..')' trackingCat = (trackingEnabled and '[[Category:Portal templates with too many portals]]' or '') return portals, trackingCat, errMsg end if not args.redlinks or trackingEnabled then -- make new list of portals that exist local existingPortals = {} for _, portal in ipairs(portals) do local portalTitle = mw.title.new(portal,"Portal") -- if portal exists, put it into list if portalTitle and exists(portalTitle) then table.insert(existingPortals,portal) -- otherwise set tracking cat elseif trackingEnabled then trackingCat = "[[Category:Portal templates with redlinked portals]]" end end -- If redlinks is off, use portal list purged of redlinks portals = args.redlinks and portals or existingPortals -- if nothing left after purge, set tracking cat if #portals == 0 and trackingEnabled then trackingCat = trackingCat.."[[Category:Pages with empty portal template]]" end end return portals, trackingCat, errMsg end local function portalBox(args) return mw.html.create('ul') :attr('role', 'navigation') :attr('aria-label', 'Portals') :addClass('noprint') :addClass(args.error and '' or sandboxVersion('portalbox')) :addClass(args.border and sandboxVersion('portalborder') or '') :addClass(sandboxVersion(args.left and 'portalleft' or 'portalright')) :css('margin', args.margin or nil) :newline() end local function fillBox(root, contents) for _, item in ipairs(contents) do local entry = root:tag('li') entry:addClass(sandboxVersion('portalbox-entry')) local image = entry:tag('span') image:addClass(sandboxVersion('portalbox-image')) image:wikitext(item[1]) local link = entry:tag('span') link:addClass(sandboxVersion('portalbox-link')) link:wikitext(item[2]) end return root end local function noviewer(portalImage) -- Function to add noviewer class to filespec for portalImage local portalImage, hasClass = mw.ustring.gsub(portalImage, "class%s*=[^%|]+", "%0 noviewer") if hasClass == 0 then portalImage = portalImage.."|class=noviewer" end return portalImage end function p._portal(portals, args) -- This function builds the portal box used by the {{portal}} template. -- Normalize all arguments if args.redlinks == 'include' then args.redlinks = true end args.addBreak = args['break'] for key, default in pairs({left=false,tracking=true,nominimum=false, redlinks=false,addBreak=false,border=true}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local root = portalBox(args) local trackingCat = '' local errMsg = nil args.minPortals = args.nominimum and 0 or 1 args.maxPortals = -1 portals, trackingCat, errMsg = p._checkPortals(portals, args) root:wikitext(trackingCat) -- if error message, put it in the box and return if errMsg then if args.border then -- suppress error message when border=no args.error = true -- recreate box without fancy formatting root = portalBox(args) root:wikitext(trackingCat) local errTag = root:tag('strong') errTag:addClass('error') errTag:css('padding','0.2em') errTag:wikitext('Error: '..errMsg) end return tostring(root) end -- if no portals (and no error), just return tracking category if #portals == 0 then return trackingCat end local contents = {} -- Display the portals specified in the positional arguments. local defaultUsed = nil for _, portal in ipairs(portals) do local portalImage = getImageName(portal) if portalImage == defaultImage then defaultUsed = portal else portalImage = noviewer(portalImage) end local image = string.format('[[File:%s|32x28px]]', portalImage) local link = string.format('[[Portal:%s|%s%sportal]]', portal, portal, args.addBreak and '<br />' or ' ') table.insert(contents, {image, link}) end if defaultUsed and args.tracking and checkTracking() then local cat = string.format('[[Category:Portal templates with default image|%s]]', defaultUsed) root:wikitext(cat) end return tostring(fillBox(root, contents)) end function p._demo(imageList, args) for key, default in pairs({left=false,border=true}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local root = portalBox(args) local contents = {} -- Display the portals specified in the positional arguments. for _, fn in ipairs(imageList) do local image = string.format('[[File:%s|32x28px]]',noviewer(fn)) local link = string.format('[[:File:%s|%s]]',fn,fn) table.insert(contents,{image,link}) end return tostring(fillBox(root,contents)) end function p._image(portal,keep) -- Wrapper function to allow getImageName() to be accessed through #invoke. -- backward compatibility: if table passed, take first element if type(portal) == 'table' then portal = portal[1] end local name = getImageName(portal) -- If keep is yes (or equivalent), then allow all metadata (like image borders) to be returned -- also, add "noviewer" class to metadata local keepargs = yesno(keep) if keepargs then return noviewer(name) end -- otherwise, just keep filename, plus optional category local args = mw.text.split(name, "|", true) local result = {args[1]} -- the filename always comes first local category = '' -- parse name, looking for category arguments for i = 2,#args do local m = mw.ustring.match(args[i], "^%s*category%s*=") if m then table.insert(result, args[i]) end end -- reassemble arguments return table.concat(result,"|") end local function getAllImageTable() -- Returns an array containing all image subpages (minus aliases) as loaded by mw.loadData. local images = {} for i, subpage in ipairs{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'other'} do local imageTable = mw.loadData('Module:Portal/images/' .. subpage .. sandbox) for portal, image in pairs(imageTable) do local args = mw.text.split(image,"|") images[portal] = args[1] -- just use image filename end end return images end function p._displayAll(portals, args) -- This function displays all portals that have portal images. This function is for maintenance purposes and should not be used in -- articles, for two reasons: 1) there are over 1500 portals with portal images, and 2) the module doesn't record how the portal -- names are capitalized, so the portal links may be broken. local lang = mw.language.getContentLanguage() portals = portals or {} for portal in pairs(getAllImageTable()) do table.insert(portals,lang:ucfirst(portal)) end table.sort(portals) args.redlinks = args.redlinks or "yes" return p._portal(portals, args) end function p._imageDupes() -- This function searches the image subpages to find duplicate images. If duplicate images exist, it is not necessarily a bad thing, -- as different portals might just happen to choose the same image. However, this function is helpful in identifying images that -- should be moved to a portal alias for ease of maintenance. local exists, dupes = {}, {} for portal, image in pairs(getAllImageTable()) do if not exists[image] then exists[image] = portal else table.insert(dupes, string.format('The image "[[:File:%s|%s]]" is used for both portals "%s" and "%s".', image, image, exists[image], portal)) end end if #dupes < 1 then return 'No duplicate images found.' else return 'The following duplicate images were found:\n* ' .. table.concat(dupes, '\n* ') end end local function processPortalArgs(args) -- This function processes a table of arguments and returns two tables: an array of portal names for processing by ipairs, and a table of -- the named arguments that specify style options, etc. We need to use ipairs because we want to list all the portals in the order -- they were passed to the template, but we also want to be able to deal with positional arguments passed explicitly, for example -- {{portal|2=Politics}}. The behaviour of ipairs is undefined if nil values are present, so we need to make sure they are all removed. args = type(args) == 'table' and args or {} local portals = {} local namedArgs = {} for k, v in pairs(args) do if type(k) == 'number' and type(v) == 'string' then -- Make sure we have no non-string portal names. table.insert(portals, k) elseif type(k) ~= 'number' then namedArgs[k] = v end end table.sort(portals) for i, v in ipairs(portals) do portals[i] = args[v] end return portals, namedArgs end -- Entry point for sorting portals from other named arguments function p._processPortalArgs(args) return processPortalArgs(args) end function p.image(frame) local origArgs = getArgs(frame) local portals, args = processPortalArgs(origArgs) return p._image(portals[1],args.border) end function p.demo(frame) local args = getArgs(frame) local styles = frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } return styles..p._demo(args,args) end local function makeWrapper(funcName) -- Processes external arguments and sends them to the other functions. return function (frame) -- If called via #invoke, use the args passed into the invoking -- template, or the args passed to #invoke if any exist. Otherwise -- assume args are being passed directly in from the debug console -- or from another Lua module. -- Also: trim whitespace and remove blank arguments local origArgs = getArgs(frame) -- create two tables to pass to func: an array of portal names, and a table of named arguments. local portals, args = processPortalArgs(origArgs) local results = '' if funcName == '_portal' or funcName == '_displayAll' then results = frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } end return results .. p[funcName](portals, args) end end for _, funcName in ipairs{'portal', 'imageDupes', 'displayAll'} do p[funcName] = makeWrapper('_' .. funcName) end return p 17la7cpkbw894t9i08xfqc16pd5ncik 116746 116745 2026-07-15T18:13:31Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Portal]] 116745 Scribunto text/plain --[==[ This module is a Lua implementation of the old {{Portal}} template. As of February 2019 it is used on nearly 7,900,000 articles. -- Please take care when updating it! It outputs two functions: p.portal, which generates a list of portals, and p.image, which -- produces the image name for an individual portal. -- The portal image data is kept in submodules of [[Module:Portal/images]], listed below: -- [[Module:Portal/images/a]] - for portal names beginning with "A". -- [[Module:Portal/images/b]] - for portal names beginning with "B". -- [[Module:Portal/images/c]] - for portal names beginning with "C". -- [[Module:Portal/images/d]] - for portal names beginning with "D". -- [[Module:Portal/images/e]] - for portal names beginning with "E". -- [[Module:Portal/images/f]] - for portal names beginning with "F". -- [[Module:Portal/images/g]] - for portal names beginning with "G". -- [[Module:Portal/images/h]] - for portal names beginning with "H". -- [[Module:Portal/images/i]] - for portal names beginning with "I". -- [[Module:Portal/images/j]] - for portal names beginning with "J". -- [[Module:Portal/images/k]] - for portal names beginning with "K". -- [[Module:Portal/images/l]] - for portal names beginning with "L". -- [[Module:Portal/images/m]] - for portal names beginning with "M". -- [[Module:Portal/images/n]] - for portal names beginning with "N". -- [[Module:Portal/images/o]] - for portal names beginning with "O". -- [[Module:Portal/images/p]] - for portal names beginning with "P". -- [[Module:Portal/images/q]] - for portal names beginning with "Q". -- [[Module:Portal/images/r]] - for portal names beginning with "R". -- [[Module:Portal/images/s]] - for portal names beginning with "S". -- [[Module:Portal/images/t]] - for portal names beginning with "T". -- [[Module:Portal/images/u]] - for portal names beginning with "U". -- [[Module:Portal/images/v]] - for portal names beginning with "V". -- [[Module:Portal/images/w]] - for portal names beginning with "W". -- [[Module:Portal/images/x]] - for portal names beginning with "X". -- [[Module:Portal/images/y]] - for portal names beginning with "Y". -- [[Module:Portal/images/z]] - for portal names beginning with "Z". -- [[Module:Portal/images/other]] - for portal names beginning with any other letters. This includes numbers, -- letters with diacritics, and letters in non-Latin alphabets. -- [[Module:Portal/images/aliases]] - for adding aliases for existing portal names. Use this page for variations -- in spelling and diacritics, etc., no matter what letter the portal begins with. -- -- The images data pages are separated by the first letter to reduce server load when images are added, changed, or removed. -- Previously all the images were on one data page at [[Module:Portal/images]], but this had the disadvantage that all -- 5,000,000 pages using this module needed to be refreshed every time an image was added or removed. ]==] local p = {} -- determine whether we're being called from a sandbox local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) local sandbox = isSandbox and '/sandbox' or '' local function sandboxVersion(s) return isSandbox and s..'-sand' or s end local templatestyles = 'Module:Portal'..sandbox..'/styles.css' local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') -- List of non-talk namespaces which should not be tracked (Talk pages are never tracked) local badNamespaces = {'user','template','draft','wikipedia'} -- Check whether to do tracking in this namespace -- Returns true unless the page is one of the banned namespaces local function checkTracking(title) local thisPage = title or mw.title.getCurrentTitle() if thisPage.isTalkPage then return false end local ns = thisPage.nsText:lower() for _, v in ipairs(badNamespaces) do if ns == v then return false end end return true end local function matchImagePage(s) -- Finds the appropriate image subpage given a lower-case -- portal name plus the first letter of that portal name. if type(s) ~= 'string' or #s < 1 then return end local firstLetter = mw.ustring.sub(s, 1, 1) local imagePage if mw.ustring.find(firstLetter, '^[a-z]') then imagePage = 'Module:Portal/images/' .. firstLetter .. sandbox else imagePage = 'Module:Portal/images/other' .. sandbox end return mw.loadData(imagePage)[s] end local function getAlias(s) -- Gets an alias from the image alias data page. local aliasData = mw.loadData('Module:Portal/images/aliases'..sandbox) for portal, aliases in pairs(aliasData) do for _, alias in ipairs(aliases) do if alias == s then return portal end end end end local defaultImage = 'Portal-puzzle.svg|link=|alt=' local function getImageName(s) -- Gets the image name for a given string. if type(s) ~= 'string' or #s < 1 then return defaultImage end s = mw.ustring.lower(s) local image = matchImagePage(s) or matchImagePage(getAlias(s)) or defaultImage image = mw.ustring.gsub(image,'^File:','') --- strip mistaken leading File: or Image: image = mw.ustring.gsub(image,'^Image:','') return image end local function exists(title) local success, exists = pcall(function() return title.exists end) -- If success = false, then we're out of expensive parser function calls and can't check whether it exists -- in that case, don't throw a Lua error return not success or exists end -- Function to check argument portals for errors, generate tracking categories if needed -- Function first checks for too few/many portals provided -- Then checks the portal list to purge any portals that don't exist -- Arguments: -- portals: raw list of portals -- args.tracking: is tracking requested? (will not track on bad titles or namespaces) -- args.redlinks: should redlinks be displayed? -- args.minPortals: minimum number of portal arguments -- args.maxPortals: maximum number of portal arguments -- Returns: -- portals = list of portals, with redlinks purged (if args.redlinks=false) -- trackingCat = possible tracking category -- errorMsg = error message function p._checkPortals(portals, args) local trackingCat = '' local errMsg = nil -- Tracking is on by default. -- It is disabled if any of the following is true -- 1/ the parameter "tracking" is set to 'no, 'n', or 'false' -- 2/ the current page fails the namespace or pagename tests local trackingEnabled = args.tracking and checkTracking() args.minPortals = args.minPortals or 1 args.maxPortals = args.maxPortals or -1 -- check for too few portals if #portals < args.minPortals then errMsg = 'please specify at least '..args.minPortals..' portal'..(args.minPortals > 1 and 's' or '') trackingCat = (trackingEnabled and '[[Category:Portal templates with too few portals]]' or '') return portals, trackingCat, errMsg end -- check for too many portals if args.maxPortals >= 0 and #portals > args.maxPortals then errMsg = 'too many portals (maximum = '..args.maxPortals..')' trackingCat = (trackingEnabled and '[[Category:Portal templates with too many portals]]' or '') return portals, trackingCat, errMsg end if not args.redlinks or trackingEnabled then -- make new list of portals that exist local existingPortals = {} for _, portal in ipairs(portals) do local portalTitle = mw.title.new(portal,"Portal") -- if portal exists, put it into list if portalTitle and exists(portalTitle) then table.insert(existingPortals,portal) -- otherwise set tracking cat elseif trackingEnabled then trackingCat = "[[Category:Portal templates with redlinked portals]]" end end -- If redlinks is off, use portal list purged of redlinks portals = args.redlinks and portals or existingPortals -- if nothing left after purge, set tracking cat if #portals == 0 and trackingEnabled then trackingCat = trackingCat.."[[Category:Pages with empty portal template]]" end end return portals, trackingCat, errMsg end local function portalBox(args) return mw.html.create('ul') :attr('role', 'navigation') :attr('aria-label', 'Portals') :addClass('noprint') :addClass(args.error and '' or sandboxVersion('portalbox')) :addClass(args.border and sandboxVersion('portalborder') or '') :addClass(sandboxVersion(args.left and 'portalleft' or 'portalright')) :css('margin', args.margin or nil) :newline() end local function fillBox(root, contents) for _, item in ipairs(contents) do local entry = root:tag('li') entry:addClass(sandboxVersion('portalbox-entry')) local image = entry:tag('span') image:addClass(sandboxVersion('portalbox-image')) image:wikitext(item[1]) local link = entry:tag('span') link:addClass(sandboxVersion('portalbox-link')) link:wikitext(item[2]) end return root end local function noviewer(portalImage) -- Function to add noviewer class to filespec for portalImage local portalImage, hasClass = mw.ustring.gsub(portalImage, "class%s*=[^%|]+", "%0 noviewer") if hasClass == 0 then portalImage = portalImage.."|class=noviewer" end return portalImage end function p._portal(portals, args) -- This function builds the portal box used by the {{portal}} template. -- Normalize all arguments if args.redlinks == 'include' then args.redlinks = true end args.addBreak = args['break'] for key, default in pairs({left=false,tracking=true,nominimum=false, redlinks=false,addBreak=false,border=true}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local root = portalBox(args) local trackingCat = '' local errMsg = nil args.minPortals = args.nominimum and 0 or 1 args.maxPortals = -1 portals, trackingCat, errMsg = p._checkPortals(portals, args) root:wikitext(trackingCat) -- if error message, put it in the box and return if errMsg then if args.border then -- suppress error message when border=no args.error = true -- recreate box without fancy formatting root = portalBox(args) root:wikitext(trackingCat) local errTag = root:tag('strong') errTag:addClass('error') errTag:css('padding','0.2em') errTag:wikitext('Error: '..errMsg) end return tostring(root) end -- if no portals (and no error), just return tracking category if #portals == 0 then return trackingCat end local contents = {} -- Display the portals specified in the positional arguments. local defaultUsed = nil for _, portal in ipairs(portals) do local portalImage = getImageName(portal) if portalImage == defaultImage then defaultUsed = portal else portalImage = noviewer(portalImage) end local image = string.format('[[File:%s|32x28px]]', portalImage) local link = string.format('[[Portal:%s|%s%sportal]]', portal, portal, args.addBreak and '<br />' or ' ') table.insert(contents, {image, link}) end if defaultUsed and args.tracking and checkTracking() then local cat = string.format('[[Category:Portal templates with default image|%s]]', defaultUsed) root:wikitext(cat) end return tostring(fillBox(root, contents)) end function p._demo(imageList, args) for key, default in pairs({left=false,border=true}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key], default) end local root = portalBox(args) local contents = {} -- Display the portals specified in the positional arguments. for _, fn in ipairs(imageList) do local image = string.format('[[File:%s|32x28px]]',noviewer(fn)) local link = string.format('[[:File:%s|%s]]',fn,fn) table.insert(contents,{image,link}) end return tostring(fillBox(root,contents)) end function p._image(portal,keep) -- Wrapper function to allow getImageName() to be accessed through #invoke. -- backward compatibility: if table passed, take first element if type(portal) == 'table' then portal = portal[1] end local name = getImageName(portal) -- If keep is yes (or equivalent), then allow all metadata (like image borders) to be returned -- also, add "noviewer" class to metadata local keepargs = yesno(keep) if keepargs then return noviewer(name) end -- otherwise, just keep filename, plus optional category local args = mw.text.split(name, "|", true) local result = {args[1]} -- the filename always comes first local category = '' -- parse name, looking for category arguments for i = 2,#args do local m = mw.ustring.match(args[i], "^%s*category%s*=") if m then table.insert(result, args[i]) end end -- reassemble arguments return table.concat(result,"|") end local function getAllImageTable() -- Returns an array containing all image subpages (minus aliases) as loaded by mw.loadData. local images = {} for i, subpage in ipairs{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'other'} do local imageTable = mw.loadData('Module:Portal/images/' .. subpage .. sandbox) for portal, image in pairs(imageTable) do local args = mw.text.split(image,"|") images[portal] = args[1] -- just use image filename end end return images end function p._displayAll(portals, args) -- This function displays all portals that have portal images. This function is for maintenance purposes and should not be used in -- articles, for two reasons: 1) there are over 1500 portals with portal images, and 2) the module doesn't record how the portal -- names are capitalized, so the portal links may be broken. local lang = mw.language.getContentLanguage() portals = portals or {} for portal in pairs(getAllImageTable()) do table.insert(portals,lang:ucfirst(portal)) end table.sort(portals) args.redlinks = args.redlinks or "yes" return p._portal(portals, args) end function p._imageDupes() -- This function searches the image subpages to find duplicate images. If duplicate images exist, it is not necessarily a bad thing, -- as different portals might just happen to choose the same image. However, this function is helpful in identifying images that -- should be moved to a portal alias for ease of maintenance. local exists, dupes = {}, {} for portal, image in pairs(getAllImageTable()) do if not exists[image] then exists[image] = portal else table.insert(dupes, string.format('The image "[[:File:%s|%s]]" is used for both portals "%s" and "%s".', image, image, exists[image], portal)) end end if #dupes < 1 then return 'No duplicate images found.' else return 'The following duplicate images were found:\n* ' .. table.concat(dupes, '\n* ') end end local function processPortalArgs(args) -- This function processes a table of arguments and returns two tables: an array of portal names for processing by ipairs, and a table of -- the named arguments that specify style options, etc. We need to use ipairs because we want to list all the portals in the order -- they were passed to the template, but we also want to be able to deal with positional arguments passed explicitly, for example -- {{portal|2=Politics}}. The behaviour of ipairs is undefined if nil values are present, so we need to make sure they are all removed. args = type(args) == 'table' and args or {} local portals = {} local namedArgs = {} for k, v in pairs(args) do if type(k) == 'number' and type(v) == 'string' then -- Make sure we have no non-string portal names. table.insert(portals, k) elseif type(k) ~= 'number' then namedArgs[k] = v end end table.sort(portals) for i, v in ipairs(portals) do portals[i] = args[v] end return portals, namedArgs end -- Entry point for sorting portals from other named arguments function p._processPortalArgs(args) return processPortalArgs(args) end function p.image(frame) local origArgs = getArgs(frame) local portals, args = processPortalArgs(origArgs) return p._image(portals[1],args.border) end function p.demo(frame) local args = getArgs(frame) local styles = frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } return styles..p._demo(args,args) end local function makeWrapper(funcName) -- Processes external arguments and sends them to the other functions. return function (frame) -- If called via #invoke, use the args passed into the invoking -- template, or the args passed to #invoke if any exist. Otherwise -- assume args are being passed directly in from the debug console -- or from another Lua module. -- Also: trim whitespace and remove blank arguments local origArgs = getArgs(frame) -- create two tables to pass to func: an array of portal names, and a table of named arguments. local portals, args = processPortalArgs(origArgs) local results = '' if funcName == '_portal' or funcName == '_displayAll' then results = frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } end return results .. p[funcName](portals, args) end end for _, funcName in ipairs{'portal', 'imageDupes', 'displayAll'} do p[funcName] = makeWrapper('_' .. funcName) end return p 17la7cpkbw894t9i08xfqc16pd5ncik Module:List 828 44968 116747 114009 2026-03-02T05:52:06Z en>HouseBlaster 0 implement [[Wikipedia:Categories for discussion/Log/2026 February 13#Category:List templates with deprecated parameters]] 116747 Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:Pages using module:list with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { frameOnly = ((frame and frame.args and frame.args.frameonly or '') ~= ''), valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 3zyv4n9325mfv0ujl80r445q2241il3 116748 116747 2026-07-15T18:13:32Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:List]] 116747 Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:Pages using module:list with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { frameOnly = ((frame and frame.args and frame.args.frameonly or '') ~= ''), valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 3zyv4n9325mfv0ujl80r445q2241il3 Module:Disambiguation/templates 828 46177 117284 110542 2026-02-26T17:22:58Z en>Pppery 0 Update list 117284 Scribunto text/plain -- This page contains a table of all disambiguation templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["Disambiguation"] = true, ["Begriffsklärung"] = true, ["DAB"] = true, ["Dab"] = true, ["Dab page"] = true, ["Dabpage"] = true, ["Dbig"] = true, ["Dis"] = true, ["Disam"] = true, ["Disamb"] = true, ["Disambig"] = true, ["Disambig misspelling"] = true, ["Disambig-plants"] = true, ["Disambiguation page"] = true, ["Manual of Style disambiguation"] = true, ["Meta disambig"] = true, ["MOS disambiguation"] = true, ["MoS disambiguation"] = true, ["Portal disambig"] = true, ["Portal disambiguation"] = true, ["Project disambiguation"] = true, ["Shortcut disambig"] = true, ["Wikipedia disambiguation"] = true, ["WP disambig"] = true, ["WP-disambig"] = true, ["Airport disambiguation"] = true, ["Airport disambig"] = true, ["Biology disambiguation"] = true, ["Call sign disambiguation"] = true, ["Callsigndis"] = true, ["Caselaw disambiguation"] = true, ["Case law disambiguation"] = true, ["Chinese title disambiguation"] = true, ["Chinese title disambig"] = true, ["CJKVdab"] = true, ["Disambig-Chinese-char-title"] = true, ["Disambiguation cleanup"] = true, ["Cleanup disambig"] = true, ["Cleanup disambiguation"] = true, ["CleanupDisambig"] = true, ["Dab cleanup"] = true, ["Dab-cleanup"] = true, ["Dabclean"] = true, ["Disamb-cleanup"] = true, ["Disambcleanup"] = true, ["Disambig cleanup"] = true, ["Disambig-cleanup"] = true, ["Disambig-CU"] = true, ["Disambig-cu"] = true, ["Disambigcleanup"] = true, ["Disambiguate-cleanup"] = true, ["Disambiguation-cleanup"] = true, ["Geodis-cleanup"] = true, ["Disambiguation with potential"] = true, ["Disambiguation with possibilties"] = true, ["Genus disambiguation"] = true, ["Genus disambig"] = true, ["Greek letter organization disambiguation"] = true, ["GLO disambiguation"] = true, ["Hangul title disambiguation"] = true, ["Hospital disambiguation"] = true, ["Hospitaldis"] = true, ["Human name disambiguation"] = true, ["Bio-dab"] = true, ["Hndab"] = true, ["HNDIS"] = true, ["HnDis"] = true, ["Hndis"] = true, ["Hndisambig"] = true, ["Human name dab"] = true, ["Name list"] = true, ["Personal name"] = true, ["Personal name disambiguation"] = true, ["Human name disambiguation cleanup"] = true, ["Hndis-cleanup"] = true, ["Personal name disambiguation cleanup"] = true, ["Hurricane season disambiguation"] = true, ["Letter–number combination disambiguation"] = true, ["Letter-Number Combination Disambiguation"] = true, ["Letter-Number combination disambiguation"] = true, ["Letter-number combination disambiguation"] = true, ["Letter-NumberCombDisambig"] = true, ["Letter-NumberCombdisambig"] = true, ["Letter-NumberCombinationDisambiguation"] = true, ["LNCD"] = true, ["Mathematical disambiguation"] = true, ["Math dab"] = true, ["Math disambiguation"] = true, ["Math-dab"] = true, ["Mathdab"] = true, ["Mathematics disambiguation"] = true, ["Maths disambiguation"] = true, ["Military unit disambiguation"] = true, ["Mil-unit-dis"] = true, ["Mil-unit-disambig"] = true, ["Music disambiguation"] = true, ["Music disambig"] = true, ["Number disambiguation"] = true, ["Numberdis"] = true, ["Numdab"] = true, ["Numdisambig"] = true, ["Opus number disambiguation"] = true, ["Phonetics disambiguation"] = true, ["Place name disambiguation"] = true, ["DisambigG"] = true, ["DisambigGeo"] = true, ["Disambiggeo"] = true, ["Geo-dis"] = true, ["Geodab"] = true, ["Geodis"] = true, ["Geodisambig"] = true, ["Geographic disambiguation"] = true, ["Geographical disambiguation"] = true, ["Pnd"] = true, ["Road disambiguation"] = true, ["Roaddis"] = true, ["School disambiguation"] = true, ["School disambig"] = true, ["Schooldab"] = true, ["Schooldis"] = true, ["Species Latin name abbreviation disambiguation"] = true, ["Species Latin name disambiguation"] = true, ["LatinNameDisambig"] = true, ["Species disambiguation"] = true, ["SpeciesLatinNameDisambig"] = true, ["Station disambiguation"] = true, ["Station dab"] = true, ["Synagogue disambiguation"] = true, ["Taxonomy disambiguation"] = true, ["Template disambiguation"] = true, ["Template ambiguous"] = true, ["Template dab"] = true, ["Template disambig"] = true, ["WoO number disambiguation"] = true, } 120emfqmecg5jbyx2n1prgswwe275a0 117285 117284 2026-07-16T11:45:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Disambiguation/templates]] 117284 Scribunto text/plain -- This page contains a table of all disambiguation templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["Disambiguation"] = true, ["Begriffsklärung"] = true, ["DAB"] = true, ["Dab"] = true, ["Dab page"] = true, ["Dabpage"] = true, ["Dbig"] = true, ["Dis"] = true, ["Disam"] = true, ["Disamb"] = true, ["Disambig"] = true, ["Disambig misspelling"] = true, ["Disambig-plants"] = true, ["Disambiguation page"] = true, ["Manual of Style disambiguation"] = true, ["Meta disambig"] = true, ["MOS disambiguation"] = true, ["MoS disambiguation"] = true, ["Portal disambig"] = true, ["Portal disambiguation"] = true, ["Project disambiguation"] = true, ["Shortcut disambig"] = true, ["Wikipedia disambiguation"] = true, ["WP disambig"] = true, ["WP-disambig"] = true, ["Airport disambiguation"] = true, ["Airport disambig"] = true, ["Biology disambiguation"] = true, ["Call sign disambiguation"] = true, ["Callsigndis"] = true, ["Caselaw disambiguation"] = true, ["Case law disambiguation"] = true, ["Chinese title disambiguation"] = true, ["Chinese title disambig"] = true, ["CJKVdab"] = true, ["Disambig-Chinese-char-title"] = true, ["Disambiguation cleanup"] = true, ["Cleanup disambig"] = true, ["Cleanup disambiguation"] = true, ["CleanupDisambig"] = true, ["Dab cleanup"] = true, ["Dab-cleanup"] = true, ["Dabclean"] = true, ["Disamb-cleanup"] = true, ["Disambcleanup"] = true, ["Disambig cleanup"] = true, ["Disambig-cleanup"] = true, ["Disambig-CU"] = true, ["Disambig-cu"] = true, ["Disambigcleanup"] = true, ["Disambiguate-cleanup"] = true, ["Disambiguation-cleanup"] = true, ["Geodis-cleanup"] = true, ["Disambiguation with potential"] = true, ["Disambiguation with possibilties"] = true, ["Genus disambiguation"] = true, ["Genus disambig"] = true, ["Greek letter organization disambiguation"] = true, ["GLO disambiguation"] = true, ["Hangul title disambiguation"] = true, ["Hospital disambiguation"] = true, ["Hospitaldis"] = true, ["Human name disambiguation"] = true, ["Bio-dab"] = true, ["Hndab"] = true, ["HNDIS"] = true, ["HnDis"] = true, ["Hndis"] = true, ["Hndisambig"] = true, ["Human name dab"] = true, ["Name list"] = true, ["Personal name"] = true, ["Personal name disambiguation"] = true, ["Human name disambiguation cleanup"] = true, ["Hndis-cleanup"] = true, ["Personal name disambiguation cleanup"] = true, ["Hurricane season disambiguation"] = true, ["Letter–number combination disambiguation"] = true, ["Letter-Number Combination Disambiguation"] = true, ["Letter-Number combination disambiguation"] = true, ["Letter-number combination disambiguation"] = true, ["Letter-NumberCombDisambig"] = true, ["Letter-NumberCombdisambig"] = true, ["Letter-NumberCombinationDisambiguation"] = true, ["LNCD"] = true, ["Mathematical disambiguation"] = true, ["Math dab"] = true, ["Math disambiguation"] = true, ["Math-dab"] = true, ["Mathdab"] = true, ["Mathematics disambiguation"] = true, ["Maths disambiguation"] = true, ["Military unit disambiguation"] = true, ["Mil-unit-dis"] = true, ["Mil-unit-disambig"] = true, ["Music disambiguation"] = true, ["Music disambig"] = true, ["Number disambiguation"] = true, ["Numberdis"] = true, ["Numdab"] = true, ["Numdisambig"] = true, ["Opus number disambiguation"] = true, ["Phonetics disambiguation"] = true, ["Place name disambiguation"] = true, ["DisambigG"] = true, ["DisambigGeo"] = true, ["Disambiggeo"] = true, ["Geo-dis"] = true, ["Geodab"] = true, ["Geodis"] = true, ["Geodisambig"] = true, ["Geographic disambiguation"] = true, ["Geographical disambiguation"] = true, ["Pnd"] = true, ["Road disambiguation"] = true, ["Roaddis"] = true, ["School disambiguation"] = true, ["School disambig"] = true, ["Schooldab"] = true, ["Schooldis"] = true, ["Species Latin name abbreviation disambiguation"] = true, ["Species Latin name disambiguation"] = true, ["LatinNameDisambig"] = true, ["Species disambiguation"] = true, ["SpeciesLatinNameDisambig"] = true, ["Station disambiguation"] = true, ["Station dab"] = true, ["Synagogue disambiguation"] = true, ["Taxonomy disambiguation"] = true, ["Template disambiguation"] = true, ["Template ambiguous"] = true, ["Template dab"] = true, ["Template disambig"] = true, ["WoO number disambiguation"] = true, } 120emfqmecg5jbyx2n1prgswwe275a0 Module:Pagetype/doc 828 46190 117278 110012 2025-08-05T18:47:10Z en>Tactica 0 Expand {{lua}}. 117278 wikitext text/x-wiki {{high use}} {{module rating|protected}} {{cascade-protected template|page=module}} {{Lua|Module:Pagetype/config|Module:Arguments|Module:Disambiguation|Module:Namespace detect|Module:Wikitext Parsing|Module:Yesno}} This module is used to detect the page type of a given page. It detects [[WP:REDIRECT|redirect pages]] automatically and is highly customisable. It can be used on its own or as a meta-module to create other page-type-detection templates. This module can also be accessed using {{tl|pagetype}}. == Syntax == ; Basic usage <pre> {{#invoke:pagetype|main}} </pre> ; All parameters <pre> {{#invoke:pagetype|main | page = | defaultns = | main = | user = | wikipedia = | project = | wp = | file = | image = | mediawiki = | template = | help = | category = | portal = | draft = | timedtext = | module = | topic = | special = | media = | talk = | redirect = | soft_redirect = | dab = | na = | other = | sia = | nonexistent = | plural = }} </pre> == Basic usage == For simple detection of the page type of the current page, use the default settings: &#123;{#invoke:pagetype|main}} That will produce the following results, depending on the page type or the [[WP:NAMESPACE|namespace]]: {| class="wikitable" ! Page type / namespace !! Output |- | Redirects (in any namespace) || <code>redirect</code> |- | Main namespace || <code>article</code> |- | File namespace || <code>file</code> |- | Template namespace || <code>template</code> |- | Category namespace || <code>category</code> |- | Module namespace || <code>module</code> |- | Other namespaces || <code>page</code> |} If the module is used on a talk page, it will detect the page type for the corresponding subject page. ; Example {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main}}</nowiki></code> || {{#invoke:pagetype|main}} |} == Page parameter == You can use the <code>page</code> parameter to make the module act as though it was called from that page. &#123;{#invoke:pagetype|main|page=''page name''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK}}</nowiki></code> || {{#invoke:pagetype|main|page=UK}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |} == Adding and removing namespaces == It is possible to specify different behaviour for each namespace than that described in the [[#Basic usage|basic usage]] section. For example, you might want the module to display "user page" for pages in the user namespace, instead of the default "page". To do this, you can use the code {{para|user|yes}}. This looks up the typical name used for pages in the user namespace, in this case "user page", and uses that text when the module is used with a page in the user namespace. To use this with other namespaces, use the namespace name in lower case as a parameter: &#123;{#invoke:pagetype|main | user = ''yes'' | wikipedia = ''yes'' | project = ''yes'' | wp = ''yes'' | mediawiki = ''yes'' | help = ''yes'' | portal = ''yes'' | draft = ''yes'' | timedtext = ''yes'' | topic = ''yes'' | special = ''yes'' | media = ''yes'' }} You can use any of the following to specify the namespace: "<code>yes</code>", "<code>y</code>", "<code>true</code>" or "<code>1</code>". They can be used in any combination of upper and lower case. (These values are defined by [[Module:Yesno]].) The default text for these namespaces is as follows: {| class="wikitable" ! Page type / namespace !! Output |- | User namespace || <code>user page</code> |- | Wikipedia namespace || <code>project page</code> |- | MediaWiki namespace || <code>interface page</code> |- | Help namespace || <code>help page</code> |- | Portal namespace || <code>portal</code> |- | Draft namespace || <code>draft</code> |- | Timed Text namespace || <code>Timed Text page</code> |- | Topic namespace || <code>topic</code> |- | Special namespace || <code>special page</code> |- | Media namespace || <code>file</code> |} You can use a similar process to remove any of the default namespace values as well. For example, if you use the code {{para|template|no}}, then the module will display "page" when used on a template page, rather than the default "template". &#123;{#invoke:pagetype|main | main = ''no'' | file = ''no'' | template = ''no'' | category = ''no'' | module = ''no'' }} The following values will all work to remove namespace values: "<code>no</code>", "<code>n</code>", "<code>false</code>" or "<code>0</code>". They can be used in any combination of upper and lower case. ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|talk=y}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|talk=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|main=no}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|main=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=Yes}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=Yes}} |} == Default namespace sets == As well as adding and removing individual namespaces, it is possible to specify different sets of namespaces by using the {{para|defaultns}}. There are four different sets available: <code>all</code>, <code>extended</code>, <code>none</code> and the default set. These sets allow you to specify many namespaces at once, without having to use all of the individual namespace parameters. Namespaces are set according to the following table: {| class="wikitable" |- ! rowspan="2" | Namespace ! colspan="4" | Value of {{para|defaultns}} ! rowspan="2" | Output |- | style="width: 75px; text-align: center;" | <code>none</code> | style="width: 75px; text-align: center;" | <code>extended</code> | style="width: 75px; text-align: center;" | <code>all</code> | style="width: 75px; text-align: center;" | Other values |- | Main | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | article |- | User | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | user page |- | Wikipedia | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | project page |- | File | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | file |- | MediaWiki | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | interface page |- | Template | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | template |- | Help | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | help page |- | Category | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | category |- | Portal | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | portal |- | Draft | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | draft |- | TimedText | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | Timed Text page |- | Module | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | module |- | Topic (Flow boards) | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | topic |- | All talk namespaces | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | talk page |- | Special | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | special page |- | Media | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | file |} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|defaultns=none}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|defaultns=none}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|defaultns=all}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|defaultns=all}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg|defaultns=none}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg|defaultns=none}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|defaultns=extended}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|defaultns=extended}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=extended}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=extended}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=all}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=all}} |} == Custom namespace values == It is possible to specify a custom value for any namespace: &#123;{#invoke:pagetype|main | main = ''custom text'' | user = ''custom text'' | wikipedia = ''custom text'' | project = ''custom text'' | wp = ''custom text'' | file = ''custom text'' | image = ''custom text'' | mediawiki = ''custom text'' | template = ''custom text'' | help = ''custom text'' | category = ''custom text'' | portal = ''custom text'' | draft = ''custom text'' | timedtext = ''custom text'' | module = ''custom text'' | topic = ''custom text'' | special = ''custom text'' | media = ''custom text'' }} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|talk=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|main=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|main=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=custom text}} |} == Talk parameter == Normally, the module will treat talk pages as if they were in the corresponding subject namespace. However, if the <code>talk</code> parameter is set, the module will treat talk pages separately from subject pages. The <code>talk</code> parameter sets values for all talk pages, i.e. pages in the Talk: namespace, pages in the User talk: namespace, pages in the Wikipedia talk: namespace, and so on. &#123;{#invoke:pagetype|main|talk=''yes''}} &#123;{#invoke:pagetype|main|talk=''custom text''}} The default value for "<code>talk=''yes''</code>" is "talk page". ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=custom text}} |} == Main namespace classes == For pages in the main namespace, it is possible to add a class value in the first positional parameter: &#123;{#invoke:pagetype|main|''class''}} If the class value matches one of the values in the table below, it will produce an alternative to the default output of <code>article</code>. {| class="wikitable" |- ! Class !! Class values !! Output |- | No applicable class || <code>na</code>, <code>n/a</code> || <code>page</code> |- |} You can input the class value in any combination of upper and lower case. === Custom main namespace classes === It is also possible to specify a custom value for the main namespace classes: &#123;{#invoke:pagetype|main|''class''|na=''yes''}} &#123;{#invoke:pagetype|main|''class''|na=''custom text''}} This works the same way that it does for the custom namespace page types. Possible parameters are: * '''na''': a custom value for NA-class pages. It works in the same way as the <code>dab</code> parameter. The default value for "<code>yes</code>" etc. is "page". ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|na}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|na}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|na|na=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|na|na=custom text}} |} == Redirects == By default, the module automatically detects redirects in all namespace. It is not possible to specify redirect behaviour by namespace, but you can turn redirect detection off, or use a custom value for redirect pages. &#123;{#invoke:pagetype|main|redirect=''no''}} &#123;{#invoke:pagetype|main|redirect=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=UK}}</nowiki></code> || {{#invoke:pagetype|main|page=UK}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK|redirect=no}}</nowiki></code> || {{#invoke:pagetype|main|page=UK|redirect=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK|redirect=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=UK|redirect=custom text}} |} == Disambiguation pages == By default, the module uses [[Module:Disambiguation]] to detect [[WP:DAB|disambiguation pages]] in the main namespace. If you want, you can turn this detection off, or use a custom value for disambiguation pages. &#123;{#invoke:pagetype|main|dab=''no''}} &#123;{#invoke:pagetype|main|dab=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury|dab=no}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury|dab=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury|dab=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury|dab=custom text}} |} == Set index articles == Documentation pending. == Soft redirects == Documentation pending. == Non-existent pages == Documentation pending. == Other namespaces == By default, the module produces "<code>page</code>" if used from a namespace that hasn't been specified. This value can be changed with the {{para|other}} parameter: &#123;{#invoke:pagetype|main|other=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text|wikipedia=wikipedia-space text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text|wikipedia=wikipedia-space text}} |} == Plurals == By default the module returns the name of the namespace in the singular. Adding the parameter {{para|plural|y}} returns the plural form. {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|plural=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|plural=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Category:Books}}</nowiki></code> || {{#invoke:pagetype|main|page=Category:Books}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Category:Books|plural=y}}</nowiki></code> || {{#invoke:pagetype|main|page=Category:Books|plural=y}} |} The rules for pluralisation can be customised in [[Module:Pagetype/config]] to allow localisation. == Capitalisation == By default the module returns the page type in lowercase. Adding the parameter {{para|caps|y}} returns a version with a capital letter at the start. {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|caps=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|caps=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|plural=y|caps=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|plural=y|caps=y}} |} gyf3yr077hb6gbgk5uln5srx4vdzyc6 117279 117278 2026-07-16T11:45:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/doc]] 117278 wikitext text/x-wiki {{high use}} {{module rating|protected}} {{cascade-protected template|page=module}} {{Lua|Module:Pagetype/config|Module:Arguments|Module:Disambiguation|Module:Namespace detect|Module:Wikitext Parsing|Module:Yesno}} This module is used to detect the page type of a given page. It detects [[WP:REDIRECT|redirect pages]] automatically and is highly customisable. It can be used on its own or as a meta-module to create other page-type-detection templates. This module can also be accessed using {{tl|pagetype}}. == Syntax == ; Basic usage <pre> {{#invoke:pagetype|main}} </pre> ; All parameters <pre> {{#invoke:pagetype|main | page = | defaultns = | main = | user = | wikipedia = | project = | wp = | file = | image = | mediawiki = | template = | help = | category = | portal = | draft = | timedtext = | module = | topic = | special = | media = | talk = | redirect = | soft_redirect = | dab = | na = | other = | sia = | nonexistent = | plural = }} </pre> == Basic usage == For simple detection of the page type of the current page, use the default settings: &#123;{#invoke:pagetype|main}} That will produce the following results, depending on the page type or the [[WP:NAMESPACE|namespace]]: {| class="wikitable" ! Page type / namespace !! Output |- | Redirects (in any namespace) || <code>redirect</code> |- | Main namespace || <code>article</code> |- | File namespace || <code>file</code> |- | Template namespace || <code>template</code> |- | Category namespace || <code>category</code> |- | Module namespace || <code>module</code> |- | Other namespaces || <code>page</code> |} If the module is used on a talk page, it will detect the page type for the corresponding subject page. ; Example {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main}}</nowiki></code> || {{#invoke:pagetype|main}} |} == Page parameter == You can use the <code>page</code> parameter to make the module act as though it was called from that page. &#123;{#invoke:pagetype|main|page=''page name''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK}}</nowiki></code> || {{#invoke:pagetype|main|page=UK}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |} == Adding and removing namespaces == It is possible to specify different behaviour for each namespace than that described in the [[#Basic usage|basic usage]] section. For example, you might want the module to display "user page" for pages in the user namespace, instead of the default "page". To do this, you can use the code {{para|user|yes}}. This looks up the typical name used for pages in the user namespace, in this case "user page", and uses that text when the module is used with a page in the user namespace. To use this with other namespaces, use the namespace name in lower case as a parameter: &#123;{#invoke:pagetype|main | user = ''yes'' | wikipedia = ''yes'' | project = ''yes'' | wp = ''yes'' | mediawiki = ''yes'' | help = ''yes'' | portal = ''yes'' | draft = ''yes'' | timedtext = ''yes'' | topic = ''yes'' | special = ''yes'' | media = ''yes'' }} You can use any of the following to specify the namespace: "<code>yes</code>", "<code>y</code>", "<code>true</code>" or "<code>1</code>". They can be used in any combination of upper and lower case. (These values are defined by [[Module:Yesno]].) The default text for these namespaces is as follows: {| class="wikitable" ! Page type / namespace !! Output |- | User namespace || <code>user page</code> |- | Wikipedia namespace || <code>project page</code> |- | MediaWiki namespace || <code>interface page</code> |- | Help namespace || <code>help page</code> |- | Portal namespace || <code>portal</code> |- | Draft namespace || <code>draft</code> |- | Timed Text namespace || <code>Timed Text page</code> |- | Topic namespace || <code>topic</code> |- | Special namespace || <code>special page</code> |- | Media namespace || <code>file</code> |} You can use a similar process to remove any of the default namespace values as well. For example, if you use the code {{para|template|no}}, then the module will display "page" when used on a template page, rather than the default "template". &#123;{#invoke:pagetype|main | main = ''no'' | file = ''no'' | template = ''no'' | category = ''no'' | module = ''no'' }} The following values will all work to remove namespace values: "<code>no</code>", "<code>n</code>", "<code>false</code>" or "<code>0</code>". They can be used in any combination of upper and lower case. ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|talk=y}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|talk=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|main=no}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|main=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=Yes}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=Yes}} |} == Default namespace sets == As well as adding and removing individual namespaces, it is possible to specify different sets of namespaces by using the {{para|defaultns}}. There are four different sets available: <code>all</code>, <code>extended</code>, <code>none</code> and the default set. These sets allow you to specify many namespaces at once, without having to use all of the individual namespace parameters. Namespaces are set according to the following table: {| class="wikitable" |- ! rowspan="2" | Namespace ! colspan="4" | Value of {{para|defaultns}} ! rowspan="2" | Output |- | style="width: 75px; text-align: center;" | <code>none</code> | style="width: 75px; text-align: center;" | <code>extended</code> | style="width: 75px; text-align: center;" | <code>all</code> | style="width: 75px; text-align: center;" | Other values |- | Main | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | article |- | User | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | user page |- | Wikipedia | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | project page |- | File | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | file |- | MediaWiki | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | interface page |- | Template | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | template |- | Help | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | help page |- | Category | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | category |- | Portal | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | portal |- | Draft | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | draft |- | TimedText | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | Timed Text page |- | Module | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{tick}} | module |- | Topic (Flow boards) | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | topic |- | All talk namespaces | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | talk page |- | Special | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | special page |- | Media | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{cross}} | style="text-align: center;" | {{tick}} | style="text-align: center;" | {{cross}} | file |} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|defaultns=none}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|defaultns=none}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|defaultns=all}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|defaultns=all}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg}} |- | <code><nowiki>{{#invoke:pagetype|main|page=File:Example.svg|defaultns=none}}</nowiki></code> || {{#invoke:pagetype|main|page=File:Example.svg|defaultns=none}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|defaultns=extended}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|defaultns=extended}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=extended}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=extended}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=all}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|defaultns=all}} |} == Custom namespace values == It is possible to specify a custom value for any namespace: &#123;{#invoke:pagetype|main | main = ''custom text'' | user = ''custom text'' | wikipedia = ''custom text'' | project = ''custom text'' | wp = ''custom text'' | file = ''custom text'' | image = ''custom text'' | mediawiki = ''custom text'' | template = ''custom text'' | help = ''custom text'' | category = ''custom text'' | portal = ''custom text'' | draft = ''custom text'' | timedtext = ''custom text'' | module = ''custom text'' | topic = ''custom text'' | special = ''custom text'' | media = ''custom text'' }} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|wikipedia=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Talk:United Kingdom|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Talk:United Kingdom|talk=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|main=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|main=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt}} |- | <code><nowiki>{{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=TimedText:Imagine (John Lennon song - sample).ogg.en.srt|timedtext=custom text}} |} == Talk parameter == Normally, the module will treat talk pages as if they were in the corresponding subject namespace. However, if the <code>talk</code> parameter is set, the module will treat talk pages separately from subject pages. The <code>talk</code> parameter sets values for all talk pages, i.e. pages in the Talk: namespace, pages in the User talk: namespace, pages in the Wikipedia talk: namespace, and so on. &#123;{#invoke:pagetype|main|talk=''yes''}} &#123;{#invoke:pagetype|main|talk=''custom text''}} The default value for "<code>talk=''yes''</code>" is "talk page". ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=yes}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=yes}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|talk=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia talk:Namespace|wikipedia=yes|talk=custom text}} |} == Main namespace classes == For pages in the main namespace, it is possible to add a class value in the first positional parameter: &#123;{#invoke:pagetype|main|''class''}} If the class value matches one of the values in the table below, it will produce an alternative to the default output of <code>article</code>. {| class="wikitable" |- ! Class !! Class values !! Output |- | No applicable class || <code>na</code>, <code>n/a</code> || <code>page</code> |- |} You can input the class value in any combination of upper and lower case. === Custom main namespace classes === It is also possible to specify a custom value for the main namespace classes: &#123;{#invoke:pagetype|main|''class''|na=''yes''}} &#123;{#invoke:pagetype|main|''class''|na=''custom text''}} This works the same way that it does for the custom namespace page types. Possible parameters are: * '''na''': a custom value for NA-class pages. It works in the same way as the <code>dab</code> parameter. The default value for "<code>yes</code>" etc. is "page". ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|na}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|na}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|na|na=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|na|na=custom text}} |} == Redirects == By default, the module automatically detects redirects in all namespace. It is not possible to specify redirect behaviour by namespace, but you can turn redirect detection off, or use a custom value for redirect pages. &#123;{#invoke:pagetype|main|redirect=''no''}} &#123;{#invoke:pagetype|main|redirect=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=UK}}</nowiki></code> || {{#invoke:pagetype|main|page=UK}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK|redirect=no}}</nowiki></code> || {{#invoke:pagetype|main|page=UK|redirect=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=UK|redirect=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=UK|redirect=custom text}} |} == Disambiguation pages == By default, the module uses [[Module:Disambiguation]] to detect [[WP:DAB|disambiguation pages]] in the main namespace. If you want, you can turn this detection off, or use a custom value for disambiguation pages. &#123;{#invoke:pagetype|main|dab=''no''}} &#123;{#invoke:pagetype|main|dab=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury|dab=no}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury|dab=no}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Mercury|dab=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Mercury|dab=custom text}} |} == Set index articles == Documentation pending. == Soft redirects == Documentation pending. == Non-existent pages == Documentation pending. == Other namespaces == By default, the module produces "<code>page</code>" if used from a namespace that hasn't been specified. This value can be changed with the {{para|other}} parameter: &#123;{#invoke:pagetype|main|other=''custom text''}} ; Examples {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text|wikipedia=wikipedia-space text}}</nowiki></code> || {{#invoke:pagetype|main|page=Wikipedia:Namespace|other=custom text|wikipedia=wikipedia-space text}} |} == Plurals == By default the module returns the name of the namespace in the singular. Adding the parameter {{para|plural|y}} returns the plural form. {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|plural=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|plural=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Category:Books}}</nowiki></code> || {{#invoke:pagetype|main|page=Category:Books}} |- | <code><nowiki>{{#invoke:pagetype|main|page=Category:Books|plural=y}}</nowiki></code> || {{#invoke:pagetype|main|page=Category:Books|plural=y}} |} The rules for pluralisation can be customised in [[Module:Pagetype/config]] to allow localisation. == Capitalisation == By default the module returns the page type in lowercase. Adding the parameter {{para|caps|y}} returns a version with a capital letter at the start. {| class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|caps=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|caps=y}} |- | <code><nowiki>{{#invoke:pagetype|main|page=United Kingdom|plural=y|caps=y}}</nowiki></code> || {{#invoke:pagetype|main|page=United Kingdom|plural=y|caps=y}} |} gyf3yr077hb6gbgk5uln5srx4vdzyc6 Template:Polluted category 10 46629 117184 111807 2026-07-12T18:00:09Z en>MusikBot II 0 Changed protection settings for "[[Template:Polluted category]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2500 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) 111807 wikitext text/x-wiki <nowiki /><noinclude>{{Documentation}}<!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, THANKS --></noinclude> 4onaw4seacscd08nxwsxjqt517qhu3d 117185 117184 2026-07-16T11:40:26Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Polluted_category]] 111807 wikitext text/x-wiki <nowiki /><noinclude>{{Documentation}}<!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, THANKS --></noinclude> 4onaw4seacscd08nxwsxjqt517qhu3d Template:Monthly clean-up category/outer core 10 46632 117134 111810 2025-10-15T11:50:58Z en>Rich Farmbrough 0 Pass page count through. 117134 wikitext text/x-wiki <includeonly>{{Monthly clean-up category/core | type = {{#if:{{{type|}}}|{{{type}}}|{{#ifeq:{{First word|{{{name part}}}}}|Wikipedia|{{{name part}}}|{{lcfirst:{{{name part}}}}}}}}} | toc = {{{toc}}} | year = {{{year}}} | monthno = {{{monthno}}} | month name = {{{month name|0}}} | name part = {{{name part}}} | cat = {{#if:{{{cat|}}}|{{{cat}}}|{{{name part}}}}} | page count = {{PAGESINCATEGORY:{{PAGENAME}}|R}} | message = {{{message|}}} | datecat = {{{datecat|}}} | clean-up = {{{clean-up|}}} | track = {{{track|}}} }}</includeonly> at064eh0p3ggszmmzqd6ayj5qu1wiwd 117135 117134 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/outer_core]] 117134 wikitext text/x-wiki <includeonly>{{Monthly clean-up category/core | type = {{#if:{{{type|}}}|{{{type}}}|{{#ifeq:{{First word|{{{name part}}}}}|Wikipedia|{{{name part}}}|{{lcfirst:{{{name part}}}}}}}}} | toc = {{{toc}}} | year = {{{year}}} | monthno = {{{monthno}}} | month name = {{{month name|0}}} | name part = {{{name part}}} | cat = {{#if:{{{cat|}}}|{{{cat}}}|{{{name part}}}}} | page count = {{PAGESINCATEGORY:{{PAGENAME}}|R}} | message = {{{message|}}} | datecat = {{{datecat|}}} | clean-up = {{{clean-up|}}} | track = {{{track|}}} }}</includeonly> at064eh0p3ggszmmzqd6ayj5qu1wiwd Template:CollapsibleLargeCategoryTOC 10 46634 117244 2017-03-10T22:25:32Z en>Christian75 0 {{redr}} is deprecated - converting to {{Redirect category shell|}} using [[Project:AWB|AWB]] 117244 wikitext text/x-wiki #REDIRECT [[Template:Collapsible large category TOC]] {{Redirect category shell| {{R from move}} }} flvat5ylw08wh5wc9sto9pnqwr9os53 117245 111812 2026-07-16T11:42:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:CollapsibleLargeCategoryTOC]] 111812 wikitext text/x-wiki #REDIRECT [[Template:Collapsible large category TOC]] {{Redirect category shell| {{R from move}} }} flvat5ylw08wh5wc9sto9pnqwr9os53 Template:Collapsible large category TOC 10 46635 117246 2014-07-02T16:18:10Z en>The Mol Man 0 117246 wikitext text/x-wiki {{#invoke:Large category TOC|collapsible}}<includeonly><!--[[Category:Working category 84userBot]]--></includeonly><noinclude>{{documentation}}</noinclude> tbbas2cod1wshadl2dd0h6oyw8uba0m 117247 111813 2026-07-16T11:42:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Collapsible_large_category_TOC]] 111813 wikitext text/x-wiki {{#invoke:Large category TOC|collapsible}}<includeonly><!--[[Category:Working category 84userBot]]--></includeonly><noinclude>{{documentation}}</noinclude> tbbas2cod1wshadl2dd0h6oyw8uba0m Template:Empty category 10 46648 117044 2018-02-23T17:02:13Z en>Primefac 0 Changed protection level for "[[Template:Empty category]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) 117044 wikitext text/x-wiki #REDIRECT [[Template:Possibly empty category]] ho1p9zcm2iippwhni4oy3voegnorzpp 117045 111829 2026-07-16T11:38:15Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Empty_category]] 111829 wikitext text/x-wiki #REDIRECT [[Template:Possibly empty category]] ho1p9zcm2iippwhni4oy3voegnorzpp Module:Lang/data/iana languages 828 47141 117216 115090 2026-06-22T16:56:25Z en>Trappist the monk 0 update to 2026-06-14 data; 117216 Scribunto text/plain -- File-Date: 2026-06-14 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (IALA)", "Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Chichewa", "Chewa", "Nyanja"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Iron Ossetic", "Iron", "Iron Ossetian", "Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine", "Nakoda Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw", "Nehirowimowin"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bih"] = {"Bihari languages"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli-Mufu"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Karian", "Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin", "Tsilhqot’in"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Klallam", "Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["cls"] = {"Classical Sanskrit"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Moi-Wadea", "Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slavey"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Tlicho", "Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dyl"] = {"Bhutanese Sign Language"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Hän"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnm"] = {"Hainanese"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu", "Isu (Menchum Division)"}, ["isv"] = {"Interslavic"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Ngyian", "Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Kinnauri Pahari"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Ktunaxa", "Ksanka", "Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwak'wala", "Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfb"] = {"Buu (Cameroon)"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["luh"] = {"Leizhou Chinese"}, ["lui"] = {"Luiseño"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Soq", "Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male", "Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mòcheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Hember Avu", "Amben", "Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk", "Kanien'kéha"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Nepal Bhasa", "Newar", "Newari"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack", "Lhéchelesem"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oak"] = {"Noakhali", "Noakhailla"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["olb"] = {"Oli-Bodiman"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osd"] = {"Digor Ossetic", "Digor", "Digor Ossetian"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rrm"] = {"Moriori"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["scz"] = {"Shaetlan"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt", "She shashishalhem"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap", "Secwepemctsín"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjc"] = {"Shaojiang Chinese"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish", "Sḵwx̱wú7mesh sníchim"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Tsuut'ina", "Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isubu", "Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson", "Nłeʔkepmxcín", "Thompson River Salish"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan", "Tāłtān"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvg"] = {"Tugunese", "Batavian Portuguese Creole", "Mardijker Creole"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsn"] = {"Vedic Sanskrit"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Yote", "Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Iyasa", "Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynb"] = {"Yamben"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhk"] = {"Kurdish Sign Language"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mbuun"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["bh"] = {"Bihari languages"}, ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dek"] = {"Dek"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nte"] = {"Nathembo"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yol"] = {"Yola"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 7maeu8qldugwz5oxm6jkg7gdan5few7 117217 117216 2026-07-16T11:41:56Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/iana_languages]] 117216 Scribunto text/plain -- File-Date: 2026-06-14 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (IALA)", "Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Chichewa", "Chewa", "Nyanja"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Iron Ossetic", "Iron", "Iron Ossetian", "Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine", "Nakoda Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw", "Nehirowimowin"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bih"] = {"Bihari languages"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli-Mufu"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Karian", "Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin", "Tsilhqot’in"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Klallam", "Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["cls"] = {"Classical Sanskrit"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Moi-Wadea", "Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slavey"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Tlicho", "Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dyl"] = {"Bhutanese Sign Language"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Hän"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnm"] = {"Hainanese"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu", "Isu (Menchum Division)"}, ["isv"] = {"Interslavic"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Ngyian", "Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Kinnauri Pahari"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Ktunaxa", "Ksanka", "Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwak'wala", "Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfb"] = {"Buu (Cameroon)"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["luh"] = {"Leizhou Chinese"}, ["lui"] = {"Luiseño"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Soq", "Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male", "Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mòcheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Hember Avu", "Amben", "Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk", "Kanien'kéha"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Nepal Bhasa", "Newar", "Newari"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack", "Lhéchelesem"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oak"] = {"Noakhali", "Noakhailla"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["olb"] = {"Oli-Bodiman"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osd"] = {"Digor Ossetic", "Digor", "Digor Ossetian"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rrm"] = {"Moriori"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["scz"] = {"Shaetlan"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt", "She shashishalhem"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap", "Secwepemctsín"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjc"] = {"Shaojiang Chinese"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish", "Sḵwx̱wú7mesh sníchim"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Tsuut'ina", "Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isubu", "Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson", "Nłeʔkepmxcín", "Thompson River Salish"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan", "Tāłtān"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvg"] = {"Tugunese", "Batavian Portuguese Creole", "Mardijker Creole"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsn"] = {"Vedic Sanskrit"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Yote", "Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Iyasa", "Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynb"] = {"Yamben"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhk"] = {"Kurdish Sign Language"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mbuun"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["bh"] = {"Bihari languages"}, ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dek"] = {"Dek"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nte"] = {"Nathembo"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yol"] = {"Yola"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 7maeu8qldugwz5oxm6jkg7gdan5few7 Module:Lang/data/iana scripts 828 47144 117218 114891 2026-06-22T16:56:28Z en>Trappist the monk 0 update to 2026-06-14 data; 117218 Scribunto text/plain -- File-Date: 2026-06-14 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Berf"] = {"Beria Erfe"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hntl"] = {"Han (Traditional variant) with Latin (alias for Hant + Latn)"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Seal"] = {"Seal", "Small Seal"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } opa2icedd77qcon6wkrhxtmgbquj2gt 117219 117218 2026-07-16T11:41:56Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/iana_scripts]] 117218 Scribunto text/plain -- File-Date: 2026-06-14 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Berf"] = {"Beria Erfe"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hntl"] = {"Han (Traditional variant) with Latin (alias for Hant + Latn)"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Seal"] = {"Seal", "Small Seal"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } opa2icedd77qcon6wkrhxtmgbquj2gt Module:Lang/data/iana regions 828 47145 117220 114893 2026-06-22T16:56:30Z en>Trappist the monk 0 update to 2026-06-14 data; 117220 Scribunto text/plain -- File-Date: 2026-06-14 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } az5uweykk88bvuuol7yikutrw3jafzq 117221 117220 2026-07-16T11:41:56Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/iana_regions]] 117220 Scribunto text/plain -- File-Date: 2026-06-14 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } az5uweykk88bvuuol7yikutrw3jafzq Module:Lang/data/iana variants 828 47146 117222 114895 2026-06-22T16:56:54Z en>Trappist the monk 0 update to 2026-06-14 data; 117222 Scribunto text/plain -- File-Date: 2026-06-14 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akhmimic"] = { ["descriptions"] = {"Akhmimic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["anpezo"] = { ["descriptions"] = {"Anpezo standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohairic"] = { ["descriptions"] = {"Bohairic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fascia"] = { ["descriptions"] = {"Fascia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fayyumic"] = { ["descriptions"] = {"Fayyumic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["fodom"] = { ["descriptions"] = {"Fodom standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["gherd"] = { ["descriptions"] = {"Gherdëina standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hanoi"] = { ["descriptions"] = {"The Hà Nội variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["huett"] = { ["descriptions"] = {"The Huế (province Thừa Thiên) variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kleinsch"] = { ["descriptions"] = {"Kleinschmidt orthography", "Allattaasitaamut"}, ["prefixes"] = {"kl", "kl-tunumiit"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["leidentr"] = { ["descriptions"] = {"Ancient Egyptian in Leiden Unified Transliteration"}, ["prefixes"] = {"egy"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["lycopol"] = { ["descriptions"] = {"Lycopolitan alias Subakhmimic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["mdcegyp"] = { ["descriptions"] = {"Ancient Egyptian hieroglyphs encoded in Manuel de Codage"}, ["prefixes"] = {"egy"}, }, ["mdctrans"] = { ["descriptions"] = {"Ancient Egyptian transliteration encoded in Manuel de Codage"}, ["prefixes"] = {"egy"}, }, ["mesokem"] = { ["descriptions"] = {"Mesokemic alias Oxyrhynchite dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["moderat"] = { ["descriptions"] = {"The moderate (conservative, i.e. Danish-like) spelling variant of Bokmål"}, ["prefixes"] = {"nb"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["pehoeji"] = { ["descriptions"] = {"Hokkien Vernacular Romanization System", "Pe̍h-ōe-jī orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["radikalt"] = { ["descriptions"] = {"Radical (i.e. Nynorsk-like) spelling variant of Bokmål"}, ["prefixes"] = {"nb"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["sahidic"] = { ["descriptions"] = {"Sahidic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["saigon"] = { ["descriptions"] = {"The Sài Gòn variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["slepe"] = { ["descriptions"] = {"Sorbian dialect of Schleife"}, ["prefixes"] = {"dsb"}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["stadi"] = { ["descriptions"] = {"The \"Stadin slangi\" dialect of Finnish"}, ["prefixes"] = {"fi"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["taglish"] = { ["descriptions"] = {"Tagalog-English code-switching"}, ["prefixes"] = {"en", "tl", "fil"}, }, ["tailo"] = { ["descriptions"] = {"Taiwanese Hokkien Romanization System for Hokkien languages", "Tâi-lô orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["valbadia"] = { ["descriptions"] = {"Val Badia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["viennese"] = { ["descriptions"] = {"The Viennese dialect of German"}, ["prefixes"] = {"de"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } m8ui1ahgr00min1dqt7anpuxgznnw0u 117223 117222 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/iana_variants]] 117222 Scribunto text/plain -- File-Date: 2026-06-14 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akhmimic"] = { ["descriptions"] = {"Akhmimic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["anpezo"] = { ["descriptions"] = {"Anpezo standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohairic"] = { ["descriptions"] = {"Bohairic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fascia"] = { ["descriptions"] = {"Fascia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fayyumic"] = { ["descriptions"] = {"Fayyumic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["fodom"] = { ["descriptions"] = {"Fodom standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["gherd"] = { ["descriptions"] = {"Gherdëina standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hanoi"] = { ["descriptions"] = {"The Hà Nội variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["huett"] = { ["descriptions"] = {"The Huế (province Thừa Thiên) variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kleinsch"] = { ["descriptions"] = {"Kleinschmidt orthography", "Allattaasitaamut"}, ["prefixes"] = {"kl", "kl-tunumiit"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["leidentr"] = { ["descriptions"] = {"Ancient Egyptian in Leiden Unified Transliteration"}, ["prefixes"] = {"egy"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["lycopol"] = { ["descriptions"] = {"Lycopolitan alias Subakhmimic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["mdcegyp"] = { ["descriptions"] = {"Ancient Egyptian hieroglyphs encoded in Manuel de Codage"}, ["prefixes"] = {"egy"}, }, ["mdctrans"] = { ["descriptions"] = {"Ancient Egyptian transliteration encoded in Manuel de Codage"}, ["prefixes"] = {"egy"}, }, ["mesokem"] = { ["descriptions"] = {"Mesokemic alias Oxyrhynchite dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["moderat"] = { ["descriptions"] = {"The moderate (conservative, i.e. Danish-like) spelling variant of Bokmål"}, ["prefixes"] = {"nb"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["pehoeji"] = { ["descriptions"] = {"Hokkien Vernacular Romanization System", "Pe̍h-ōe-jī orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["radikalt"] = { ["descriptions"] = {"Radical (i.e. Nynorsk-like) spelling variant of Bokmål"}, ["prefixes"] = {"nb"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["sahidic"] = { ["descriptions"] = {"Sahidic dialect of Coptic"}, ["prefixes"] = {"cop"}, }, ["saigon"] = { ["descriptions"] = {"The Sài Gòn variant of Vietnamese"}, ["prefixes"] = {"vi"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["slepe"] = { ["descriptions"] = {"Sorbian dialect of Schleife"}, ["prefixes"] = {"dsb"}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["stadi"] = { ["descriptions"] = {"The \"Stadin slangi\" dialect of Finnish"}, ["prefixes"] = {"fi"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["taglish"] = { ["descriptions"] = {"Tagalog-English code-switching"}, ["prefixes"] = {"en", "tl", "fil"}, }, ["tailo"] = { ["descriptions"] = {"Taiwanese Hokkien Romanization System for Hokkien languages", "Tâi-lô orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["valbadia"] = { ["descriptions"] = {"Val Badia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["viennese"] = { ["descriptions"] = {"The Viennese dialect of German"}, ["prefixes"] = {"de"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } m8ui1ahgr00min1dqt7anpuxgznnw0u Module:Lang/data/iana suppressed scripts 828 47147 117224 114897 2026-06-22T16:56:57Z en>Trappist the monk 0 update to 2026-06-14 data; 117224 Scribunto text/plain -- File-Date: 2026-06-14 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } f9hhpglpg7ffutti13f8zyf7lxr3fq5 117225 117224 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/iana_suppressed_scripts]] 117224 Scribunto text/plain -- File-Date: 2026-06-14 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } f9hhpglpg7ffutti13f8zyf7lxr3fq5 Module:Lang/configuration 828 47148 117226 114917 2026-07-07T22:37:46Z en>Pppery 0 Rename category per CFDS 117226 Scribunto text/plain --[[--------------------------< T E M P L A T E S _ T >-------------------------------------------------------- ]] local templates_t = { lang = 'Lang', langx = 'Langx', langxx = 'Lang-xx', transliteration = 'Transliteration', } --[[--------------------------< K N O W N _ P A R A M S >------------------------------------------------------ lists of all parameters known to {{lang}}, {{langx}}, {{lang-xx}} templates. Exception: |fn= is known to {{lang}} but is not a 'lang' template; that parameter causes the module to call the specified lang(), lang_xx_inherit(), or lang_xx_italic() function. These separate functions set |fn= to nill and then do the known-param checking on the other template parameters ]] local known_params_t = { ['common_params_all_t'] = { -- these parameters common to {{lang}}, {{langx}}, and {{lang-xx}} ['code'] = true, ['text'] = true, ['rtl'] = true, ['italic'] = true, ['italics'] = true, ['i'] = true, ['size'] = true, ['proto'] = true, ['nocat'] = true, ['cat'] = true, ['template'] = true, -- supplied by external templates to provide template name for error messaging ({{nihongo}}, etc) }, ['params_lang_t'] = { -- unique to {{lang}} [1] = true, -- alias of |code= [2] = true, -- alias of |text= }, ['params_x_t'] = { -- common to {{langx}} and {{lang-xx}} ['translit'] = true, ['translit-std'] = true, ['translit-script'] = true, ['translation'] = true, ['lit='] = true, ['label'] = true, ['link'] = true, ['links'] = true, ['lit'] = true, ['engvar'] = true, }, ['params_langx_t'] = { -- unique to {{langx}} [1] = true, -- alias of |code= [2] = true, -- alias of |text= [3] = true, -- alias of |translit= [4] = true, -- alias of |translation= }, ['params_lang_xx_t'] = { -- unique to {{lang-xx}} [1] = true, -- alias of |text= [2] = true, -- alias of |translit= [3] = true, -- alias of |translation= ['script'] = true, -- these needed to override default params in {{lang-??}} templates ['region'] = true, ['variant'] = true, }, } --[[--------------------------< E N G _ V A R >---------------------------------------------------------------- Used at en.wiki so that spelling of 'romanized' (US, default) can be changed to 'romanised' to match the envar specified by a {{Use xxx English}}. Not likely useful outside of en.wiki This is accomplished by setting |engvar=gb; can, should be omitted in articles that use American English; no need for the clutter. ]] local engvar_sel_t = { -- select either UK English or US English ['au'] = 'gb_t', -- these match IANA region codes (except in lower case) ['ca'] = 'us_t', ['gb'] = 'gb_t', ['ie'] = 'gb_t', ['in'] = 'gb_t', ['nz'] = 'gb_t', ['us'] = 'us_t', -- default engvar ['za'] = 'gb_t' }; local engvar_t = { ['gb_t'] = { ['romanisz_lc'] = 'romanisation', -- lower case ['romanisz_uc'] = 'Romanisation', -- upper case; unused can be deleted ['romanisz_pt'] = 'romanised', -- past tense }, ['us_t'] = { -- default engvar ['romanisz_lc'] = 'romanization', -- lower case ['romanisz_uc'] = 'Romanization', -- upper case; unused can be deleted ['romanisz_pt'] = 'romanized', -- past tense } } local default_engvar = 'us_t'; --[[ =============================<< M E S S A G I N G T A B L E S >>============================================= these tables are for internationalization. Messages or fragments thereof are mostly grouped by function name. Some messages are shared by functions other than the function table that lists the message or fragment. ]] --[[--------------------------< K E Y W O R D S _ T >---------------------------------------------------------- ]] local keywords_t = { ['affirmative'] = 'yes', ['negative'] = 'no', ['unset'] = 'unset', ['invert'] = 'invert', ['default'] = 'default', } --[[--------------------------< M I S C _ T E X T _ T >-------------------------------------------------------- ]] local misc_text_t = { ['error'] = 'Error', -- make_error_msg(), tag_from_name() ['language'] = 'language', -- make_translit(), lang_xx(), name_from_tag() ['help'] = 'help', } --[[--------------------------< M A K E _ E R R O R _ M S G _ T >---------------------------------------------- ]] local make_error_msg_t = { ['xlit_err_cat'] = 'Transliteration template errors', ['lang_err_cat'] = 'Lang and lang-xx template errors', ['undefined'] = 'undefined', } --[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- ]] local parameter_validate_t = { ['invalid_param'] = 'invalid parameter: &#124;$1=', -- $1 is parameter name } --[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- ]] local validate_italic_t = { ['multi_italic'] = 'only one of &#124;italic=, &#124;italics=, or &#124;i= can be specified', } --[[--------------------------< V A L I D A T E _ T E X T _ T >------------------------------------------------ ]] local validate_text_t = { ['no_text'] = 'no text', ['malformed_markup'] = 'text has malformed markup', ['italic_markup'] = 'text has italic markup', } --[[--------------------------< T E X T _ S C R I P T _ M A T C H _ T E S T _ T >------------------------------ ]] local text_script_match_test_t = { ['latn_txt_mismatch'] = 'Latn text/non-Latn script subtag mismatch', ['latn_scr_mismatch'] = 'Non-latn text (pos $1: $2)/Latn script subtag mismatch', -- $1 identifies offending character's position; $2 is the character } --[[--------------------------< L A N G _ T >------------------------------------------------------------------ ]] local lang_t = { ['conflict_n_param'] = 'conflicting: {{{$1}}} and &#124;$2=', -- $1 is positional param number, $2 is named param; shared with _lang_xx() ['conflict_n_param_types'] = { ['code'] = 'code', ['text'] = 'text', ['translit'] = 'translit', }, ['invalid_proto'] = 'invalid &#124;proto=: $1', -- _lang_xx also emits this message } --[[--------------------------< L A N G _ X X _ T >------------------------------------------------------------ ]] local lang_xx_t = { ['conflict_n_lit'] = 'conflicting: {{{$1}}} and &#124;lit= or &#124;translation=', -- $1 is positional parameter; can be either 3 ({{lang-??}}) or 4 ({{langx}}) ['conflict_lit'] = 'conflicting: &#124;lit= and &#124;translation=', ['conflict_link'] = 'conflicting: &#124;links= and &#124;link=', ['invalid_xlit_std'] = 'invalid translit-std', ['romanization'] = 'Romanization of', ['translit_nonlatn'] = 'transliteration text not Latin script (pos $1: $2)', -- _xlit() also emits this message; $1 identifies offending character's position; $2 is the character ['xlit_of_latn'] = 'transliteration of latn script', } --[[--------------------------< T A G _ F R O M _ N A M E _ T >------------------------------------------------ ]] local tag_from_name_t = { ['lang_not_found'] = 'language: $1 not found', -- $1 is language name parameter value ['missing_lang_name'] = 'missing language name', } --[[--------------------------< T R A N S L _ T >-------------------------------------------------------------- ]] local transl_t = { ['unrecog_xlit_std'] = 'unrecognized transliteration standard: $1', -- $1 is |translit_std- parameter value ['no_text'] = 'no text', ['missing_lang_scr'] = 'missing language / script code', ['unrecog_lang_scr'] = 'unrecognized language / script code: $1', -- $1 is the language/script code } --[[--------------------------< G E T _ I E T F _ P A R T S _ T >---------------------------------------------- ]] local get_ietf_parts_t = { ['maint_promo_cat'] = 'Lang and lang-xx code promoted to ISO 639-1|$1', -- $1 is ISO 639-2/3 subtag ['maint_promo_msg'] = 'code: $1 promoted to code: $2', -- $1 is ISO 639-2/3 subtag, $2 is synonymous ISO 639-1 subtag ['missing_lang_tag'] = 'missing language tag', -- also used in _langx() ['redundant_scr'] = 'redundant script tag', ['redundant_reg'] = 'redundant region tag', ['redundant_var'] = 'redundant variant tag', ['unrecog_tag'] = 'unrecognized language tag: $1', -- $1 is the whole language tag ['unrecog_code'] = 'unrecognized language code: $1', -- $1 is code ['unrecog_reg_code'] = 'unrecognized region: $1 for code: $2', -- $1 is region, $2 is code ['unrecog_scr_code'] = 'unrecognized script: $1 for code: $2', -- $1 is script, $2 is code ['script_code'] = 'script: $1 not supported for code: $2', -- $1 is script, $2 is code ['unrecog_var'] = 'unrecognized variant: $1', -- $1 is variant ['unrecog_var_code'] = 'unrecognized variant: $1 for code: $2', -- $1 is variant, $2 is code ['unrecog_var_code_scr'] = 'unrecognized variant: $1 for code-script pair: $2-$3', -- $1 is variant, $2 is code, $3 is script ['unrecog_var_code_reg'] = 'unrecognized variant: $1 for code-region pair: $2-$3', -- $1 is variant, $2 is code, $3 is region ['unrecog_pri'] = 'unrecognized private tag: $1', -- $1 is private tag } --[[--------------------------< L A N G U A G E _ N A M E _ G E T _ T >---------------------------------------- ]] local language_name_get_t = { ['deprecated_cat'] = 'Lang and langx using deprecated ISO 639 codes|$1', -- $1 is deprecated ISO 639 subtag ['deprecated_msg'] = 'code: $1 is deprecated', -- $1 is deprecated ISO 639 subtag } --[[--------------------------< H T M L _ T I T L E _ T E X T _ T >-------------------------------------------- ]] local make_text_html_t = { ['zxx'] = 'text', -- for zxx no linguistic content ['collective'] = 'collective text', -- for collective languages ['individual'] = 'language text', -- for individual languages } --[[--------------------------< T R A N S L A T I O N _ M A K E _ T >------------------------------------------ ]] local translation_make_t = { ['lit_xlation'] = 'Literal translation', -- article title fragment and HTML title attribute ['lit_abbr'] = 'lit.', } --[[--------------------------< M A K E _ C A T E G O R Y _ T >------------------------------------------------ ]] local make_category_t = { ['collective_cat'] = 'Category:Articles with text in', -- for collective languages ['cat_prefix'] = 'Category:Articles containing', -- prefix for explicitly cited and individual languages ['explicit_cat'] = 'explicitly cited', -- for explicitly citing this wiki's language ['cat_postfix'] = 'language text', -- postfix for individual languages } --[[--------------------------< M A K E _ T R A N S L I T _ T >------------------------------------------------ ]] local make_translit_t = { ['script'] = 'script', ['transliteration'] = 'transliteration', } --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { known_params_t = known_params_t, templates_t = templates_t, default_engvar = default_engvar, -- engvar support not likely useful outside of en.wiki engvar_t = engvar_t, engvar_sel_t = engvar_sel_t, get_ietf_parts_t = get_ietf_parts_t, -- messaging tables keywords_t = keywords_t, lang_t = lang_t, lang_xx_t = lang_xx_t, language_name_get_t = language_name_get_t, make_category_t = make_category_t, make_error_msg_t = make_error_msg_t, make_text_html_t = make_text_html_t, make_translit_t = make_translit_t, misc_text_t = misc_text_t, parameter_validate_t = parameter_validate_t, tag_from_name_t = tag_from_name_t, text_script_match_test_t = text_script_match_test_t, transl_t = transl_t, translation_make_t = translation_make_t, validate_italic_t = validate_italic_t, validate_text_t = validate_text_t, } 0grapkhfltfc8vltv99ir6fmysp0gia 117227 117226 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/configuration]] 117226 Scribunto text/plain --[[--------------------------< T E M P L A T E S _ T >-------------------------------------------------------- ]] local templates_t = { lang = 'Lang', langx = 'Langx', langxx = 'Lang-xx', transliteration = 'Transliteration', } --[[--------------------------< K N O W N _ P A R A M S >------------------------------------------------------ lists of all parameters known to {{lang}}, {{langx}}, {{lang-xx}} templates. Exception: |fn= is known to {{lang}} but is not a 'lang' template; that parameter causes the module to call the specified lang(), lang_xx_inherit(), or lang_xx_italic() function. These separate functions set |fn= to nill and then do the known-param checking on the other template parameters ]] local known_params_t = { ['common_params_all_t'] = { -- these parameters common to {{lang}}, {{langx}}, and {{lang-xx}} ['code'] = true, ['text'] = true, ['rtl'] = true, ['italic'] = true, ['italics'] = true, ['i'] = true, ['size'] = true, ['proto'] = true, ['nocat'] = true, ['cat'] = true, ['template'] = true, -- supplied by external templates to provide template name for error messaging ({{nihongo}}, etc) }, ['params_lang_t'] = { -- unique to {{lang}} [1] = true, -- alias of |code= [2] = true, -- alias of |text= }, ['params_x_t'] = { -- common to {{langx}} and {{lang-xx}} ['translit'] = true, ['translit-std'] = true, ['translit-script'] = true, ['translation'] = true, ['lit='] = true, ['label'] = true, ['link'] = true, ['links'] = true, ['lit'] = true, ['engvar'] = true, }, ['params_langx_t'] = { -- unique to {{langx}} [1] = true, -- alias of |code= [2] = true, -- alias of |text= [3] = true, -- alias of |translit= [4] = true, -- alias of |translation= }, ['params_lang_xx_t'] = { -- unique to {{lang-xx}} [1] = true, -- alias of |text= [2] = true, -- alias of |translit= [3] = true, -- alias of |translation= ['script'] = true, -- these needed to override default params in {{lang-??}} templates ['region'] = true, ['variant'] = true, }, } --[[--------------------------< E N G _ V A R >---------------------------------------------------------------- Used at en.wiki so that spelling of 'romanized' (US, default) can be changed to 'romanised' to match the envar specified by a {{Use xxx English}}. Not likely useful outside of en.wiki This is accomplished by setting |engvar=gb; can, should be omitted in articles that use American English; no need for the clutter. ]] local engvar_sel_t = { -- select either UK English or US English ['au'] = 'gb_t', -- these match IANA region codes (except in lower case) ['ca'] = 'us_t', ['gb'] = 'gb_t', ['ie'] = 'gb_t', ['in'] = 'gb_t', ['nz'] = 'gb_t', ['us'] = 'us_t', -- default engvar ['za'] = 'gb_t' }; local engvar_t = { ['gb_t'] = { ['romanisz_lc'] = 'romanisation', -- lower case ['romanisz_uc'] = 'Romanisation', -- upper case; unused can be deleted ['romanisz_pt'] = 'romanised', -- past tense }, ['us_t'] = { -- default engvar ['romanisz_lc'] = 'romanization', -- lower case ['romanisz_uc'] = 'Romanization', -- upper case; unused can be deleted ['romanisz_pt'] = 'romanized', -- past tense } } local default_engvar = 'us_t'; --[[ =============================<< M E S S A G I N G T A B L E S >>============================================= these tables are for internationalization. Messages or fragments thereof are mostly grouped by function name. Some messages are shared by functions other than the function table that lists the message or fragment. ]] --[[--------------------------< K E Y W O R D S _ T >---------------------------------------------------------- ]] local keywords_t = { ['affirmative'] = 'yes', ['negative'] = 'no', ['unset'] = 'unset', ['invert'] = 'invert', ['default'] = 'default', } --[[--------------------------< M I S C _ T E X T _ T >-------------------------------------------------------- ]] local misc_text_t = { ['error'] = 'Error', -- make_error_msg(), tag_from_name() ['language'] = 'language', -- make_translit(), lang_xx(), name_from_tag() ['help'] = 'help', } --[[--------------------------< M A K E _ E R R O R _ M S G _ T >---------------------------------------------- ]] local make_error_msg_t = { ['xlit_err_cat'] = 'Transliteration template errors', ['lang_err_cat'] = 'Lang and lang-xx template errors', ['undefined'] = 'undefined', } --[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- ]] local parameter_validate_t = { ['invalid_param'] = 'invalid parameter: &#124;$1=', -- $1 is parameter name } --[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- ]] local validate_italic_t = { ['multi_italic'] = 'only one of &#124;italic=, &#124;italics=, or &#124;i= can be specified', } --[[--------------------------< V A L I D A T E _ T E X T _ T >------------------------------------------------ ]] local validate_text_t = { ['no_text'] = 'no text', ['malformed_markup'] = 'text has malformed markup', ['italic_markup'] = 'text has italic markup', } --[[--------------------------< T E X T _ S C R I P T _ M A T C H _ T E S T _ T >------------------------------ ]] local text_script_match_test_t = { ['latn_txt_mismatch'] = 'Latn text/non-Latn script subtag mismatch', ['latn_scr_mismatch'] = 'Non-latn text (pos $1: $2)/Latn script subtag mismatch', -- $1 identifies offending character's position; $2 is the character } --[[--------------------------< L A N G _ T >------------------------------------------------------------------ ]] local lang_t = { ['conflict_n_param'] = 'conflicting: {{{$1}}} and &#124;$2=', -- $1 is positional param number, $2 is named param; shared with _lang_xx() ['conflict_n_param_types'] = { ['code'] = 'code', ['text'] = 'text', ['translit'] = 'translit', }, ['invalid_proto'] = 'invalid &#124;proto=: $1', -- _lang_xx also emits this message } --[[--------------------------< L A N G _ X X _ T >------------------------------------------------------------ ]] local lang_xx_t = { ['conflict_n_lit'] = 'conflicting: {{{$1}}} and &#124;lit= or &#124;translation=', -- $1 is positional parameter; can be either 3 ({{lang-??}}) or 4 ({{langx}}) ['conflict_lit'] = 'conflicting: &#124;lit= and &#124;translation=', ['conflict_link'] = 'conflicting: &#124;links= and &#124;link=', ['invalid_xlit_std'] = 'invalid translit-std', ['romanization'] = 'Romanization of', ['translit_nonlatn'] = 'transliteration text not Latin script (pos $1: $2)', -- _xlit() also emits this message; $1 identifies offending character's position; $2 is the character ['xlit_of_latn'] = 'transliteration of latn script', } --[[--------------------------< T A G _ F R O M _ N A M E _ T >------------------------------------------------ ]] local tag_from_name_t = { ['lang_not_found'] = 'language: $1 not found', -- $1 is language name parameter value ['missing_lang_name'] = 'missing language name', } --[[--------------------------< T R A N S L _ T >-------------------------------------------------------------- ]] local transl_t = { ['unrecog_xlit_std'] = 'unrecognized transliteration standard: $1', -- $1 is |translit_std- parameter value ['no_text'] = 'no text', ['missing_lang_scr'] = 'missing language / script code', ['unrecog_lang_scr'] = 'unrecognized language / script code: $1', -- $1 is the language/script code } --[[--------------------------< G E T _ I E T F _ P A R T S _ T >---------------------------------------------- ]] local get_ietf_parts_t = { ['maint_promo_cat'] = 'Lang and lang-xx code promoted to ISO 639-1|$1', -- $1 is ISO 639-2/3 subtag ['maint_promo_msg'] = 'code: $1 promoted to code: $2', -- $1 is ISO 639-2/3 subtag, $2 is synonymous ISO 639-1 subtag ['missing_lang_tag'] = 'missing language tag', -- also used in _langx() ['redundant_scr'] = 'redundant script tag', ['redundant_reg'] = 'redundant region tag', ['redundant_var'] = 'redundant variant tag', ['unrecog_tag'] = 'unrecognized language tag: $1', -- $1 is the whole language tag ['unrecog_code'] = 'unrecognized language code: $1', -- $1 is code ['unrecog_reg_code'] = 'unrecognized region: $1 for code: $2', -- $1 is region, $2 is code ['unrecog_scr_code'] = 'unrecognized script: $1 for code: $2', -- $1 is script, $2 is code ['script_code'] = 'script: $1 not supported for code: $2', -- $1 is script, $2 is code ['unrecog_var'] = 'unrecognized variant: $1', -- $1 is variant ['unrecog_var_code'] = 'unrecognized variant: $1 for code: $2', -- $1 is variant, $2 is code ['unrecog_var_code_scr'] = 'unrecognized variant: $1 for code-script pair: $2-$3', -- $1 is variant, $2 is code, $3 is script ['unrecog_var_code_reg'] = 'unrecognized variant: $1 for code-region pair: $2-$3', -- $1 is variant, $2 is code, $3 is region ['unrecog_pri'] = 'unrecognized private tag: $1', -- $1 is private tag } --[[--------------------------< L A N G U A G E _ N A M E _ G E T _ T >---------------------------------------- ]] local language_name_get_t = { ['deprecated_cat'] = 'Lang and langx using deprecated ISO 639 codes|$1', -- $1 is deprecated ISO 639 subtag ['deprecated_msg'] = 'code: $1 is deprecated', -- $1 is deprecated ISO 639 subtag } --[[--------------------------< H T M L _ T I T L E _ T E X T _ T >-------------------------------------------- ]] local make_text_html_t = { ['zxx'] = 'text', -- for zxx no linguistic content ['collective'] = 'collective text', -- for collective languages ['individual'] = 'language text', -- for individual languages } --[[--------------------------< T R A N S L A T I O N _ M A K E _ T >------------------------------------------ ]] local translation_make_t = { ['lit_xlation'] = 'Literal translation', -- article title fragment and HTML title attribute ['lit_abbr'] = 'lit.', } --[[--------------------------< M A K E _ C A T E G O R Y _ T >------------------------------------------------ ]] local make_category_t = { ['collective_cat'] = 'Category:Articles with text in', -- for collective languages ['cat_prefix'] = 'Category:Articles containing', -- prefix for explicitly cited and individual languages ['explicit_cat'] = 'explicitly cited', -- for explicitly citing this wiki's language ['cat_postfix'] = 'language text', -- postfix for individual languages } --[[--------------------------< M A K E _ T R A N S L I T _ T >------------------------------------------------ ]] local make_translit_t = { ['script'] = 'script', ['transliteration'] = 'transliteration', } --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { known_params_t = known_params_t, templates_t = templates_t, default_engvar = default_engvar, -- engvar support not likely useful outside of en.wiki engvar_t = engvar_t, engvar_sel_t = engvar_sel_t, get_ietf_parts_t = get_ietf_parts_t, -- messaging tables keywords_t = keywords_t, lang_t = lang_t, lang_xx_t = lang_xx_t, language_name_get_t = language_name_get_t, make_category_t = make_category_t, make_error_msg_t = make_error_msg_t, make_text_html_t = make_text_html_t, make_translit_t = make_translit_t, misc_text_t = misc_text_t, parameter_validate_t = parameter_validate_t, tag_from_name_t = tag_from_name_t, text_script_match_test_t = text_script_match_test_t, transl_t = transl_t, translation_make_t = translation_make_t, validate_italic_t = validate_italic_t, validate_text_t = validate_text_t, } 0grapkhfltfc8vltv99ir6fmysp0gia Module:Lang/data/is latn data 828 47149 117228 114919 2026-06-12T17:04:35Z en>Trappist the monk 0 update to unicode 17.0.0; 117228 Scribunto text/plain --[[--------------------------< S I N G L E S _ T >----------------------------------------------------------- list of Latn and Zyyy (common) codepoints that are not included in <ranges_t> taken from Module:Unicode data/scripts and a local copy of https://www.unicode.org/Public/17.0.0/ucd/ScriptExtensions.txt using Module:Lang/data/make is latn data ]] local singles_t = { [170] = true, -- 00AA [186] = true, -- 00BA [215] = true, -- 00D7 [247] = true, -- 00F7 [787] = true, -- 0313 [856] = true, -- 0358 [862] = true, -- 035E [884] = true, -- 0374 [894] = true, -- 037E [901] = true, -- 0385 [903] = true, -- 0387 [1541] = true, -- 0605 [1548] = true, -- 060C [1563] = true, -- 061B [1567] = true, -- 061F [1600] = true, -- 0640 [1757] = true, -- 06DD [2274] = true, -- 08E2 [3647] = true, -- 0E3F [4347] = true, -- 10FB [6149] = true, -- 1805 [7379] = true, -- 1CD3 [7393] = true, -- 1CE1 [7418] = true, -- 1CFA [7672] = true, -- 1DF8 [8305] = true, -- 2071 [8319] = true, -- 207F [8432] = true, -- 20F0 [8498] = true, -- 2132 [8526] = true, -- 214E [12294] = true, -- 3006 [12448] = true, -- 30A0 [12783] = true, -- 31EF [13055] = true, -- 32FF [43310] = true, -- A92E [43471] = true, -- A9CF [43867] = true, -- AB5B [65279] = true, -- FEFF [65392] = true, -- FF70 [119970] = true, -- 1D4A2 [119995] = true, -- 1D4BB [120134] = true, -- 1D546 [129008] = true, -- 1F7F0 [129736] = true, -- 1FAC8 [917505] = true, -- E0001 } --[[--------------------------< R A N G E S _ T >------------------------------------------------------------- list of Latn and Zyyy (common) codepoints taken from Module:Unicode data/scripts and a local copy of https://www.unicode.org/Public/16.0.0/ucd/ScriptExtensions.txt ]] local ranges_t = { {0, 169}, -- 0000..00A9 {171, 185}, -- 00AB..00B9 {187, 214}, -- 00BB..00D6 {216, 246}, -- 00D8..00F6 {248, 745}, -- 00F8..02E9 {748, 782}, -- 02EC..030E {784, 785}, -- 0310..0311 {803, 805}, -- 0323..0325 {813, 814}, -- 032D..032E {816, 817}, -- 0330..0331 {867, 879}, -- 0363..036F {1157, 1158}, -- 0485..0486 {2385, 2386}, -- 0951..0952 {2404, 2405}, -- 0964..0965 {4053, 4056}, -- 0FD5..0FD8 {5867, 5869}, -- 16EB..16ED {5941, 5942}, -- 1735..1736 {6146, 6147}, -- 1802..1803 {7401, 7404}, -- 1CE9..1CEC {7406, 7411}, -- 1CEE..1CF3 {7413, 7415}, -- 1CF5..1CF7 {7424, 7461}, -- 1D00..1D25 {7468, 7516}, -- 1D2C..1D5C {7522, 7525}, -- 1D62..1D65 {7531, 7543}, -- 1D6B..1D77 {7545, 7614}, -- 1D79..1DBE {7680, 7935}, -- 1E00..1EFF {8192, 8203}, -- 2000..200B {8206, 8292}, -- 200E..2064 {8294, 8304}, -- 2066..2070 {8308, 8318}, -- 2074..207E {8320, 8334}, -- 2080..208E {8336, 8348}, -- 2090..209C {8352, 8385}, -- 20A0..20C1 {8448, 8485}, -- 2100..2125 {8487, 8497}, -- 2127..2131 {8499, 8525}, -- 2133..214D {8527, 8587}, -- 214F..218B {8592, 9257}, -- 2190..2429 {9280, 9290}, -- 2440..244A {9312, 10239}, -- 2460..27FF {10496, 11123}, -- 2900..2B73 {11126, 11263}, -- 2B76..2BFF {11360, 11391}, -- 2C60..2C7F {11776, 11869}, -- 2E00..2E5D {12272, 12292}, -- 2FF0..3004 {12296, 12320}, -- 3008..3020 {12336, 12343}, -- 3030..3037 {12348, 12351}, -- 303C..303F {12443, 12444}, -- 309B..309C {12539, 12540}, -- 30FB..30FC {12688, 12703}, -- 3190..319F {12736, 12773}, -- 31C0..31E5 {12832, 12895}, -- 3220..325F {12927, 13007}, -- 327F..32CF {13144, 13311}, -- 3358..33FF {19904, 19967}, -- 4DC0..4DFF {42752, 42972}, -- A700..A7DC {42993, 43007}, -- A7F1..A7FF {43056, 43065}, -- A830..A839 {43824, 43866}, -- AB30..AB5A {43868, 43876}, -- AB5C..AB64 {43878, 43883}, -- AB66..AB6B {64256, 64262}, -- FB00..FB06 {64830, 64831}, -- FD3E..FD3F {65040, 65049}, -- FE10..FE19 {65072, 65106}, -- FE30..FE52 {65108, 65126}, -- FE54..FE66 {65128, 65131}, -- FE68..FE6B {65281, 65381}, -- FF01..FF65 {65438, 65439}, -- FF9E..FF9F {65504, 65510}, -- FFE0..FFE6 {65512, 65518}, -- FFE8..FFEE {65529, 65533}, -- FFF9..FFFD {65792, 65794}, -- 10100..10102 {65799, 65843}, -- 10107..10133 {65847, 65855}, -- 10137..1013F {65936, 65948}, -- 10190..1019C {66000, 66044}, -- 101D0..101FC {66273, 66299}, -- 102E1..102FB {67456, 67461}, -- 10780..10785 {67463, 67504}, -- 10787..107B0 {67506, 67514}, -- 107B2..107BA {113824, 113827}, -- 1BCA0..1BCA3 {117760, 118012}, -- 1CC00..1CCFC {118016, 118451}, -- 1CD00..1CEB3 {118458, 118480}, -- 1CEBA..1CED0 {118496, 118512}, -- 1CEE0..1CEF0 {118608, 118723}, -- 1CF50..1CFC3 {118784, 119029}, -- 1D000..1D0F5 {119040, 119078}, -- 1D100..1D126 {119081, 119142}, -- 1D129..1D166 {119146, 119162}, -- 1D16A..1D17A {119171, 119172}, -- 1D183..1D184 {119180, 119209}, -- 1D18C..1D1A9 {119214, 119274}, -- 1D1AE..1D1EA {119488, 119507}, -- 1D2C0..1D2D3 {119520, 119539}, -- 1D2E0..1D2F3 {119552, 119638}, -- 1D300..1D356 {119648, 119672}, -- 1D360..1D378 {119808, 119892}, -- 1D400..1D454 {119894, 119964}, -- 1D456..1D49C {119966, 119967}, -- 1D49E..1D49F {119973, 119974}, -- 1D4A5..1D4A6 {119977, 119980}, -- 1D4A9..1D4AC {119982, 119993}, -- 1D4AE..1D4B9 {119997, 120003}, -- 1D4BD..1D4C3 {120005, 120069}, -- 1D4C5..1D505 {120071, 120074}, -- 1D507..1D50A {120077, 120084}, -- 1D50D..1D514 {120086, 120092}, -- 1D516..1D51C {120094, 120121}, -- 1D51E..1D539 {120123, 120126}, -- 1D53B..1D53E {120128, 120132}, -- 1D540..1D544 {120138, 120144}, -- 1D54A..1D550 {120146, 120485}, -- 1D552..1D6A5 {120488, 120779}, -- 1D6A8..1D7CB {120782, 120831}, -- 1D7CE..1D7FF {122624, 122654}, -- 1DF00..1DF1E {122661, 122666}, -- 1DF25..1DF2A {126065, 126132}, -- 1EC71..1ECB4 {126209, 126269}, -- 1ED01..1ED3D {126976, 127019}, -- 1F000..1F02B {127024, 127123}, -- 1F030..1F093 {127136, 127150}, -- 1F0A0..1F0AE {127153, 127167}, -- 1F0B1..1F0BF {127169, 127183}, -- 1F0C1..1F0CF {127185, 127221}, -- 1F0D1..1F0F5 {127232, 127405}, -- 1F100..1F1AD {127462, 127487}, -- 1F1E6..1F1FF {127489, 127490}, -- 1F201..1F202 {127504, 127547}, -- 1F210..1F23B {127552, 127560}, -- 1F240..1F248 {127568, 127569}, -- 1F250..1F251 {127584, 127589}, -- 1F260..1F265 {127744, 128728}, -- 1F300..1F6D8 {128732, 128748}, -- 1F6DC..1F6EC {128752, 128764}, -- 1F6F0..1F6FC {128768, 128985}, -- 1F700..1F7D9 {128992, 129003}, -- 1F7E0..1F7EB {129024, 129035}, -- 1F800..1F80B {129040, 129095}, -- 1F810..1F847 {129104, 129113}, -- 1F850..1F859 {129120, 129159}, -- 1F860..1F887 {129168, 129197}, -- 1F890..1F8AD {129200, 129211}, -- 1F8B0..1F8BB {129216, 129217}, -- 1F8C0..1F8C1 {129232, 129240}, -- 1F8D0..1F8D8 {129280, 129623}, -- 1F900..1FA57 {129632, 129645}, -- 1FA60..1FA6D {129648, 129660}, -- 1FA70..1FA7C {129664, 129674}, -- 1FA80..1FA8A {129678, 129734}, -- 1FA8E..1FAC6 {129741, 129756}, -- 1FACD..1FADC {129759, 129770}, -- 1FADF..1FAEA {129775, 129784}, -- 1FAEF..1FAF8 {129792, 129938}, -- 1FB00..1FB92 {129940, 130042}, -- 1FB94..1FBFA {917536, 917631}, -- E0020..E007F } --[[--------------------------< S P E C I A L S _ T >--------------------------------------------------------- list of individual language-specific non-Latn and non-Zyyy codepoints; these codepoints commonly used in transliterations. This list is manually currated so is most likely incomplete. keys to <specials_t> are decimal codepoints; other keys are language tags (always lowercase) of language transliterations that use these non-Latn codepoints. ]] local specials_t = { [788] = { -- U+0314: COMBINING REVERSED COMMA ABOVE ["hy"] = true, -- Armenian }, [794] = { -- U+031A: COMBINING LEFT ANGLE ABOVE ["ltc"] = true, -- Middle Chinese; is this really IPA? }, [795] = { -- U+031B: COMBINING HORN ["th"] = true, -- Thai }, [806] = { -- U+0326: COMBINING COMMA BELOW ["ab"] = true, -- Abkhaz ["kca"] = true, -- Khanty ["xal"] = true, -- Kalmyk or Oirat }, [807] = { -- U+0327: COMBINING CEDILLA ["fa"] = true, -- Persian }, [809] = { -- U+0329: COMBINING VERTICAL LINE BELOW ["ab"] = true, -- Abkhaz ["sa"] = true, -- Sanskrit }, [815] = { -- U+032F: COMBINING INVERTED BREVE BELOW ["mong"] = true, -- Mongolian ["xsc"] = true, -- Scythian }, [818] = { -- U+0332: COMBINING LOW LINE ["ar"] = true, -- Arabic ["hbo"] = true, -- Ancient Hebrew ["he"] = true, -- Hebrew ["jpa"] = true, -- Jewish Palestinian Aramaic ["mdh"] = true, -- Maguindanaon ["otk"] = true, -- Old Turkish }, [831] = { -- U+033F: COMBINING DOUBLE OVERLINE ["mnp"] = true, -- Northern Min Chinese, Jian'ou dialect }, [855] = { -- U+0357: COMBINING RIGHT HALF RING ABOVE ["egy"] = true, -- Ancient Egyptian }, [863] = { -- U+035F: COMBINING DOUBLE MACRON BELOW ["am"] = true, -- Amharic ["ar"] = true, -- Arabic ["dv"] = true, -- Dhivehi, Divehi, or Maldivian ["fa"] = true, -- Persian ["hi"] = true, -- Hindi ["inc"] = true, -- Indic languages ["ur"] = true, -- Urdu }, [864] = { -- U+0360: COMBINING DOUBLE TILDE ["hi"] = true, -- Hindi }, [865] = { -- U+0361: COMBINING DOUBLE INVERTED BREVE ["be"] = true, -- Belarusian ["ltc"] = true, -- Middle Chinese; is this really IPA? ["ru"] = true, -- Russian ["rue"] = true, -- Rusyn ["sem"] = true, -- Semitic languages ["sit"] = true, -- Sino-Tibetan languages ["tt"] = true, -- Tatar }, [916] = { -- U+0394: GREEK CAPITAL LETTER DELTA ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [920] = { -- U+0398: GREEK CAPITAL LETTER THETA ["ae"] = true, -- Avestan }, [934] = { -- U+03A6: GREEK CAPITAL LETTER PHI ["xle"] = true, -- Lemnian }, [945] = { -- U+03B1: GREEK SMALL LETTER ALPHA ["apc"] = true, -- Levantine Arabic }, [946] = { -- U+03B2: GREEK SMALL LETTER BETA ["ae"] = true, -- Avestan ["gha"] = true, -- Ghadamès ["ougr"] = true, -- Old Uyghur ["sem"] = true, -- Semitic languages ["syc"] = true, -- Classical Syriac ["wuu"] = true, -- Shanghainese variety of Wu Chinese }, [947] = { -- U+03B3: GREEK SMALL LETTER GAMMA ["ae"] = true, -- Avestan ["ltc"] = true, -- Late Middle Chinese ["mn"] = true, -- Mongolian ["och"] = true, -- Old Chinese ["ougr"] = true, -- Old Uyghur ["pal"] = true, -- Middle Persian ["syc"] = true, -- Classical Syriac ["syr"] = true, -- Syriac ["xal"] = true, -- Kalmyk or Oirat ["xng"] = true, -- Middle Mongolian ["xsc"] = true, -- Scythian ["ydg"] = true, -- Yidgha ["mong"] = true, -- Mongolian }, [948] = { -- U+03B4: GREEK SMALL LETTER DELTA ["ae"] = true, -- Avestan ["ougr"] = true, -- Old Uyghur ["sog"] = true, -- Sogdian ["sogd"] = true, -- Sogdian ["syc"] = true, -- Classical Syriac ["xpr"] = true, -- Parthian ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [952] = { -- U+03B8: GREEK SMALL LETTER THETA ["ae"] = true, -- Avestan ["ba"] = true, -- Bashkir ["cms"] = true, -- Messapic ["ett"] = true, -- Etruscan ["hur"] = true, -- Halkomelem ["ira"] = true, -- Iranian languages ["my"] = true, -- Burmese ["pal"] = true, -- Middle Persian (Pahlavi) ["peo"] = true, -- Old Persian ["sa"] = true, -- Sanskrit ["sem"] = true, -- Semitic languages ["syc"] = true, -- Classical Syriac ["syr"] = true, -- Syriac ["xme"] = true, -- Median ["xpg"] = true, -- Phrygian ["xpr"] = true, -- Parthian ["xsc"] = true, -- Scythian }, [955] = { -- U+03BB: GREEK SMALL LETTER LAMDA ["xcr"] = true, -- Carian ["xld"] = true, -- Lydian }, [963] = { -- U+03C3: GREEK SMALL LETTER SIGMA ["ett"] = true, -- Etruscan }, [964] = { -- U+03C4: GREEK SMALL LETTER TAU ["xld"] = true, -- Lydian }, [966] = { -- U+03C6: GREEK SMALL LETTER PHI ["ett"] = true, -- Etruscan }, [967] = { -- U+03C7: GREEK SMALL LETTER CHI ["ett"] = true, -- Etruscan ["gem"] = true, -- Germanic languages ["hur"] = true, -- Halkomelem ["kbd"] = true, -- Kabardian ["ltc"] = true, -- Late Middle Chinese ["och"] = true, -- Old Chinese ["xlc"] = true, -- Lycian ["xle"] = true, -- Lemnian }, [968] = { -- U+03C8: GREEK SMALL LETTER PSI ["ett"] = true, -- Etruscan }, [977] = { -- U+03D1: GREEK THETA SYMBOL (cursive form) ["ae"] = true, -- Avestan ["ira"] = true, -- Iranian languages ["peo"] = true, -- Old Persian ["xme"] = true, -- Median ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [1098] = { -- U+044A: CYRILLIC SMALL LETTER HARD SIGN ["ady"] = true, -- Adyghe ["cu"] = true, -- Church Slavic ["zls"] = true, -- South Slavic languages }, [1100] = { -- U+044C: CYRILLIC SMALL LETTER SOFT SIGN ["az"] = true, -- Azerbaijani ["cu"] = true, -- Church Slavonic ["dng"] = true, -- Dungan ["ru"] = true, -- Russian ["tt"] = true, -- Tatar ["tyv"] = true, -- Tuvinian }, [1278] = { -- U+04FE: CYRILLIC CAPITAL LETTER HA WITH STROKE ["av"] = true, -- Avar }, [1279] = { -- U+04FF: CYRILLIC SMALL LETTER HA WITH STROKE ["av"] = true, -- Avar }, [8113] = { -- U+1FB1: GREEK SMALL LETTER ALPHA WITH MACRON ["apc"] = true, -- Levantine Arabic }, [8190] = { -- U+1FFE: GREEK DASIA ["ar"] = true, -- Arabic (Ayin) ["xcl"] = true, -- Classical Armenian }, [19978] = { -- U+4E0A: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [20837] = { -- U+5165: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [21435] = { -- U+53BB: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [24179] = { -- U+5E73: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [38451] = { -- U+9633: [CJK Unified Ideographs] (Yang) ["wuu"] = true, -- Suzhou dialect of Wu Chinese tone marker --[[Suzhou dialect#Tones]] }, [38452] = { -- U+9634: [CJK Unified Ideographs] (Yin) ["wuu"] = true, -- Suzhou dialect of Wu Chinese tone marker --[[Suzhou dialect#Tones]] }, [65056] = { -- U+FE20: COMBINING LIGATURE LEFT HALF ["ru"] = true, -- Russian }, [65057] = { -- U+FE21: COMBINING LIGATURE RIGHT HALF ["ru"] = true, -- Russian }, } --[[--------------------------< E X P O R T S >--------------------------------------------------------------- ]] return { ranges_t = ranges_t, singles_t = singles_t, specials_t = specials_t, sizeof_ranges_t = #ranges_t, } dc83p4l9k8mwwdqbirq3l5ieeolwkb8 117229 117228 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lang/data/is_latn_data]] 117228 Scribunto text/plain --[[--------------------------< S I N G L E S _ T >----------------------------------------------------------- list of Latn and Zyyy (common) codepoints that are not included in <ranges_t> taken from Module:Unicode data/scripts and a local copy of https://www.unicode.org/Public/17.0.0/ucd/ScriptExtensions.txt using Module:Lang/data/make is latn data ]] local singles_t = { [170] = true, -- 00AA [186] = true, -- 00BA [215] = true, -- 00D7 [247] = true, -- 00F7 [787] = true, -- 0313 [856] = true, -- 0358 [862] = true, -- 035E [884] = true, -- 0374 [894] = true, -- 037E [901] = true, -- 0385 [903] = true, -- 0387 [1541] = true, -- 0605 [1548] = true, -- 060C [1563] = true, -- 061B [1567] = true, -- 061F [1600] = true, -- 0640 [1757] = true, -- 06DD [2274] = true, -- 08E2 [3647] = true, -- 0E3F [4347] = true, -- 10FB [6149] = true, -- 1805 [7379] = true, -- 1CD3 [7393] = true, -- 1CE1 [7418] = true, -- 1CFA [7672] = true, -- 1DF8 [8305] = true, -- 2071 [8319] = true, -- 207F [8432] = true, -- 20F0 [8498] = true, -- 2132 [8526] = true, -- 214E [12294] = true, -- 3006 [12448] = true, -- 30A0 [12783] = true, -- 31EF [13055] = true, -- 32FF [43310] = true, -- A92E [43471] = true, -- A9CF [43867] = true, -- AB5B [65279] = true, -- FEFF [65392] = true, -- FF70 [119970] = true, -- 1D4A2 [119995] = true, -- 1D4BB [120134] = true, -- 1D546 [129008] = true, -- 1F7F0 [129736] = true, -- 1FAC8 [917505] = true, -- E0001 } --[[--------------------------< R A N G E S _ T >------------------------------------------------------------- list of Latn and Zyyy (common) codepoints taken from Module:Unicode data/scripts and a local copy of https://www.unicode.org/Public/16.0.0/ucd/ScriptExtensions.txt ]] local ranges_t = { {0, 169}, -- 0000..00A9 {171, 185}, -- 00AB..00B9 {187, 214}, -- 00BB..00D6 {216, 246}, -- 00D8..00F6 {248, 745}, -- 00F8..02E9 {748, 782}, -- 02EC..030E {784, 785}, -- 0310..0311 {803, 805}, -- 0323..0325 {813, 814}, -- 032D..032E {816, 817}, -- 0330..0331 {867, 879}, -- 0363..036F {1157, 1158}, -- 0485..0486 {2385, 2386}, -- 0951..0952 {2404, 2405}, -- 0964..0965 {4053, 4056}, -- 0FD5..0FD8 {5867, 5869}, -- 16EB..16ED {5941, 5942}, -- 1735..1736 {6146, 6147}, -- 1802..1803 {7401, 7404}, -- 1CE9..1CEC {7406, 7411}, -- 1CEE..1CF3 {7413, 7415}, -- 1CF5..1CF7 {7424, 7461}, -- 1D00..1D25 {7468, 7516}, -- 1D2C..1D5C {7522, 7525}, -- 1D62..1D65 {7531, 7543}, -- 1D6B..1D77 {7545, 7614}, -- 1D79..1DBE {7680, 7935}, -- 1E00..1EFF {8192, 8203}, -- 2000..200B {8206, 8292}, -- 200E..2064 {8294, 8304}, -- 2066..2070 {8308, 8318}, -- 2074..207E {8320, 8334}, -- 2080..208E {8336, 8348}, -- 2090..209C {8352, 8385}, -- 20A0..20C1 {8448, 8485}, -- 2100..2125 {8487, 8497}, -- 2127..2131 {8499, 8525}, -- 2133..214D {8527, 8587}, -- 214F..218B {8592, 9257}, -- 2190..2429 {9280, 9290}, -- 2440..244A {9312, 10239}, -- 2460..27FF {10496, 11123}, -- 2900..2B73 {11126, 11263}, -- 2B76..2BFF {11360, 11391}, -- 2C60..2C7F {11776, 11869}, -- 2E00..2E5D {12272, 12292}, -- 2FF0..3004 {12296, 12320}, -- 3008..3020 {12336, 12343}, -- 3030..3037 {12348, 12351}, -- 303C..303F {12443, 12444}, -- 309B..309C {12539, 12540}, -- 30FB..30FC {12688, 12703}, -- 3190..319F {12736, 12773}, -- 31C0..31E5 {12832, 12895}, -- 3220..325F {12927, 13007}, -- 327F..32CF {13144, 13311}, -- 3358..33FF {19904, 19967}, -- 4DC0..4DFF {42752, 42972}, -- A700..A7DC {42993, 43007}, -- A7F1..A7FF {43056, 43065}, -- A830..A839 {43824, 43866}, -- AB30..AB5A {43868, 43876}, -- AB5C..AB64 {43878, 43883}, -- AB66..AB6B {64256, 64262}, -- FB00..FB06 {64830, 64831}, -- FD3E..FD3F {65040, 65049}, -- FE10..FE19 {65072, 65106}, -- FE30..FE52 {65108, 65126}, -- FE54..FE66 {65128, 65131}, -- FE68..FE6B {65281, 65381}, -- FF01..FF65 {65438, 65439}, -- FF9E..FF9F {65504, 65510}, -- FFE0..FFE6 {65512, 65518}, -- FFE8..FFEE {65529, 65533}, -- FFF9..FFFD {65792, 65794}, -- 10100..10102 {65799, 65843}, -- 10107..10133 {65847, 65855}, -- 10137..1013F {65936, 65948}, -- 10190..1019C {66000, 66044}, -- 101D0..101FC {66273, 66299}, -- 102E1..102FB {67456, 67461}, -- 10780..10785 {67463, 67504}, -- 10787..107B0 {67506, 67514}, -- 107B2..107BA {113824, 113827}, -- 1BCA0..1BCA3 {117760, 118012}, -- 1CC00..1CCFC {118016, 118451}, -- 1CD00..1CEB3 {118458, 118480}, -- 1CEBA..1CED0 {118496, 118512}, -- 1CEE0..1CEF0 {118608, 118723}, -- 1CF50..1CFC3 {118784, 119029}, -- 1D000..1D0F5 {119040, 119078}, -- 1D100..1D126 {119081, 119142}, -- 1D129..1D166 {119146, 119162}, -- 1D16A..1D17A {119171, 119172}, -- 1D183..1D184 {119180, 119209}, -- 1D18C..1D1A9 {119214, 119274}, -- 1D1AE..1D1EA {119488, 119507}, -- 1D2C0..1D2D3 {119520, 119539}, -- 1D2E0..1D2F3 {119552, 119638}, -- 1D300..1D356 {119648, 119672}, -- 1D360..1D378 {119808, 119892}, -- 1D400..1D454 {119894, 119964}, -- 1D456..1D49C {119966, 119967}, -- 1D49E..1D49F {119973, 119974}, -- 1D4A5..1D4A6 {119977, 119980}, -- 1D4A9..1D4AC {119982, 119993}, -- 1D4AE..1D4B9 {119997, 120003}, -- 1D4BD..1D4C3 {120005, 120069}, -- 1D4C5..1D505 {120071, 120074}, -- 1D507..1D50A {120077, 120084}, -- 1D50D..1D514 {120086, 120092}, -- 1D516..1D51C {120094, 120121}, -- 1D51E..1D539 {120123, 120126}, -- 1D53B..1D53E {120128, 120132}, -- 1D540..1D544 {120138, 120144}, -- 1D54A..1D550 {120146, 120485}, -- 1D552..1D6A5 {120488, 120779}, -- 1D6A8..1D7CB {120782, 120831}, -- 1D7CE..1D7FF {122624, 122654}, -- 1DF00..1DF1E {122661, 122666}, -- 1DF25..1DF2A {126065, 126132}, -- 1EC71..1ECB4 {126209, 126269}, -- 1ED01..1ED3D {126976, 127019}, -- 1F000..1F02B {127024, 127123}, -- 1F030..1F093 {127136, 127150}, -- 1F0A0..1F0AE {127153, 127167}, -- 1F0B1..1F0BF {127169, 127183}, -- 1F0C1..1F0CF {127185, 127221}, -- 1F0D1..1F0F5 {127232, 127405}, -- 1F100..1F1AD {127462, 127487}, -- 1F1E6..1F1FF {127489, 127490}, -- 1F201..1F202 {127504, 127547}, -- 1F210..1F23B {127552, 127560}, -- 1F240..1F248 {127568, 127569}, -- 1F250..1F251 {127584, 127589}, -- 1F260..1F265 {127744, 128728}, -- 1F300..1F6D8 {128732, 128748}, -- 1F6DC..1F6EC {128752, 128764}, -- 1F6F0..1F6FC {128768, 128985}, -- 1F700..1F7D9 {128992, 129003}, -- 1F7E0..1F7EB {129024, 129035}, -- 1F800..1F80B {129040, 129095}, -- 1F810..1F847 {129104, 129113}, -- 1F850..1F859 {129120, 129159}, -- 1F860..1F887 {129168, 129197}, -- 1F890..1F8AD {129200, 129211}, -- 1F8B0..1F8BB {129216, 129217}, -- 1F8C0..1F8C1 {129232, 129240}, -- 1F8D0..1F8D8 {129280, 129623}, -- 1F900..1FA57 {129632, 129645}, -- 1FA60..1FA6D {129648, 129660}, -- 1FA70..1FA7C {129664, 129674}, -- 1FA80..1FA8A {129678, 129734}, -- 1FA8E..1FAC6 {129741, 129756}, -- 1FACD..1FADC {129759, 129770}, -- 1FADF..1FAEA {129775, 129784}, -- 1FAEF..1FAF8 {129792, 129938}, -- 1FB00..1FB92 {129940, 130042}, -- 1FB94..1FBFA {917536, 917631}, -- E0020..E007F } --[[--------------------------< S P E C I A L S _ T >--------------------------------------------------------- list of individual language-specific non-Latn and non-Zyyy codepoints; these codepoints commonly used in transliterations. This list is manually currated so is most likely incomplete. keys to <specials_t> are decimal codepoints; other keys are language tags (always lowercase) of language transliterations that use these non-Latn codepoints. ]] local specials_t = { [788] = { -- U+0314: COMBINING REVERSED COMMA ABOVE ["hy"] = true, -- Armenian }, [794] = { -- U+031A: COMBINING LEFT ANGLE ABOVE ["ltc"] = true, -- Middle Chinese; is this really IPA? }, [795] = { -- U+031B: COMBINING HORN ["th"] = true, -- Thai }, [806] = { -- U+0326: COMBINING COMMA BELOW ["ab"] = true, -- Abkhaz ["kca"] = true, -- Khanty ["xal"] = true, -- Kalmyk or Oirat }, [807] = { -- U+0327: COMBINING CEDILLA ["fa"] = true, -- Persian }, [809] = { -- U+0329: COMBINING VERTICAL LINE BELOW ["ab"] = true, -- Abkhaz ["sa"] = true, -- Sanskrit }, [815] = { -- U+032F: COMBINING INVERTED BREVE BELOW ["mong"] = true, -- Mongolian ["xsc"] = true, -- Scythian }, [818] = { -- U+0332: COMBINING LOW LINE ["ar"] = true, -- Arabic ["hbo"] = true, -- Ancient Hebrew ["he"] = true, -- Hebrew ["jpa"] = true, -- Jewish Palestinian Aramaic ["mdh"] = true, -- Maguindanaon ["otk"] = true, -- Old Turkish }, [831] = { -- U+033F: COMBINING DOUBLE OVERLINE ["mnp"] = true, -- Northern Min Chinese, Jian'ou dialect }, [855] = { -- U+0357: COMBINING RIGHT HALF RING ABOVE ["egy"] = true, -- Ancient Egyptian }, [863] = { -- U+035F: COMBINING DOUBLE MACRON BELOW ["am"] = true, -- Amharic ["ar"] = true, -- Arabic ["dv"] = true, -- Dhivehi, Divehi, or Maldivian ["fa"] = true, -- Persian ["hi"] = true, -- Hindi ["inc"] = true, -- Indic languages ["ur"] = true, -- Urdu }, [864] = { -- U+0360: COMBINING DOUBLE TILDE ["hi"] = true, -- Hindi }, [865] = { -- U+0361: COMBINING DOUBLE INVERTED BREVE ["be"] = true, -- Belarusian ["ltc"] = true, -- Middle Chinese; is this really IPA? ["ru"] = true, -- Russian ["rue"] = true, -- Rusyn ["sem"] = true, -- Semitic languages ["sit"] = true, -- Sino-Tibetan languages ["tt"] = true, -- Tatar }, [916] = { -- U+0394: GREEK CAPITAL LETTER DELTA ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [920] = { -- U+0398: GREEK CAPITAL LETTER THETA ["ae"] = true, -- Avestan }, [934] = { -- U+03A6: GREEK CAPITAL LETTER PHI ["xle"] = true, -- Lemnian }, [945] = { -- U+03B1: GREEK SMALL LETTER ALPHA ["apc"] = true, -- Levantine Arabic }, [946] = { -- U+03B2: GREEK SMALL LETTER BETA ["ae"] = true, -- Avestan ["gha"] = true, -- Ghadamès ["ougr"] = true, -- Old Uyghur ["sem"] = true, -- Semitic languages ["syc"] = true, -- Classical Syriac ["wuu"] = true, -- Shanghainese variety of Wu Chinese }, [947] = { -- U+03B3: GREEK SMALL LETTER GAMMA ["ae"] = true, -- Avestan ["ltc"] = true, -- Late Middle Chinese ["mn"] = true, -- Mongolian ["och"] = true, -- Old Chinese ["ougr"] = true, -- Old Uyghur ["pal"] = true, -- Middle Persian ["syc"] = true, -- Classical Syriac ["syr"] = true, -- Syriac ["xal"] = true, -- Kalmyk or Oirat ["xng"] = true, -- Middle Mongolian ["xsc"] = true, -- Scythian ["ydg"] = true, -- Yidgha ["mong"] = true, -- Mongolian }, [948] = { -- U+03B4: GREEK SMALL LETTER DELTA ["ae"] = true, -- Avestan ["ougr"] = true, -- Old Uyghur ["sog"] = true, -- Sogdian ["sogd"] = true, -- Sogdian ["syc"] = true, -- Classical Syriac ["xpr"] = true, -- Parthian ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [952] = { -- U+03B8: GREEK SMALL LETTER THETA ["ae"] = true, -- Avestan ["ba"] = true, -- Bashkir ["cms"] = true, -- Messapic ["ett"] = true, -- Etruscan ["hur"] = true, -- Halkomelem ["ira"] = true, -- Iranian languages ["my"] = true, -- Burmese ["pal"] = true, -- Middle Persian (Pahlavi) ["peo"] = true, -- Old Persian ["sa"] = true, -- Sanskrit ["sem"] = true, -- Semitic languages ["syc"] = true, -- Classical Syriac ["syr"] = true, -- Syriac ["xme"] = true, -- Median ["xpg"] = true, -- Phrygian ["xpr"] = true, -- Parthian ["xsc"] = true, -- Scythian }, [955] = { -- U+03BB: GREEK SMALL LETTER LAMDA ["xcr"] = true, -- Carian ["xld"] = true, -- Lydian }, [963] = { -- U+03C3: GREEK SMALL LETTER SIGMA ["ett"] = true, -- Etruscan }, [964] = { -- U+03C4: GREEK SMALL LETTER TAU ["xld"] = true, -- Lydian }, [966] = { -- U+03C6: GREEK SMALL LETTER PHI ["ett"] = true, -- Etruscan }, [967] = { -- U+03C7: GREEK SMALL LETTER CHI ["ett"] = true, -- Etruscan ["gem"] = true, -- Germanic languages ["hur"] = true, -- Halkomelem ["kbd"] = true, -- Kabardian ["ltc"] = true, -- Late Middle Chinese ["och"] = true, -- Old Chinese ["xlc"] = true, -- Lycian ["xle"] = true, -- Lemnian }, [968] = { -- U+03C8: GREEK SMALL LETTER PSI ["ett"] = true, -- Etruscan }, [977] = { -- U+03D1: GREEK THETA SYMBOL (cursive form) ["ae"] = true, -- Avestan ["ira"] = true, -- Iranian languages ["peo"] = true, -- Old Persian ["xme"] = true, -- Median ["xsc"] = true, -- Scythian ["xsc-x-pontic"] = true, -- Pontic Scythian }, [1098] = { -- U+044A: CYRILLIC SMALL LETTER HARD SIGN ["ady"] = true, -- Adyghe ["cu"] = true, -- Church Slavic ["zls"] = true, -- South Slavic languages }, [1100] = { -- U+044C: CYRILLIC SMALL LETTER SOFT SIGN ["az"] = true, -- Azerbaijani ["cu"] = true, -- Church Slavonic ["dng"] = true, -- Dungan ["ru"] = true, -- Russian ["tt"] = true, -- Tatar ["tyv"] = true, -- Tuvinian }, [1278] = { -- U+04FE: CYRILLIC CAPITAL LETTER HA WITH STROKE ["av"] = true, -- Avar }, [1279] = { -- U+04FF: CYRILLIC SMALL LETTER HA WITH STROKE ["av"] = true, -- Avar }, [8113] = { -- U+1FB1: GREEK SMALL LETTER ALPHA WITH MACRON ["apc"] = true, -- Levantine Arabic }, [8190] = { -- U+1FFE: GREEK DASIA ["ar"] = true, -- Arabic (Ayin) ["xcl"] = true, -- Classical Armenian }, [19978] = { -- U+4E0A: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [20837] = { -- U+5165: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [21435] = { -- U+53BB: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [24179] = { -- U+5E73: [CJK Unified Ideographs] ["wuu"] = true, -- Wu Chinese tone marker }, [38451] = { -- U+9633: [CJK Unified Ideographs] (Yang) ["wuu"] = true, -- Suzhou dialect of Wu Chinese tone marker --[[Suzhou dialect#Tones]] }, [38452] = { -- U+9634: [CJK Unified Ideographs] (Yin) ["wuu"] = true, -- Suzhou dialect of Wu Chinese tone marker --[[Suzhou dialect#Tones]] }, [65056] = { -- U+FE20: COMBINING LIGATURE LEFT HALF ["ru"] = true, -- Russian }, [65057] = { -- U+FE21: COMBINING LIGATURE RIGHT HALF ["ru"] = true, -- Russian }, } --[[--------------------------< E X P O R T S >--------------------------------------------------------------- ]] return { ranges_t = ranges_t, singles_t = singles_t, specials_t = specials_t, sizeof_ranges_t = #ranges_t, } dc83p4l9k8mwwdqbirq3l5ieeolwkb8 ChiSamogitia 0 47539 116782 116249 2026-07-15T19:03:23Z Amherst99 8770 /* */ 116782 wikitext text/x-wiki {{Infobox language|name=ChiSamogitia|nativename=''žemaitėška''|states=[[Lithuania]]|region=[[Samogitia]]|speakers=< 500,000|date=2009 census|ref=<ref>http://www-01.sil.org/iso639-3/cr_files/2009-050_sgs.pdf</ref>|familycolor=Indo-European|fam2=[[Balto-Slavic languages|Balto-Slavic]]|fam3=[[Baltic languages|Baltic]]|fam4=[[East Baltic languages|East Baltic]]|fam5=[[Lithuanian languages|Lithuanian]]|script=[[Latin script|Latin]] ([[#Alphabet|Samogitian alphabet]])|iso3=sgs|glotto=samo1265}} '''{{PAGENAME}}''' ntchiyowoyero icho chikuyowoyeka ku [[Samogitia]], chigaŵa chinyake cha ku [[Lithuania]]. ==Vilembo vifupi== {{reflist}} {{InterWiki|code=bat-smg}} [[Category:Languages of Lithuania]] [[Category:Samogitia]] laleolsosl1lp7mpba7f57e98y3msll Template:Donald Trump series 10 47761 116694 2026-07-07T21:45:26Z en>Augmented Seventh 0 Restored revision 1363072809 by [[Special:Contributions/Augmented Seventh|Augmented Seventh]] ([[User talk:Augmented Seventh|talk]]): These changes, seemingly pointed, are going to need a third opinion 116694 wikitext text/x-wiki {{#invoke:sidebar|sidebar | name = Donald Trump series | templatestyles = Sidebar person/styles.css | class = sidebar-person vcard hlist | style = border-color: #d69d36 | wraplinks = true | title = <table><tr> <td class="sidebar-person-title-image" style="background-color: #002466;color:inherit;">[[File:{{PAGENAME:Official Presidential Portrait of President Donald J. Trump (2025) (3x4 close cropped).jpg}}|75px|border]]</td> <td class="sidebar-person-title" style="background-color: #002466;color: #FFF;"><div>{{color| #FFF|This article is part of <br/>a series about}}</div><span class="vcard"><span class="fn">{{colored link| #FFF|Donald Trump|Donald Trump}}</span></span></td> </tr></table> | content1 = ---- {{hidden begin|contentstyle=text-align:center;|title=Life and business|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Life and business|y|}}}} *[[Early life and education of Donald Trump|Early life and education]] *[[Business career of Donald Trump|Business career]] **[[The Trump Organization]] **[[Wealth of Donald Trump|wealth]] **[[Tax returns of Donald Trump|tax returns]] *[[Media career of Donald Trump|Media career]] **[[The Apprentice (American TV series)|''The Apprentice'']] **[[Bibliography of Donald Trump|bibliography]] **[[Donald Trump filmography|filmography]] *[[Trump family|Family]] *[[Age and health concerns about Donald Trump|Age and health]] *[[Donald J. Trump Foundation|Foundation]] *[[Public image of Donald Trump|Public image]] **[[Donald Trump in popular culture|In popular culture]] **[[Trump Always Chickens Out|"Trump always chickens out"]] **[[List of things named after Donald Trump|Eponyms]] **[[Pseudonyms used by Donald Trump|Pseudonyms]] **[[Saturday Night Live parodies of Donald Trump|''SNL'' parodies]] *[[Residences of Donald Trump|Residences]] *[[Donald Trump and American football|American football]] *[[Donald Trump and golf|Golf]] *[[List of awards and honors received by Donald Trump|Honors]] *[[Personal and business legal affairs of Donald Trump|Legal affairs]] **[[Indictments against Donald Trump|Indictments]] *[[Donald Trump sexual misconduct allegations|Sexual misconduct allegations]] **[[Relationship of Donald Trump and Jeffrey Epstein|Epstein ties]] *[[Makeup of Donald Trump|Makeup]] *[[Donald Trump and handshakes|Handshakes]] *[[Security incidents involving Donald Trump|Assassination attempts]] **[[2016 Donald Trump Las Vegas rally incident|NV]] **[[Attempted assassination of Donald Trump in Pennsylvania|PA]] ***[[Thomas Crooks|perpetrator]] ***[[Donald Trump raised-fist photographs|photographs]] **[[Attempted assassination of Donald Trump in Florida|FL]] ***[[Ryan Routh|perpetrator]] **[[2026 White House Correspondents' Dinner shooting|DC]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Trumpism|Views and ideology]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Views and ideology|y|}}}} *[[Trumpism]] *[[Political positions of Donald Trump|Political positions]] *[[List of endorsements by Donald Trump|Endorsements]] *[[Make America Great Again|"Make America Great Again"]] **[[MAGA movement|Movement]] *[[Rhetoric of Donald Trump|Rhetoric]] **[[List of nicknames used by Donald Trump|Nicknames]] *[[Donald Trump and religion|Religion]] *[[Racial views of Donald Trump|Racial views]] *[[Donald Trump and antisemitism|Antisemitism]] *[[Donald Trump and fascism|Fascism]] *[[List of conspiracy theories promoted by Donald Trump|Conspiracy theories]] *[[False or misleading statements by Donald Trump|Misinformation]] *[[Trump derangement syndrome|"Trump derangement syndrome"]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=45th and 47th President of the United States|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|45th and 47th president of the United States|y|}}}} *Presidencies **[[First presidency of Donald Trump|first]] **[[Second presidency of Donald Trump|second]] **[[Timeline of the Donald Trump presidencies|timeline]] *Transitions **[[First presidential transition of Donald Trump|first]] **[[Second presidential transition of Donald Trump|second]] *Inaugurations **[[First inauguration of Donald Trump|first]] **[[Second inauguration of Donald Trump|second]] *[[Donald J. Trump Presidential Library|Presidential library]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Tenure|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Tenure|y|}}}} *First 100 days **[[First 100 days of the first Trump presidency|first]] **[[First 100 days of the second Trump presidency|second]] *[[List of executive actions by Donald Trump|Executive actions]] **[[Trump executive orders (disambiguation)|executive orders]] **[[Lists of proclamations by Donald Trump|proclamations]] **[[List of people granted executive clemency by Donald Trump (disambiguation)|pardons]] *[[Lists of presidential trips made by Donald Trump|Trips]] **[[List of international presidential trips made by Donald Trump|international]] *Opinion polling **[[Opinion polling on the first Trump presidency|first]] **[[Opinion polling on the second Trump presidency|second]] *[[Legal affairs of Donald Trump|Legal affairs]] *[[Protests against Donald Trump|Protests]] *[[Social media use by Donald Trump|Social media]] ([[Use of X by Donald Trump|X]]) {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political positions of Donald Trump|Policies]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Policies|y|}}}} *Domestic **[[Domestic policy of the first Trump administration|first]] **[[Domestic policy of the second Trump administration|second]] *Economic **[[Economic policy of the first Trump administration|first]] **[[Economic policy of the second Trump administration|second]] **tariffs ***[[Tariffs in the first Trump administration|first]] ***[[Tariffs in the second Trump administration|second]] ****[[Liberation Day tariffs]] **trade wars ***[[China–United States trade war|China]] ***[[2025–2026 United States trade war with Canada and Mexico|Canada and Mexico]] *Environment **[[Environmental policy of the first Trump administration|first]] **[[Environmental policy of the second Trump administration|second]] ***[[Donald Trump and wind energy|wind energy]] *Foreign **[[Foreign policy of the first Trump administration|first]] **[[Foreign policy of the second Trump administration|second]] **[[America First (policy)|America First]] **[[American expansionism under Donald Trump|American expansionism]] **[[Donroe Doctrine]] ***[[Operation Southern Spear]] ***[[Greenland crisis]] **Iran relations ***[[Iran–United States relations during the first Trump administration|first]] ***[[Iran–United States relations during the second Trump administration|second]] ****[[2026 Iran war]] *Government shutdowns **[[January 2018 United States federal government shutdown|2018]] **[[2018–2019 United States federal government shutdown|2018–2019]] **[[2025 United States federal government shutdown|2025]] **[[2026 United States federal government shutdowns|2026]] *Immigration **[[Immigration policy of the first Trump administration|first]] **[[Immigration policy of the second Trump administration|second]] *[[Infrastructure policy of Donald Trump|Infrastructure]] *Social **[[Social policy of the first Trump administration|first]] **[[Social policy of the second Trump administration|second]] **cannabis ***[[Cannabis policy of the first Trump administration|first]] ***[[Cannabis policy of the second Trump administration|second]] *Space **[[Space policy of the first Trump administration|first]] **[[Space policy of the second Trump administration|second]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political appointments of the Trump administration (disambiguation)|Appointments]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Appointments|y|}}}} *[[First cabinet of Donald Trump|First Cabinet]] *[[Second cabinet of Donald Trump|Second Cabinet]] *[[List of ambassadors appointed by Donald Trump (disambiguation)|Ambassadors]] *[[List of federal judges appointed by Donald Trump|Federal judges]] **[[Neil Gorsuch Supreme Court nomination|Gorsuch]] **[[Brett Kavanaugh Supreme Court nomination|Kavanaugh]] **[[Amy Coney Barrett Supreme Court nomination|Barrett]] **[[Donald Trump Supreme Court candidates|Supreme Court candidates]] *[[Executive Office appointments by Donald Trump (disambiguation)|Executives]] *[[List of United States attorneys appointed by Donald Trump|U.S. Attorneys]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political career of Donald Trump|Presidential campaigns]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Campaigns|y|}}}} *[[Donald Trump 2000 presidential campaign|2000]] **[[2000 Reform Party presidential primaries|primaries]] *[[Donald Trump 2016 presidential campaign|2016]] **[[2016 United States presidential election|election]] **[[2016 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2016 presidential campaign endorsements|endorsements]] **[[List of rallies for the 2016 Donald Trump presidential campaign|rallies]] **[[2016 Republican National Convention|convention]] **[[2016 United States presidential debates|debates]] **[[Never Trump movement]] ***[[List of Republicans who opposed the Donald Trump 2016 presidential campaign|people]] **[[Donald Trump Access Hollywood tape|''Access Hollywood'' tape]] **[[Trump Tower wiretapping allegations|wiretapping allegations]] **[[Spygate (conspiracy theory)|Spygate]] *[[Donald Trump 2020 presidential campaign|2020]] **[[2020 United States presidential election|election]] **[[2020 Republican Party presidential primaries|primaries]] **endorsements ***[[List of Donald Trump 2020 presidential campaign political endorsements|political]] ***[[List of Donald Trump 2020 presidential campaign non-political endorsements|non-political]] **[[List of Republicans who opposed the Donald Trump 2020 presidential campaign|opposition]] **[[List of Donald Trump rallies (December 2016–2022)#2020 presidential campaign|rallies]] **[[2020 Republican National Convention|convention]] **[[2020 United States presidential debates|debates]] **[[Republican reactions to Donald Trump's claims of 2020 election fraud|GOP reactions to election fraud claims]] **[[Trump–Raffensperger phone call]] *[[Donald Trump 2024 presidential campaign|2024]] **[[2024 United States presidential election|election]] **[[2024 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2024 presidential campaign endorsements|endorsements]] **[[List of Republicans who oppose the Donald Trump 2024 presidential campaign|opposition]] **[[Presidential eligibility of Donald Trump|eligibility]] **[[Agenda 47]] **[[List of rallies for the 2024 Donald Trump presidential campaign|rallies]] **[[2024 Republican National Convention|convention]] **[[2024 United States presidential debates|debates]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Impeachments|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Impeachments|y|}}}} *[[Efforts to impeach Donald Trump|Efforts]] **[[List of impeachment resolutions introduced against Donald Trump|resolutions]] *[[First impeachment of Donald Trump|First impeachment]] **[[Trump–Ukraine scandal]] **[[Impeachment inquiry into Donald Trump|House inquiry]] **[[First impeachment trial of Donald Trump|Senate trial]] *[[Second impeachment of Donald Trump|Second impeachment]] **[[January 6 United States Capitol attack|Capitol attack]] **[[Second impeachment trial of Donald Trump|Senate trial]] *[[Proposed expungements of the impeachments of Donald Trump|Proposed expungements]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Prosecutions|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Civil and Criminal Prosecutions|y|}}}} *[[Federal prosecution of Donald Trump (election obstruction case)|2020 election federal indictment]] *[[Federal prosecution of Donald Trump (classified documents case)|Classified documents federal indictment]] **[[Smith special counsel investigation|special counsel investigation]] **[[FBI investigation into Donald Trump's handling of government documents|Plasmic Echo]] **[[FBI search of Mar-a-Lago]] **''[[Trump v. United States (2022)|Trump v. United States]]'' *[[Prosecution of Donald Trump in New York|New York indictment]] **[[Stormy Daniels–Donald Trump scandal|Stormy Daniels scandal]] **[[Karen McDougal#Affair with Donald Trump|Karen McDougal affair]] **[[New York investigations of the Trump Organization|financial fraud]] *[[Georgia election racketeering prosecution|Georgia election indictment]] **[[2020 Georgia election investigation|Georgia election investigation]] **[[Mug shot of Donald Trump|mug shot]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Communication of the Trump administration during the COVID-19 pandemic|COVID-19 pandemic]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|COVID-19|y|}}}} *[[White House Coronavirus Task Force|Taskforce]] *[[U.S. federal government response to the COVID-19 pandemic|Government response]] **[[Stimulus (economics)|stimulus bills]] ***[[CARES Act]] ***[[Consolidated Appropriations Act, 2021]] **[[Operation Warp Speed]] *[[White House COVID-19 outbreak|White House outbreak]] *[[Trump administration political interference with science agencies|Interference with science agencies]] {{hidden end}} ---- {{#ifeq:{{PAGENAME}}|Donald Trump|<!-- Exclude signature from President's main biography page, where it is already displayed in the infobox. -->| <div class="skin-invert-image">[[File:{{PAGENAME:Trumpsignature2025.svg}}|150px|class=notpageimage|link=Donald Trump|Donald Trump's signature]]</div>}} [[File:Seal of the President of the United States.svg|link=|alt=Seal of the President of the United States|70px]] }}<noinclude> {{Documentation|Template:Donald Trump/doc}} [[Category:President of the United States sidebar templates]] [[Category:Donald Trump-related templates]] </noinclude> qx9mjwdb9f4eqamsmrzxchx20rku2is 116695 116694 2026-07-15T17:38:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Donald_Trump_series]] 116694 wikitext text/x-wiki {{#invoke:sidebar|sidebar | name = Donald Trump series | templatestyles = Sidebar person/styles.css | class = sidebar-person vcard hlist | style = border-color: #d69d36 | wraplinks = true | title = <table><tr> <td class="sidebar-person-title-image" style="background-color: #002466;color:inherit;">[[File:{{PAGENAME:Official Presidential Portrait of President Donald J. Trump (2025) (3x4 close cropped).jpg}}|75px|border]]</td> <td class="sidebar-person-title" style="background-color: #002466;color: #FFF;"><div>{{color| #FFF|This article is part of <br/>a series about}}</div><span class="vcard"><span class="fn">{{colored link| #FFF|Donald Trump|Donald Trump}}</span></span></td> </tr></table> | content1 = ---- {{hidden begin|contentstyle=text-align:center;|title=Life and business|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Life and business|y|}}}} *[[Early life and education of Donald Trump|Early life and education]] *[[Business career of Donald Trump|Business career]] **[[The Trump Organization]] **[[Wealth of Donald Trump|wealth]] **[[Tax returns of Donald Trump|tax returns]] *[[Media career of Donald Trump|Media career]] **[[The Apprentice (American TV series)|''The Apprentice'']] **[[Bibliography of Donald Trump|bibliography]] **[[Donald Trump filmography|filmography]] *[[Trump family|Family]] *[[Age and health concerns about Donald Trump|Age and health]] *[[Donald J. Trump Foundation|Foundation]] *[[Public image of Donald Trump|Public image]] **[[Donald Trump in popular culture|In popular culture]] **[[Trump Always Chickens Out|"Trump always chickens out"]] **[[List of things named after Donald Trump|Eponyms]] **[[Pseudonyms used by Donald Trump|Pseudonyms]] **[[Saturday Night Live parodies of Donald Trump|''SNL'' parodies]] *[[Residences of Donald Trump|Residences]] *[[Donald Trump and American football|American football]] *[[Donald Trump and golf|Golf]] *[[List of awards and honors received by Donald Trump|Honors]] *[[Personal and business legal affairs of Donald Trump|Legal affairs]] **[[Indictments against Donald Trump|Indictments]] *[[Donald Trump sexual misconduct allegations|Sexual misconduct allegations]] **[[Relationship of Donald Trump and Jeffrey Epstein|Epstein ties]] *[[Makeup of Donald Trump|Makeup]] *[[Donald Trump and handshakes|Handshakes]] *[[Security incidents involving Donald Trump|Assassination attempts]] **[[2016 Donald Trump Las Vegas rally incident|NV]] **[[Attempted assassination of Donald Trump in Pennsylvania|PA]] ***[[Thomas Crooks|perpetrator]] ***[[Donald Trump raised-fist photographs|photographs]] **[[Attempted assassination of Donald Trump in Florida|FL]] ***[[Ryan Routh|perpetrator]] **[[2026 White House Correspondents' Dinner shooting|DC]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Trumpism|Views and ideology]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Views and ideology|y|}}}} *[[Trumpism]] *[[Political positions of Donald Trump|Political positions]] *[[List of endorsements by Donald Trump|Endorsements]] *[[Make America Great Again|"Make America Great Again"]] **[[MAGA movement|Movement]] *[[Rhetoric of Donald Trump|Rhetoric]] **[[List of nicknames used by Donald Trump|Nicknames]] *[[Donald Trump and religion|Religion]] *[[Racial views of Donald Trump|Racial views]] *[[Donald Trump and antisemitism|Antisemitism]] *[[Donald Trump and fascism|Fascism]] *[[List of conspiracy theories promoted by Donald Trump|Conspiracy theories]] *[[False or misleading statements by Donald Trump|Misinformation]] *[[Trump derangement syndrome|"Trump derangement syndrome"]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=45th and 47th President of the United States|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|45th and 47th president of the United States|y|}}}} *Presidencies **[[First presidency of Donald Trump|first]] **[[Second presidency of Donald Trump|second]] **[[Timeline of the Donald Trump presidencies|timeline]] *Transitions **[[First presidential transition of Donald Trump|first]] **[[Second presidential transition of Donald Trump|second]] *Inaugurations **[[First inauguration of Donald Trump|first]] **[[Second inauguration of Donald Trump|second]] *[[Donald J. Trump Presidential Library|Presidential library]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Tenure|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Tenure|y|}}}} *First 100 days **[[First 100 days of the first Trump presidency|first]] **[[First 100 days of the second Trump presidency|second]] *[[List of executive actions by Donald Trump|Executive actions]] **[[Trump executive orders (disambiguation)|executive orders]] **[[Lists of proclamations by Donald Trump|proclamations]] **[[List of people granted executive clemency by Donald Trump (disambiguation)|pardons]] *[[Lists of presidential trips made by Donald Trump|Trips]] **[[List of international presidential trips made by Donald Trump|international]] *Opinion polling **[[Opinion polling on the first Trump presidency|first]] **[[Opinion polling on the second Trump presidency|second]] *[[Legal affairs of Donald Trump|Legal affairs]] *[[Protests against Donald Trump|Protests]] *[[Social media use by Donald Trump|Social media]] ([[Use of X by Donald Trump|X]]) {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political positions of Donald Trump|Policies]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Policies|y|}}}} *Domestic **[[Domestic policy of the first Trump administration|first]] **[[Domestic policy of the second Trump administration|second]] *Economic **[[Economic policy of the first Trump administration|first]] **[[Economic policy of the second Trump administration|second]] **tariffs ***[[Tariffs in the first Trump administration|first]] ***[[Tariffs in the second Trump administration|second]] ****[[Liberation Day tariffs]] **trade wars ***[[China–United States trade war|China]] ***[[2025–2026 United States trade war with Canada and Mexico|Canada and Mexico]] *Environment **[[Environmental policy of the first Trump administration|first]] **[[Environmental policy of the second Trump administration|second]] ***[[Donald Trump and wind energy|wind energy]] *Foreign **[[Foreign policy of the first Trump administration|first]] **[[Foreign policy of the second Trump administration|second]] **[[America First (policy)|America First]] **[[American expansionism under Donald Trump|American expansionism]] **[[Donroe Doctrine]] ***[[Operation Southern Spear]] ***[[Greenland crisis]] **Iran relations ***[[Iran–United States relations during the first Trump administration|first]] ***[[Iran–United States relations during the second Trump administration|second]] ****[[2026 Iran war]] *Government shutdowns **[[January 2018 United States federal government shutdown|2018]] **[[2018–2019 United States federal government shutdown|2018–2019]] **[[2025 United States federal government shutdown|2025]] **[[2026 United States federal government shutdowns|2026]] *Immigration **[[Immigration policy of the first Trump administration|first]] **[[Immigration policy of the second Trump administration|second]] *[[Infrastructure policy of Donald Trump|Infrastructure]] *Social **[[Social policy of the first Trump administration|first]] **[[Social policy of the second Trump administration|second]] **cannabis ***[[Cannabis policy of the first Trump administration|first]] ***[[Cannabis policy of the second Trump administration|second]] *Space **[[Space policy of the first Trump administration|first]] **[[Space policy of the second Trump administration|second]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political appointments of the Trump administration (disambiguation)|Appointments]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Appointments|y|}}}} *[[First cabinet of Donald Trump|First Cabinet]] *[[Second cabinet of Donald Trump|Second Cabinet]] *[[List of ambassadors appointed by Donald Trump (disambiguation)|Ambassadors]] *[[List of federal judges appointed by Donald Trump|Federal judges]] **[[Neil Gorsuch Supreme Court nomination|Gorsuch]] **[[Brett Kavanaugh Supreme Court nomination|Kavanaugh]] **[[Amy Coney Barrett Supreme Court nomination|Barrett]] **[[Donald Trump Supreme Court candidates|Supreme Court candidates]] *[[Executive Office appointments by Donald Trump (disambiguation)|Executives]] *[[List of United States attorneys appointed by Donald Trump|U.S. Attorneys]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political career of Donald Trump|Presidential campaigns]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Campaigns|y|}}}} *[[Donald Trump 2000 presidential campaign|2000]] **[[2000 Reform Party presidential primaries|primaries]] *[[Donald Trump 2016 presidential campaign|2016]] **[[2016 United States presidential election|election]] **[[2016 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2016 presidential campaign endorsements|endorsements]] **[[List of rallies for the 2016 Donald Trump presidential campaign|rallies]] **[[2016 Republican National Convention|convention]] **[[2016 United States presidential debates|debates]] **[[Never Trump movement]] ***[[List of Republicans who opposed the Donald Trump 2016 presidential campaign|people]] **[[Donald Trump Access Hollywood tape|''Access Hollywood'' tape]] **[[Trump Tower wiretapping allegations|wiretapping allegations]] **[[Spygate (conspiracy theory)|Spygate]] *[[Donald Trump 2020 presidential campaign|2020]] **[[2020 United States presidential election|election]] **[[2020 Republican Party presidential primaries|primaries]] **endorsements ***[[List of Donald Trump 2020 presidential campaign political endorsements|political]] ***[[List of Donald Trump 2020 presidential campaign non-political endorsements|non-political]] **[[List of Republicans who opposed the Donald Trump 2020 presidential campaign|opposition]] **[[List of Donald Trump rallies (December 2016–2022)#2020 presidential campaign|rallies]] **[[2020 Republican National Convention|convention]] **[[2020 United States presidential debates|debates]] **[[Republican reactions to Donald Trump's claims of 2020 election fraud|GOP reactions to election fraud claims]] **[[Trump–Raffensperger phone call]] *[[Donald Trump 2024 presidential campaign|2024]] **[[2024 United States presidential election|election]] **[[2024 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2024 presidential campaign endorsements|endorsements]] **[[List of Republicans who oppose the Donald Trump 2024 presidential campaign|opposition]] **[[Presidential eligibility of Donald Trump|eligibility]] **[[Agenda 47]] **[[List of rallies for the 2024 Donald Trump presidential campaign|rallies]] **[[2024 Republican National Convention|convention]] **[[2024 United States presidential debates|debates]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Impeachments|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Impeachments|y|}}}} *[[Efforts to impeach Donald Trump|Efforts]] **[[List of impeachment resolutions introduced against Donald Trump|resolutions]] *[[First impeachment of Donald Trump|First impeachment]] **[[Trump–Ukraine scandal]] **[[Impeachment inquiry into Donald Trump|House inquiry]] **[[First impeachment trial of Donald Trump|Senate trial]] *[[Second impeachment of Donald Trump|Second impeachment]] **[[January 6 United States Capitol attack|Capitol attack]] **[[Second impeachment trial of Donald Trump|Senate trial]] *[[Proposed expungements of the impeachments of Donald Trump|Proposed expungements]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Prosecutions|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Civil and Criminal Prosecutions|y|}}}} *[[Federal prosecution of Donald Trump (election obstruction case)|2020 election federal indictment]] *[[Federal prosecution of Donald Trump (classified documents case)|Classified documents federal indictment]] **[[Smith special counsel investigation|special counsel investigation]] **[[FBI investigation into Donald Trump's handling of government documents|Plasmic Echo]] **[[FBI search of Mar-a-Lago]] **''[[Trump v. United States (2022)|Trump v. United States]]'' *[[Prosecution of Donald Trump in New York|New York indictment]] **[[Stormy Daniels–Donald Trump scandal|Stormy Daniels scandal]] **[[Karen McDougal#Affair with Donald Trump|Karen McDougal affair]] **[[New York investigations of the Trump Organization|financial fraud]] *[[Georgia election racketeering prosecution|Georgia election indictment]] **[[2020 Georgia election investigation|Georgia election investigation]] **[[Mug shot of Donald Trump|mug shot]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Communication of the Trump administration during the COVID-19 pandemic|COVID-19 pandemic]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|COVID-19|y|}}}} *[[White House Coronavirus Task Force|Taskforce]] *[[U.S. federal government response to the COVID-19 pandemic|Government response]] **[[Stimulus (economics)|stimulus bills]] ***[[CARES Act]] ***[[Consolidated Appropriations Act, 2021]] **[[Operation Warp Speed]] *[[White House COVID-19 outbreak|White House outbreak]] *[[Trump administration political interference with science agencies|Interference with science agencies]] {{hidden end}} ---- {{#ifeq:{{PAGENAME}}|Donald Trump|<!-- Exclude signature from President's main biography page, where it is already displayed in the infobox. -->| <div class="skin-invert-image">[[File:{{PAGENAME:Trumpsignature2025.svg}}|150px|class=notpageimage|link=Donald Trump|Donald Trump's signature]]</div>}} [[File:Seal of the President of the United States.svg|link=|alt=Seal of the President of the United States|70px]] }}<noinclude> {{Documentation|Template:Donald Trump/doc}} [[Category:President of the United States sidebar templates]] [[Category:Donald Trump-related templates]] </noinclude> qx9mjwdb9f4eqamsmrzxchx20rku2is 116779 116695 2026-07-15T18:36:57Z Tumbuka Arch 6863 116779 wikitext text/x-wiki {{#invoke:sidebar|sidebar | name = Donald Trump series | templatestyles = Sidebar person/styles.css | class = sidebar-person vcard hlist | style = border-color: #d69d36 | wraplinks = true | title = <table><tr> <td class="sidebar-person-title-image" style="background-color: #002466;color:inherit;">[[File:{{PAGENAME:Official Presidential Portrait of President Donald J. Trump (2025) (3x4 close cropped).jpg}}|75px|border]]</td> <td class="sidebar-person-title" style="background-color: #002466;color: #FFF;"><div>{{color| #FFF|Nkhani iyi ni yimoza mwa nkhani za}}</div><span class="vcard"><span class="fn">{{colored link| #FFF|Donald Trump|Donald Trump}}</span></span></td> </tr></table> | content1 = ---- {{hidden begin|contentstyle=text-align:center;|title=Umoyo na bizinesi|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Umoyo na bizinesi|y|}}}} *[[Umoyo wakwambilira na masambiro gha Donald Trump|Umoyo wakwambilira na masambiro]] *[[Ntchito ya bizinesi ya Donald Trump|Ntchito ya bizinesi]] **[[Trump Organization]] **[[Usambazi wa Donald Trump|Usambazi]] **[[Marekodi gha msonkho gha Donald Trump|Marekodi gha msonkho]] *[[Ntchito ya vya mawayilesi ya Donald Trump|Ntchito ya vya mawayilesi]] **[[The Apprentice (American TV series)|''The Apprentice'']] **[[Mndandanda wa mabuku gha Donald Trump|Mabuku]] **[[Mafilimu gha Donald Trump|Mafilimu]] *[[Mbumba ya Trump|Mbumba]] *[[Msinkhu na umoyo wa Donald Trump|Msinkhu na umoyo]] *[[Donald J. Trump Foundation|Foundation]] *[[Chithuzithuzi cha Donald Trump ku ŵanthu|Mbiri yake pa ŵanthu]] **[[Donald Trump mu chikhalidwe chakumanyikwa|Mu chikhalidwe chakumanyikwa]] **[[Trump Always Chickens Out|"Trump wakuchimbira nyengo zose"]] **[[Mndandanda wa vinthu vyakuthyeka zina la Donald Trump|Mazina ghakupika]] **[[Mazina ghanyake agho Donald Trump wakagwiliskiranga ntchito|Mazina ghanyake]] **[[Saturday Night Live parodies of Donald Trump|Ma parody gha ''SNL'']] *[[Malo agho Donald Trump wakukhala|Malo ghakukhala]] *[[Donald Trump na mpira wa American football|American football]] *[[Donald Trump na gofu|Gofu]] *[[Mndandanda wa mphotho na ntchindi izo Donald Trump wapokera|Ntchindi]] *[[Nkhani za malango za Donald Trump pa munthu na bizinesi|Nkhani za malango]] **[[Milandu yakuimbira Donald Trump|Milandu]] *[[Ivyo Donald Trump waimbika pa nkhaza za kugonana|Ivyo waimbika pa kugonana]] **[[Ubwezi wa Donald Trump na Jeffrey Epstein|Ubwezi na Epstein]] *[[Kudolo kwa Donald Trump|Kudolo]] *[[Donald Trump na kukorana mawoko|Kukorana mawoko]] *[[Vyakuchitika vya chitetezo vyakukhwaskana na Donald Trump|Kuyezga kumukoma]] **[[2016 Donald Trump Las Vegas rally incident|NV]] **[[Kuyezga kukoma Donald Trump ku Pennsylvania|PA]] ***[[Thomas Crooks|Muloŵevu]] ***[[Vithuzithuzi vya Donald Trump wakukwezga nkhonya|Vithuzithuzi]] **[[Kuyezga kukoma Donald Trump ku Florida|FL]] ***[[Ryan Routh|Muloŵevu]] **[[2026 White House Correspondents' Dinner shooting|DC]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Trumpism|Maghanoghano na fundo za ndyali]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Maghanoghano na fundo za ndyali|y|}}}} *[[Trumpism]] *[[Maudindo gha ndyali gha Donald Trump|Maudindo gha ndyali]] *[[Mndandanda wa ŵakovwira Donald Trump|Ŵakovwira]] *[[Make America Great Again|"Make America Great Again"]] **[[Gulu la MAGA|Gulu]] *[[Kayowoyero ka Donald Trump|Kayowoyero]] **[[Mndandanda wa mazina agho Donald Trump wakugwiliskira ntchito|Mazina]] *[[Donald Trump na chisopa|Chisopa]] *[[Maghanoghano gha mtundu gha Donald Trump|Maghanoghano gha mtundu]] *[[Donald Trump na kususka Ŵayuda|Kususka Ŵayuda]] *[[Donald Trump na ufashizimu|Ufashizimu]] *[[Mndandanda wa vigomezgo vyambura ukaboni ivyo Donald Trump wakalimbikiska|Vigomezgo vyambura ukaboni]] *[[Mazgu ghautesi panji ghakupuruska gha Donald Trump|Utesi]] *[[Trump derangement syndrome|"Trump derangement syndrome"]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Purezidenti wa 45 na 47 wa United States|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Purezidenti wa 45 na 47 wa United States|y|}}}} *Maulongozi **[[Ulongozi wakwamba wa Donald Trump|wakwamba]] **[[Ulongozi wachiŵiri wa Donald Trump|wachiŵiri]] **[[Ndondomeko ya nyengo ya maulongozi gha Donald Trump|ndondomeko ya nyengo]] *Kusintha kwa ulamuliro **[[Kusintha kwakwamba kwa ulamuliro wa Donald Trump|kwakwamba]] **[[Kusintha kwachiŵiri kwa ulamuliro wa Donald Trump|kwachiŵiri]] *Kunjira mu udindo **[[Kunjira kwakwamba mu udindo kwa Donald Trump|kwakwamba]] **[[Kunjira kwachiŵiri mu udindo kwa Donald Trump|kwachiŵiri]] *[[Laibulale ya Purezidenti Donald J. Trump|Laibulale ya Purezidenti]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Nyengo ya ulongozi|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Nyengo ya ulongozi|y|}}}} *Mazuŵa 100 ghakwamba **[[Mazuŵa 100 ghakwamba gha ulongozi wakwamba wa Trump|wakwamba]] **[[Mazuŵa 100 ghakwamba gha ulongozi wachiŵiri wa Trump|wachiŵiri]] *[[Mndandanda wa vyakuchita vya boma vya Donald Trump|Vyakuchita vya boma]] **[[Malango gha boma gha Trump (disambiguation)|Malango gha boma]] **[[Mndandanda wa vipharazgo vya Donald Trump|Vipharazgo]] **[[Mndandanda wa ŵanthu awo Donald Trump wakaŵagowokera (disambiguation)|Kugowokera]] *[[Mndandanda wa maulendo gha purezidenti gha Donald Trump|Maulendo]] **[[Mndandanda wa maulendo gha purezidenti gha Donald Trump ku vyaru vinyake|gha pa charu chose]] *Kufumba maghanoghano gha ŵanthu **[[Kufumba maghanoghano pa ulongozi wakwamba wa Trump|wakwamba]] **[[Kufumba maghanoghano pa ulongozi wachiŵiri wa Trump|wachiŵiri]] *[[Nkhani za malango za Donald Trump|Nkhani za malango]] *[[Viwoneskero vyakususkana na Donald Trump|Viwoneskero]] *[[Kugwiliskira ntchito malo ghakuchezgerapo gha Donald Trump|Malo ghakuchezgerapo]] ([[Kugwiliskira ntchito X kwa Donald Trump|X]]) {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Mawonero gha ndale gha Donald Trump|Ndondomeko]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Ndondomeko|y|}}}} *Vya mukati mwa charu **[[Ndondomeko ya mukati mwa charu ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya mukati mwa charu ya boma lachiŵiri la Trump|yachiŵiri]] *Vya chuma **[[Ndondomeko ya vyachuma ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyachuma ya boma lachiŵiri la Trump|yachiŵiri]] **Misonkho ya katundu ***[[Misonkho ya katundu mu boma lakwamba la Trump|yakwamba]] ***[[Misonkho ya katundu mu boma lachiŵiri la Trump|yachiŵiri]] ****[[Misonkho ya Liberation Day]] **Nkhondo za malonda ***[[Nkhondo ya malonda pakati pa China na United States|China]] ***[[Nkhondo ya malonda ya United States na Canada na Mexico ya 2025–2026|Canada na Mexico]] *Vyakuvikilira chilengiwa **[[Ndondomeko ya vyachilengedwe ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyachilengedwe ya boma lachiŵiri la Trump|yachiŵiri]] ***[[Donald Trump na nkhongono ya mphepo|nkhongono ya mphepo]] *Vya kuwaro **[[Ndondomeko ya vyaru vinyake ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyaru vinyake ya boma lachiŵiri la Trump|yachiŵiri]] **[[America First (ndondomeko)|America First]] **[[Kukuliska mazaza gha America mu nyengo ya Donald Trump|Kukuliska mazaza gha America]] **[[Donroe Doctrine]] ***[[Operation Southern Spear]] ***[[Suzgo la Greenland]] **Ubwezi wa Iran ***[[Ubwezi wa Iran na United States mu nyengo ya boma lakwamba la Trump|wakwamba]] ***[[Ubwezi wa Iran na United States mu nyengo ya boma lachiŵiri la Trump|wachiŵiri]] ****[[Nkhondo ya Iran ya 2026]] *Kujara boma **[[Kujara boma la United States kwa Janyuwale 2018|2018]] **[[Kujara boma la United States la 2018–2019|2018–2019]] **[[Kujara boma la United States la 2025|2025]] **[[Kujara boma la United States la 2026|2026]] *Vyakukhwaskana na ŵanthu ŵakufuma ku vyaru vinyake **[[Ndondomeko ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lachiŵiri la Trump|yachiŵiri]] *[[Ndondomeko ya vyakuzenga ya Donald Trump|Vyakuzenga]] *Vyacharu **[[Ndondomeko ya vya ŵanthu ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vya ŵanthu ya boma lachiŵiri la Trump|yachiŵiri]] **Chamba ***[[Ndondomeko ya chamba ya boma lakwamba la Trump|yakwamba]] ***[[Ndondomeko ya chamba ya boma lachiŵiri la Trump|yachiŵiri]] *Vya mlengalenga **[[Ndondomeko ya mlengalenga ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya mlengalenga ya boma lachiŵiri la Trump|yachiŵiri]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Kusora ŵanthu ŵa ndale mu boma la Trump (kulekaniska)|Kusora ŵanthu pa maudindo]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Appointments|y|}}}} *[[Nduna yakwamba ya Donald Trump|Nduna yakwamba]] *[[Nduna yachiŵiri ya Donald Trump|Nduna yachiŵiri]] *[[Mndandanda wa ŵaambasada ŵakusankhika na Donald Trump (kulekaniska)|Ŵaambasada]] *[[Mndandanda wa ŵeruzgi ŵa boma la federal ŵakusankhika na Donald Trump|Ŵeruzgi ŵa federal]] **[[Kusankhika kwa Neil Gorsuch ku Khoti Likuru Chomene|Gorsuch]] **[[Kusankhika kwa Brett Kavanaugh ku Khoti Likuru Chomene|Kavanaugh]] **[[Kusankhika kwa Amy Coney Barrett ku Khoti Likuru Chomene|Barrett]] **[[Ŵakusankhika ku Khoti Likuru Chomene ŵa Donald Trump|Ŵakusankhika ku Khoti Likuru Chomene]] *[[Kusankhika kwa maofesala ŵa Executive Office na Donald Trump (kulekaniska)|Maofesala ŵa Executive]] *[[Mndandanda wa ma Attorney ŵa United States ŵakusankhika na Donald Trump|Ma Attorney ŵa U.S.]] {{hidden end}} -------------- {{hidden begin|contentstyle=text-align:center;|title=[[Ntchito ya ndale ya Donald Trump|Makampeni gha chisankho cha ulongozgi]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Campaigns|y|}}}} *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2000|2000]] **[[Ma primaries gha chisankho cha ulongozgi gha Reform Party gha 2000|ma primaries]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2016|2016]] **[[Chisankho cha ulongozgi cha United States cha 2016|chisankho]] **[[Ma primaries gha Republican Party gha 2016|ma primaries]] **[[Mndandanda wa ŵakumovwira Donald Trump pa kampeni ya 2016|ŵakumovwira]] **[[Mndandanda wa ma rally gha kampeni ya Donald Trump ya 2016|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2016|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2016|ma debate]] **[[Never Trump movement]] ***[[Mndandanda wa ma Republican awo ŵakasuska kampeni ya Donald Trump ya 2016|ŵanthu]] **[[Tepi ya Donald Trump Access Hollywood|''Access Hollywood'' tape]] **[[Ivyo vikayowoyeka pa kupulika mafoni pa Trump Tower|kupulika mafoni]] **[[Spygate (chisambizgo cha chiwembu)|Spygate]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2020|2020]] **[[Chisankho cha ulongozgi cha United States cha 2020|chisankho]] **[[Ma primaries gha Republican Party gha 2020|ma primaries]] **ŵakumovwira ***[[Mndandanda wa ŵandale awo ŵakamovwira Donald Trump pa kampeni ya 2020|ŵandale]] ***[[Mndandanda wa ŵambura kuŵa ŵandale awo ŵakamovwira Donald Trump pa kampeni ya 2020|ŵambura kuŵa ŵandale]] **[[Mndandanda wa ma Republican awo ŵakasuska kampeni ya Donald Trump ya 2020|ŵakususka]] **[[Mndandanda wa ma rally gha Donald Trump (Disembala 2016–2022)#Kampeni ya chisankho cha ulongozgi ya 2020|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2020|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2020|ma debate]] **[[Ivyo ma Republican ŵakayowoya pa ivyo Donald Trump wakadandawuranga vya uchinyakazi pa chisankho cha 2020|ivyo ma GOP ŵakayowoya]] **[[Foni ya Trump–Raffensperger]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2024|2024]] **[[Chisankho cha ulongozgi cha United States cha 2024|chisankho]] **[[Ma primaries gha Republican Party gha 2024|ma primaries]] **[[Mndandanda wa ŵakumovwira Donald Trump pa kampeni ya 2024|ŵakumovwira]] **[[Mndandanda wa ma Republican awo ŵakususka kampeni ya Donald Trump ya 2024|ŵakususka]] **[[Kwenelera kwa Donald Trump pa chisankho cha ulongozgi|kwenelera]] **[[Agenda 47]] **[[Mndandanda wa ma rally gha kampeni ya Donald Trump ya 2024|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2024|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2024|ma debate]] {{hidden end}} -------------- {{hidden begin|contentstyle=text-align:center;|title=Kumupa mulandu wa kufumiska pa udindo|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Impeachments|y|}}}} *[[Kuyezgayezga kumupa Donald Trump mulandu wa kumufumiska pa udindo|Kuyezgayezga]] **[[Mndandanda wa ma resolution gha impeachment agho ghakapelekeka pa Donald Trump|ma resolution]] *[[Impeachment yakwamba ya Donald Trump|Yakwamba]] **[[Skandalo la Trump–Ukraine]] **[[Kufufuza kwa House pa impeachment ya Donald Trump|Kufufuza kwa House]] **[[Mulandu wakwamba wa impeachment wa Donald Trump mu Senate|Mulandu mu Senate]] *[[Impeachment yachiŵiri ya Donald Trump|Yachiŵiri]] **[[Kuukira kwa United States Capitol pa Janyuwale 6|Kuukira Capitol]] **[[Mulandu wachiŵiri wa impeachment wa Donald Trump mu Senate|Mulandu mu Senate]] *[[Malingaliro gha kufumiska ma impeachment gha Donald Trump pa mbiri|Kufumiska pa mbiri]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Milandu|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Civil and Criminal Prosecutions|y|}}}} *[[Mulandu wa boma la federal pa Donald Trump (mulandu wa kutondeska chisankho)|Mulandu wa federal pa chisankho cha 2020]] *[[Mulandu wa boma la federal pa Donald Trump (mulandu wa vyakulembeka vyachisisi)|Mulandu wa federal pa vyakulembeka vyachisisi]] **[[Kufufuza kwa Smith Special Counsel|kufufuza kwa special counsel]] **[[Kufufuza kwa FBI pa umo Donald Trump wakasungira vyakulembeka vya boma|Plasmic Echo]] **[[Kusanda kwa FBI ku Mar-a-Lago]] **''[[Trump v. United States (2022)|Trump v. United States]]'' *[[Mulandu wa Donald Trump ku New York|Mulandu wa New York]] **[[Skandalo la Stormy Daniels–Donald Trump|Skandalo la Stormy Daniels]] **[[Karen McDougal#Ubwezi na Donald Trump|Ubwezi wa Karen McDougal]] **[[Kufufuza kwa Trump Organization ku New York|uchigeŵenga wa ndalama]] *[[Mulandu wa Georgia wa racketeering pa chisankho|Mulandu wa Georgia]] **[[Kufufuza kwa chisankho cha Georgia cha 2020|Kufufuza kwa Georgia]] **[[Chithuzi cha Donald Trump pa polisi|chithuzi cha polisi]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Kuyowoyeskana kwa boma la Trump pa nyengo ya mliri wa COVID-19|Mliri wa COVID-19]]|expanded=y{{#ifeq:{{{expanded|}}}|COVID-19|y|}}}} *[[White House Coronavirus Task Force|Gulu la ntchito]] *[[Mazgoro gha boma la federal la U.S. pa mliri wa COVID-19|Mazgoro gha boma]] **[[Ndalama zakovwira chuma (ukaboni)|malango gha kovwira chuma]] ***[[CARES Act]] ***[[Consolidated Appropriations Act, 2021]] **[[Operation Warp Speed]] *[[Kubuka kwa COVID-19 ku White House|Kubuka ku White House]] *[[Kunjilirapo kwa boma la Trump pa mabungwe gha sayansi|Kunjilirapo pa mabungwe gha sayansi]] {{hidden end}} {{#ifeq:{{PAGENAME}}|Donald Trump|| }} {{Documentation|Template:Donald Trump/doc}} [[Category:Matemplate gha sidebar gha Mulongozgi wa United States]] [[Category:Matemplate ghakukhwaskana na Donald Trump]] 20hfpd87trgv1fko52f67sh03ekuk1l 116780 116779 2026-07-15T18:37:29Z Tumbuka Arch 6863 116780 wikitext text/x-wiki {{#invoke:sidebar|sidebar | name = Donald Trump series | templatestyles = Sidebar person/styles.css | class = sidebar-person vcard hlist | style = border-color: #d69d36 | wraplinks = true | title = <table><tr> <td class="sidebar-person-title-image" style="background-color: #002466;color:inherit;">[[File:{{PAGENAME:Official Presidential Portrait of President Donald J. Trump (2025) (3x4 close cropped).jpg}}|75px|border]]</td> <td class="sidebar-person-title" style="background-color: #002466;color: #FFF;"><div>{{color| #FFF|This article is part of <br/>a series about}}</div><span class="vcard"><span class="fn">{{colored link| #FFF|Donald Trump|Donald Trump}}</span></span></td> </tr></table> | content1 = ---- {{hidden begin|contentstyle=text-align:center;|title=Life and business|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Life and business|y|}}}} *[[Early life and education of Donald Trump|Early life and education]] *[[Business career of Donald Trump|Business career]] **[[The Trump Organization]] **[[Wealth of Donald Trump|wealth]] **[[Tax returns of Donald Trump|tax returns]] *[[Media career of Donald Trump|Media career]] **[[The Apprentice (American TV series)|''The Apprentice'']] **[[Bibliography of Donald Trump|bibliography]] **[[Donald Trump filmography|filmography]] *[[Trump family|Family]] *[[Age and health concerns about Donald Trump|Age and health]] *[[Donald J. Trump Foundation|Foundation]] *[[Public image of Donald Trump|Public image]] **[[Donald Trump in popular culture|In popular culture]] **[[Trump Always Chickens Out|"Trump always chickens out"]] **[[List of things named after Donald Trump|Eponyms]] **[[Pseudonyms used by Donald Trump|Pseudonyms]] **[[Saturday Night Live parodies of Donald Trump|''SNL'' parodies]] *[[Residences of Donald Trump|Residences]] *[[Donald Trump and American football|American football]] *[[Donald Trump and golf|Golf]] *[[List of awards and honors received by Donald Trump|Honors]] *[[Personal and business legal affairs of Donald Trump|Legal affairs]] **[[Indictments against Donald Trump|Indictments]] *[[Donald Trump sexual misconduct allegations|Sexual misconduct allegations]] **[[Relationship of Donald Trump and Jeffrey Epstein|Epstein ties]] *[[Makeup of Donald Trump|Makeup]] *[[Donald Trump and handshakes|Handshakes]] *[[Security incidents involving Donald Trump|Assassination attempts]] **[[2016 Donald Trump Las Vegas rally incident|NV]] **[[Attempted assassination of Donald Trump in Pennsylvania|PA]] ***[[Thomas Crooks|perpetrator]] ***[[Donald Trump raised-fist photographs|photographs]] **[[Attempted assassination of Donald Trump in Florida|FL]] ***[[Ryan Routh|perpetrator]] **[[2026 White House Correspondents' Dinner shooting|DC]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Trumpism|Views and ideology]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Views and ideology|y|}}}} *[[Trumpism]] *[[Political positions of Donald Trump|Political positions]] *[[List of endorsements by Donald Trump|Endorsements]] *[[Make America Great Again|"Make America Great Again"]] **[[MAGA movement|Movement]] *[[Rhetoric of Donald Trump|Rhetoric]] **[[List of nicknames used by Donald Trump|Nicknames]] *[[Donald Trump and religion|Religion]] *[[Racial views of Donald Trump|Racial views]] *[[Donald Trump and antisemitism|Antisemitism]] *[[Donald Trump and fascism|Fascism]] *[[List of conspiracy theories promoted by Donald Trump|Conspiracy theories]] *[[False or misleading statements by Donald Trump|Misinformation]] *[[Trump derangement syndrome|"Trump derangement syndrome"]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=45th and 47th President of the United States|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|45th and 47th president of the United States|y|}}}} *Presidencies **[[First presidency of Donald Trump|first]] **[[Second presidency of Donald Trump|second]] **[[Timeline of the Donald Trump presidencies|timeline]] *Transitions **[[First presidential transition of Donald Trump|first]] **[[Second presidential transition of Donald Trump|second]] *Inaugurations **[[First inauguration of Donald Trump|first]] **[[Second inauguration of Donald Trump|second]] *[[Donald J. Trump Presidential Library|Presidential library]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Tenure|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Tenure|y|}}}} *First 100 days **[[First 100 days of the first Trump presidency|first]] **[[First 100 days of the second Trump presidency|second]] *[[List of executive actions by Donald Trump|Executive actions]] **[[Trump executive orders (disambiguation)|executive orders]] **[[Lists of proclamations by Donald Trump|proclamations]] **[[List of people granted executive clemency by Donald Trump (disambiguation)|pardons]] *[[Lists of presidential trips made by Donald Trump|Trips]] **[[List of international presidential trips made by Donald Trump|international]] *Opinion polling **[[Opinion polling on the first Trump presidency|first]] **[[Opinion polling on the second Trump presidency|second]] *[[Legal affairs of Donald Trump|Legal affairs]] *[[Protests against Donald Trump|Protests]] *[[Social media use by Donald Trump|Social media]] ([[Use of X by Donald Trump|X]]) {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political positions of Donald Trump|Policies]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Policies|y|}}}} *Domestic **[[Domestic policy of the first Trump administration|first]] **[[Domestic policy of the second Trump administration|second]] *Economic **[[Economic policy of the first Trump administration|first]] **[[Economic policy of the second Trump administration|second]] **tariffs ***[[Tariffs in the first Trump administration|first]] ***[[Tariffs in the second Trump administration|second]] ****[[Liberation Day tariffs]] **trade wars ***[[China–United States trade war|China]] ***[[2025–2026 United States trade war with Canada and Mexico|Canada and Mexico]] *Environment **[[Environmental policy of the first Trump administration|first]] **[[Environmental policy of the second Trump administration|second]] ***[[Donald Trump and wind energy|wind energy]] *Foreign **[[Foreign policy of the first Trump administration|first]] **[[Foreign policy of the second Trump administration|second]] **[[America First (policy)|America First]] **[[American expansionism under Donald Trump|American expansionism]] **[[Donroe Doctrine]] ***[[Operation Southern Spear]] ***[[Greenland crisis]] **Iran relations ***[[Iran–United States relations during the first Trump administration|first]] ***[[Iran–United States relations during the second Trump administration|second]] ****[[2026 Iran war]] *Government shutdowns **[[January 2018 United States federal government shutdown|2018]] **[[2018–2019 United States federal government shutdown|2018–2019]] **[[2025 United States federal government shutdown|2025]] **[[2026 United States federal government shutdowns|2026]] *Immigration **[[Immigration policy of the first Trump administration|first]] **[[Immigration policy of the second Trump administration|second]] *[[Infrastructure policy of Donald Trump|Infrastructure]] *Social **[[Social policy of the first Trump administration|first]] **[[Social policy of the second Trump administration|second]] **cannabis ***[[Cannabis policy of the first Trump administration|first]] ***[[Cannabis policy of the second Trump administration|second]] *Space **[[Space policy of the first Trump administration|first]] **[[Space policy of the second Trump administration|second]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political appointments of the Trump administration (disambiguation)|Appointments]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Appointments|y|}}}} *[[First cabinet of Donald Trump|First Cabinet]] *[[Second cabinet of Donald Trump|Second Cabinet]] *[[List of ambassadors appointed by Donald Trump (disambiguation)|Ambassadors]] *[[List of federal judges appointed by Donald Trump|Federal judges]] **[[Neil Gorsuch Supreme Court nomination|Gorsuch]] **[[Brett Kavanaugh Supreme Court nomination|Kavanaugh]] **[[Amy Coney Barrett Supreme Court nomination|Barrett]] **[[Donald Trump Supreme Court candidates|Supreme Court candidates]] *[[Executive Office appointments by Donald Trump (disambiguation)|Executives]] *[[List of United States attorneys appointed by Donald Trump|U.S. Attorneys]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Political career of Donald Trump|Presidential campaigns]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Campaigns|y|}}}} *[[Donald Trump 2000 presidential campaign|2000]] **[[2000 Reform Party presidential primaries|primaries]] *[[Donald Trump 2016 presidential campaign|2016]] **[[2016 United States presidential election|election]] **[[2016 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2016 presidential campaign endorsements|endorsements]] **[[List of rallies for the 2016 Donald Trump presidential campaign|rallies]] **[[2016 Republican National Convention|convention]] **[[2016 United States presidential debates|debates]] **[[Never Trump movement]] ***[[List of Republicans who opposed the Donald Trump 2016 presidential campaign|people]] **[[Donald Trump Access Hollywood tape|''Access Hollywood'' tape]] **[[Trump Tower wiretapping allegations|wiretapping allegations]] **[[Spygate (conspiracy theory)|Spygate]] *[[Donald Trump 2020 presidential campaign|2020]] **[[2020 United States presidential election|election]] **[[2020 Republican Party presidential primaries|primaries]] **endorsements ***[[List of Donald Trump 2020 presidential campaign political endorsements|political]] ***[[List of Donald Trump 2020 presidential campaign non-political endorsements|non-political]] **[[List of Republicans who opposed the Donald Trump 2020 presidential campaign|opposition]] **[[List of Donald Trump rallies (December 2016–2022)#2020 presidential campaign|rallies]] **[[2020 Republican National Convention|convention]] **[[2020 United States presidential debates|debates]] **[[Republican reactions to Donald Trump's claims of 2020 election fraud|GOP reactions to election fraud claims]] **[[Trump–Raffensperger phone call]] *[[Donald Trump 2024 presidential campaign|2024]] **[[2024 United States presidential election|election]] **[[2024 Republican Party presidential primaries|primaries]] **[[List of Donald Trump 2024 presidential campaign endorsements|endorsements]] **[[List of Republicans who oppose the Donald Trump 2024 presidential campaign|opposition]] **[[Presidential eligibility of Donald Trump|eligibility]] **[[Agenda 47]] **[[List of rallies for the 2024 Donald Trump presidential campaign|rallies]] **[[2024 Republican National Convention|convention]] **[[2024 United States presidential debates|debates]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Impeachments|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Impeachments|y|}}}} *[[Efforts to impeach Donald Trump|Efforts]] **[[List of impeachment resolutions introduced against Donald Trump|resolutions]] *[[First impeachment of Donald Trump|First impeachment]] **[[Trump–Ukraine scandal]] **[[Impeachment inquiry into Donald Trump|House inquiry]] **[[First impeachment trial of Donald Trump|Senate trial]] *[[Second impeachment of Donald Trump|Second impeachment]] **[[January 6 United States Capitol attack|Capitol attack]] **[[Second impeachment trial of Donald Trump|Senate trial]] *[[Proposed expungements of the impeachments of Donald Trump|Proposed expungements]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Prosecutions|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Civil and Criminal Prosecutions|y|}}}} *[[Federal prosecution of Donald Trump (election obstruction case)|2020 election federal indictment]] *[[Federal prosecution of Donald Trump (classified documents case)|Classified documents federal indictment]] **[[Smith special counsel investigation|special counsel investigation]] **[[FBI investigation into Donald Trump's handling of government documents|Plasmic Echo]] **[[FBI search of Mar-a-Lago]] **''[[Trump v. United States (2022)|Trump v. United States]]'' *[[Prosecution of Donald Trump in New York|New York indictment]] **[[Stormy Daniels–Donald Trump scandal|Stormy Daniels scandal]] **[[Karen McDougal#Affair with Donald Trump|Karen McDougal affair]] **[[New York investigations of the Trump Organization|financial fraud]] *[[Georgia election racketeering prosecution|Georgia election indictment]] **[[2020 Georgia election investigation|Georgia election investigation]] **[[Mug shot of Donald Trump|mug shot]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Communication of the Trump administration during the COVID-19 pandemic|COVID-19 pandemic]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|COVID-19|y|}}}} *[[White House Coronavirus Task Force|Taskforce]] *[[U.S. federal government response to the COVID-19 pandemic|Government response]] **[[Stimulus (economics)|stimulus bills]] ***[[CARES Act]] ***[[Consolidated Appropriations Act, 2021]] **[[Operation Warp Speed]] *[[White House COVID-19 outbreak|White House outbreak]] *[[Trump administration political interference with science agencies|Interference with science agencies]] {{hidden end}} ---- {{#ifeq:{{PAGENAME}}|Donald Trump|<!-- Exclude signature from President's main biography page, where it is already displayed in the infobox. -->| <div class="skin-invert-image">[[File:{{PAGENAME:Trumpsignature2025.svg}}|150px|class=notpageimage|link=Donald Trump|Donald Trump's signature]]</div>}} [[File:Seal of the President of the United States.svg|link=|alt=Seal of the President of the United States|70px]] }}<noinclude> {{Documentation|Template:Donald Trump/doc}} [[Category:President of the United States sidebar templates]] [[Category:Donald Trump-related templates]] </noinclude> rt5sh6enfir3gjx1kq8wzkz8br1mucm 116781 116780 2026-07-15T18:38:25Z Tumbuka Arch 6863 116781 wikitext text/x-wiki {{#invoke:sidebar|sidebar | name = Donald Trump series | templatestyles = Sidebar person/styles.css | class = sidebar-person vcard hlist | style = border-color: #d69d36 | wraplinks = true | title = <table><tr> <td class="sidebar-person-title-image" style="background-color: #002466;color:inherit;">[[File:{{PAGENAME:Official Presidential Portrait of President Donald J. Trump (2025) (3x4 close cropped).jpg}}|75px|border]]</td> <td class="sidebar-person-title" style="background-color: #002466;color: #FFF;"><div>{{color| #FFF|This article is part of <br/>a series about}}</div><span class="vcard"><span class="fn">{{colored link| #FFF|Donald Trump|Donald Trump}}</span></span></td> </tr></table> | content1 = ---- {{hidden begin|contentstyle=text-align:center;|title=Umoyo na bizinesi|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Umoyo na bizinesi|y|}}}} *[[Umoyo wakwambilira na masambiro gha Donald Trump|Umoyo wakwambilira na masambiro]] *[[Ntchito ya bizinesi ya Donald Trump|Ntchito ya bizinesi]] **[[Trump Organization]] **[[Usambazi wa Donald Trump|Usambazi]] **[[Marekodi gha msonkho gha Donald Trump|Marekodi gha msonkho]] *[[Ntchito ya vya mawayilesi ya Donald Trump|Ntchito ya vya mawayilesi]] **[[The Apprentice (American TV series)|''The Apprentice'']] **[[Mndandanda wa mabuku gha Donald Trump|Mabuku]] **[[Mafilimu gha Donald Trump|Mafilimu]] *[[Mbumba ya Trump|Mbumba]] *[[Msinkhu na umoyo wa Donald Trump|Msinkhu na umoyo]] *[[Donald J. Trump Foundation|Foundation]] *[[Chithuzithuzi cha Donald Trump ku ŵanthu|Mbiri yake pa ŵanthu]] **[[Donald Trump mu chikhalidwe chakumanyikwa|Mu chikhalidwe chakumanyikwa]] **[[Trump Always Chickens Out|"Trump wakuchimbira nyengo zose"]] **[[Mndandanda wa vinthu vyakuthyeka zina la Donald Trump|Mazina ghakupika]] **[[Mazina ghanyake agho Donald Trump wakagwiliskiranga ntchito|Mazina ghanyake]] **[[Saturday Night Live parodies of Donald Trump|Ma parody gha ''SNL'']] *[[Malo agho Donald Trump wakukhala|Malo ghakukhala]] *[[Donald Trump na mpira wa American football|American football]] *[[Donald Trump na gofu|Gofu]] *[[Mndandanda wa mphotho na ntchindi izo Donald Trump wapokera|Ntchindi]] *[[Nkhani za malango za Donald Trump pa munthu na bizinesi|Nkhani za malango]] **[[Milandu yakuimbira Donald Trump|Milandu]] *[[Ivyo Donald Trump waimbika pa nkhaza za kugonana|Ivyo waimbika pa kugonana]] **[[Ubwezi wa Donald Trump na Jeffrey Epstein|Ubwezi na Epstein]] *[[Kudolo kwa Donald Trump|Kudolo]] *[[Donald Trump na kukorana mawoko|Kukorana mawoko]] *[[Vyakuchitika vya chitetezo vyakukhwaskana na Donald Trump|Kuyezga kumukoma]] **[[2016 Donald Trump Las Vegas rally incident|NV]] **[[Kuyezga kukoma Donald Trump ku Pennsylvania|PA]] ***[[Thomas Crooks|Muloŵevu]] ***[[Vithuzithuzi vya Donald Trump wakukwezga nkhonya|Vithuzithuzi]] **[[Kuyezga kukoma Donald Trump ku Florida|FL]] ***[[Ryan Routh|Muloŵevu]] **[[2026 White House Correspondents' Dinner shooting|DC]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Trumpism|Maghanoghano na fundo za ndyali]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Maghanoghano na fundo za ndyali|y|}}}} *[[Trumpism]] *[[Maudindo gha ndyali gha Donald Trump|Maudindo gha ndyali]] *[[Mndandanda wa ŵakovwira Donald Trump|Ŵakovwira]] *[[Make America Great Again|"Make America Great Again"]] **[[Gulu la MAGA|Gulu]] *[[Kayowoyero ka Donald Trump|Kayowoyero]] **[[Mndandanda wa mazina agho Donald Trump wakugwiliskira ntchito|Mazina]] *[[Donald Trump na chisopa|Chisopa]] *[[Maghanoghano gha mtundu gha Donald Trump|Maghanoghano gha mtundu]] *[[Donald Trump na kususka Ŵayuda|Kususka Ŵayuda]] *[[Donald Trump na ufashizimu|Ufashizimu]] *[[Mndandanda wa vigomezgo vyambura ukaboni ivyo Donald Trump wakalimbikiska|Vigomezgo vyambura ukaboni]] *[[Mazgu ghautesi panji ghakupuruska gha Donald Trump|Utesi]] *[[Trump derangement syndrome|"Trump derangement syndrome"]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Purezidenti wa 45 na 47 wa United States|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Purezidenti wa 45 na 47 wa United States|y|}}}} *Maulongozi **[[Ulongozi wakwamba wa Donald Trump|wakwamba]] **[[Ulongozi wachiŵiri wa Donald Trump|wachiŵiri]] **[[Ndondomeko ya nyengo ya maulongozi gha Donald Trump|ndondomeko ya nyengo]] *Kusintha kwa ulamuliro **[[Kusintha kwakwamba kwa ulamuliro wa Donald Trump|kwakwamba]] **[[Kusintha kwachiŵiri kwa ulamuliro wa Donald Trump|kwachiŵiri]] *Kunjira mu udindo **[[Kunjira kwakwamba mu udindo kwa Donald Trump|kwakwamba]] **[[Kunjira kwachiŵiri mu udindo kwa Donald Trump|kwachiŵiri]] *[[Laibulale ya Purezidenti Donald J. Trump|Laibulale ya Purezidenti]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Nyengo ya ulongozi|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Nyengo ya ulongozi|y|}}}} *Mazuŵa 100 ghakwamba **[[Mazuŵa 100 ghakwamba gha ulongozi wakwamba wa Trump|wakwamba]] **[[Mazuŵa 100 ghakwamba gha ulongozi wachiŵiri wa Trump|wachiŵiri]] *[[Mndandanda wa vyakuchita vya boma vya Donald Trump|Vyakuchita vya boma]] **[[Malango gha boma gha Trump (disambiguation)|Malango gha boma]] **[[Mndandanda wa vipharazgo vya Donald Trump|Vipharazgo]] **[[Mndandanda wa ŵanthu awo Donald Trump wakaŵagowokera (disambiguation)|Kugowokera]] *[[Mndandanda wa maulendo gha purezidenti gha Donald Trump|Maulendo]] **[[Mndandanda wa maulendo gha purezidenti gha Donald Trump ku vyaru vinyake|gha pa charu chose]] *Kufumba maghanoghano gha ŵanthu **[[Kufumba maghanoghano pa ulongozi wakwamba wa Trump|wakwamba]] **[[Kufumba maghanoghano pa ulongozi wachiŵiri wa Trump|wachiŵiri]] *[[Nkhani za malango za Donald Trump|Nkhani za malango]] *[[Viwoneskero vyakususkana na Donald Trump|Viwoneskero]] *[[Kugwiliskira ntchito malo ghakuchezgerapo gha Donald Trump|Malo ghakuchezgerapo]] ([[Kugwiliskira ntchito X kwa Donald Trump|X]]) {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Mawonero gha ndale gha Donald Trump|Ndondomeko]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Ndondomeko|y|}}}} *Vya mukati mwa charu **[[Ndondomeko ya mukati mwa charu ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya mukati mwa charu ya boma lachiŵiri la Trump|yachiŵiri]] *Vya chuma **[[Ndondomeko ya vyachuma ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyachuma ya boma lachiŵiri la Trump|yachiŵiri]] **Misonkho ya katundu ***[[Misonkho ya katundu mu boma lakwamba la Trump|yakwamba]] ***[[Misonkho ya katundu mu boma lachiŵiri la Trump|yachiŵiri]] ****[[Misonkho ya Liberation Day]] **Nkhondo za malonda ***[[Nkhondo ya malonda pakati pa China na United States|China]] ***[[Nkhondo ya malonda ya United States na Canada na Mexico ya 2025–2026|Canada na Mexico]] *Vyakuvikilira chilengiwa **[[Ndondomeko ya vyachilengedwe ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyachilengedwe ya boma lachiŵiri la Trump|yachiŵiri]] ***[[Donald Trump na nkhongono ya mphepo|nkhongono ya mphepo]] *Vya kuwaro **[[Ndondomeko ya vyaru vinyake ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vyaru vinyake ya boma lachiŵiri la Trump|yachiŵiri]] **[[America First (ndondomeko)|America First]] **[[Kukuliska mazaza gha America mu nyengo ya Donald Trump|Kukuliska mazaza gha America]] **[[Donroe Doctrine]] ***[[Operation Southern Spear]] ***[[Suzgo la Greenland]] **Ubwezi wa Iran ***[[Ubwezi wa Iran na United States mu nyengo ya boma lakwamba la Trump|wakwamba]] ***[[Ubwezi wa Iran na United States mu nyengo ya boma lachiŵiri la Trump|wachiŵiri]] ****[[Nkhondo ya Iran ya 2026]] *Kujara boma **[[Kujara boma la United States kwa Janyuwale 2018|2018]] **[[Kujara boma la United States la 2018–2019|2018–2019]] **[[Kujara boma la United States la 2025|2025]] **[[Kujara boma la United States la 2026|2026]] *Vyakukhwaskana na ŵanthu ŵakufuma ku vyaru vinyake **[[Ndondomeko ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lachiŵiri la Trump|yachiŵiri]] *[[Ndondomeko ya vyakuzenga ya Donald Trump|Vyakuzenga]] *Vyacharu **[[Ndondomeko ya vya ŵanthu ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya vya ŵanthu ya boma lachiŵiri la Trump|yachiŵiri]] **Chamba ***[[Ndondomeko ya chamba ya boma lakwamba la Trump|yakwamba]] ***[[Ndondomeko ya chamba ya boma lachiŵiri la Trump|yachiŵiri]] *Vya mlengalenga **[[Ndondomeko ya mlengalenga ya boma lakwamba la Trump|yakwamba]] **[[Ndondomeko ya mlengalenga ya boma lachiŵiri la Trump|yachiŵiri]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Kusora ŵanthu ŵa ndale mu boma la Trump (kulekaniska)|Kusora ŵanthu pa maudindo]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Appointments|y|}}}} *[[Nduna yakwamba ya Donald Trump|Nduna yakwamba]] *[[Nduna yachiŵiri ya Donald Trump|Nduna yachiŵiri]] *[[Mndandanda wa ŵaambasada ŵakusankhika na Donald Trump (kulekaniska)|Ŵaambasada]] *[[Mndandanda wa ŵeruzgi ŵa boma la federal ŵakusankhika na Donald Trump|Ŵeruzgi ŵa federal]] **[[Kusankhika kwa Neil Gorsuch ku Khoti Likuru Chomene|Gorsuch]] **[[Kusankhika kwa Brett Kavanaugh ku Khoti Likuru Chomene|Kavanaugh]] **[[Kusankhika kwa Amy Coney Barrett ku Khoti Likuru Chomene|Barrett]] **[[Ŵakusankhika ku Khoti Likuru Chomene ŵa Donald Trump|Ŵakusankhika ku Khoti Likuru Chomene]] *[[Kusankhika kwa maofesala ŵa Executive Office na Donald Trump (kulekaniska)|Maofesala ŵa Executive]] *[[Mndandanda wa ma Attorney ŵa United States ŵakusankhika na Donald Trump|Ma Attorney ŵa U.S.]] {{hidden end}} -------------- {{hidden begin|contentstyle=text-align:center;|title=[[Ntchito ya ndale ya Donald Trump|Makampeni gha chisankho cha ulongozgi]]|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Campaigns|y|}}}} *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2000|2000]] **[[Ma primaries gha chisankho cha ulongozgi gha Reform Party gha 2000|ma primaries]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2016|2016]] **[[Chisankho cha ulongozgi cha United States cha 2016|chisankho]] **[[Ma primaries gha Republican Party gha 2016|ma primaries]] **[[Mndandanda wa ŵakumovwira Donald Trump pa kampeni ya 2016|ŵakumovwira]] **[[Mndandanda wa ma rally gha kampeni ya Donald Trump ya 2016|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2016|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2016|ma debate]] **[[Never Trump movement]] ***[[Mndandanda wa ma Republican awo ŵakasuska kampeni ya Donald Trump ya 2016|ŵanthu]] **[[Tepi ya Donald Trump Access Hollywood|''Access Hollywood'' tape]] **[[Ivyo vikayowoyeka pa kupulika mafoni pa Trump Tower|kupulika mafoni]] **[[Spygate (chisambizgo cha chiwembu)|Spygate]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2020|2020]] **[[Chisankho cha ulongozgi cha United States cha 2020|chisankho]] **[[Ma primaries gha Republican Party gha 2020|ma primaries]] **ŵakumovwira ***[[Mndandanda wa ŵandale awo ŵakamovwira Donald Trump pa kampeni ya 2020|ŵandale]] ***[[Mndandanda wa ŵambura kuŵa ŵandale awo ŵakamovwira Donald Trump pa kampeni ya 2020|ŵambura kuŵa ŵandale]] **[[Mndandanda wa ma Republican awo ŵakasuska kampeni ya Donald Trump ya 2020|ŵakususka]] **[[Mndandanda wa ma rally gha Donald Trump (Disembala 2016–2022)#Kampeni ya chisankho cha ulongozgi ya 2020|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2020|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2020|ma debate]] **[[Ivyo ma Republican ŵakayowoya pa ivyo Donald Trump wakadandawuranga vya uchinyakazi pa chisankho cha 2020|ivyo ma GOP ŵakayowoya]] **[[Foni ya Trump–Raffensperger]] *[[Kampeni ya chisankho cha ulongozgi ya Donald Trump ya 2024|2024]] **[[Chisankho cha ulongozgi cha United States cha 2024|chisankho]] **[[Ma primaries gha Republican Party gha 2024|ma primaries]] **[[Mndandanda wa ŵakumovwira Donald Trump pa kampeni ya 2024|ŵakumovwira]] **[[Mndandanda wa ma Republican awo ŵakususka kampeni ya Donald Trump ya 2024|ŵakususka]] **[[Kwenelera kwa Donald Trump pa chisankho cha ulongozgi|kwenelera]] **[[Agenda 47]] **[[Mndandanda wa ma rally gha kampeni ya Donald Trump ya 2024|ma rally]] **[[Msonkhano Wapachaka wa Republican National wa 2024|msonkhano]] **[[Ma debate gha chisankho cha ulongozgi cha United States gha 2024|ma debate]] {{hidden end}} -------------- {{hidden begin|contentstyle=text-align:center;|title=Kumupa mulandu wa kufumiska pa udindo|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Impeachments|y|}}}} *[[Kuyezgayezga kumupa Donald Trump mulandu wa kumufumiska pa udindo|Kuyezgayezga]] **[[Mndandanda wa ma resolution gha impeachment agho ghakapelekeka pa Donald Trump|ma resolution]] *[[Impeachment yakwamba ya Donald Trump|Yakwamba]] **[[Skandalo la Trump–Ukraine]] **[[Kufufuza kwa House pa impeachment ya Donald Trump|Kufufuza kwa House]] **[[Mulandu wakwamba wa impeachment wa Donald Trump mu Senate|Mulandu mu Senate]] *[[Impeachment yachiŵiri ya Donald Trump|Yachiŵiri]] **[[Kuukira kwa United States Capitol pa Janyuwale 6|Kuukira Capitol]] **[[Mulandu wachiŵiri wa impeachment wa Donald Trump mu Senate|Mulandu mu Senate]] *[[Malingaliro gha kufumiska ma impeachment gha Donald Trump pa mbiri|Kufumiska pa mbiri]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=Milandu|expanded=<noinclude>y</noinclude>{{#ifeq:{{{expanded|}}}|Civil and Criminal Prosecutions|y|}}}} *[[Mulandu wa boma la federal pa Donald Trump (mulandu wa kutondeska chisankho)|Mulandu wa federal pa chisankho cha 2020]] *[[Mulandu wa boma la federal pa Donald Trump (mulandu wa vyakulembeka vyachisisi)|Mulandu wa federal pa vyakulembeka vyachisisi]] **[[Kufufuza kwa Smith Special Counsel|kufufuza kwa special counsel]] **[[Kufufuza kwa FBI pa umo Donald Trump wakasungira vyakulembeka vya boma|Plasmic Echo]] **[[Kusanda kwa FBI ku Mar-a-Lago]] **''[[Trump v. United States (2022)|Trump v. United States]]'' *[[Mulandu wa Donald Trump ku New York|Mulandu wa New York]] **[[Skandalo la Stormy Daniels–Donald Trump|Skandalo la Stormy Daniels]] **[[Karen McDougal#Ubwezi na Donald Trump|Ubwezi wa Karen McDougal]] **[[Kufufuza kwa Trump Organization ku New York|uchigeŵenga wa ndalama]] *[[Mulandu wa Georgia wa racketeering pa chisankho|Mulandu wa Georgia]] **[[Kufufuza kwa chisankho cha Georgia cha 2020|Kufufuza kwa Georgia]] **[[Chithuzi cha Donald Trump pa polisi|chithuzi cha polisi]] {{hidden end}} ---- {{hidden begin|contentstyle=text-align:center;|title=[[Kuyowoyeskana kwa boma la Trump pa nyengo ya mliri wa COVID-19|Mliri wa COVID-19]]|expanded=y{{#ifeq:{{{expanded|}}}|COVID-19|y|}}}} *[[White House Coronavirus Task Force|Gulu la ntchito]] *[[Mazgoro gha boma la federal la U.S. pa mliri wa COVID-19|Mazgoro gha boma]] **[[Ndalama zakovwira chuma (ukaboni)|malango gha kovwira chuma]] ***[[CARES Act]] ***[[Consolidated Appropriations Act, 2021]] **[[Operation Warp Speed]] *[[Kubuka kwa COVID-19 ku White House|Kubuka ku White House]] *[[Kunjilirapo kwa boma la Trump pa mabungwe gha sayansi|Kunjilirapo pa mabungwe gha sayansi]] {{hidden end}} {{#ifeq:{{PAGENAME}}|Donald Trump|| }} {{Documentation|Template:Donald Trump/doc}} [[Category:Matemplate gha sidebar gha Mulongozgi wa United States]] [[Category:Matemplate ghakukhwaskana na Donald Trump]] qjyh5a97t4w36djwu1sm6a3s8kt46i1 Template:Donald Trump/doc 10 47762 116728 2026-03-01T04:06:52Z en>Deacon Vorbis 0 update default state 116728 wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> ==Trump-related navigation templates== Articles about [[Donald Trump]] are organized into several themes. Because of the large number of articles involved, full navigation is split among several navboxes: * {{tl|Donald Trump}} as a generic presidential biography template * {{tl|Trump businesses}} focusing on Trump's business career in real estate and miscellaneous ventures * {{tl|Trump family}} about family members, relations and ancestry * {{tl|Trump media}} grouping Trump's media productions, media appearances and third-party works about Trump * {{tl|First presidency of Donald Trump}} focusing on the election campaign, transition and presidency * {{tl|Second presidency of Donald Trump}} focusing on the election campaign, transition and presidency * {{tl|Trump executive actions}} lists the Trump administration's executive actions, including executive orders and presidential memoranda Duplication of contents across each of those should be avoided. There is also a navigation sidebar, {{tl|Donald Trump series}}, which should only include a selection of the most relevant articles. {{collapsible option|default=collapsed}} For the navigation sidebar {{tl|Donald Trump series}}, the {{para|state}} parameter has no effect; however, the {{para|expanded}} parameter can have the following values to expand their respective sections on specific pages: * Life and business * Views and ideology * 45th and 47th president of the United States * Tenure * Policies * Appointments * Campaigns * Impeachments * Civil and Criminal Prosecutions * COVID-19 Use of the {{para|expanded}} parameter on this template causes the '''Business and personal''' section to collapse automatically. Any other value for the {{para|expanded}} parameter will cause all sections to collapse.<includeonly> {{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> {{DEFAULTSORT:Trump, Donald}} <!-- Categories for specific templates using this common documentation page should be placed at the bottom of each relevant template --> }}</includeonly> aghhel7ogh8j20vqg925oihl6orr5un 116729 116728 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Donald_Trump/doc]] 116728 wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> ==Trump-related navigation templates== Articles about [[Donald Trump]] are organized into several themes. Because of the large number of articles involved, full navigation is split among several navboxes: * {{tl|Donald Trump}} as a generic presidential biography template * {{tl|Trump businesses}} focusing on Trump's business career in real estate and miscellaneous ventures * {{tl|Trump family}} about family members, relations and ancestry * {{tl|Trump media}} grouping Trump's media productions, media appearances and third-party works about Trump * {{tl|First presidency of Donald Trump}} focusing on the election campaign, transition and presidency * {{tl|Second presidency of Donald Trump}} focusing on the election campaign, transition and presidency * {{tl|Trump executive actions}} lists the Trump administration's executive actions, including executive orders and presidential memoranda Duplication of contents across each of those should be avoided. There is also a navigation sidebar, {{tl|Donald Trump series}}, which should only include a selection of the most relevant articles. {{collapsible option|default=collapsed}} For the navigation sidebar {{tl|Donald Trump series}}, the {{para|state}} parameter has no effect; however, the {{para|expanded}} parameter can have the following values to expand their respective sections on specific pages: * Life and business * Views and ideology * 45th and 47th president of the United States * Tenure * Policies * Appointments * Campaigns * Impeachments * Civil and Criminal Prosecutions * COVID-19 Use of the {{para|expanded}} parameter on this template causes the '''Business and personal''' section to collapse automatically. Any other value for the {{para|expanded}} parameter will cause all sections to collapse.<includeonly> {{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> {{DEFAULTSORT:Trump, Donald}} <!-- Categories for specific templates using this common documentation page should be placed at the bottom of each relevant template --> }}</includeonly> aghhel7ogh8j20vqg925oihl6orr5un Template:Color/styles.css 10 47763 116734 2024-08-08T18:04:34Z en>Jon (WMF) 0 Fixes [[phab:T369874]]. Please see talk page and do not revert without discussion (and good reason). See also [[meta:User:Jon_(WMF)/Edit_for_dark_mode_support]] 116734 sanitized-css text/css /* {{pp-template}} */ /* [[phab:T360683]]: This stylesheet removes the function of this template in * dark mode */ @media screen { html.skin-theme-clientpref-night div:not(.notheme) > .tmp-color, html.skin-theme-clientpref-night p > .tmp-color, html.skin-theme-clientpref-night table:not(.notheme) .tmp-color { color: inherit !important; } } @media screen and ( prefers-color-scheme: dark) { /* automatic mode */ html.skin-theme-clientpref-os div:not(.notheme) > .tmp-color, html.skin-theme-clientpref-os p > .tmp-color, html.skin-theme-clientpref-os table:not(.notheme) .tmp-color { color: inherit !important; } } dl8bwbkew3oeno6jka06uesbas1lvul 116735 116734 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Color/styles.css]] 116734 sanitized-css text/css /* {{pp-template}} */ /* [[phab:T360683]]: This stylesheet removes the function of this template in * dark mode */ @media screen { html.skin-theme-clientpref-night div:not(.notheme) > .tmp-color, html.skin-theme-clientpref-night p > .tmp-color, html.skin-theme-clientpref-night table:not(.notheme) .tmp-color { color: inherit !important; } } @media screen and ( prefers-color-scheme: dark) { /* automatic mode */ html.skin-theme-clientpref-os div:not(.notheme) > .tmp-color, html.skin-theme-clientpref-os p > .tmp-color, html.skin-theme-clientpref-os table:not(.notheme) .tmp-color { color: inherit !important; } } dl8bwbkew3oeno6jka06uesbas1lvul Template:Param value/styles.css 10 47764 116736 2025-12-11T19:07:18Z en>Pppery 0 /* {{pp-template}} */ 116736 sanitized-css text/css /* {{pp-template}} */ .tpl-pval__code { border: thin solid var(--border-color-base, #a2a9b1); background-color: var(--color-inverted, #fff); color: inherit; white-space: nowrap; } fqg9qh88nnemm62ynyo3np3cozsa2f2 116737 116736 2026-07-15T17:38:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Param_value/styles.css]] 116736 sanitized-css text/css /* {{pp-template}} */ .tpl-pval__code { border: thin solid var(--border-color-base, #a2a9b1); background-color: var(--color-inverted, #fff); color: inherit; white-space: nowrap; } fqg9qh88nnemm62ynyo3np3cozsa2f2 Pulezidenti wa United States 0 47765 116738 2026-07-15T18:13:02Z Tumbuka Arch 6863 Created page with "{{Short description|Mulara wa charu na boma la United States}} {{Hatnote group| {{For-multi|list ya mapulezidenti ŵa United States|List of presidents of the United States}} {{Other uses}} }} {{Pp-move}} {{Pp-extended|small=yes}} {{Use American English|date=March 2021}} {{Use mdy dates|date=September 2022}} {{Infobox official post | post = Mulara | body = wa United States | insignia = Seal Of The President Of The United States Of America.svg | insigniasize = 145 | insign..." 116738 wikitext text/x-wiki {{Short description|Mulara wa charu na boma la United States}} {{Hatnote group| {{For-multi|list ya mapulezidenti ŵa United States|List of presidents of the United States}} {{Other uses}} }} {{Pp-move}} {{Pp-extended|small=yes}} {{Use American English|date=March 2021}} {{Use mdy dates|date=September 2022}} {{Infobox official post | post = Mulara | body = wa United States | insignia = Seal Of The President Of The United States Of America.svg | insigniasize = 145 | insigniacaption = [[Seal of the president of the United States|Chidindo cha pulezidenti]] | flag = Flag of the President of the United States of America.svg | flagsize = 145 | flagborder = yes | flagcaption = [[Flag of the president of the United States|Mbendera ya pulezidenti]] | image = Official Presidential Portrait of President Donald J. Trump (2025) (cropped)(2).jpg | incumbent = [[Donald Trump]] | incumbentsince = January 20, 2025 | department = {{plainlist| * [[Executive branch of the U.S. government]] * [[Executive Office of the President]] }} | style = {{plainlist| * [[President (government title)|Mulara wa boma]]<ref>{{Cite news |url=https://www.nytimes.com/1891/08/02/archives/how-to-address-the-president-he-is-not-your-excellency-or-your.html |agency=The Washington Star |title=How to Address the President; He Is Not Your Excellency or Your Honor, But Mr. President |date=August 2, 1891 |newspaper=The New York Times |url-access=subscription }}</ref><ref>{{Cite web |url=http://www.usgs.gov/usgs-manual/handbook/hb/431-2-h/chap4.html |title=USGS Correspondence Handbook—Chapter 4 |date=July 18, 2007 |publisher=United States Geological Survey |url-status=dead |archive-url=https://web.archive.org/web/20120926000950/http://www.usgs.gov/usgs-manual/handbook/hb/431-2-h/chap4.html |archive-date=September 26, 2012 |access-date=November 15, 2012}}</ref> (mwakawiro) * [[The Honourable#United States|Mweneko]]<ref>{{Cite web |url=http://www.ita.doc.gov/ita_sec/Address%20and%20Salutation.htm |title=Models of Address and Salutation |publisher=[[International Trade Administration]] |url-status=dead |archive-url=https://web.archive.org/web/20100720073107/http://www.ita.doc.gov/ita_sec/Address%20and%20Salutation.htm |archive-date=July 20, 2010 |access-date=September 4, 2010 }}</ref> (mwakuzirwika) * [[Excellency|Mwenekeso]]<ref>[https://web.archive.org/web/20120927014351/http://www.un.int/protocol/documents/Hspmfm.pdf "Heads of State, Heads of Government, Ministers for Foreign Affairs"], Protocol and Liaison Service, [[United Nations]]. Retrieved November 1, 2012.</ref><ref>{{Cite web |url=https://obamawhitehouse.archives.gov/the-press-office/2010/09/01/remarks-president-obama-president-mubarak-his-majesty-king-abdullah-prim |title=Remarks by President Obama, President Mubarak, His Majesty King Abdullah, Prime Minister Netanyahu and President Abbas Before Working Dinner |last=The White House Office of the Press Secretary |date=September 1, 2010 |publisher=[[National Archives and Records Administration]] |via=White House |access-date=July 19, 2011}}</ref> (pa vyakukhwaskana na vyalo) }} | type = {{plainlist| * [[Head of state]] * [[Head of government]] * [[Commander-in-chief]] }} | abbreviation = POTUS | member_of = {{plainlist| * [[Cabinet of the United States|Cabinet]] * [[United States Domestic Policy Council|Domestic Policy Council]] * [[National Economic Council (United States)|National Economic Council]] * [[United States National Security Council|National Security Council]] }} | residence = [[White House]] | seat = [[Washington, D.C.]] | appointer = [[United States Electoral College|Electoral College]] panji kwizira mu kulondeka | termlength = Vyaka vinayi | termlength_qualified = ([[Twenty-second Amendment to the United States Constitution|wakusazgikaso kamoza pera]]) | constituting_instrument = [[Constitution of the United States]] (1789) | succession = [[United States presidential line of succession|Mndandanda wa ŵakusazgapo]] | formation = {{start date and age|1789|3|4|p=1|br=1}}<ref name="formation">"The conventions of nine states having adopted the Constitution, Congress, in September or October, 1788, passed a resolution in conformity with the opinions expressed by the Convention and appointed the first Wednesday in March of the ensuing year as the day, and the then seat of Congress as the place, 'for commencing proceedings under the Constitution.' <p>"Both governments could not be understood to exist at the same time. The new government did not commence until the old government expired. It is apparent that the government did not commence on the Constitution's being ratified by the ninth state, for these ratifications were to be reported to Congress, whose continuing existence was recognized by the Convention, and who were requested to continue to exercise their powers for the purpose of bringing the new government into operation. In fact, Congress did continue to act as a government until it dissolved on the first of November by the successive disappearance of its members. It existed potentially until March 2, the day preceding that on which the members of the new Congress were directed to assemble." {{ussc|name=Owings v. Speed|link=supreme.justia.com|volume=18|page=420|pin=422|year=1820|reporter=Wheat|reporter-volume=5}}</p></ref><ref>{{Cite book |last=Maier |first=Pauline |title=Ratification: The People Debate the Constitution, 1787–1788 |date=2010 |publisher=Simon & Schuster |isbn=978-0-684-86854-7 |location=New York, New York |page=433 |author-link=Pauline Maier}}</ref><ref>{{Cite web |url=https://constitutioncenter.org/blog/march-4-a-forgotten-huge-day-in-american-politics/ |title=March 4: A forgotten huge day in American history |date=March 4, 2013 |publisher=[[National Constitution Center]] |access-date=July 29, 2018 |archive-date=February 24, 2018 |archive-url=https://web.archive.org/web/20180224184927/https://constitutioncenter.org/blog/march-4-a-forgotten-huge-day-in-american-politics |url-status=dead }}</ref> | first = [[George Washington]]<ref>{{Cite web |url=https://www.mountvernon.org/library/digitalhistory/digital-encyclopedia/article/presidential-election-of-1789/ |title=Presidential Election of 1789 |publisher=Mount Vernon Ladies' Association |access-date=July 29, 2018}}</ref> | salary = $400,000 pa chaka{{efn|In addition to $100,000 in travel reimbursement, $19,000 for entertainment and $50,000 for additional expenses.<ref name="cnbc">{{Cite news |last=Elkins |first=Kathleen |date=February 19, 2018 |title=Here's the last time the president of the United States got a raise |url=https://www.cnbc.com/2018/02/16/how-much-the-president-on-the-united-states-gets-paid.html |access-date=October 22, 2025 |agency=[[CNBC]]}}</ref>}} | website = {{URL|https://www.whitehouse.gov/|whitehouse.gov}} }} {{Politics of the United States}} {{United States constitutional law}} The '''pulezidenti<!--"pulezidenti" is uncapitalized as per [[MOS:JOBTITLES]]. Specifically, it is uncapitalized because it is preceded by the modifier "the" (see [[MOS:JOBTITLES]] bullet 3 and table column 2 example 1)--> wa United States''' ('''POTUS'''){{efn|Lizgu lakuti POTUS likambira mu [[Phillips Code]], nthowa yakulemba mwakudumura iyo yikapangika mu 1879 na [[Walter P. Phillips]] kuti yithandizge kutumiza mwaluŵiro malipoti gha manyuzipepala kwizira pa telegraph.<ref>{{Cite book |last=Safire |first=William |url=https://books.google.com/books?id=q6ARDAAAQBAJ&pg=PA564 |title=Safire's Political Dictionary |date=2008 |publisher=Oxford University Press |isbn=978-0-19-534061-7 |page=564}}</ref>}} ni [[head of state|mulongozgi wa charu]] na [[head of government|mulongozgi wa boma]] wa [[United States]]. Pulezidenti wakulongozga [[Federal government of the United States#Executive branch|nthambi yakulongozga]] ya [[Federal government of the United States|boma la federo]] ndipo ni [[Powers of the president of the United States#Commander-in-chief|mulara mukuru]] wa [[United States Armed Forces]]. Nkhongono za upulezidenti zikasazgikira<ref>{{Cite journal|last=Ford|first=Henry Jones|date=1908|title=The Influence of State Politics in Expanding Federal Power|journal=Proceedings of the American Political Science Association|volume=5|pages=53–63|doi=10.2307/3038511|jstor=3038511| issn=1520-8605}}</ref> kufuma apo pulezidenti wakwamba, [[George Washington]], wakambira uteŵeti mu 1789.<ref name=formation /> Nangauli nkhongono za pulezidenti zikakwera na kuchepa nyengo na nyengo, upulezidenti wakhala na ntchito yikuru mu ndyali za America kufuma kwamba kwa vyaka vya m'ma 20, ndipo vikulutilira mu vyaka vya m'ma 21 na kuŵa na kusazgikira kwa nkhongono mu maulamuliro gha [[Franklin D. Roosevelt]] na [[George W. Bush]].<ref>{{Cite magazine |date=September 11, 2021 |title=How 9/11 Radically Expanded The Power of the U.S. Government |url=https://time.com/6096903/september-11-legal-history/ |access-date=September 29, 2023 |magazine=Time}}</ref><ref>{{Cite web |last=Peterson |first=Erin |title=Presidential Power Surges |url=https://hls.harvard.edu/today/presidential-power-surges/ |access-date=September 29, 2023 |publisher=Harvard Law School}}</ref> Mu vyaka vya m'ma 21, pulezidenti ni yumoza wa ŵanthu ŵankhongono chomene mu ndyali pa charu chose ndipo ni mulongozgi wa [[superpower|charu chankhongono]].<ref>{{Cite magazine|url=https://time.com/4657665/steve-bannon-donald-trump/|title=Is Steve Bannon the Second Most Powerful Man in the World?|last=Von Drehle|first=David|date=February 2, 2017|magazine=[[Time (magazine)|Time]]}}</ref><ref>{{Cite news|url=https://www.theguardian.com/commentisfree/2008/jan/03/uselections2008.world|title=Who should be the world's most powerful person?|date=January 3, 2008|newspaper=The Guardian}}</ref><ref>{{Cite web|url=https://www.newsweek.com/meacham-history-power-83117|title=Meacham: The History of Power|last=Meacham|first=Jon|date=December 20, 2008|magazine=[[Newsweek]]|access-date=September 4, 2010}}</ref> Pakuŵa mulongozgi wa charu icho chili na [[List of countries by GDP (nominal)|chuma chikuru chomene pa GDP yakuyana waka]], pulezidenti wali na nkhongono zikuru za mu charu na zakuwaro, zakuchema kuti [[Hard power|nkhongono zakukhora]] na [[soft power|nkhongono zakuzika]]. Kwa nyengo yitali mu vyaka vya m'ma 20, chomenechomene mu nyengo ya [[Cold War]], pulezidenti wa United States kanandi wakachemekanga kuti "mulongozgi wa charu chaufulu".<ref name="freeworld">{{cite web |last1=Tierney |first1=Dominic |title=What Does It Mean That Trump Is 'Leader of the Free World'? |url=https://www.theatlantic.com/international/archive/2017/01/trump-free-world-leader/514232/ |magazine=The Atlantic |date=January 24, 2017}}</ref> [[Article Two of the United States Constitution|Ndime Yachiŵiri ya Dango la United States]] yikakhazikiska nthambi yakulongozga ya boma la federo ndipo yikapeleka nkhongono zakulongozga kwa pulezidenti. Nkhongono izi zikusazgapo kusazga na kukhazikiska malango gha federo na udindo wa kusankha ŵalara ŵa boma, ŵa vyakuyana na vyalo, ŵa maofesi gha malango, na ŵa makhoti. Kwizira mu ndondomeko za dango izo zikapeleka kwa pulezidenti nkhongono zakusankha na kupokelera ŵa kazembe na kupanga mapangano na vyaru vinyake, kweniso malango agho ghakazomerezgeka na Congress, upulezidenti wa mazuŵa ghano uli na udindo ukuru pa ndyali zakuwaro za United States. Udindo uwu ukusazgapo kulongozga gulu lankhondo lakudura chomene pa charu chose, ilo lili na [[List of states with nuclear weapons|vyankhondo vya nyukiliya vinandi chomene pa charu chachiŵiri]]. Pulezidenti wakuchitapo kanthu kukuru pa malango gha federo na ndondomeko za mu charu. Mu ndondomeko ya [[Separation of powers under the United States Constitution|kupatukana kwa nkhongono]], [[Article One of the United States Constitution#Section 7: Bills|Ndime Yakwamba, Gawo 7]] la Dango likumupa pulezidenti nkhongono zakusaina panji [[Veto power in the United States|kukana]] malango gha federo. Pakuti mapulezidenti ŵa mazuŵa ghano ŵakuwoneka nga mbalongozgi ŵa vyipani vyawo vya ndyali, kupanga ndondomeko zikuru kukwenera chomene na ivyo vikuchitika pa visola vya pulezidenti, ndipo mapulezidenti ŵakuchitapo kanthu kulimbikiska ivyo ŵakukhumba mu ŵabali ŵa Congress awo kanandi ŵakuthemba pa pulezidenti pa nkhani za visola.<ref>{{Cite journal |last=Pfiffner |first=J. P. |year=1988 |title=The President's Legislative Agenda |journal=Annals of the American Academy of Political and Social Science |volume=499 |pages=22–35 |doi=10.1177/0002716288499001002 |url=https://journals.sagepub.com/doi/10.1177/0002716288499001002 |s2cid=143985489 |url-access=subscription }}</ref> Mu nyengo yasono, mapulezidenti ŵasazgirapo kugwiliskira ntchito [[executive order]]s, malango gha maofesi, na kusankha ŵeruzgi kuti ŵakhwaskenge ndondomeko za mu charu. Pulezidenti wakusankhika kwizira mu [[United States Electoral College|Electoral College]] kuŵa na nyengo ya vyaka vinayi, pamoza na [[Vice President of the United States|vice president]]. Kwizira mu [[Twenty-second Amendment to the United States Constitution|Kusintha kwa Dango kwa Makumi Aŵiri na Viŵiri]], uko kukazomerezgeka mu 1951, munthu uyo wasankhika kuŵa pulezidenti maulendo ghaŵiri wangasankhikaso yayi kuŵa pulezidenti ulendo wachitatu. Kweniso, ma vice president 9 ŵakazgoka mapulezidenti chifukwa cha [[List of presidents of the United States who died in office|nyifwa ya pulezidenti mu nyengo ya uteŵeti]] panji [[Richard Nixon's resignation speech|kuleka ntchito]].{{efn|Ma vice president 9 awo ŵakatora udindo wa upulezidenti pamanyuma pa nyifwa panji kuleka ntchito kwa pulezidenti wakale ndipo ŵakamalizga nyengo yake ni: [[John Tyler]] (1841); [[Millard Fillmore]] (1850); [[Andrew Johnson]] (1865); [[Chester A. Arthur]] (1881); [[Theodore Roosevelt]] (1901); [[Calvin Coolidge]] (1923); [[Harry S. Truman]] (1945); [[Lyndon B. Johnson]] (1963); na [[Gerald Ford]] (1974).}} Pakuŵa na wose, [[List of presidents of the United States|ŵanthu 45]] ŵateŵetera, panji ŵakuteŵetera sono, mu ma pulezidenti 47 kufika pa nyengo ya sono ya 60 ya vyaka vinayi.{{efn|[[Grover Cleveland]] wakateŵetera nyengo ziŵiri zambura kulondezgana, ndipo [[Donald Trump]] sono wakuteŵetera nyengo yake yachiŵiri yambura kulondezgana, ntheura waliyose wakupendeka kaŵiri.<ref>{{Cite web |url=https://trumpwhitehouse.archives.gov/about-the-white-house/presidents/grover-cleveland-24/ |title=Grover Cleveland—24 |publisher=White House}}</ref>}} [[Donald Trump]] ndiyo ni pulezidenti wa 47 ndipo wakuteŵetera sono kufuma pa January 20, 2025.<ref>{{Cite news |last1=Miller |first1=Zeke |last2=Price |first2=Michelle L. |last3=Weissert |first3=Will |last4=Colvin |first4=Jill |date=November 5, 2024 |title=Trump wins the White House in political comeback rooted in appeals to frustrated voters |url=https://apnews.com/article/election-day-trump-harris-white-house-83c8e246ab97f5b97be45cdc156af4e2 |access-date=November 6, 2024 |publisher=[[Associated Press]] }}</ref> == Mbiri na chitukuko == === Kwamba === Mu Julayi 1776, [[Thirteen Colonies|Makoloni Khumi na Ghatatu]], agho ghakimirika pa [[Second Continental Congress|Kongiresi Yachiŵiri ya Kontinenti]] mu [[Philadelphia]], ghakazomera mwakukolerana [[United States Declaration of Independence|Chilango cha Wanangwa cha United States]] umo makoloni ghakajilengeka kuti ni [[sovereign state|vyaru vyakujiyimira vyekha]] ndipo kuti ghakaŵaso pasi pa muwuso wa [[Kingdom of Great Britain|Ufumu wa Britain]] yayi.<ref name="Milkis">{{Cite book |last1=Milkis |first1=Sidney M. |url=https://books.google.com/books?id=KkUvAAAAYAAJ |title=The American Presidency: Origins and Development |last2=Nelson |first2=Michael |publisher=CQ Press |year=2008 |isbn=978-0-87289-336-8 |edition=5th |location=Washington, D.C. |pages=1–25}}</ref> Kuzomera uku kukalembeka mu [[United States Declaration of Independence|Chilango cha Wanangwa]], icho chikalembeka chomene na [[Thomas Jefferson]] ndipo chikazomerezgeka mwakukolerana pa Julayi 4, 1776, na [[Second Continental Congress|Kongiresi Yachiŵiri ya Kontinenti]]. Pakumanya kuti ŵakakhumbikwiranga kukolerana chomene pa nkhondo yawo yakulimbana na [[Kingdom of Great Britain|Ufumu wa Britain]],<ref name="Kelly">{{Cite book |last1=Kelly |first1=Alfred H. |title=The American Constitution: Its Origins and Development |last2=Harbison |first2=Winfred A. |last3=Belz |first3=Herman |publisher=W.W. Norton & Co. |year=1991 |isbn=978-0-393-96056-3 |edition=7th |volume=I |location=New York |pages=76–81}}</ref> Kongiresi ya Kontinenti pa nyengo yimoza yikamba kulemba dango ilo likakoleranenge [[U.S. state|vyaru]] pamoza. Pakachitika kudumbiskana kwa nyengo yitali pa nkhani zinandi, kusazgapo kuyimirika na kuvota, kweniso nkhongono izo boma likuru likeneranga kuŵa nazo.<ref>{{Cite web |url=http://history.state.gov/milestones/1776-1783/Articles |archive-url=https://web.archive.org/web/20090204233742/http://history.state.gov/milestones/1776-1783/Articles |url-status=dead |archive-date=February 4, 2009 |title=Articles of Confederation, 1777–1781 |publisher=Office of the Historian, Bureau of Public Affairs, United States Department of State |location=Washington, D.C. |access-date=January 20, 2019 }}</ref> Kongiresi wakamalizga kulemba [[Articles of Confederation|Mazuŵa gha Kukolerana]] kuti wakhazikiske [[Perpetual Union|umoza wa nyengo zose]] pakati pa vyaru mu Novembala 1777 ndipo wakatumizga kwa vyaru kuti vikazomerezge.<ref name=Milkis /> Pasi pa [[Articles of Confederation|Mazuŵa gha Kukolerana]], agho ghakaŵa na nkhongono kufuma pa Malichi 1, 1781, [[Congress of the Confederation|Kongiresi ya Kukolerana]] yikaŵa ulamuliro wa ndyali wa pakati kweni ukaŵavya nkhongono zakupanga malango. Ukakwananga kupanga fundo, vyeruzgo, na malango ghake, kweni ukatenge ungapanga malango yayi, kweniso ukatenge ungatozga misonkho yayi panji kukhazikiska malango gha malonda gha mu vyaru pa ŵanthu ŵake.<ref name=Kelly /> Ndondomeko iyi yikalongora umo ŵa America ŵakaghanaghaniranga kuti ndondomeko ya Britain ya [[The Crown|Korona]] na [[Parliament of Great Britain|Nyumba ya Malango]] yikwenera kuti yikagwiranga ntchito pakuyowoya za [[dominion|muwuso wa ufumu]]: wupu wakulongozga pa vinthu ivyo vikakhwaskanga ufumu wose.<ref name=Kelly /> Vyaru vikaŵa kuti vyafwatuka ku muwuso wa ufumu uliwose ndipo vikapeleka vinyake mwa [[royal prerogative|maufulu gha ufumu]] agho ghakaŵapo kale (mwachiyelezgero, kupanga nkhondo, kupokelera ŵakazembe, na vinyake) kwa Kongiresi; maufulu ghanyake ghakakhala mu maboma gha vyaru vyawo. Ŵabali ŵa Kongiresi ŵakasankha [[President of the Continental Congress|Pulezidenti wa United States mu Kongiresi Yakuwungana]] kuti walongozge madiskusoni ghawo nga ni munthu wambura kutemwera pa nkhani za [[discussion moderator|kulongozga kudumbiskana]]. Uwu ukaŵa udindo wakupambana chomene na wa pulezidenti wa United States uyo wakiza pamanyuma, chifukwa ukaŵa udindo wa mwambo pera kwambura nkhongono zakulongozga, kupatulapo kulongozga wupu wa nyumba ya malango.<ref>{{Cite book |last=Ellis |first=Richard J. |url=https://books.google.com/books?id=ybmeEcpEvlsC |title=Founding the American Presidency |publisher=Rowman & Littlefield |year=1999 |isbn=0-8476-9499-2 |location=Lanham, Maryland |page=1}}</ref> Mu 1783, [[Phangano la Paris (1783)|Phangano la Paris]] likakhazikiska wanangwa wa makoloni ghose ghakale. Pakuti mtende ukaŵapo, vyaru vikalazga kuyang'anira vinthu vyawo vya mukati.<ref name=Milkis /> Kufika mu 1786, ŵa America ŵakawona kuti mphaka zawo za ku kontinenti zikaŵa zakufoka ndipo zikuvutika, ndipo vyaru vyawo vikakumana na masuzgo gha chuma apo vyaru vya pafupi vikambanga kulimbana pa malonda. Ŵakawona [[hard currency|ndalama zakukhora]] zawo zikwenda ku misika ya ku vyaru vinyake kulipira vinthu vyakunjira mu charu, malonda ghawo mu [[Mediterranean Sea|Nyanja ya Mediterranean]] ghakakhwaskika na ŵa [[North Africa]] awo ŵakaba mu nyanja, ndipo ngongoli za nkhondo ya wanangwa izo zikapokera ndalama zakuwaro zikaleka kulipirika ndipo zikamba kusazgikira na chiwongolero.<ref name=Milkis /> Vyakusuzga vya wanthu na ndyali vikamba kuwoneka. Vinthu nga ni [[Newburgh Conspiracy|Chiŵembu cha Newburgh]] na [[Shays' Rebellion|Muvundiko wa Shays]] vikulongora kuti [[Articles of Confederation|Mazuŵa gha Kukolerana]] zikatondeka kugwira ntchito, chomenechomene kuti pakaŵa pakukhumbikwa boma lankhongono la charu chose ilo likaŵenge na mulongozgi wa boma wakupika nkhongono. Pamanyuma pa kumazga mwakukolerana masuzgo gha malonda na somba pakati pa [[Virginia]] na Maryland pa [[Mount Vernon Conference|Ungano wa Mount Vernon]] mu 1785, Virginia wakachema kuti paŵe ungano wa malonda pakati pa vyaru vyose, uwo ukakhazikiskika mu Seputembala 1786 ku [[Annapolis, Maryland]], na chilato cha kumazga masuzgo ghakuru gha malonda pakati pa vyaru. Kweni [[Annapolis Convention (1786)|Ungano ya Annapolis]] yikatondeka chifukwa cha ŵanthu ŵachoko awo ŵakiza chifukwa cha kukayikira kwa vyaru vinandi, ndipo [[Alexander Hamilton]] wa New York wakalongozga ŵimiliri ŵa Annapolis kuti ŵacheme ungano wakusintha Mazuŵa gha Kukolerana, uwo ukeneranga kuchitika chaka chakulondezgapo ku [[Philadelphia]]. Ivyo vingachitika pa ungano uwu vikawoneka kuti ni vichoko mpaka apo [[James Madison]] na [[Edmund Randolph]] ŵakafiska kusanga kuti [[George Washington]] wize ku Philadelphia nga ni muyimiliri wa Virginia.<ref name=Milkis /><ref name="Beeman">{{Cite book |last=Beeman |first=Richard |url=https://archive.org/details/plainhonestmenm00beem |title=Plain, Honest Men: The Making of the American Constitution |publisher=Random House |year=2009 |isbn=978-0-8129-7684-7 |location=New York |url-access=registration}}</ref> Apo [[Constitutional Convention (United States)|Ungano wa Dango la United States]] ukakumana mu Meyi 1787, ŵimiliri ŵa vyaru 12 awo ŵakiza ([[Rhode Island]] yikatuma yayi ŵimiliri) ŵakiza na ivyo ŵakasambira mu ndondomeko zakupambana za maboma gha vyaru vyawo pa nkhani ya nthambi zakupanga malango na zakulongozga. Vyaru vinandi vikaŵa na mulongozgi wakufoka wambura nkhongono zakukana malango panji kusankha ŵalara, wakasankhikanga chaka chilichose na nyumba ya malango ku nyengo yimoza pera, wakagawana nkhongono na wupu wa ulongozgi, ndipo wakasangana na nyumba ya malango yankhongono.<ref name=Milkis /> [[New York (state)|New York]] ndiyo yikaŵa yapadera chomene, chifukwa yikaŵa na kazembe wankhongono yumoza uyo wakaŵa na nkhongono zakukana malango na kusankha ŵalara, wakasankhikanga vyaka vitatu ndipo wangasankhikaso maulendo ghanandi.<ref name=Milkis /> Kwizira mu kudumbiskana kwakubisika ku Philadelphia ndiko udindo wa upulezidenti uwo uli mu [[Constitution of the United States|Dango la United States]] ukapangika. === 1789–1933 === [[File:Gilbert Stuart Williamstown Portrait of George Washington.jpg|thumb|[[George Washington]], pulezidenti wakwamba wa United States]] Nga ni pulezidenti wakwamba wa charu, [[George Washington]] wakakhazikiska maluso ghanandi agho ghakazakaŵa chilangilo cha udindo uwu.<ref>{{Cite news|url=https://millercenter.org/president/washington/life-in-brief|title=George Washington: Life in Brief|last=Steven|first=Knott|date=October 4, 2016|work=Miller Center|access-date=September 14, 2020|archive-url=https://web.archive.org/web/20180205001103/https://millercenter.org/president/washington/life-in-brief|archive-date=February 5, 2018|url-status=live|language=en-US}}</ref><ref>{{cite web |last1=Stockwell |first1=Mary |title=Presidential Precedents |url=https://www.mountvernon.org/library/digitalhistory/digital-encyclopedia/article/presidential-precedents/ |publisher=Mount Vernon, Washington Library, Center for Digital History |access-date=September 14, 2020}}</ref> Kusankha kwake kusiya ntchito pamanyuma pa nyengo ziŵiri kukawovwira kumazga wofi wakuti charu chingazakasanduka ufumu ndipo kukakhazikiska chiyerezgero icho chikaphyokeka yayi mpaka mu 1940 ndipo pamanyuma chikazakaŵa chakukhazikika kwizira mu [[Kusintha kwa Dango kwa Makumi Aŵiri na Viŵiri kwa Dango la United States|Kusintha kwa Dango kwa Makumi Aŵiri na Viŵiri]]. Kuumaliro wa upulezidenti wake, vipani vya ndyali vikaŵa kuti vyamba kuŵapo,<ref>{{cite news |last1=Feeling |first1=John |title=How the Rivalry Between Thomas Jefferson and Alexander Hamilton Changed History |url=https://time.com/4210440/jefferson-hamilton-excerpt/ |access-date=September 14, 2020 |publisher=Time |date=February 15, 2016}}</ref> ndipo [[John Adams]] wakathereska [[Thomas Jefferson]] mu 1796, visola vyakwamba vya pulezidenti ivyo vikapikisana chomene.<ref>{{cite news |last1=NCC staff |title=On This Day: The first bitter, contested presidential election takes place |url=https://constitutioncenter.org/blog/on-this-day-the-first-bitter-contested-presidential-election-takes-place |access-date=September 14, 2020 |publisher=National Constitution Center |date=November 4, 2019}}</ref> Pamanyuma pakuti Jefferson wathereska Adams mu 1800, iyo pamoza na [[James Madison]] na [[James Monroe]] ŵaliyose ŵakateŵetera nyengo ziŵiri, ndipo pamanyuma ŵakalamulira chomene ndyali za charu mu [[Nyengo ya Makhaliro Ghawemi]] mpaka mwana wa Adams [[John Quincy Adams]] wakathereska visola mu 1824 pamanyuma pa kupatulika kwa [[Chipani cha Democratic-Republican]]. Kusankhika kwa [[Andrew Jackson]] mu 1828 kukaŵa kakwamba munthu wakufuma kuwaro kwa ŵakulongozga ŵa Virginia na Massachusetts kusankhika kuŵa pulezidenti, vyaka 40 pamanyuma pakuti Washington wasankhika.<ref>{{cite news |last1=Walsh |first1=Kenneth |title=The Most Consequential Elections in History: Andrew Jackson and the Election of 1828 |url=https://www.usnews.com/news/articles/2008/08/20/the-most-consequential-elections-in-history-andrew-jackson-and-the-election-of-1828 |access-date=September 14, 2020 |publisher=U.S. News & World Report |date=August 20, 2008}}</ref> [[Demokilase ya Jackson|Demokilase ya Jackson]] yikakhumbanga kukhozga nkhongono za upulezidenti pa mtengo wa Congress, uku yikukuzga kutora nawo mbali kwa ŵanthu apo charu chikakuranga mwaluŵiro kumanjiliro gha dazi. Kweni uyo wakiza mu malo ghake, [[Martin Van Buren]], wakaleka kutemweka pamanyuma pa [[Chiwawa cha 1837]],<ref>{{cite news |last1=Bomboy |first1=Scott |title=Martin Van Buren's legacy: Expert politician, mediocre president |url=https://constitutioncenter.org/blog/martin-van-burens-legacy-was-more-than-just-muttonchops-2/ |access-date=September 14, 2020 |publisher=National Constitution Center |date=December 5, 2017}}</ref> ndipo nyifwa ya [[William Henry Harrison]] na ubwezi uheni pakati pa [[John Tyler]] na Congress vikapangiska kuti udindo uwu uŵe wakufoka chomene.<ref>{{cite web |last1=Freehling |first1=William |title=John Tyler: Impact and Legacy |url=https://millercenter.org/president/tyler/impact-and-legacy |website=University of Virginia, Miller Center |date=October 4, 2016 |access-date=September 14, 2020}}</ref> Pamoza na Van Buren, mu vyaka 24 pakati pa 1837 na 1861, ma nyengo 6 gha upulezidenti ghakazuzgika na ŵanalume 8 ŵakupambana, ndipo palije uyo wakateŵetera nyengo ziŵiri.<ref>{{cite news |last1=McNamara |first1=Robert |title=Seven Presidents Served in the 20 Years Before the Civil War |url=https://www.thoughtco.com/presidents-before-the-civil-war-1773447 |access-date=September 14, 2020 |publisher=ThoughtCo |date=July 3, 2019}}</ref> Senate yikaŵa na ntchito yikuru mu nyengo iyi, apo [[Wupu Ukulu Watatu]] wa [[Henry Clay]], [[Daniel Webster]], na [[John C. Calhoun]] ukaŵa na ntchito yikuru pakupanga ndondomeko za charu mu ma 1830 na ma 1840, mpaka apo kudumbiskana pa nkhani ya wuzga kukamba kupatulanya charu mu ma 1850.<ref>{{cite web |last1=Heidler |first1=David |last2=Heidler |first2=Jeanne |title=The Great Triumvirate |url=https://www.essentialcivilwarcurriculum.com/the-great-triumvirate.html |website=Essential Civil War Curriculum |access-date=September 14, 2020}}</ref><ref>{{cite news |last1=Winters |first1=Michael Sean |title='Do not trust in princes': the limits of politics |url=https://www.ncronline.org/news/politics/do-not-trust-princes-limits-politics |access-date=September 14, 2020 |publisher=National Catholic Reporter |date=August 4, 2017}}</ref> Ulongozgi wa [[Abraham Lincoln]] mu nyengo ya [[Nkhondo ya pa Wanangwa ya America|Nkhondo ya pa Wanangwa ya America]] wapangiska ŵakulemba mbiri kumuwona nga ni yumoza wa mapulezidenti ŵakuru chomene ŵa charu.{{efn|Pafupifupi ŵakusambira mbiri wose ŵakumuyika Lincoln mu mapulezidenti ŵatatu ŵakwamba ŵa charu, ndipo ŵanandi ŵakumuyika pa malo ghakwamba. Wonani [[Malo gha mapulezidenti ŵa United States mu mbiri|Malo gha mapulezidenti ŵa United States mu mbiri]] kuti muwone ivyo kafukufuku wakulongora.}} Vinthu ivyo vikachitika pa nkhondo na kuwusa kwa Republican mu Congress vikapangiska udindo uwu kuŵa wankhongono chomene.<ref>{{cite news |last1=Williams |first1=Frank |title=Lincoln's War Powers: Part Constitution, Part Trust |url=https://www.abajournal.com/magazine/article/lincolns_war_powers_part_constitution_part_trust |access-date=September 14, 2020 |publisher=American Bar Association |date=April 1, 2011}}</ref><ref>{{cite news |last1=Weber |first1=Jennifer |title=Was Lincoln a Tyrant? |url=https://opinionator.blogs.nytimes.com/2013/03/25/was-lincoln-a-tyrant/ |access-date=September 14, 2020 |publisher=New York Times Opinionator |date=March 25, 2013}}</ref> Kusankhikaso kwa Lincoln mu 1864 kukaŵa kakwamba pulezidenti kusankhikaso kufuma apo Jackson wakachitira mu 1832. Pamanyuma pa kuphedwa kwa Lincoln, uyo wakiza mu malo ghake [[Andrew Johnson]] wakataya chovwiro chose cha ndyali<ref>{{cite web |last1=Varon |first1=Elizabeth |title=Andrew Johnson: Campaigns and Elections |url=https://millercenter.org/president/johnson/campaigns-and-elections |website=University of Virginia, Miller Center |date=October 4, 2016 |access-date=September 14, 2020}}</ref> ndipo wakakhala pafupi kufumiskika pa udindo.<ref>{{cite news |last1=NCC Staff |title=The man whose impeachment vote saved Andrew Johnson |url=https://constitutioncenter.org/blog/the-man-whose-impeachment-vote-saved-andrew-johnson |access-date=September 14, 2020 |publisher=National Constitution Center |date=May 16, 2020}}</ref> Congress yikalutilira kuŵa yankhongono mu nyengo ziŵiri za upulezidenti wa mulongozgi wa nkhondo ya Civil War [[Ulysses S. Grant]]. Pamanyuma pa kumara kwa [[Nyengo ya Kuzengaso|Nyengo ya Kuzengaso]], [[Grover Cleveland]] wakaŵa pulezidenti wakwamba wa Democrat kusankhika kufuma pambere pa nkhondo, wakaluta ku visola vitatu vyakulondezgana (1884, 1888, 1892) ndipo wakathereska kaŵiri. Mu 1900, [[William McKinley]] wakaŵa pulezidenti wakwamba uyo wakaŵapo pa udindo kusankhikaso kufuma apo Grant wakachitira mu 1872. Pamanyuma pa [[Kuphedwa kwa William McKinley|kuphedwa]] kwa McKinley na [[Leon Czolgosz]] mu 1901, [[Theodore Roosevelt]] wakaŵa munthu wakumanyikwa chomene mu ndyali za America.<ref>{{cite news |last1=Boissoneault |first1=Lorraine |title=The Debate Over Executive Orders Began With Teddy Roosevelt's Mad Passion for Conservation |url=https://www.smithsonianmag.com/history/how-theodore-roosevelts-executive-orders-reshaped-countryand-presidency-180962908/ |access-date=September 14, 2020 |publisher=Smithsonian Magazine (website) |date=April 17, 2017}}</ref> Ŵakulemba mbiri ŵakugomezga kuti Roosevelt wakasintha mwakukhalapo ndondomeko ya ndyali chifukwa cha kukhozga udindo wa upulezidenti,<ref>{{cite news |last1=Posner |first1=Eric |title=The inevitability of the imperial presidency |url=https://www.washingtonpost.com/blogs/political-bookworm/post/the-inevitability-of-the-imperial-presidency/2011/04/22/AFTRBoPE_blog.html |access-date=September 12, 2020 |newspaper=[[The Washington Post]] |date=April 22, 2011}}</ref> ndipo vinthu vinyake ivyo wakachita vikuphatikizapo kumazga ma wupu ghakuru gha malonda, kusungilira chilengedwe, kusintha kwa ntchito, kupanga mikhaliro ya munthu kuŵa yakuzirwa nga ni nkhani za ndondomeko, na kusankha yekha uyo wakeneranga kulondezga, [[William Howard Taft]]. Mu ma 1910, [[Woodrow Wilson]] wakalongozga charu ku chigonjetso mu [[Nkhondo Yakwamba ya Charu Chose|Nkhondo Yakwamba ya Charu Chose]], kweni fundo ya Wilson ya kukhazikiska [[Wupu wa Mitundu|Wupu wa Mitundu]] yikakanika na Senate.<ref>{{cite news |last1=Glass |first1=Andrew |title=Senate rejects League of Nations, Nov. 19, 2019 |url=https://www.politico.com/story/2014/11/senate-rejects-league-of-nations-nov-19-1919-113006 |access-date=September 14, 2020 |publisher=Politico |date=November 19, 2014}}</ref> [[Warren Harding]], nangauli wakatemwikwanga apo wakaŵa pa udindo, mbiri yake yikafipiskika chifukwa cha vinyake vyakuchita uheni, chomenechomene [[Teapot Dome scandal|Wubishi wa Teapot Dome]],<ref>{{cite news |last1=Robenalt |first1=James |title=If we weren't so obsessed with Warren G. Harding's sex life, we'd realize he was a pretty good president |url=https://www.washingtonpost.com/posteverything/wp/2015/08/13/if-we-werent-so-obsessed-with-warren-g-hardings-sex-life-wed-realize-he-was-a-pretty-good-president/ |access-date=September 14, 2020 |newspaper=[[The Washington Post]] |date=August 13, 2015}}</ref> ndipo [[Herbert Hoover]] wakaleka kutemweka luŵiro pamanyuma pakutondeka kumazga [[Soka Likuru la Chuma|Soka Likuru la Chuma]].<ref>{{cite journal |last1=Smith |first1=Richard Norton |last2=Walch |first2=Timothy |title=The Ordeal of Herbert Hoover |journal=Prologue Magazine |date=Summer 2004 |volume=36 |issue=2 |url=https://www.archives.gov/publications/prologue/2004/summer/hoover-1.html |publisher=National Archives}}</ref> === Upulezidenti wa Ufumu === {{Main|Upulezidenti wa Ufumu}} [[File:Franklin D Roosevelt - radio broadcast.jpg|thumb|Pulezidenti [[Franklin D. Roosevelt]] wakuyowoya pa wayilesi mu 1933.]] Kukwera kwa [[Franklin D. Roosevelt]] mu 1933 kukalutilira kulazga ku ivyo wakulemba mbiri [[Arthur M. Schlesinger Jr.]] wakachema kuti ni [[Upulezidenti wa Ufumu|upulezidenti wa ufumu]].<ref>{{Cite book|url=https://archive.org/details/imperialpresiden00schl|title=The Imperial Presidency|last=Schlesinger| first=Arthur M. Jr. |date=1973|publisher=Houghton Mifflin|others=Frank and Virginia Williams Collection of Lincolniana (Mississippi State University. Libraries)|isbn=0-395-17713-8|location=Boston|pages=x|oclc=704887|author-link=Arthur M. Schlesinger Jr.|url-access=registration}}</ref> Chifukwa cha chovwiro cha ma Republican ghanandi mu Congress na ŵanthu awo ŵakakhumbanga kusintha kukuru, [[New Deal|Ndondomeko Yiphya]] ya Roosevelt yikakura chomene ukuru na mulimo wa boma la pakati, kusazgapo ma wupu ghakulongozga ghanandi.<ref name=JohnYooFDR>{{cite journal |last1=Yoo |first1=John |title=Franklin Roosevelt and Presidential Power |journal=Chapman Law Review |date=February 14, 2018 |volume=21 |issue=1 |page=205 |ssrn=3123894 |url=https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3123894}}</ref>{{rp|211–12}} Ŵantchito awo ŵakateŵeteranga pulezidenti, awo kale ŵakaŵa ŵachoko, ŵakasazgikira chomene, ndipo [[Ofesi Yikuluwakuru ya Pulezidenti|Ofesi Yikuru ya Pulezidenti]] yikakhazikiskika mu 1939, ndipo palije yumoza wa ŵantchito aŵa wakakhumbikwiranga kuzomerezgeka na Senate.<ref name=JohnYooFDR />{{rp|229–231}} Kusankhikaso kwa Roosevelt mwakupambana na kale ku nyengo yachitatu na yachinayi, chigonjetso cha United States mu [[Nkhondo Yachiŵiri ya Charu Chose|Nkhondo Yachiŵiri ya Charu Chose]], na kukura kwa chuma cha charu vyose vikawovwira kukhazikiska udindo uwu kuŵa wa ulongozgi wa charu chose.<ref name=JohnYooFDR />{{rp|269}} Awo ŵakamulondezga, [[Harry S. Truman]] na [[Dwight D. Eisenhower]], waliyose wakateŵetera nyengo ziŵiri apo [[Nkhondo Yakuzizima|Nkhondo Yakuzizima]] yikapangiska kuti upulezidenti uwoneke nga ni "[[mulongozgi wa charu chafwatuka|mulongozgi wa charu cha wanangwa]]",<ref name="freeworld" /> apo [[John F. Kennedy]] wakaŵa mulongozgi muwukirano kweniso wakatemweka uyo wakapokera chandulo kufuma ku kukura kwa TV mu ma 1960.<ref>{{cite news |last1=Eschner |first1=Kat |title=A Year Before His Presidential Debate, JFK Foresaw How TV Would Change Politics |url=https://www.smithsonianmag.com/smart-news/what-jfk-had-say-about-tv-politics-180967172/ |access-date=September 12, 2020 |publisher=Smithsonian Magazine |date=November 14, 2017}}</ref><ref>{{cite news |last1=Simon |first1=Ron |title=See How JFK Created a Presidency for the Television Age |url=https://time.com/4795637/jfk-television/ |access-date=September 12, 2020 |publisher=Time |date=May 29, 2017}}</ref> Pamanyuma pakuti [[Lyndon B. Johnson]] wakataya chovwiro cha ŵanthu chifukwa cha [[Nkhondo ya ku Vietnam|Nkhondo ya Vietnam]] ndipo upulezidenti wa [[Richard Nixon]] ukamara mu [[Wubishi wa Watergate|wubishi wa Watergate]], Congress yikakhazikiska masinthiro ghanandi agho ghakakhumbanga kuti yijikhazikiske panthazi.<ref>{{cite news |last1=Wallach |first1=Philip |title=When Congress won the American people's respect: Watergate |url=https://www.legbranch.org/2018-4-25-when-congress-won-the-american-peoples-respect-watergate/ |access-date=September 12, 2020 |publisher=LegBranch.org |date=April 26, 2018}}</ref><ref>{{cite news |last1=Berger |first1=Sam |last2=Tausanovitch |first2=Alex |title=Lessons From Watergate |url=https://www.americanprogress.org/issues/democracy/reports/2018/07/30/454058/lessons-from-watergate/ |access-date=September 12, 2020 |publisher=Center for American Progress |date=July 30, 2018}}</ref> Ivyo vikasazgapo [[War Powers Resolution|Dango la Mphamvu za Nkhondo]], ilo likapangika kuŵa dango nangauli Nixon wakaliveta mu 1973,<ref>{{USStat|87|555}}, 559–560.</ref><ref>{{cite news |last1=Madden |first1=Richard |title=House and Senate Override Veto by Nixon on Curb of War Powers; Backers of Bill Win 3-Year Fight |url=https://www.nytimes.com/1973/11/08/archives/house-and-senate-override-veto-by-nixon-on-curb-of-war-powers.html |access-date=September 12, 2020 |work=[[The New York Times]] |date=November 8, 1973}}</ref> ndiposo [[Dango la Bajeti la Congress na Kulongora Ndalama la 1974|Dango la Bajeti la Congress na Kulongora Ndalama la 1974]], ilo likakhumbanga kukhozga mazaza gha Congress pa nkhani za ndalama.<ref>{{cite news |last1=Glass |first1=Andrew |title=Budget and Impoundment Control Act becomes law, July 12, 1974 |url=https://www.politico.com/story/2017/07/12/budget-and-impoundment-control-act-becomes-law-july-12-1974-240372 |access-date=September 12, 2020 |publisher=Politico |date=July 12, 2017}}</ref> Mu 1976, [[Gerald Ford]] wakazomerezga kuti "pendulum ya mbiri" yikasintha kulazga ku Congress, ndipo ichi chikapangiska kuti paŵe suzgo la "kuswa" luso lake la kulamulira.<ref>{{cite news |last1=Shabecoff |first1=Philip |title=Presidency Is Found Weaker Under Ford |url=https://www.nytimes.com/1976/03/28/archives/presidency-is-found-weaker-under-ford-curbs-on-exerting-power-seen.html |access-date=September 9, 2020 |work=[[The New York Times]] |date=March 28, 1976}}</ref> Ford wakatondeka kusankhikaso kuti watemwere nyengo yakukwana ndipo uyo wakamulondezga, [[Jimmy Carter]], nayo wakatondeka kusankhikaso. [[Ronald Reagan]], uyo wakaŵa wakuseŵera mafilimu pambere wandambe mulimo wake wa ndyali, wakagwiliskira ntchito luso lake la kuyowoya kuti wawovwire kusintha ndondomeko ya America kufuma ku ndondomeko za New Deal kulazga ku fundo za ndyali za kusungilira miyambo.<ref>{{cite news |last1=Edwards |first1=Lee |title=What Made Reagan a Truly Great Communicator |url=https://www.heritage.org/conservatism/commentary/what-made-reagan-truly-great-communicator |archive-url=https://web.archive.org/web/20180615012306/https://www.heritage.org/conservatism/commentary/what-made-reagan-truly-great-communicator |url-status=unfit |archive-date=June 15, 2018 |access-date=September 12, 2020 |publisher=The Heritage Foundation |date=February 5, 2018}}</ref><ref>{{cite news |last1=Brands |first1=H. W. |title=What Reagan Learned from FDR |url=https://historynewsnetwork.org/article/159389 |access-date=September 12, 2020 |publisher=History News Network}}</ref> Pamanyuma pa [[Nkhondo Yakuzizima|Nkhondo Yakuzizima]], United States yikazgoka charu chakulongozga chomene pa charu chose.<ref>{{cite journal |last1=Sorensen |first1=Theodore |title=America's First Post-Cold War President |journal=Foreign Affairs |date=Fall 1992 |volume=71 |issue=4 |pages=13–30 |doi=10.2307/20045307 |jstor=20045307 |url=https://www.foreignaffairs.com/articles/1992-09-01/americas-first-post-cold-war-president|url-access=subscription }}</ref> [[Bill Clinton]], [[George W. Bush]], na [[Barack Obama]] wose ŵakateŵetera nyengo ziŵiri nga ni mapulezidenti. Pa nyengo iyi, charu chikamba kuŵa chakugaŵikana chomene pa ndyali, ndipo ichi chikapangiska kuti ŵabali ŵa Congress awo ŵali na maghanoghano ghakupambana chomene ŵakure, chomenechomene pamanyuma pa [[Chisankho cha pakati pa nyengo cha United States cha 1994|visola vya pakati pa nyengo vya 1994]] ivyo vikawona ma Republican ghapoka mazaza mu Nyumba yakuwungana kwa nyengo yakwamba mu vyaka 40, kweniso kukura kwa kugwiliskira ntchito mwakawiro [[Filibuster mu Senate ya United States|filibuster]] mu Senate.<ref>Barber, Michael; McCarty, Nolan (2013), [https://www.apsanet.org/portals/54/Files/Task%20Force%20Reports/Chapter2Mansbridge.pdf Causes and Consequences of Polarization] {{Webarchive|url=https://web.archive.org/web/20210114193351/https://www.apsanet.org/portals/54/Files/Task%20Force%20Reports/Chapter2Mansbridge.pdf |date=January 14, 2021 }}, American Political Science Association Task Force on Negotiating Agreement in Politics report, at 19–20, 37–38.</ref> Ntheura izi, mapulezidenti ŵasono ŵakulutilira kugomezga chomene pa [[Executive order|malango gha pulezidenti]], ndondomeko za ma wupu, na kusankha ŵeruzgi kuti ŵakhazikiske ndondomeko zikuru, m'malo mwa malango ghakupangika na Congress kweniso mazaza gha Congress.<ref>{{cite journal |last1=Rudalevige |first1=Andrew |title=The Letter of the Law: Administrative Discretion and Obama's Domestic Unilateralism |journal=The Forum |date=April 1, 2014 |volume=12 |issue=1 |pages=29–59 |doi=10.1515/for-2014-0023 |s2cid=145237493 |doi-access=free }}</ref> Visola vya upulezidenti mu vyaka vya m'ma 2000 vyalongora kulutilira kwa kugaŵikana uku, chifukwa palije munthu uyo wakapambana na mavoti gha ŵanthu na mphambano yakuluska pa 5 peresenti, kupatulapo Obama mu 2008, ndipo ŵaŵiri, George W. Bush ([[Visola vya pulezidenti vya United States vya 2000|2000]]) na [[Donald Trump]] ([[Visola vya pulezidenti vya United States vya 2016|2016]]), ŵakawina mu Electoral College kweni ŵakataya mavoti gha ŵanthu.<ref>{{efn|Wonani [[Mndandanda wa visola vya pulezidenti vya United States mwakuyana na mphambano ya mavoti gha ŵanthu]].}}</ref> Bush ([[Visola vya pulezidenti vya United States vya 2004|2004]]) na Trump ([[Visola vya pulezidenti vya United States vya 2024|2024]]) pamanyuma ŵakasankhikaso, ndipo wose ŵakawina mu Electoral College kweniso mu mavoti gha ŵanthu. === Ŵakususka kusintha kwa upulezidenti === Ŵakakhazikiska charu ichi [[Ŵakakhazikiska charu cha United States|Ŵakakhazikiska charu cha United States]] ŵakaghanaghananga kuti [[Congress ya United States|Congress]], iyo yikaŵa nthambi yakwamba ya boma yakuzunulika mu [[Dango la Malango la United States|Dango la Malango]], ndiyo yizamuŵa nthambi yikuru ya boma; ŵakaghanaghananga yayi kuti paŵenge dipatimenti yankhongono ya vya ukulongozga.<ref name="tws9nov09">{{Cite news |last=Kakutani |first=Michiko |url=https://www.nytimes.com/2007/07/06/books/06book.html |title=Unchecked and Unbalanced |date=July 6, 2007 |work=The New York Times |access-date=November 9, 2009 |quote=the founding fathers had "scant affection for strong executives" like England's king, and{{nbsp}}... Bush White House's claims are rooted in ideas "about the 'divine' right of kings"{{nbsp}}... and that certainly did not find their way into our founding documents, the 1776 Declaration of Independence and the Constitution of 1787.}}</ref> Kweni mazaza gha pulezidenti ghakusintha mu nyengo, ndipo ichi chapangiska kuti ŵanthu ŵayowoye kuti upulezidenti wa mazuŵa ghano waŵa na nkhongono zinandi chomene,<ref name="twsSEPnnxcvdf1">{{Cite news |url=https://www.huffpost.com/entry/the-conquest-of-president_b_120582 |first=David |last=Sirota |title=The Conquest of Presidentialism |date=August 22, 2008 |work=HuffPost |access-date=September 20, 2009}}</ref><ref name="twsSEPnn5454">{{Cite news |last=Schimke |first=David |url=http://www.utne.com/2008-09-01/Politics/presidential-Power-to-the-People.aspx |title=Presidential Power to the People—Author Dana D. Nelson on why democracy demands that the next President be taken down a notch |date=September–October 2008 |work=Utne Reader |access-date=September 20, 2009}}</ref> wambura kuŵa na vyakupimika,<ref name="tws9nov07">{{Cite news |last=Linker |first=Ross |url=http://www.jhunewsletter.com/2007/09/26/critical-of-presidency-prof-ginsberg-and-crenson-unite-18626/ |title=Critical of Presidency, Prof. Ginsberg and Crenson unite |date=September 27, 2007 |access-date=November 9, 2017 |publisher=The Johns-Hopkins Newsletter |quote=Presidents slowly but surely gain more and more power with both the public at large and other political institutions doing nothing to prevent it.}}</ref> ndiposo uli na mikhaliro ya "uchifumu".<ref name="tws9nov08">{{Cite news |last=Kakutani |first=Michiko |url=https://www.nytimes.com/2007/07/06/books/06book.html |title=Unchecked and Unbalanced |date=July 6, 2007 |work=The New York Times |access-date=November 9, 2009 |quote=Unchecked and Unbalanced: Presidential Power in a Time of Terror By Frederick A. O. Schwarz Jr. and Aziz Z. Huq (authors)}}</ref> Mu 2008 pulofesa [[Dana D. Nelson]] wakayowoya kuti mapulezidenti mu vyaka 30 ivyo vikajumpha ŵakagwira ntchito yakuti ŵaŵe na "mazaza ghose pa nthambi ya vya ukulongozga na ma wupu ghake".<ref name="twsSEPrt8jyh5">{{Cite news |last=Nelson |first=Dana D. |url=http://www.latimes.com/news/opinion/la-oe-nelson11-2008oct11,0,224216.story |title=Opinion—The 'unitary executive' question—What do McCain and Obama think of the concept? |date=October 11, 2008 |work=Los Angeles Times |access-date=September 21, 2009}}</ref> Wakususka awo ŵakukhozgera [[Chisambizgo cha nthambi yimoza ya ukulongozga|chigomezgo cha nthambi yimoza ya ukulongozga]] chifukwa cha kusazgirako "mazaza ghanandi gha ukulongozga agho ghakuleka kupimika—nga ni malango gha pulezidenti, vyilongolero, makalata gha ndondomeko, vipharazgo, malango gha vya chitetezo cha charu, na mazgu gha pulezidenti pa kusayina malango—ivyo vikuzomerezga kale mapulezidenti kupanga ndondomeko zinandi za vya charu cha kuwaro na mukati kwambura wovwiri, kususkika, panji kuzomerezgeka na Congress".<ref name=twsSEPrt8jyh5 /> [[Bill Wilson (activist)|Bill Wilson]], membala wa wupu wa [[Americans for Limited Government]], wakayowoya kuti upulezidenti wakusazgikira "ni suzgo likuru chomene ilo likukumana na wanangwa wa munthu payekha na ulamuliro wa demokilase".<ref name="tws8nov06">{{Cite news |last=Shane |first=Scott |url=https://www.nytimes.com/2009/09/26/us/politics/26activist.html |title=A Critic Finds Obama Policies a Perfect Target |date=September 25, 2009 |work=The New York Times |access-date=November 8, 2009 |quote=There is the small, minority-owned firm with deep ties to President Obama's Chicago backers, made eligible by the Federal Reserve to handle potentially lucrative credit deals. "I want to know how these firms are picked and who picked them," Mr. Wilson, the group's president, tells his eager researchers.}}</ref> == Mazaza gha kupanga malango == [[Vigaŵa vya kupika mazaza|Article I, Gawo{{nbsp}}1]] la Dango la Malango likuŵika mazaza ghose gha [[Ukwamba kupika dango|kupanga malango]] mu mawoko gha Congress, ndipo [[Dango lakukanizga kuŵa mu malo ghaŵiri|Article 1, Gawo 6, Ndime{{nbsp}}2]] likukanizga pulezidenti (na ŵantchito wose ŵa nthambi ya ukulongozga) kuŵa membala wa Congress nyengo yeneyiyo. Nangauli vili nthena, upulezidenti wa mazuŵa ghano uli na mazaza ghakuru pa vya malango, chifukwa cha fundo za mu dango la malango kweniso kusintha kwa mbiri mu nyengo. === Kusayina na kuveta malango === [[File:Lyndon Johnson signing Civil Rights Act, July 2, 1964.jpg|alt=|thumb|Pulezidenti [[Lyndon B. Johnson]] wakusayina [[Dango la Wanangwa wa Ŵanthu la 1964|Dango la Wanangwa wa Ŵanthu la 1964]] pa [[Nyumba Yituŵa|Nyumba Yituŵa]] pa Julayi 2, 1964, apo [[Martin Luther King Jr.]] na ŵanyake ŵakulaŵiska.]] Mazaza ghakuru chomene gha pulezidenti pa kupanga malango ghakufuma ku [[Ndime ya Kupereka Dango|Ndime ya Kupereka Dango]], iyo yikupeleka mazaza kwa pulezidenti kuveta [[Bill (law)|dango lililose]] ilo lapokelereka na [[Congress ya United States|Congress]]. Nangauli Congress yingasintha veto ya pulezidenti, yikukhumbikwira [[Voti zinandi chomene#Voti ziŵiri pa zitatu|voti ziŵiri pa zitatu]] za nyumba zose ziŵiri, ndipo kanandi ichi chikuŵa chakusuzga kuchitika kwambura malango agho ghakukhozgeka na magulu ghaŵiri gha ndyali. Ŵakulemba dango la malango ŵakawopanga kuti Congress yingayezga kusazgirako mazaza ghake na kupangiska "uwofya wa ŵanandi", ntheura kupeleka veto kwa pulezidenti uyo wakusankhika mwakudunjika yayi kukaŵa nthowa yakuzikika ya kupima mazaza gha kupika malango. Nangauli George Washington wakagomezganga kuti veto yikwenera kugwiliskirika ntchito pera para dango lili kwambiska yayi, sono veto yikugwiliskirika ntchito kanandi apo mapulezidenti ŵali na mphambano za ndondomeko na dango. Ntheura veto—panji chiwopsezo cha veto—yikasintha ndipo yapangiska upulezidenti wa mazuŵa ghano kuŵa chigaŵa chakuzirwa chomene cha ndondomeko ya kupanga malango mu America. Chomenechomene, pasi pa [[Ndime ya Kupereka Dango|Presentment Clause]], para dango laperekeka na Congress, pulezidenti wali na nthowa zitatu: # Kusayina dango mu mazuŵa khumi, kwambura kupenda mazuŵa gha Sabata. Dango ili [[Coming into force|likwamba kugwira ntchito]]. # [[Veto power mu United States|Kuveta]] dango mu nyengo iyo yazunulika pachanya na kuliwezgera ku nyumba ya Congress iyo yikalambika, pakuyowoya ivyo wakususka. Dango ili likwamba yayi kugwira ntchito, kwambura kuti nyumba zose ziŵiri za Congress zivote kuti ziviske veto iyi na [[Voti zinandi chomene#Voti ziŵiri pa zitatu|voti ziŵiri pa zitatu]]. # Kuleka kuchitapo kanthu pa dango mu nyengo iyo yazunulika pachanya. Dango ili likwamba kugwira ntchito nga ni kuti pulezidenti wakalisayina, kweni pekha para Congress yili pa holide yayi. Usange Congress yili kumalizga nyengo yake yakuwungana, dango ili likwamba yayi kugwira ntchito, ndipo ichi chikudziwika kuti [[pocket veto]]. Mu 1996, Congress yikayezga kusazgirako mazaza gha veto gha pulezidenti kwizira mu [[Dango la Line Item Veto la 1996|Dango la Line Item Veto]]. Dango ili likapeleka mazaza kwa pulezidenti kusayina dango lililose la ndalama kuti liŵe dango kweniso nyengo yeneyiyo kufumiskapo vinthu vinyake vya ndalama mu dango ilo, chomenechomene ndalama ziphya, ndalama zakugwiliskirika ntchito mwakukhumbikwa, panji chandulo chiphya cha msonkho chakupimika. Congress yikatenge yingapangaso chinthu icho chafumiskika. Usange pulezidenti wakaveta dango liphya ili, Congress yikatenge yingasintha veto iyi mwakugwiliskira ntchito nthowa yake yakawiro, iyo ni voti ziŵiri pa zitatu mu nyumba zose ziŵiri. Mu ''[[Clinton v. City of New York]]'', {{ussc|524|417|1998}}, [[Khoti Likuru la United States|Khoti Likuru la United States]] likati kusintha uku kwa mazaza gha veto mu kupanga dango kukaŵa kwambura kulondezga dango la malango. === Kukhazikiska ndondomeko === [[File:2018 SOTU 27628831.jpg|alt=|thumb|Pulezidenti [[Donald Trump]] wakuyowoya [[Uthenga wa Boma la Charu wa 2018]] panthazi pa [[Congress ya United States|Congress]].]] Kwa nyengo yitali mu mbiri ya America, ŵanthu awo ŵakapenjanga kuŵa mapulezidenti ŵakapenjanga kusankhika chifukwa cha layizgo la ndondomeko ya malango iyo ŵakakhumbanga kuchita. [[Article Two of the United States Constitution#Section 3: Presidential responsibilities|Article II, Gawo 3, Ndime 2]] likukhumba kuti pulezidenti walongozge vinthu ivi ku Congress ivyo pulezidenti wakuwona kuti "nchakukhumbikwa kweniso chakwenelera". Ivi vikuchitika kwizira mu uthenga wa [[State of the Union|Umo Boma la Charu Liliri]], uwo kanandi ukuyowoya fundo za malango agho pulezidenti wakukhumba kuti ghapangike mu chaka chakulondezgapo, kweniso kwizira mu mauthenga ghanyake ghakuwoneka panji ghambura kuwoneka na Congress. Pulezidenti wangawovwirapo pakupanga malango mwa kupereka maghanoghano, kupempha, panji nanga nkhukoserezga kuti Congress ipange malango agho pulezidenti wakugomezga kuti ngakukhumbikwa. Kweniso, pulezidenti wangayezga kusintha umo dango likupangikira apo likali mu ndondomeko ya kupanga dango kwizira mu kukopa ŵabali ŵa Congress payekha.<ref>{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/95/recommendations-clause |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/95/recommendations-clause |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Recommendations Clause |last=Pfiffner |first=James |website=The Heritage Guide to the Constitution |publisher=[[The Heritage Foundation]] |access-date=April 14, 2019}}</ref> Mapulezidenti ŵali na mazaza agha chifukwa Dango la Malango likuyowoya yayi uyo wangapanga malango, kweni mazaza agha ghali na mphaka chifukwa mbabali ŵa Congress pera ndiwo ŵangambiska dango.<ref>{{Cite web |url=https://bidenwhitehouse.archives.gov/about-the-white-house/our-government/the-legislative-branch/ |title=Our Government: The Legislative Branch |website=[[White House]] |publisher=The White House |location=Washington, D.C. |access-date=April 14, 2019}}</ref> Pulezidenti panji ŵalara ŵanyake ŵa nthambi ya ukulongozga ŵangapanga vyakulemba vya malango na kupempha maseneta panji ŵimiliri kuti ŵaloweske vyakulemba ivi mu Congress. Kweniso, pulezidenti wangayezga kuchiska Congress kuti yisinthire dango ilo laperekeka, mwakuti wayowoye kuti wavetenge dango ilo usange vinthu ivyo wakukhumba vikasinthika yayi.<ref>{{Cite web |url=https://fas.org/sgp/crs/misc/R42843.pdf |title=Introduction to the Legislative Process in the U.S. Congress |last=Heitshusen |first=Valerie |date=November 15, 2018 |website=R42843 · Version 14 · updated |publisher=Congressional Research Service |location=Washington, D.C. |access-date=April 14, 2019}}</ref> === Kukhazikiska malango ghakulongozga === Malango ghanandi agho Congress yikapanga ghakuyowoya yayi vyose ivyo vingachitika, ndipo ghakupeleka mwakudunjika panji mwambura kudunjika mazaza gha kugwiliskira ntchito malango ku wupu wakwenelera wa boma. Nga ni mulongozgi wa nthambi ya ukulongozga, mapulezidenti ŵakulongozga ma wupu ghanandi gha [[List of federal agencies in the United States|boma la United States]] agho ghangapanga malango ghakulongozga kwambura kulaŵililika chomene na Congress. Mu vyaka vya m'ma 1900, ŵakususkika ŵakayowoya kuti mazaza ghanandi gha kupanga malango na bajeti agho ghakeneranga kuŵa gha Congress ghakajumphira mu mawoko gha mapulezidenti. Munthu yumoza wakususka wakayowoya kuti mapulezidenti ŵangapanga "gulu la ŵanthu ŵakukwana nga ni gulu la ŵankhondo la 'ma czar'—waliyose wambura kuyankha kwa Congress kweni wakupika mulimo wa kulongozga ndondomeko zikuru za ku White House".<ref name="tws28sep08">{{Cite news |last=Cantor |first=Eric |url=https://www.washingtonpost.com/wp-dyn/content/article/2009/07/29/AR2009072902624.html |title=Obama's 32 Czars |date=July 30, 2009 |newspaper=The Washington Post |access-date=September 28, 2009}}</ref> Mapulezidenti ŵakususkika chifukwa cha kupanga [[mazgu gha kusayina|mazgu gha kusayina]] apo ŵakusayina malango gha Congress, pakuyowoya umo ŵakupulikira dango panji umo ŵazamugwiliskira ntchito.<ref name="twsSEPrt8jyh5" /> Chizgoŵezi ichi chasukika na [[American Bar Association]] kuti nchakususkana na dango la malango.<ref name="tws11nov301">{{Cite news |last=Suarez |first=Ray |url=https://www.pbs.org/newshour/bb/white_house/july-dec06/signing_07-24.html |title=President's Use of 'Signing Statements' Raises Constitutional Concerns |date=July 24, 2006 |access-date=November 11, 2009 |url-status=dead |archive-url=https://web.archive.org/web/20070321035900/http://www.pbs.org/newshour/bb/white_house/july-dec06/signing_07-24.html |archive-date=March 21, 2007 |publisher=PBS Online NewsHour |quote=The American Bar Association said President Bush's use of "signing statements", which allow him to sign a bill into law but not enforce certain provisions, disregards the rule of law and the separation of powers. Legal experts discuss the implications. |display-authors=etal }}</ref> Wakasangazga wa kusungilira miyambo [[George Will]] wakalemba vya "nthambi ya ukulongozga iyo yikusazgikira chomene" kweniso "kuzimirika kwa Congress".<ref name="tws28sep">{{Cite news |last=Will |first=George F. |url=https://www.washingtonpost.com/wp-dyn/content/article/2008/12/19/AR2008121902929.html |title=Making Congress Moot |date=December 21, 2008 |newspaper=The Washington Post |access-date=September 28, 2009}}</ref> === Kucemera na kuzimiska Congress === Kuti boma lichitenge mwaluŵiro para pali suzgo likuru la mukati mwa charu panji la pa charu chose ilo likuchitika apo Congress yili pa nyengo yayi yakukumana, pulezidenti wali kupika nkhongono kwizira mu [[Article Two of the United States Constitution#Clause 3: Extraordinary sessions and prorogation of Congress|Nkhani Yachiŵiri, Chigaŵa 3]] cha Malango kuti wacheme [[special session|ungano wapadera]] wa nyumba yimoza panji zose ziŵiri za Congress. Kufuma apo [[John Adams]] wakachita nthena kakwamba mu 1797, pulezidenti wachema Congress yose kuti yikumanenge pa ungano wapadera maulendo 27. [[Harry S. Truman]] ndiyo wakaŵa waumaliro kuchita nthena mu Julayi 1948, ndipo ungano uwu ukamanyikwa kuti [[Turnip Day Session]].<ref name="Forte">{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/96/convening-of-congress |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/96/convening-of-congress |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Convening of Congress |last=Forte |first=David F. |website=The Heritage Guide to the Constitution |publisher=Heritage Foundation |access-date=April 14, 2019}}</ref><ref name="Steinmetz">{{Cite magazine |last=Steinmetz |first=Katy |date=August 10, 2010 |title=Congressional Special Sessions |url=https://content.time.com/time/politics/article/0,8599,2009480,00.html |magazine=[[Time (magazine)|Time]] |access-date=April 14, 2019}}</ref> Kweniso, pambere [[Twentieth Amendment to the United States Constitution|Chigaziso cha Makumiŵiri]] chindazomerezgeke mu 1933, icho chikiza nyengo iyo Congress yikakumananga kufuma mu Disembala kuluta mu Janyuwale, ŵapulezidenti ŵaphya awo ŵakamba maudindo ŵakachemanga Senate kuti yikumanenge kuti yikhozge kusankhika kwa ŵanthu panji kuzomera mapangano. Kweni mu nyengo ya mazuŵa ghano, nkhongono iyi yili kuleka kugwiritsidwa ntchito chifukwa Congress sono yikukhalilira pa ungano chaka chose, ndipo yikuchita maungano gha pro forma mazuŵa ghose ghatatu nangauli yikuwoneka nga yili pa kupumura. Mwakuyana na ichi, pulezidenti wali na mazaza kuzimiska Congress usange Nyumba ya Ŵimiliri na Senate zingatondeka kupulikana pa nyengo ya kuzimiska; palije pulezidenti uyo wagwiriskapo ntchito nkhongono iyi.<ref name="Forte"/><ref name="Steinmetz"/> == Nkhongono za kulongozga == {{Main|Nkhongono za pulezidenti wa United States}} {{Quote box|align=right|width=25%|quote=Suffice it to say that the President is made the sole repository of the executive powers of the United States, and the powers entrusted to him as well as the duties imposed upon him are awesome indeed.|source=''[[Nixon v. General Services Administration]]'', '''{{ussc|433|425|1977}}''' ([[William Rehnquist|Rehnquist, J.]], [[Dissenting opinion|dissenting]])}} Pulezidenti ni mulongozgi wa nthambi yakulongozga ya boma la feduro ndipo wali na udindo wakuyana na [[Article Two of the United States Constitution|Malango]] wa "kuwona kuti malango ghakugwiriskika ntchito mwakugomezgeka".<ref>{{Cite web |url=https://www.law.cornell.edu/constitution/articleii#section3 |title=Article II, Section 3, U.S. Constitution |year=2012 |publisher=Legal Information Institute |access-date=August 7, 2012}}</ref> Nthambi yakulongozga yili na ŵantchito ŵakujumpha 4 miliyoni, kusazgapo ŵasilikari.<ref name="obamapresidency">{{Cite web |url=https://obamawhitehouse.archives.gov/1600/executive-branch |title=Executive Branch |date=April 2015 |via=[[NARA|National Archives]] |work=[[whitehouse.gov]] |access-date=January 24, 2020}}</ref> === Nkhongono za ulamuliro === Ŵapulezidenti ŵakusankha ŵanthu mu maudindo gha ndyali. Pulezidenti uyo wanjira waka mu udindo wangasankha ŵanthu 4,000, ndipo 1,200 mwa iwo ŵakwenera kuzomerezgeka na [[Advice and consent#United States|Senate ya United States]]. [[Ambassador|Ŵakazembe]], ŵabali ŵa [[Cabinet of the United States|Kabineti]], na ŵalara ŵanyake, ni mwa maudindo agho ghakuzuzgika kwizira mu kusankhika kwa pulezidenti na kuzomerezgeka na Senate.<ref>{{cite web| title=Presidentially Appointed Positions| date=April 14, 2021| url=https://presidentialtransition.org/wp-content/uploads/sites/6/2020/12/Presidentially-Appointed-Positions.pdf| publisher=[[Partnership for Public Service]]| location=Washington, D.C.| access-date=March 7, 2023}}</ref><ref>{{cite news| title=Biden Political Appointee Tracker| url=https://www.washingtonpost.com/politics/interactive/2020/biden-appointee-tracker/| newspaper=The Washington Post| access-date=March 7, 2023}}</ref> Nkhongono za pulezidenti zakuchimbiska ŵalara ŵa nthambi yakulongozga zakhala nkhani yakukwaskana chomene mu ndyali. Kanandi, pulezidenti wangawuskamo ŵalara ŵa nthambi yakulongozga nyengo yiliyose.<ref>See ''Shurtleff v. United States'', {{ussc|189|311|1903}}; ''[[Myers v. United States]]'', {{ussc|272|52|1926}}.</ref> Kweni, Congress yingachepeska na kukhora mazaza gha pulezidenti pakuwuskamo ŵalongozgi ŵa mawupu ghakujiyimira ghakulongozga malango na ŵalara ŵanyake ŵa pasi mu nthambi yakulongozga kwizira mu [[statute|dango]].<ref>See ''[[Humphrey's Executor v. United States]]'', {{ussc|295|602|1935}} and ''[[Morrison v. Olson]]'', {{ussc|487|654|1988}}, respectively.</ref> Kuti ŵalamulire boma la feduro ilo likukulirakulira, ŵapulezidenti ŵakamba kuzijala na magulu ghanandi gha ŵantchito, agho pamanyuma ghakanozgekera mu [[Executive Office of the President of the United States]]. Mu Executive Office iyi, gulu la mukati chomene la ŵawovwiri ŵa pulezidenti na ŵawovwiri ŵawo likusangika mu [[White House Office]]. Pulezidenti wali na nkhongono zakulongozga milimo ya boma la feduro kwizira mu kupereka mitundu yakupambanapambana ya [[Presidential directive|malanguro]], nga ni [[Presidential proclamation (United States)|chilango cha pulezidenti]] na [[executive order|malanguro gha pulezidenti]]. Para pulezidenti wakugwiriskira ntchito mwakwenelera udindo uwo wali kupika na malango, ukuru wa nkhongono iyi ngukuru.<ref>{{Cite web |url=https://www.heritage.org/the-constitution/report/executive-summary-the-use-and-abuse-executive-orders-and-other-presidential |archive-url=https://web.archive.org/web/20170331030907/http://www.heritage.org/the-constitution/report/executive-summary-the-use-and-abuse-executive-orders-and-other-presidential |url-status=unfit |archive-date=March 31, 2017 |title=Executive Summary: The Use and Abuse of Executive Orders and Other Presidential Directives |last=Gaziano |first=Todd |date=February 21, 2001 |publisher=The Heritage Foundation |location=Washington, D.C. |access-date=January 23, 2018}}</ref> Nangauli vili nthena, malanguro agha ghali pasi pa [[Judicial review in the United States|kuweleruzgika na ŵeruzgi]] mu makhoti gha feduro gha United States, agho ghangasanga kuti ngambula kukolerana na malango. Congress yingazgora malanguro gha pulezidenti kuŵa ghambura ntchito kwizira mu dango. === Vya vyakuwaro (Foreign affairs) === [[File:President George H. W. Bush and Mikhail Gorbachev.jpg|thumb|Mulongozgi George H. W. Bush na mulongozgi wa Soviet [[Mikhail Gorbachev]] ŵali kusayina [[1990 Chemical Weapons Accord|Phangano la 1990 pa vya vilwero vya makemikolo]] ku [[White House|Nyumba ya White House]].]] [[Article Two of the United States Constitution#Section 3: Presidential responsibilities|Article II, Section 3, Clause 4]] chikukhumba kuti pulezidenti "wapokelere Mabambasada". Dango ili, ilo likumanyikwa kuti Reception Clause, lili kupulikikwa kuti likung'anamura kuti pulezidenti wali na mazaza ghakuru pa nkhani za vyakuwaro,<ref>''[[United States v. Curtiss-Wright Export Corp.]]'', {{ussc|299|304|1936}}, likalongosora Pulezidenti kuti ni "chiŵaro chekha cha charu mu ubale wake wakuwaro", fundo iyo [https://fas.org/sgp/eprint/fisher.pdf yikatsutsika] na Louis Fisher wa [[Library of Congress|Layibulare ya Kongiresi]].</ref> ndiposo kumovwira pulezidenti pa mazaza ghake ghakupokera [[diplomatic recognition|kuwoneska kuzomera]] boma la charu chinyake.<ref>''[[Zivotofsky v. Kerry]]'', {{Ussc|576|___|2015|el=no}}.</ref> Malango gha Dango la Malango gha charu ghakumupaso pulezidenti mazaza ghakuŵika mabambasada gha United States, kweniso kupereka na kudumbiskana chomene mapangano pakati pa United States na vyaru vinyake. Mapangano agha, para ghazomerezgeka na ulangizi na chivomerezgo cha Seneti ya U.S. (na mavoti gha [[Supermajority|maghanaghano ghaŵiri pa vigaŵa vitatu]]), ghakuŵa ghakukaka nga ni dango la boma. Nangauli nkhani za vyakuwaro zikaŵa nyengo zose chigaŵa chakuzirwa cha maudindo gha pulezidenti, kusintha kwa tekinoloje kufuma apo Dango la Malango likakhazikiskikira kwasazgirako mazaza gha pulezidenti. Kale mabambasada ŵakaŵa na mazaza ghakuru gha kudumbiskana mwakujiyimira paŵekha mu zina la United States, kweni sono mapulezidenti ŵakukumana nyengo zose mwakudunjika na ŵalongozgi ŵa vyaru vinyake. === Mulongozgi mukuru wa ŵasilikari (Commander-in-chief) === [[File:Lincoln O-62 by Gardner, 1862-crop.jpg|thumb|Pulezidenti [[Abraham Lincoln]] wakavikilira mwakukwana [[Union (American Civil War)|Union]] mu nyengo ya [[American Civil War|Nkhondo ya pa Wenenawene ya ku America]]. Pano wali (pakati) na General [[George B. McClellan]] (kumazere), ndiposo ŵasilikari ku [[Antietam National Battlefield|Antietam]], pa Okutobala 3, 1862.]] Chimoza mwa mazaza ghakuzirwa chomene gha wupu wakulongozga ni mulimo wa pulezidenti nga ni [[Powers of the president of the United States#Commander-in-chief|mulongozgi mukuru wa ŵasilikari]] wa [[United States Armed Forces|Ŵasilikari ŵa United States]]. Mazaza ghakupharazga nkhondo ghali mu mawoko gha Kongiresi mwakuyana na dango la malango, kweni pulezidenti wali na mulimo wakumalizga wakulongozga na kupangiska ndondomeko za ŵasilikari. Mlingo weneko wa mazaza agho Dango la Malango likumupa pulezidenti nga ni mulongozgi mukuru wa ŵasilikari waŵa nkhani ya kudumbirana chomene mu mdauko, apo Kongiresi nyengo zinyake yamupanga mazaza ghakuru ndipo nyengo zinyake yikayezga kuchepeska mazaza agha.<ref>{{Cite web |url=https://constitutioncenter.org/interactive-constitution/articles/article-ii/commander-in-chief-clause-ramsey-and-vladeck/clause/25 |title=Common Interpretation: Commander in Chief Clause |last1=Ramsey |first1=Michael |last2=Vladeck |first2=Stephen |website=National Constitution Center Educational Resources (some internal navigation required) |publisher=National Constitution Center |access-date=May 23, 2017}}</ref> Ŵalembi ŵa Dango la Malango ŵakaphalira makora kuchepeska mazaza gha pulezidenti pa nkhani za ŵasilikari; [[Alexander Hamilton]] wakalongosora mu [[Federalist No. 69]] kuti:{{blockquote|Pulezidenti ndiyo wakwenera kuŵa mulongozgi mukuru wa ŵasilikari na sitima za nkhondo za United States.{{nbsp}}... Ichi chikung'anamura waka ulongozgi ukuru na kulongozga ŵasilikari na ŵanyamata ŵa sitima za nkhondo{{nbsp}}... apo [mazaza] gha [[Monarchy of Great Britain|themba la Britain]] ghakusazgapo KUPHARAZGA nkhondo na KULENGA NA KULONGOZGA magulu gha ŵasilikari na sitima za nkhondo, vyose ivi{{nbsp}}... vikeneranga kuŵa vya wupu wakupanga malango.<ref>[[Alexander Hamilton|Hamilton, Alexander]]. [http://www.constitution.org/fed/federa69.htm ''The Federalist'' #69] (reposting). Retrieved June 15, 2007.</ref> [Mazgu ghakudidimizgika mu chakwamba.]|sign=|source=}} Mu nyengo yasono, mwakuyana na [[War Powers Resolution|Dango la Mazaza gha Nkhondo]], Kongiresi yikwenera kuzomerezga kutumizga ŵasilikari kuluta ku malo ghanyake kwa mazuŵa ghakujumpha 60, nangauli ndondomeko iyi yikuthemba pa vinthu vyakuyambiska ivyo vindagwiriskikepo ntchito, ndipo ichi chapangiska kuti yileke kugwira ntchito makora.<ref name="miller-center">{{Cite web |url=http://millercenter.org/policy/commissions/warpowers/report |title=The National War Powers Commission Report |last1=Christopher |first1=James A. |last2=Baker, III |date=July 8, 2008 |publisher=The Miller Center of Public Affairs at the University of Virginia |format=PDF |url-status=dead |archive-url=https://web.archive.org/web/20101126165009/http://millercenter.org/policy/commissions/warpowers/report |archive-date=November 26, 2010 |access-date=December 15, 2010 |quote=No clear mechanism or requirement exists today for the president and Congress to consult. The War Powers Resolution of 1973 contains only vague consultation requirements. Instead, it relies on reporting requirements that, if triggered, begin the clock running for Congress to approve the particular armed conflict. By the terms of the 1973 Resolution, however, Congress need not act to disapprove the conflict; the cessation of all hostilities is required in 60 to 90 days merely if Congress fails to act. Many have criticized this aspect of the Resolution as unwise and unconstitutional, and no president in the past 35 years has filed a report "pursuant" to these triggering provisions. }}</ref> Kweniso, Kongiresi yikupeleka mphaka ku mazaza gha pulezidenti pa ŵasilikari kwizira mu kulamulira ndalama za ŵasilikari na malango ghawo. Mapulezidenti mu mdauko ŵakambiska nyengo zinandi ndondomeko zakunjira mu nkhondo,<ref name="tws12novef">{{Cite news |url=http://www.time.com/time/magazine/article/0,9171,878290,00.html |archive-url=https://web.archive.org/web/20080107101712/http://www.time.com/time/magazine/article/0,9171,878290,00.html |url-status=dead |archive-date=January 7, 2008 |title=The Law: The President's War Powers |date=June 1, 1970 |magazine=Time |access-date=September 28, 2009 }}</ref><ref name="tws8nov102">{{Cite news |last=Mitchell |first=Alison |url=https://www.nytimes.com/1999/05/02/weekinreview/the-world-only-congress-can-declare-war-really-it-s-true.html |title=The World; Only Congress Can Declare War. Really. It's True |date=May 2, 1999 |work=The New York Times |access-date=November 8, 2009 |quote=Presidents have sent forces abroad more than 100 times; Congress has declared war only five times: the War of 1812, the Mexican War, the Spanish–American War, World War I and World War II.}}</ref> kweni ŵakususka ŵayowoya kuti pakaŵa mikangano yinandi iyo mapulezidenti ŵakachitapo nkhondo kwambura kupokera chiphani chakuzomerezgeka, kusazgapo kuluta kwa ŵasilikari ŵa [[Theodore Roosevelt]] ku [[Panama]] mu 1903,<ref name="tws12novef" /> [[Korean War|Nkhondo ya Korea]],<ref name="tws12novef" /> [[Vietnam War|Nkhondo ya Vietnam]],<ref name="tws12novef" /> ndiposo kuwukira kwa [[Grenada]] mu 1983<ref name="tws8nov101">{{Cite news |last=Mitchell |first=Alison |url=https://www.nytimes.com/1999/05/02/weekinreview/the-world-only-congress-can-declare-war-really-it-s-true.html |title=The World; Only Congress Can Declare War. Really. It's True |date=May 2, 1999 |work=The New York Times |access-date=November 8, 2009 |quote=President Reagan told Congress of the invasion of Grenada two hours after he had ordered the landing. He told Congressional leaders of the bombing of Libya while the aircraft were on their way.}}</ref> na [[Panama]] mu 1989.<ref name="tws8nov100">{{Cite news |last=Gordon |first=Michael R. |url=https://www.nytimes.com/learning/general/onthisday/big/1220.html#article |title=U.S. troops move in Panama in effort to seize Noriega; gunfire is heard in capital |date=December 20, 1990 |work=The New York Times |access-date=November 8, 2009 |quote=It was not clear whether the White House consulted with Congressional leaders about the military action, or notified them in advance. Thomas S. Foley, the Speaker of the House, said on Tuesday night that he had not been alerted by the Administration.}}</ref> Nkhongono ya usilikari iyo pulezidenti wakulongozga yekha pa nyengo ya nkhondo yasintha chomene.Andrew J. Polsky, ''Elusive Victories: The American Presidency at War'' (Oxford University Press, 2012) [https://www.h-net.org/reviews/showrev.php?id=37003 online review] [[George Washington]], pulezidenti wakwamba wa United States, wakakhazikiska mwamphamvu [[Kulongozgeka kwa ŵasilikari na ŵanthu bweka|kujilambika kwa usilikari ku mazaza gha ŵanthu bweka]]. Mu 1794, Washington wakagwiliskira ntchito nkhongono zake za mu dango la malango kuwunganya ŵasilikari ŵa [[Militia]] ŵakukwana 12,000 kuti ŵamazge [[Chiwukirano cha Whiskey|Chiwukirano cha Whiskey]], nkhondo iyo yikachitika mu [[Western Pennsylvania|Western Pennsylvania]] yakukhwaskana na ŵalimi ŵakuvwara vilwero na ŵakupanga moŵa awo ŵakakana kulipira msonkho wa pa moŵa wa mizimu. Mwakuyana na mulembi wa mdauko [[Joseph Ellis]], iyi yikaŵa "nyengo yakwamba ndiposo yimoza pera apo pulezidenti wa America uyo wakaŵa pa udindo wakalongozga ŵasilikari pa malo gha nkhondo", nangauli [[James Madison]] wakalongozga kwa kanyengo waka magulu gha ŵasilikari ŵa mfuti zikuru pakuvikilira [[Kuwotcheka kwa Washington|Washington, D.C.]], pa nyengo ya [[Nkhondo ya 1812|Nkhondo ya 1812]].{{Cite web |url=http://www.history.org/foundation/journal/summer12/george.cfm |title=George Washington and the Evolution of the American Commander in Chief |publisher=The Colonial Williamsburg Foundation}} [[Abraham Lincoln]] wakachitanga mulimo ukuru pakunozga ndondomeko yose ya nkhondo ndiposo pa ntchito za zuŵa na zuŵa pa nyengo ya [[Nkhondo ya pa Charu ya ku America|Nkhondo ya pa Charu ya ku America]], 1861–1865; ndipo ŵakulemba mdauko ŵakamulumba chomene Lincoln chifukwa cha mahara ghake gha ndondomeko ya nkhondo ndiposo luso lwake lwakusankha na kukhozga ŵalongozgi ŵasilikari nga ni [[Ulysses S. Grant]].James M. McPherson, ''Tried by War: Abraham Lincoln As Commander in Chief'' (2009) Ulongozgi wa ntchito za zuŵa na zuŵa za ŵasilikari masiku ghano ukupika ku [[Dipatimenti ya Vyakuvikilira ya United States|Dipatimenti ya Vyakuvikilira]] ndipo kanandi ukuchitika kwizira mwa [[Mlembi wa Vyakuvikilira wa United States|Mlembi wa Vyakuvikilira]]. [[Mulongozgi wa Joint Chiefs of Staff|Mulongozgi wa Joint Chiefs of Staff]] pamoza na [[Combatant Commands|Combatant Commands]] ŵakovwira pa ulongozgi wa ntchito izi mwakuyana na Unified Command Plan (UCP) iyo yavomerezgeka na pulezidenti.{{Cite news |url=https://www.defense.gov/releases/release.aspx?releaseid=14398 |title=DOD Releases Unified Command Plan 2011 |date=April 8, 2011 |work=[[United States Department of Defense]] |access-date=February 25, 2013 |url-status=dead |archive-url=https://web.archive.org/web/20110513070316/http://www.defense.gov/releases/release.aspx?releaseid=14398 |archive-date=May 13, 2011}}{{USC|10|164}}[[Joint Chiefs of Staff]]. [https://web.archive.org/web/20090416022040/http://www.jcs.mil/page.aspx?id=2 About the Joint Chiefs of Staff]. Retrieved February 25, 2013. == Nkhongono za vyeruzgo == {{Further|[[Mndandanda wa ŵanthu awo ŵakapika chigowokero panji kulekelereka na pulezidenti wa United States|Mndandanda wa ŵanthu awo ŵakapika chigowokero panji kulekelereka na pulezidenti wa United States]]}} {{Update|section|reason=The case [[Trump v. United States (2024)|Trump v. United States (2024)]]|date=July 2024}} [[File: P20220408AS-1467 (52067437977).jpg|thumb|Pulezidenti [[Joe Biden]] pamoza na wakweruzga wa [[Khoti Likuru Chomene la United States|Khoti Likuru Chomene]] uyo wakamusankha, [[Ketanji Brown Jackson]], kweniso Wachiwiri wa Pulezidenti [[Kamala Harris]] (uyo wali kumanyuma) pamanyuma pakuti Brown Jackson wazomerezgeke na [[Senate ya United States|Senate ya United States]] mu 2022]] Pulezidenti wali na mazaza ghakusankha [[Muweruzgi wa federo wa United States|ŵeruzgi ŵa federo]], kusazgapoŵanthu mu [[Makhoti gha Chikwenu gha United States|Makhoti gha Chikwenu gha United States]] na [[Khoti Likuru la United States|Khoti Likuru la United States]]. Kweni, visankho ivi vikukhumbikwira [[Ndangaulizgi na chizomerezgo#United States|kuzomerezgeka na Senate]] pambere ŵangamba mulimo. Kupokelera chizomerezgo cha Senate chingaŵa chinthu chikuru chakususka ku ŵalongozgi awo ŵakukhumba kunyoloska makhoti gha federo kuya na maghanoghano ghawo. Para ŵakusankha ŵeruzgi mu [[Khoti la Boma la United States|makhoti gha boma gha United States]], ŵalongozgi kanandi ŵakuchindika muzgo wakale wa [[Muzgo wa Senate|muzgo wa Senate]]. Ŵalongozgi ŵangaŵaso na mazaza ghakupereka [[Chigowokero|vigowokero]] na kuchedweska chilango. [[Gerald Ford]] wakagowokera [[Richard Nixon]] mwezi umoza pamanyuma pa kwamba mulimo wake. Ŵalongozgi kanandi ŵakupereka vigowokero pafupi na para ŵakuti ŵafumepo mu udindo wawo, nga umo [[Bill Clinton]] wakagowokera [[Patty Hearst]] pa zuŵa lake laumaliro mu udindo; ichi nchakukayikiska kanandi.<ref name="tws8nov12">{{Cite news |last=Johnston |first=David |url=https://www.nytimes.com/learning/general/onthisday/big/1224.html |title=Bush Pardons Six in Iran Affair, Aborting a Weinberger Trial; Prosecutor Assails 'Cover-Up' |date=December 24, 1992 |work=The New York Times |access-date=November 8, 2009 |quote=But not since President Gerald R. Ford granted clemency to former President Richard M. Nixon for possible crimes in Watergate has a Presidential pardon so pointedly raised the issue of whether the president was trying to shield officials for political purposes.}}</ref><ref name="tws8nov11">{{Cite news |last=Johnston |first=David |url=https://www.nytimes.com/learning/general/onthisday/big/1224.html |title=Bush Pardons Six in Iran Affair, Aborting a Weinberger Trial; Prosecutor Assails 'Cover-Up' |date=December 24, 1992 |work=The New York Times |access-date=November 8, 2009 |quote=The prosecutor charged that Mr. Weinberger's efforts to hide his notes may have 'forestalled impeachment proceedings against President Reagan' and formed part of a pattern of 'deception and obstruction'.{{nbsp}}... In light of President Bush's own misconduct, we are gravely concerned about his decision to pardon others who lied to Congress and obstructed official investigations.}}</ref><ref name="tws8nov10">{{Cite news |last=Eisler |first=Peter |url=https://www.usatoday.com/news/washington/2008-03-06-clinton-library-foia_N.htm |title=Clinton-papers release blocked |date=March 7, 2008 |work=USA Today |access-date=November 8, 2009 |quote=Former president Clinton issued 140 pardons on his last day in office, including several to controversial figures, such as commodities trader Rich, then a fugitive on tax evasion charges. Rich's ex-wife, Denise, contributed $2,000 in 1999 to Hillary Clinton's Senate campaign; $5,000 to a related political action committee; and $450,000 to a fund set up to build the Clinton library.}}</ref> Malango ghaŵiri ghakukhwaskana na mazaza gha boma ghakawoneka agho ghakuzomerezga pulezidenti kuti wachite milimo yake mwakujilongozga yekha munjila yinyake. Lakwamba ni [[Ufulu Wapadera wa Boma|ufulu wapadera wa boma]], uwo ukuzomerezga pulezidenti kuti waleke kuvumbura nkhani zauzgani izo zikachitika pakati pake nayo pakuchita milimo ya boma. George Washington ndiyo wakayambirizga kudemba ufulu uwu apo Bungwe la Congress likaŵeya kuwona vyalembo vya [[Muweruzgi Mkuru wa United States|Muweruzgi Mkuru]] [[John Jay]] kufuma ku chiwerengero cha phangano lakusuzga na [[Ufumu wa Great Britain|Great Britain]]. Nangauli chindindindi ichi chindalembeke mu Constitution panji dango linyake lililose, kuchita kwa Washington kukapangiska umboni wakwamba wa ufulu uwu. Apo Nixon wakayezga kugwiliskira ntchito ufulu wapadera wa boma kuŵa chifukwa chakukana kupeleka ukaboni uwo ukalongozgeka na Congress mu nyengo ya [[Nkhani ya Watergate|nkhani ya Watergate]], Khoti Likuru likazomerezga mu ''[[United States v. Nixon]]'', kuti ufulu wapadera wa boma ukazomerezgeka yayi mu nkhani izo pulezidenti wakayezganga kutaŵaka ku milandu yaupolisi. Apo Bill Clinton wakayezga kugwiliskira ntchito ufulu wapadera wa boma pa nkhani ya [[Nkhani ya Clinton–Lewinsky|nkhani ya Lewinsky]], Khoti Likuru likazomerezga mu ''[[Clinton v. Jones]]'', kuti ufulu uwu ungagwiliskikaso ntchito yayi mu milandu ya ŵanthu ŵaŵiri. Milandu iyi yikakhazikiska [[Fundo Yakale|fundo yakale ya malango]] yakuti ufulu wapadera wa boma ngwaunenesko, nangauli umo ufulu uwu ukufikira nkhathomo undalongosoreke makora. Kuwonjezgapo, makhoti gha federo ghazomerezga ufulu uwu kuti ukhwaskeso ŵanthu ŵanyake awo ŵakuteŵetera mu nthowa ya boma kweni ghawovwira yayi comene ku uzgani wa nthowa ya boma uwo pulezidenti wandavutikepo.<ref>{{Cite web |url=http://www.americanprogress.org/issues/2010/06/executive_privilege.html |title=Executive Privilege 101 |last=Millhiser, Ian |date=June 1, 2010 |publisher=Center for American Progress |access-date=October 8, 2010 |archive-date=June 9, 2010 |archive-url=https://web.archive.org/web/20100609224239/http://www.americanprogress.org/issues/2010/06/executive_privilege.html |url-status=dead }}</ref> [[Mwaŵi wakubisa vyamchindindi vya boma]] ukupeleka mazaza kwa pulezidenti na nthambi ya ulongozgi kubisa uthenga panji mabuku ku [[Discovery (law)|kufufuza kwa umboni]] mu milandu ya pa khoti usange kuwonekera kwake kungananga [[chivikiliro cha charu]]. Chiyambi cha mwaŵi uwu chikawoneka kukwambilira kwa vyaka vya m'ma 1800 apo [[Thomas Jefferson]] wakakana kupeleka mabuku gha nkhondo pa mulandu wa [[chiwembu chakugalukira boma]] wa [[Aaron Burr]], ndipo pamanyuma mu ''[[Totten v. United States]]'', apo Khoti Likuru Chomene likadumura mulandu uwo ukapelekeka na kazondi wakale wa Union.{{cite case |url=https://caselaw.findlaw.com/us-9th-circuit/1537579.html |title=Mohamed v. Jeppesen Dataplan |chapter=Part III |via=FindLaw |access-date=November 29, 2010}} Ndipouli, mwaŵi uwu ukazomerezgeka mwalamulo na Khoti Likuru Chomene la United States yayi m'paka pa mulandu wa ''[[United States v. Reynolds]]'', apo ukawonekera kuti ni mwaŵi wa [[common law]] wa [[Evidence (law)|umboni]].{{Cite web |url=https://www.acslaw.org/issue_brief/briefs-2007-2011/reforming-the-state-secrets-privilege/ |title=Reforming the State Secrets Privilege |last1=Frost |first1=Amanda |last2=Florence |first2=Justin |year=2009 |publisher=[[American Constitution Society]] |access-date=November 9, 2017}} Pambere [[vigaŵa vya pa Seputembala 11]] vindachitike, kugwiliskira ntchito mwaŵi uwu kukaŵa kwakuchitika nyengo zinyake waka, kweni kukamba kwasazgikiranga chomene.{{Cite journal |last1=Weaver |first1=William G. |last2=Pallitto |first2=Robert M. |year=2005 |title=State Secrets and Executive Power |journal=[[Political Science Quarterly]] |volume=120 |issue=1 |pages=85–112 |doi=10.1002/j.1538-165x.2005.tb00539.x |quote=Use of the state secrets privilege in courts has grown significantly over the last twenty-five years. In the twenty-three years between the decision in Reynolds [1953] and the election of Jimmy Carter, in 1976, there were four reported cases in which the government invoked the privilege. Between 1977 and 2001, there were a total of fifty-one reported cases in which courts ruled on invocation of the privilege. Because reported cases represent only a fraction of the total cases in which the privilege is invoked or implicated, it is unclear precisely how dramatically the use of the privilege has grown. But the increase in reported cases is indicative of greater willingness to assert the privilege than in the past.}} Kwambira mu 2001, boma lagwiliskira ntchito mwaŵi uwu mu milandu yinandi ndiposo pa nyengo yakwambilira ya mulandu, ndipo nyengo zinyake ichi chachitiska kuti milandu yimare pambere khoti lindafike pa fundo zikuru za madandawuro, nga umo vikawonekera pa cheruzgo cha [[Khoti la Apilu la United States la Dera la Naini|Khoti la Apilu la Dera la Naini]] mu ''[[Mohamed v. Jeppesen Dataplan, Inc.]]''.{{Cite news |last=Savage |first=Charlie |url=https://www.nytimes.com/2010/09/09/us/09secrets.html |title=Court Dismisses a Case Asserting Torture by C.I.A. |date=September 8, 2010 |work=[[The New York Times]] |access-date=October 8, 2010}}{{Cite news |last=Finn |first=Peter |url=https://www.washingtonpost.com/wp-dyn/content/article/2010/09/08/AR2010090807334.html |title=Suit dismissed against firm in CIA rendition case |date=September 9, 2010 |newspaper=[[The Washington Post]] |access-date=October 8, 2010}} Ŵakususka mwaŵi uwu ŵakuti kugwiliskira ntchito kwake kwazgoka nthowa yakubisira milimo ya boma iyo yikaŵa yakwambura kuzomerezgeka panji yakukhozga soni.{{Cite web |url=http://www.salon.com/news/opinion/glenn_greenwald/2009/02/10/obama |title=The 180-degree reversal of Obama's State Secrets position |last=Glenn Greenwald |author-link=Glenn Greenwald |date=February 10, 2009 |website=Salon |access-date=October 8, 2010}}{{Cite web |url=https://www.aclu.org/national-security/background-state-secrets-privilege |title=Background on the State Secrets Privilege |date=January 31, 2007 |publisher=[[American Civil Liberties Union]] |access-date=October 8, 2010}} Kasi pulezidenti wali na [[absolute immunity|chivikiliro chakukwana]] kufuma ku milandu ya pa khoti mpaka pa mlingo wuli, nkhani iyi yikususkana ndipo yakhala yikweruzgikapo mu vyeruzgo vinandi vya Khoti Likuru Chomene. ''[[Nixon v. Fitzgerald]]'' (1982) yikadumura mulandu wa boma uwo ukapelekeka ku pulezidenti wakale Richard Nixon chifukwa cha milimo yake ya pa udindo. ''[[Clinton v. Jones]]'' (1997) yikadumura kuti pulezidenti walije chivikiliro ku milandu ya boma pa milimo iyo wakachita pambere wandazgoke pulezidenti, ndipo yikadumura kuti mulandu wa kuzunura munthu pa nkhani ya kugonana ungapitilirira kwambura kuchedwa, nangauli uyo wakususkika wakaŵa pulezidenti wakukhala pa udindo. [[Lipoti la Mueller]] la 2019 pa kunjilirapo kwa Russia mu [[Visola vya pulezidenti vya United States vya 2016|visola vya pulezidenti vya United States vya 2016]] likalongosora ukaboni wa [[kunangiska urunji]], kweni ŵakufufuza ŵakakana kupeleka [[Donald Trump]] ku mulandu chifukwa cha ndondomeko ya [[Unduna wa Chilungamo wa United States]] yakukanizga kususka pulezidenti uyo wachali pa udindo. Lipoti ili likati kufumiska pulezidenti pa udindo na Congress kukaŵa nthowa yimoza yakumazgira suzgo ili. Kufika mu Okutobala 2019, mulandu ukaŵa uchali mu makhoti gha boma pa nkhani ya kusanga malipoti gha msonkho gha Donald Trump pa mulandu wa uheni uwo ukapelekeka na [[Loya Mukuru wa Chigaŵa cha New York]] chifukwa cha kuswa malango gha boma la New York.{{Cite news|url=https://www.npr.org/2019/10/07/767830713/federal-judge-rules-trump-must-hand-over-8-years-of-tax-returns|title=President Trump Doesn't Need To Release His Tax Returns — For Now|website=[[NPR]]|date=October 7, 2019|access-date=April 28, 2020|last1=Brown|first1=Tanya Ballard}} Makalata gha [[Office of Legal Counsel]] agho ghakafuma mu 1973 na 2000 ghakakanizga mukati mwa Unduna wa Chilungamo kususka pulezidenti pa mulandu wa uheni, icho ŵasambizgi ŵanyake ŵa malango ŵakususkira kweni ŵanyake ŵakuchizomerezga.{{cite journal |last1=Prakash |first1=Saikrishna Bangalore |title=Prosecuting and Punishing Our Presidents. |journal=[[Texas Law Review]] |date=November 2021 |volume=100 |issue=1 |pages=55–113 |url=https://texaslawreview.org/prosecuting-and-punishing-our-presidents/ |access-date=31 March 2023 |ssrn=4039230 |id={{EBSCOhost|154035452|dbcode=a9h}}}} Pakujivikilira ku mulandu wa boma wa uheni pa [[Federal prosecution of Donald Trump (election obstruction case)|ivyo wakususkikira kuti wakayezga kunangiska visola vya 2020]], mu Janyuwale 2024, Trump wakaphalira [[Khoti la Apilu la DC Circuit]] kuti pulezidenti wali na [[absolute immunity|chivikiliro chakukwana]] ku milandu ya uheni pa vinthu ivyo wachita apo wakaŵa pa udindo. Mwezi wakulondezgapo, gulu la ŵeruzgi ŵatatu la khoti ili likadumura mwakukolerana kuti Trump wakaŵavya mazaza agha. Aka kakaŵa kakwamba kuti khoti la apilu lidumbiskane nkhani ya chivikiliro cha pulezidenti cha mtundu uwu, chifukwa pakaŵavya pulezidenti uyo wakaŵa pa udindo panji wakale uyo wakasuskikapo pa mulandu wa uheni.{{cite news |title=Federal Appeals Court Rejects Trump's Claim of Absolute Immunity |url=https://www.nytimes.com/2024/02/06/us/politics/trump-immunity-appeals-court.html |work=The New York Times |date=February 6, 2024|author1=Alan Feuer|author2=Charlie Savage}} Mu ''[[Trump v. United States (2024)|Trump v. United States]]'', pa Julayi 1, 2024, Khoti Likuru Chomene likadumura kuti mapulezidenti ŵali na [[absolute immunity|chivikiliro chakukwana]] para ŵakugwiliskira ntchito mazaza ghakuru agho ghali kulembeka mu Dango Likuru, [[presumption|kughanaghana kuti pali chivikiliro]] pa milimo yinyake ya pa udindo, kweni palije chivikiliro pa milimo ya munthu payekha iyo yikukhwaskana yayi na udindo. Mulandu uwu ukaweleraso ku makhoti ghapasi kuti ghadumbiske kuti ni milimo yili iyo yikwenera kuwoneka kuti nja pa udindo panji nja munthu payekha.{{cite news|url=https://www.theguardian.com/us-news/article/2024/jul/02/presidential-immunity-trump-lawsuits|title=What does the immunity ruling mean for Trump's criminal cases?|work= The Guardian}} Aka kakaŵa kakwamba kuti makhoti ghapeleke pulezidenti chivikiliro ku milandu ya uheni. == Maudindo gha ulongozgi == === Mutu wa boma === {{listen|filename=Four ruffles and flourishes, hail to the chief (long version).ogg|title=Four ruffles and flourishes and 'Hail to the Chief' (long version)}} Nga ni [[mutu wa boma]], pulezidenti wakwimira boma la United States ku ŵanthu ŵake ndipo wakwimira charu ku vyaru vinyake pa charu chose. Mwachiyelezgero, para mutu wa boma wa charu chinyake wafika pa ulendo wa boma, kanandi pulezidenti wakuchitiska [[State visits to the United States|mwambo wakupokelera mutu wa boma]] uwo ukuchitikira pa [[South Lawn (White House)|South Lawn]], mwambo uwo ukambika na [[John F. Kennedy]] mu 1961.{{Cite book |last1=Abbott |first1=James A. |url=https://archive.org/details/designingcamelot0000abbo |title=Designing Camelot: The Kennedy White House Restoration |last2=Rice |first2=Elaine M. |publisher=Van Nostrand Reinhold |year=1998 |isbn=978-0-442-02532-8 |pages=[https://archive.org/details/designingcamelot0000abbo/page/9 9]–10 |url-access=registration}} Pamanyuma pake pakuchitika [[state dinner]] iyo pulezidenti wakupeleka mu [[State Dining Room of the White House|State Dining Room]] kumise.{{Cite web |url=https://www.whitehousehistory.org/the-white-house-state-dinner |title=The White House State Dinner |website=The White House Historical Association |access-date=November 9, 2017}} [[File:Wilson opening day 1916.jpg|thumb|Pulezidenti [[Woodrow Wilson]] wakuponya bola lakwamba la mwambo pa [[Opening Day]] mu 1916.]] [[File:President Bill Clinton at Buckingham Palace.jpg|thumb|Pulezidenti [[Bill Clinton]] wakuwona gulu la ŵasilikari ŵa ntchindi pa [[Buckingham Palace]] pa ulendo wa boma ku United Kingdom mu 1995.]] Nga ni mulongozgi wa charu, pulezidenti wakufiska maudindo ghanandi ghambura kuŵa gha boma chomene agho ghakukhwaskana na mwambo. Mwachiyelezgero, [[William Howard Taft]] wakambiska mwambo wa kuponya [[ceremonial first pitch|bola lakwamba la mwambo]] mu 1910 pa [[Griffith Stadium]], Washington, D.C., pa [[Opening Day]] ya [[Minnesota Twins#Washington Nationals/Senators: 1901–1960|Washington Senators]]. Pulezidenti waliyose kufuma kwa Taft, kupatulapo [[Jimmy Carter]], waponya bola limoza lakwamba la mwambo pa Opening Day, pa [[Major League Baseball All-Star Game|All-Star Game]], panji pa [[World Series]], kanandi pakuŵa chikondwelero chikuru.{{Cite news |last=Duggan |first=Paul |url=https://www.washingtonpost.com/wp-dyn/content/article/2007/04/01/AR2007040101262.html |title=Balking at the First Pitch |date=April 2, 2007 |newspaper=[[The Washington Post]] |page=A01}} Pulezidenti waliyose kufuma kwa [[Theodore Roosevelt]] waŵa pulezidenti wa ntchindi wa [[Boy Scouts of America]].{{Cite web |url=http://www.scouting.org/filestore/pdf/210-531_WB.pdf |title=History of the BSA Fact Sheet |publisher=Boy Scouts of America |url-status=dead |archive-url=https://web.archive.org/web/20140629031545/http://www.scouting.org/filestore/pdf/210-531_WB.pdf |archive-date=June 29, 2014 |access-date=November 9, 2017}} === Mutu wa chipani === [[File:President Reagan giving his acceptance speech at the Republican National Convention in Dallas Texas.jpg|alt=|thumb|Pulezidenti [[Ronald Reagan]] wakuyowoya mazgu ghake ghakuzomera kusankhika pa [[1984 Republican National Convention]].]] Kanandi pulezidenti wakuwoneka nga ni mutu ndiposo muyowoyeri wa chipani chake cha ndyali. Kufuma apo visola vya kuwoneska ŵanthu ŵakusankhika (binding primaries) vikambira mu vyaru vinandi vya boma, ŵanthu awo ŵakusankhika kuŵa ŵakwimilira chipani pa visola vya pulezidenti kanandi ŵakuŵa na wovwiri wa ŵavoti ŵanandi ŵa chipani chawo. Pakuti Nyumba yose ya Ŵimiliri na pafupifupi chigaŵa chimoza pa vitatu cha Seneti vikusoleka pa nyengo yimoza na pulezidenti, kupunda kwa ŵakwimira chipani pa visola kanandi kukukolerana na umo wakwimira chipani pa visola vya pulezidenti wachitira. [[Coattail effect]], panji kusoŵa kwake, nayo kanandi wakukhwaska ŵakwimira chipani pa visola vya boma na vya mu vigaŵa. Ndipouli, kanandi pakuŵa mphindano pakati pa pulezidenti na ŵanyake mu chipani, ndipo mapulezidenti awo ŵakutaya wovwiri ukuru wa ŵa chipani chawo mu Congress kanandi ŵakuwoneka kuti mbafoka ndiposo ŵakuchita makora yayi. Kweniso, chifukwa United States ni boma la ndondomeko ya phalamende yayi, chipani cha pulezidenti chikusoŵa kanandi unandi wa ŵimiliri mu nyumba yimoza panji zose za Congress, panji pa maudindo gha mabwanamkubwa na mu nyumba za malango za vyaru vinandi. === Mulongozgi wa pa charu chose === Na kukura kwa United States kuŵa [[superpower|charu chankhongono chomene]] mu vyaka vya m'ma 1900, ndiposo kuŵa na chuma chikuru chomene pa charu chose mu vyaka vya m'ma 2000, kanandi pulezidenti wakuwoneka nga ni mulongozgi wa pa charu chose, ndipo nyengo zinyake nga ni munthu wa ndyali wali na nkhongono zikuru chomene pa charu. Udindo wa United States nga ni membara mukuru wa [[NATO]], ndiposo ubwezi wake wakukhora na vyaru vinyake vyasambazi panji vya demokilase nga ni ivyo vili mu [[European Union]], vyapangiska kuti pulezidenti wachemekenge kuti "[[mulongozgi wa charu cha wanangwa]]". == Ndondomeko ya kusankha == === Ivyo munthu wakwenera kuŵa navyo === [[Article Two of the United States Constitution#Clause 5: Qualifications for office|Article II, Section 1, Clause 5]] ya Dango Likuru yikulongosora vinthu vitatu ivyo munthu wakwenera kuŵa navyo kuti waŵe pulezidenti. Kuti munthu waŵe pulezidenti wakwenera: waŵe [[Natural-born-citizen clause (United States)|mwenekaya wa United States mwa kubabikira]]; waŵe na vyaka vyakukwana 35 panji kujumpha; waŵe [[Residency (domicile)#United States|wakukhala mu United States]] kwa vyaka vyakukwana 14.{{Cite web |url=https://constitutioncenter.org/interactive-constitution/articles/article-ii/article-ii-annenberg/interp/19 |title=Article II. The Executive Branch, Annenberg Classroom |website=The Interactive Constitution |publisher=The National Constitution Center |location=Philadelphia, Pennsylvania |access-date=June 15, 2018}} Munthu uyo wakufiska vyose ivyo vyalembeka pachanya wangatondeka kuŵa pulezidenti usange pali chilichose mwa ivi: Kuyana na [[Article One of the United States Constitution#Clause 7: Judgment in cases of impeachment; Punishment on conviction|Article I, Section 3, Clause 7]], usange munthu wakafumiskika pa udindo, wakasangika na mulandu ndiposo wakakanizgika kuŵaso na udindo uliwose wa boma, nangauli pali mphindano za malango pa nkhani yakuti dango ili likukhwaska so udindo wa pulezidenti: ŵanthu pera awo ŵali kukanizgikapo kuyana na dango ili ni ŵeruzgi ŵatatu ŵa boma.{{cite web |last1=Bernstein |first1=Richard D. |title=Lots of People Are Disqualified From Becoming President |url=https://www.theatlantic.com/ideas/archive/2021/02/trump-disqualification-president/617908/ |website=The Atlantic |access-date=March 1, 2021 |language=en |date=February 4, 2021 |quote=In addition to the list of people who are ineligible for reasons of mere demographic chance, the Constitution adds a category of people who cannot be elected as a result of their misdeeds. This category includes presidents (along with vice presidents and federal "civil officers") who are impeached, convicted by two-thirds of the Senate, and disqualified for serious misconduct committed while they were in office.}}{{cite web |last1=Wolfe |first1=Jan |title=Explainer: Impeachment or the 14th Amendment – Can Trump be barred from future office? |url=https://www.reuters.com/article/us-usa-trump-impeachment-explainer-idUSKBN29I356 |website=Reuters |access-date=March 1, 2021 |language=en |date=January 14, 2021}} Kuyana na [[Fourteenth Amendment to the United States Constitution#Participants in rebellion|Section 3 ya Amendment ya 14]], munthu waliyose uyo wakalapa kuti wavikilirenge Dango Likuru ndipo pamanyuma wakagalukira United States ngwakwenelera yayi kuŵa na udindo uliwose wa boma. Ndipouli, kukanizgika uku kungafumiskikapo na voti ya magawo ghaŵiri pa ghatatu gha nyumba yiliyose ya Congress.{{cite web|last=Moreno|first=Paul|title=Articles on Amendment XIV: Disqualification for Rebellion|url=https://www.heritage.org/constitution/#!/amendments/14/essays/173/disqualification-for-rebellion|archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/amendments/14/essays/173/disqualification-for-rebellion|url-status=unfit|archive-date=April 21, 2012|website=The Heritage Guide to the Constitution|publisher=The Heritage Foundation|access-date=June 15, 2018}} Kweniso, pali mphindano pa nkhani yakuti dango ili, umo lili kulembekera, lingakanizga munthu kuŵa pulezidenti panji lingakhumbikwira dankha mulandu kuwaro kwa Congress, nangauli pali viyelezgero vya kugwiliskira ntchito amendment iyi pa vinthu vinyake padera pa chilato chake chakwambilira cha kukanizga [[Confederate States of America|ŵa Confederacy]] kuŵa pa maudindo gha boma pamanyuma pa Nkhondo ya Ŵanaŵene.{{cite web |last1=Vlamis |first1=Kelsey |title=Here's how the 14th Amendment could be used to prevent Trump from running again |url=https://www.businessinsider.com/how-the-14th-amendment-could-prevent-trump-from-office-2021-2 |website=Business Insider |access-date=March 1, 2021}} Kuyana na [[Twenty-second Amendment to the United States Constitution|Amendment ya 22]], palije munthu wangasoleka kuŵa pulezidenti kujumpha kaŵiri. Amendment iyi yikulongosoraso kuti usange munthu wakwenerera wateŵetera nga ni pulezidenti panji pulezidenti wakuchitapo ntchito kwa vyaka vyakujumpha viŵiri vya nyengo iyo munthu munyake wakasoleka kuŵa pulezidenti, munthu wakwamba wangasolekaso kuŵa pulezidenti kamoza pera.{{cite journal|last1=Peabody|first1=Bruce G.|last2=Gant|first2=Scott E.|date=February 1999|title=The Twice and Future President: Constitutional Interstices and the Twenty-Second Amendment|url=http://alpha.fdu.edu/~peabody/Twice_and_Future_President.html|journal=Minnesota Law Review|volume=83|issue=3|pages=565–635|access-date=June 12, 2015|archive-url=https://web.archive.org/web/20130115121046/http://alpha.fdu.edu/~peabody/Twice_and_Future_President.html|archive-date=January 15, 2013}}{{cite journal|last=Albert|first=Richard|title=The Evolving Vice Presidency|journal=Temple Law Review|date=Winter 2005|volume=78|issue=4|url=https://lawdigitalcommons.bc.edu/cgi/viewcontent.cgi?referer=https://www.google.com/&httpsredir=1&article=1624&context=lsfp|pages=811–896|access-date=July 31, 2018|via=Digital Commons @ Boston College Law School}} === Uteŵeti wakale === {{Main|List of presidents of the United States by other offices held|List of presidents of the United States by previous experience|List of presidents of the United States by education}} Palije chakukhumbikwa kuti pulezidenti panji ŵakwimira pa udindo wa pulezidenti ŵaŵepo na udindo unyake pambere ŵandanjire pa udindo panji pa nyengo yeneyiyo. Ndipouli, pulezidenti waliyose, kupatulapo Donald Trump, wali kuŵapo [[Governor (United States)|kazembe wa boma]], [[United States Senate|seneta wa United States]], [[United States House of Representatives|membara wa Congress]], [[General officers in the United States|mulara wa ŵasilikari]], panji [[Cabinet of the United States|membara wa nduna za boma]]. Ntchito iyo mapulezidenti ŵanandi ŵakachitanga ni ya muloya, pakuti ŵanalume 27 pa 45 awo ŵateŵeterapo nga ni pulezidenti ŵakaŵa maloya.International Law, US Power: The United States' Quest for Legal Security, p 10, Shirley V. Scott—2012 Mapulezidenti ŵanyake awo ŵakazakaŵa mapulezidenti ŵakaleka kusambira panji kuchita ntchito ya uloya pambere ŵandazgoke mapulezidenti. Palije nyengo iyo munthu wakakhumbikwiranga kuŵa na katundu kuti waŵe pulezidenti panji kuŵa na udindo unyake wa boma, kweni mu vyaka vyakwambilira vya republic, pakaŵa [[Property qualification#United States of America|vyakukhumbikwa vya katundu kuti munthu wavote]] panji kuti waŵe pa maudindo ghanyake agho ghakafiskanga munthu kuŵa pulezidenti, chomenechomene pa udindo wa kazembe wa boma. Pambere Nkhondo ya Ŵanaŵene yindachitike, chikaŵa chakuzara kuti mapulezidenti ŵaŵe ŵanthu ŵa katundu munandi: mapulezidenti ŵa ku North kanandi ŵakaŵa na mafamu ghachoko, apo ŵanandi ŵa ku South ŵakaŵa na minda yikuru ndiposo [[List of presidents of the United States who owned slaves|ŵazga]].{{cite news|url=https://247wallst.com/special-report/2019/02/26/the-net-worth-of-the-american-presidents-washington-to-trump-2/|title=The Net Worth of the American Presidents: Washington to Trump|date=November 10, 2016|work=24/7 Wall St.|access-date=April 10, 2019|publisher=247wallst.com|archive-url=https://web.archive.org/web/20190410142809/https://247wallst.com/special-report/2019/02/26/the-net-worth-of-the-american-presidents-washington-to-trump-2/|archive-date=April 10, 2019|url-status=live}}{{cite web |last1=Whitney |first1=Gleaves |title=Slaveholding Presidents |url=https://scholarworks.gvsu.edu/cgi/viewcontent.cgi?article=1021&context=ask_gleaves |website=Ask Gleaves |publisher=Grand Valley State University |access-date=October 14, 2020 |ref=gvsu}} Nangauli mapulezidenti ŵanyake ŵakamanyuma ŵakafuma mu ukavu ukuru, ŵanyake, nga ni mbumba ya Roosevelt, John Kennedy, na Donald Trump, ŵakafuma mu mbumba zisambazi chomene. Ŵanalume 33 pa 45 awo ŵateŵeterapo nga ni pulezidenti, kusazgapo pulezidenti waliyose kwambira mu 1953 na wose kupatulapo yumoza kufuma mu 1901, ŵali kuŵa na digiri ya bachelor. Pa ŵanthu aŵa, [[Ivy League#U.S. presidents in the Ivy League|mapulezidenti 16]] ŵakasanga digiri ya Bachelor panji ya pachanya kufuma ku makoleji gha mu [[Ivy League]]. === Makampeni na kusankhika === {{Main|United States presidential primary|United States presidential nominating convention}} {{See also|United States presidential debates}} [[File:Carter Reagan Debate 10-28-80.png|thumb|Pulezidenti [[Jimmy Carter]] (kumazere) wakudumbiskana na wakwimira chipani cha Republican [[Ronald Reagan]] pa Okutobala 28, 1980, pa nyengo ya [[1980 United States presidential election|kampeni ya visola vya pulezidenti vya United States ya 1980]].]] Kampeni ya mazuŵa ghano ya pulezidenti yikwamba pambere [[United States presidential primary|visola vyakwambilira]] vindachitike, ivyo vipani viŵiri vikuru vya ndyali vikugwiliskira ntchito kupatura ŵakwimira pa visola pambere [[United States presidential nominating convention|misonkhano yawo ya kusankha wakwimira chipani]] yindachitike, uko munthu uyo wapunda chomene wakuzgoka wakwimira chipani pa visola vya pulezidenti. Kanandi, wakwimira chipani pa udindo wa pulezidenti wakusankha munthu wakwimira pa udindo wa wachiŵiri kwa pulezidenti, ndipo chisankho ichi [[Rubber stamp (politics)|chikuzomerezgeka]] na msonkhano. Ŵakwimira pa visola ŵakuchita [[United States presidential debates|nkhani za kudumbiskana]] izo zikuwoneskeka pa TV ya charu chose, ndipo nangauli nkhani izi kanandi zikuperekeka ku ŵakwimira [[Democratic Party (United States)|Democratic]] na [[Republican Party (United States)|Republican]] pera, [[Third party (United States)|ŵakwimira vipani vinyake]] nawo ŵangachemeka, nga ni [[Ross Perot]] pa [[1992 United States presidential debates|nkhani za 1992]]. Ŵakwimira pa visola ŵakwendakwenda mu charu chose kulongosora maghanoghano ghawo, kukopa ŵavoti na kupempha ndalama zakwendeskera kampeni. Chigaŵa chikuru cha visola vya mazuŵa ghano chikukhwaskana na kupunda mu [[swing state|vyaru vya boma vyakusintha voti]] kwizira mu maulendo ghanandi na malonda gha pa [[mass media]]. === Visola === {{Main|United States presidential election}} {{See also|United States Electoral College}} [[File:ElectoralCollege2028.svg|thumb|293x293px|Mapu gha [[United States]] agho ghakulongora unandi wa mavoti gha Electoral College agho ghakapelekeka ku [[U.S. state|boma]] lililose na [[Washington, D.C.|District of Columbia]] pamanyuma pa [[2020 United States census]] pa visola vya pulezidenti vya 2024 na 2028. Mavoti 270 gha Electoral College ghakukhumbikwa kuti munthu waŵe na unandi pa mavoti 538 agho ghali ghose.]] Pulezidenti wakusoleka mwambura kulunjika na ŵavoti ŵa boma lililose na [[Washington, D.C.|District of Columbia]] kwizira mu Electoral College, gulu la ŵakusora ilo likupangika pa vyaka vinayi vilivyose kuti lisore pulezidenti na wachiŵiri wake pa nyengo ya vyaka vinayi. Nga umo vikulembekera mu Article II, Section 1, Clause 2, boma lililose likuŵa na unandi wa ŵakusora wakuyana na unandi wa ŵimiliri ŵake mu nyumba zose ziŵiri za Congress. [[Twenty-third Amendment to the United States Constitution|Amendment ya 23]] yikupereka kuti District of Columbia yiŵe na unandi wa ŵakusora uwo yiŵenge nayo usange yikaŵa boma, kweni yingajumphanga yayi uwo boma ilo lili na ŵanthu ŵachoko chomene lili nawo.{{Cite web|url=http://www.annenbergclassroom.org/page/twenty-third-amendment|title=Twenty-third Amendment|date=March 29, 1961|website=Annenberg Classroom|publisher=The Annenberg Public Policy Center|location=Philadelphia, Pennsylvania|access-date=July 30, 2018}} Sono, maboma ghose na District of Columbia ghakusankha ŵakusora ŵawo kwizira mu visola vya ŵanthu wose.{{Cite web|url=https://fas.org/sgp/crs/misc/RL32611.pdf|title=The Electoral College: How It Works in Contemporary Presidential Elections|last=Neale|first=Thomas H.|date=May 15, 2017|website=CRS Report for Congress|publisher=Congressional Research Service|location=Washington, D.C.|page=13|access-date=July 29, 2018}} Mu maboma ghose kupatulapo ghaŵiri, chipani icho [[Ticket (election)|tikiti]] yake ya pulezidenti na wachiŵiri wake yapokera [[Plurality (voting)|mavoti ghanandi chomene]] mu boma, chikupokera [[Slate (elections)|gulu lose]] la ŵakusora ŵake kuŵa ŵakusora ŵa boma ilo.{{Cite web|url=https://www.archives.gov/federal-register/electoral-college/electors.html|title=About the Electors|website=U.S. Electoral College|publisher=[[National Archives and Records Administration]]|location=Washington, D.C.|access-date=August 2, 2018}} [[Maine]] na [[Nebraska]] vikulondezga yayi ndondomeko iyi ya {{nowrap|winner-take-all}}; vikupereka ŵakusora ŵaŵiri kwa uyo wapunda mu boma lose, na yumoza kwa uyo wapunda mu [[List of United States congressional districts|dela lililose la Congress]].{{Cite web|url=http://www.fairvote.org/maine_nebraska|title=Maine & Nebraska|publisher=FairVote|location=Takoma Park, Maryland|access-date=August 1, 2018|archive-date=August 2, 2018|archive-url=https://web.archive.org/web/20180802041058/http://www.fairvote.org/maine_nebraska|url-status=dead}}{{Cite web|url=https://www.270towin.com/content/split-electoral-votes-maine-and-nebraska/|title=Split Electoral Votes in Maine and Nebraska|website=[[270towin.com]]|access-date=August 1, 2018}} Pa Mande wakwamba pamanyuma pa Chitatu chachiŵiri cha mwezi wa Disembala, pafupifupi masabata ghankhondi na limoza pamanyuma pa visola, ŵakusora ŵakuwungana mu misumba yikuru ya maboma ghawo, na mu Washington, D.C., kuti ŵavotere pulezidenti, ndipo pa pepala linyake la voti, ŵavotere wachiŵiri kwa pulezidenti. Kanandi ŵakuvotera ŵakwimira chipani icho chikaŵasankha. Nangauli palije dango la mu Malango Ghakuru panji la boma ilo likuŵakakamizga kuchita nthena, District of Columbia na maboma 32 ghali na malango agho ghakukhumba kuti ŵakusora ŵavotere ŵakwimira awo ŵali [[Promise|kulayizgika]] kuvotera.{{cite web |title=Faithless Elector State Laws |url=https://www.fairvote.org/faithless_elector_state_laws |website=Fair Vote |access-date=March 4, 2020 |archive-date=December 19, 2016 |archive-url=https://web.archive.org/web/20161219162610/https://www.fairvote.org/faithless_elector_state_laws |url-status=dead }}{{cite web |title=Laws Binding Electors |url=http://presidentialelectorlaws.us |access-date=March 4, 2020}} Kuzomerezgeka kwa malango agha kukakhozgeka mu mulandu wa ''[[Chiafalo v. Washington]]'' (2020).{{Cite web|last=Howe|first=Amy|date=July 6, 2020|title=Opinion analysis: Court upholds "faithless elector" laws|url=https://www.scotusblog.com/2020/07/opinion-analysis-court-upholds-faithless-elector-laws/|access-date=July 11, 2020|website=[[SCOTUSblog]]}} Pamanyuma pa kuvota, boma lililose likutumizga mbiri yakukhozgeka ya mavoti ghake gha Electoral College ku Congress. Mavoti gha ŵakusora ghakujurika na kuŵerengeka pa ungano wakuphatikizika wa Congress uwo ukuchitika mu sabata yakwamba ya Janyuwale. Usange wakwimira pa visola wapokera [[Unandi wakukwana wa mavoti|mavoti ghanandi chomene]] gha Electoral College pa udindo wa pulezidenti, sono 270 pa 538, munthu yura wakupharazgika kuŵa wapunda. Para palije uyo wapokera mavoti agha, [[Nyumba ya Ŵimiliri ya United States|Nyumba ya Ŵimiliri]] yikwenera kuwungana kuti yisore pulezidenti kwizira mu ndondomeko ya [[visola vyapadera]], umo ŵimiliri, awo ŵakuvota mwakuyimira boma lawo, ndipo boma lililose likupeleka voti yimoza, ŵakusankhapo pakati pa ŵanthu ''ŵatatu'' awo ŵapokera mavoti ghanandi gha Electoral College pa udindo wa pulezidenti. Kuti munthu waŵe pulezidenti, wakwimira pa visola wakwenera kupokera mavoti gha unandi wa maboma, sono 26 pa maboma 50. Mu mbiri ya charu ichi, pali visola viŵiri pera vya pulezidenti ivyo vikamara na [[visola vyapadera]]. Mu [[Visola vya pulezidenti vya United States vya 1800|visola vya 1800]], [[Thomas Jefferson]] na munyake wa chipani cha Democratic-Republican [[Aaron Burr]] ŵakapokera mavoti ghakuyana, 73–73, gha Electoral College, ndipo ichi chikapangiska kuti pakhale visola vyapadera vyakwamba. Vikachitika mwakukolerana na ndondomeko yakwamba iyo yikakhazikiskika na [[Nkhani Yachiŵiri ya Dango Likuru la United States#Ndime 3: Electoral College|Nkhani II, Chigaŵa 1, Ndime 3]] ya Dango Likuru, ilo likuti usange ŵanthu ŵaŵiri panji ŵatatu ŵapokera mavoti ghanandi ndiposo ghakuyana, Nyumba ya Ŵimiliri yikusankha yumoza wa iwo kuŵa pulezidenti; ndipo uyo waŵa pa malo ghachiŵiri wakuzgoka wachiŵiri kwa pulezidenti.{{Cite web|url=https://www.heritage.org/constitution/#!/articles/2/essays/80/electoral-college|archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/80/electoral-college|url-status=unfit|archive-date=April 21, 2012|title=Essays on Article II: Electoral College|last=Kuroda|first=Tadahisa|website=The Heritage Guide to The Constitution|publisher=The Heritage Foundation|access-date=July 27, 2018}} Pa Febuluwale 17, 1801, Jefferson wakasankhika kuŵa pulezidenti pa voti ya 36, ndipo Burr wakasankhika kuŵa wachiŵiri kwa pulezidenti. Pamanyuma pake, ndondomeko iyi yikasinthika kwizira mu [[Amendment ya 12 ya Dango Likuru la United States|Amendment ya 12]] kuti yigwiliskike ntchito pa [[Visola vya pulezidenti vya United States vya 1804|visola vya 1804]].{{Cite web|url=https://www.heritage.org/constitution/#!/amendments/12/essays/165/electoral-college|archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/amendments/12/essays/165/electoral-college|url-status=unfit|archive-date=April 21, 2012|title=Essays on Amendment XII: Electoral College|last=Fried|first=Charles|website=The Heritage Guide to the Constitution|publisher=The Heritage Foundation|access-date=February 20, 2018}} Pakati pajumpha vyaka pafupifupi 25, kusankha pulezidenti kukaweleraso ku Nyumba ya Ŵimiliri apo palije wakwimira pa visola uyo wakapokera [[Unandi wakukwana wa mavoti|mavoti ghanandi chomene]] gha Electoral College, 131 pa 261, mu [[Visola vya pulezidenti vya United States vya 1824|visola vya 1824]]. Kuyana na Amendment ya 12, Nyumba ya Ŵimiliri yikeneranga kusankha pulezidenti pakati pa ŵanthu ŵatatu awo ŵakapokera mavoti ghanandi gha Electoral College: [[Andrew Jackson]], [[John Quincy Adams]], na [[William H. Crawford]]. Visola vyapadera ivi vyachiŵiri, ndiposo vyamumaliro mpaka sono, vikachitika pa Febuluwale 9, 1825, ndipo vikapangiska kuti John Quincy Adams wasankhike kuŵa pulezidenti pa voti yakwamba.{{Cite book|last=Boller|first=Paul F.|url=https://books.google.com/books?id=fZ_fSmFIabQC|title=Presidential Campaigns: From George Washington to George W. Bush|publisher=Oxford University Press|year=2004|isbn=978-0-19-516716-0|edition=2nd revised|location=New York, New York|pages=36–39|access-date=August 2, 2018}} === [[Kunjira pa udindo kwa pulezidenti wa United States|Kunjira pa udindo]] === {{Main|[[Kunjira pa udindo kwa pulezidenti wa United States|Kunjira pa udindo kwa pulezidenti wa United States]]}} Kuyana na [[Amendment ya 20 ya Dango Likuru la United States|Amendment ya 20]], nyengo ya vyaka vinayi ya uteŵeti wa pulezidenti na wachiŵiri wake yikwamba pa 12 koloko muhanya pa Janyuwale 20, mu chaka icho chikulondezga visola vya pulezidenti ivyo vyajumpha.{{Cite web |url=https://constitutioncenter.org/interactive-constitution/amendments/amendment-xx |title=The Twentieth Amendment |last1=Larson |first1=Edward J. |last2=Shesol |first2=Jeff |website=The Interactive Constitution |publisher=The National Constitution Center |location=Philadelphia, Pennsylvania |access-date=June 15, 2018}} Nyengo zakwamba za uteŵeti wa pulezidenti na wachiŵiri wake izo zikambira pa zuŵa ili, ilo likumanyikwa kuti [[Kunjira pa udindo kwa pulezidenti wa United States|Zuŵa la kunjira pa udindo]], zikaŵa [[Kunjira pa udindo kwachiŵiri kwa Franklin D. Roosevelt|nyengo yachiŵiri ya uteŵeti]] wa Pulezidenti [[Franklin D. Roosevelt]] na Wachiŵiri kwa Pulezidenti [[John Nance Garner]] mu 1937.{{Cite web |url=http://history.house.gov/HistoricalHighlight/Detail/35948?ret=True |title=The First Inauguration after the Lame Duck Amendment: January 20, 1937 |publisher=Office of the Historian, U.S. House of Representatives |location=Washington, D.C. |access-date=July 24, 2018}} Kale, Zuŵa la Kunjira pa Udindo likaŵa pa Malichi 4. Chifukwa cha kusintha kwa deti ili, nyengo yakwamba ya uteŵeti (1933–37) ya ŵanalume aŵa yikachepeskeka na {{age in days|1937|1|20|1937|3|4}} mazuŵa.{{Cite web |url=https://www.congress.gov/content/conan/pdf/GPO-CONAN-2017-10-21.pdf |title=Commencement of the Terms of Office: Twentieth Amendment |website=Constitution of the United States of America: Analysis and Interpretation |publisher=United States Government Printing Office, Library of Congress |location=Washington, D.C. |pages=2297–98 |access-date=July 24, 2018}} Pambere wandambe kugwiliskira ntchito mazaza gha udindo wake, pulezidenti wakwenera [[Kuyowoya mwakuzomerezgeka|kuyowoya]] [[Chilapo cha udindo wa pulezidenti wa United States|chilapo cha udindo wa pulezidenti]], icho chili mu [[Nkhani Yachiŵiri ya Dango Likuru la United States#Ndime 8: Chilapo panji kukhozgera|Nkhani II, Chigaŵa 1, Ndime 8 ya Dango Likuru]]. Ichi ndicho chigaŵa chekha cha mwambo wa kunjira pa udindo icho chikukhumbikwa na Dango Likuru: {{blockquote|Nikulapa mwakuzirwa (panji [[Kukhozgera mu malango|kukhozgera]]) kuti nichitenge mwakugomezgeka ntchito ya Udindo wa Pulezidenti wa United States, ndipo mwakukwaniska kwane, nisungenge, nivikirirenge, na kudefendera Dango Likuru la United States.{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/85/oath-of-office |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/85/oath-of-office |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Oath of Office |last=Kesavan |first=Vasan |website=The Heritage Guide to The Constitution |publisher=The Heritage Foundation |access-date=August 2, 2018}}}} Mapulezidenti kanandi ŵakuŵika woko limoza pa [[Baibolo|Baibolo]] apo ŵakulapa chilapo, ndipo ŵakusazgapo mazgu ghakuti "Chiuta wanovwire" paumaliro wa chilapo.{{Cite web |url=https://constitutioncenter.org/blog/how-presidents-use-bibles-at-inaugurations |title=How Presidents use Bibles at inaugurations |last=NCC Staff |date=January 20, 2017 |website=Constitution Daily |publisher=National Constitution Center |location=Philadelphia, Pennsylvania |access-date=August 3, 2018 |archive-date=August 4, 2018 |archive-url=https://web.archive.org/web/20180804014507/https://constitutioncenter.org/blog/how-presidents-use-bibles-at-inaugurations |url-status=dead }}{{Cite web |url=https://constitutioncenter.org/blog/who-said-that-a-quick-history-of-the-presidential-oath |title=Who said that? A quick history of the presidential oath |last=Munson |first=Holly |date=July 12, 2011 |website=ConstitutionDaily |publisher=National Constitution Center |location=Philadelphia, Pennsylvania |access-date=August 3, 2018 |archive-date=August 4, 2018 |archive-url=https://web.archive.org/web/20180804014505/https://constitutioncenter.org/blog/who-said-that-a-quick-history-of-the-presidential-oath |url-status=dead }} Nangauli chilapo ichi chingapelekeka na munthu waliyose uyo wali na mazaza gha kulolezgeka na dango kupereka vilapo, mapulezidenti kanandi ŵakulapiskika na [[Chief Justice wa United States|Chief Justice wa United States]]. == Uteŵeti pa udindo == === Malire gha nyengo ya uteŵeti === [[File:William MacKinley (1843-1901), de 25ste president van de Verenigde Staten van Amerika, met naast, SFA002006258.jpg|thumb|Pulezidenti [[William McKinley]] na munyake wakwimira pa udindo wa wachiŵiri kwa pulezidenti, kazembe wa boma la New York [[Theodore Roosevelt]], {{Circa|1900}}]] [[File:FDR 1944 Color Portrait.jpg|alt=|thumb|[[Franklin D. Roosevelt]] wakapunda pa visola vya pulezidenti vinayi, [[Visola vya pulezidenti vya United States vya 1932|1932]], [[Visola vya pulezidenti vya United States vya 1936|1936]], [[Visola vya pulezidenti vya United States vya 1940|1940]], na [[Visola vya pulezidenti vya United States vya 1944|1944]] pambere [[Amendment ya 22 ya Dango Likuru la United States|Amendment ya 22]] yindambe kugwira ntchito mu 1951, iyo yikakhazikiska malire gha nyengo ziŵiri za uteŵeti.]] Apo pulezidenti wakwamba, [[George Washington]], wakapharazga mu [[Mazgu ghaumaliro gha George Washington|Mazgu Ghake Ghaumaliro]] kuti wazamukwimira yayi pa nyengo yachitatu ya uteŵeti, wakakhazikiska mwambo wa "nyengo ziŵiri pera". Mwambo uwu ukazgoka mwambo wakulondezgeka pamanyuma pakuti [[Thomas Jefferson]] wakawuzomerezga pakweru mu nyengo yake yachiŵiri ya uteŵeti, nga umo ŵakachitira ŵamanyuma ŵake ŵaŵiri, [[James Madison]] na [[James Monroe]].{{Cite web |url=http://www.whitehousetransitionproject.org/wp-content/uploads/2016/04/Terms-Tenure_101909-1.pdf |title=Presidential Terms and Tenure: Perspectives and Proposals for Change |last=Neale |first=Thomas H. |date=October 19, 2009 |publisher=Congressional Research Service |location=Washington, D.C. |access-date=August 3, 2018}} Nangauli mwambo wa nyengo ziŵiri ukaŵa wakukhora chomene, [[Ulysses S. Grant]] wakapenja kusankhika pa [[Msonkhano wa Chipani cha Republican wa 1880]] kuti wakwimire pa nyengo yachitatu yakulondezgana yayi, kweni wakatondeka.{{Cite web |url=https://millercenter.org/president/grant/campaigns-and-elections |title=Ulysses S. Grant: Campaigns and Elections |last=Waugh |first=Joan |date=October 4, 2016 |publisher=Miller Center of Public Affairs, University of Virginia |access-date=August 3, 2018}} Mu 1940, pamanyuma pakulongozga charu mu nyengo ya [[Great Depression|Suzgo Likuru la Chuma]] ndiposo pakukhwimiska wovwiri ku vyaru vya [[Allies of World War II|ŵabwezi ŵa nkhondo]] ivyo vikamenyananga na [[Axis powers|vyaru vya Axis]], Franklin Roosevelt wakasankhikaso pa nyengo yachitatu ya uteŵeti, ndipo wakaphwanya mwambo uwo ukaŵapo kwa nyengo yitali. Vyaka vinayi pamanyuma pake, apo United States yikanjilirapo kale mu [[Nkhondo Yachiŵiri ya Charu Chose]], wakasankhikaso pa nyengo yachinayi nangauli thupi lake likafowokanga; wakafwa pa Epulero 12, 1945, mazuŵa 82 ghati ghajumphapo kufuma apo wakambira nyengo yake yachinayi ya uteŵeti.{{Cite web |url=http://www.annenbergclassroom.org/page/twenty-second-amendment |title=Twenty-second Amendment |website=Annenberg Classroom |publisher=The Annenberg Public Policy Center |location=Philadelphia, Pennsylvania |access-date=August 2, 2018}} Pakuzgora nyengo yitali iyo Roosevelt wakateŵetera nga ni pulezidenti, [[Amendment ya 22 ya Dango Likuru la United States|Amendment ya 22]] [[kuzomerezgeka|yikazomerezgeka]] mu 1951. Amendment iyi yikukanizga munthu waliyose kusankhika kuŵa pulezidenti kujumpha kaŵiri, panji kamoza pera usange munthu yura wakateŵetera nga ni pulezidenti kwa vyaka vyakujumpha viŵiri (myezi 24) pa nyengo ya uteŵeti wa vyaka vinayi ya pulezidenti munyake. [[Harry S. Truman]], uyo wakaŵa pulezidenti pa nyengo iyo amendment iyi yikapelekekera ku maboma na Congress, wakafwatulika ku malire agha. Usange nthena yayi, nthena wakaŵavya mwaŵi wakwimira pa nyengo yachiŵiri yakukwana mu 1952, iyo wakayezga dankha kupenjera, chifukwa wakateŵetera pafupifupi nyengo yose yakukhalapo ya Roosevelt ya 1945–1949 ndipo wakasankhika pa nyengo yakukwana ya vyaka vinayi iyo yikambira mu 1949. === Malo ghambura munthu pa udindo na kulondezgana pa udindo === {{Main|[[Ndondomeko ya kulondezgana pa udindo wa pulezidenti wa United States|Ndondomeko ya kulondezgana pa udindo wa pulezidenti wa United States]]}} Kuyana na [[Amendment ya 25 ya Dango Likuru la United States#Chigaŵa 1: Kulondezgana pa udindo wa pulezidenti|Chigaŵa 1 cha Amendment ya 25]], iyo yikazomerezgeka mu 1967, wachiŵiri kwa pulezidenti wakuzgoka pulezidenti para pulezidenti [[Mulandu wa kufumiska pa udindo wa pulezidenti wa United States|wafumiskika pa udindo]], wafwa, panji waleka udindo. Nyifwa za mapulezidenti zachitikapo kanandi, kuleka udindo kwachitikapo kamoza pera, ndipo kufumiskika pa udindo kundachitikepo yayi. Pambere Amendment ya 25 yindazomerezgeke (iyo yikapambaniska makora nkhani ya kulondezgana pa udindo), [[Nkhani Yachiŵiri ya Dango Likuru la United States#Ndime 6: Malo ghambura munthu pa udindo na kuleka kukwaniska ntchito|Nkhani II, Chigaŵa 1, Ndime 6]], yikayowoyanga waka kuti wachiŵiri kwa pulezidenti wakutora "mazaza na milimo" ya pulezidenti para pulezidenti wafumiskika pa udindo, wafwa, waleka udindo, panji watondeka kuchita ntchito zake.{{Cite journal |last=Feerick |first=John D. |date=2011 |title=Presidential Succession and Inability: Before and After the Twenty-Fifth Amendment |url=http://ir.lawnet.fordham.edu/cgi/viewcontent.cgi?article=4695&context=flr |journal=Fordham Law Review |location=New York City |publisher=[[Fordham University School of Law]] |volume=79 |issue=3 |pages=907–949 |access-date=December 13, 2018}} Kuyana na ndime iyi, pakaŵa kususkana pa nkhani yakuti kasi wachiŵiri kwa pulezidenti wakuzgoka nadi pulezidenti para udindo wasoŵa munthu, panji wakuŵa waka [[Kuchita udindo mwakanyengo|wakuchita udindo wa pulezidenti]],{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/83/presidential-succession |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/83/presidential-succession |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Presidential Succession |last=Feerick |first=John |website=The Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=December 13, 2018}} icho nthena chikapangiska kuti pachitike [[visola vyapadera]]. Pulezidenti [[William Henry Harrison]] wakati wafwa mu 1841, Wachiŵiri kwa Pulezidenti [[John Tyler]] wakapharazga kuti walondezga udindo wose wa pulezidenti, ndipo wakakana kupokera mapepala ghose agho ghakalembekanga kwa "Pulezidenti Wakuchita Udindo". Pamanyuma pake, Congress yikazomerezga fundo yake. == Umulongozgi mu udindo == === Malire gha nyengo ya udindo === [[File:William MacKinley (1843-1901), de 25ste president van de Verenigde Staten van Amerika, met naast, SFA002006258.jpg|thumb|Pulezidenti [[William McKinley]] na munyake uyo wakapikanga nayo pa udindo wa wachiŵiri wa pulezidenti, kazembe wa New York [[Theodore Roosevelt]], {{Circa|1900}}]] [[File:FDR 1944 Color Portrait.jpg|alt=|thumb|[[Franklin D. Roosevelt]] wakathereska visola vinayi vya [[Visola vya pulezidenti wa United States|pulezidenti]] mu [[Visola vya pulezidenti wa United States vya 1932|1932]], [[Visola vya pulezidenti wa United States vya 1936|1936]], [[Visola vya pulezidenti wa United States vya 1940|1940]], na [[Visola vya pulezidenti wa United States vya 1944|1944]] pambere [[Sintho la nambara 22 la Dango Likuru la United States|Sintho la nambara 22]] lindambe kugwira ntchito mu 1951, ilo likakhazikiska mphaka wa maudindo ghaŵiri.]] Apo pulezidenti wakwamba, [[George Washington]], wakapharazga mu [[Mazgu gha George Washington pakulekana na udindo|Mazgu ghake ghakulekana na udindo]] kuti walekenge kupikaso pa nyengo yachitatu, wakakhazikiska mwambo wa "maudindo ghaŵiri pera". Mwambo uwu ukazgoka mwambo wakulondezgeka pamanyuma pakuti [[Thomas Jefferson]] wakawovwira pakweru fundo iyi mu nyengo yake yachiŵiri, nga umo ŵakachitira ŵalongozgi ŵaŵiri awo ŵakamulondezga, [[James Madison]] na [[James Monroe]].{{Cite web |url=http://www.whitehousetransitionproject.org/wp-content/uploads/2016/04/Terms-Tenure_101909-1.pdf |title=Presidential Terms and Tenure: Perspectives and Proposals for Change |last=Neale |first=Thomas H. |date=October 19, 2009 |publisher=Congressional Research Service |location=Washington, D.C. |access-date=August 3, 2018}} Nangauli mwambo wa maudindo ghaŵiri ukaŵa wakukhora, [[Ulysses S. Grant]] wakapenja kusankhika pa [[Msonkhano Wapachaka wa Republican wa 1880|Msonkhano Wapachaka wa Republican wa 1880]] kuti wapike pa nyengo yachitatu yambura kulondezgana, kweni wakatondeka.{{Cite web |url=https://millercenter.org/president/grant/campaigns-and-elections |title=Ulysses S. Grant: Campaigns and Elections |last=Waugh |first=Joan |date=October 4, 2016 |publisher=Miller Center of Public Affairs, University of Virginia |access-date=August 3, 2018}} Mu 1940, pamanyuma pakulongozga charu mu nyengo ya [[Great Depression]] ndipo wakakhumbanga kovwira [[Ŵabwezi ŵa United States mu Nkhondo Yachiŵiri ya pa Charu Chose|ŵabwezi ŵa United States]] awo ŵakarwanga nkhondo na [[Mphara za Axis|ŵa Axis]], Franklin Roosevelt wakasankhika pa nyengo yachitatu, kuphwanya mwambo uwo ukaŵapo kwa nyengo yitali. Vyaka vinayi pamanyuma, apo United States yikachitanga [[Nkhondo Yachiŵiri ya pa Charu Chose]], wakasankhikaso nangauli thupi lake likamba kufoka; wakafwa pa Epulero 12, 1945, mazuŵa 82 kufuma apo wakambira nyengo yake yachinayi.{{Cite web |url=http://www.annenbergclassroom.org/page/twenty-second-amendment |title=Twenty-second Amendment |website=Annenberg Classroom |publisher=The Annenberg Public Policy Center |location=Philadelphia, Pennsylvania |access-date=August 2, 2018}} Pakuzgora utali wakuluska wa ulamuliro wa Roosevelt, [[Sintho la nambara 22 la Dango Likuru la United States|Sintho la nambara 22]] likazomerezgeka mu 1951. Sintho ili likukanizga munthu waliyose kusankhika kuŵa pulezidenti kaŵiri kuluska, panji kamoza pera usange munthu yura wakateŵetera nga ni pulezidenti kwa vyaka vyakuluska viŵiri (myezi 24) vya nyengo ya pulezidenti munyake. [[Harry S. Truman]], uyo wakaŵa pulezidenti pa nyengo iyo Sintho ili likatumizgikira ku vyaru na Congress, wakafwatulika ku malire agha. Usange nthena wakafwatulikapo yayi, nthena wakatondekanga kupika pa nyengo yake yachiŵiri yakukwana mu 1952, iyo wakayezga pachoko waka, pakuti wakateŵetera pafupifupi nyengo yose ya Roosevelt yakusazgikira ya 1945–1949 ndipo wakasankhika ku nyengo yakukwana ya vyaka vinayi iyo yikambira mu 1949. === Malo ghambura munthu na kulondezgana pa udindo === {{Main|[[Ndondomeko ya kulondezgana pa udindo wa pulezidenti wa United States|Ndondomeko ya kulondezgana pa udindo wa pulezidenti wa United States]]}} Pasi pa [[Sintho la nambara 25 la Dango Likuru la United States#Chigaŵa 1: Kulondezgana pa udindo wa pulezidenti|Chigaŵa 1 cha Sintho la nambara 25]], ilo likazomerezgeka mu 1967, wachiŵiri wa pulezidenti wakuŵa pulezidenti para pulezidenti [[Mulandu wa kufumiskapo pa udindo wa boma ku United States|wafumiskika pa udindo]], wafwa, panji waleka ntchito. Nyifwa zachitika kanandi, kuleka ntchito kwachitika kamoza pera, ndipo kufumiskika pa udindo kundachitikepo. Pambere Sintho la nambara 25 lindazomerezgeke (ilo likalongosora makora nkhani ya kulondezgana pa udindo), [[Nkhani Yachiŵiri ya Dango Likuru la United States#Ndime 6: Malo ghambura munthu na kuleka kutondeka kuchita ntchito|Nkhani II, Chigaŵa 1, Ndime 6]], yikayowoya waka kuti wachiŵiri wa pulezidenti wakupokera "mazaza na milimo" ya pulezidenti para pulezidenti wafumiskika pa udindo, wafwa, waleka ntchito, panji watondeka kuchita milimo yake.{{Cite journal |last=Feerick |first=John D. |date=2011 |title=Presidential Succession and Inability: Before and After the Twenty-Fifth Amendment |url=http://ir.lawnet.fordham.edu/cgi/viewcontent.cgi?article=4695&context=flr |journal=Fordham Law Review |location=New York City |publisher=[[Fordham University School of Law]] |volume=79 |issue=3 |pages=907–949 |access-date=December 13, 2018}} Pasi pa ndime iyi, pakaŵa kususkana pa nkhani yakuti kasi wachiŵiri wa pulezidenti waŵenge nadi pulezidenti para malo ghaba ghambura munthu, panji waŵenge waka [[Kuchita ntchito ya munyake mu dango|wakuchita ntchito nga ni pulezidenti]],{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/83/presidential-succession |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/83/presidential-succession |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Presidential Succession |last=Feerick |first=John |website=The Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=December 13, 2018}} ndipo ichi nthena chikapangiska kuti paŵe [[Visola vyapadera|visola vyapadera]]. Pulezidenti [[William Henry Harrison]] wakati wafwa mu 1841, Wachiŵiri wa Pulezidenti [[John Tyler]] wakapharazga kuti walondezga udindo wose wa pulezidenti, ndipo wakakana kupokera mapepala agho ghakalembekanga ku "Pulezidenti Wakuchita Milimo". Pamanyuma pake, Congress yikazomera fundo yake. Para pulezidenti na wachiŵiri wa pulezidenti ŵalije wose, Nkhani II, Chigaŵa 1, Ndime 6 nayo yikupaso mazaza ku Congress kuti yidumbe uyo waŵenge wakuchita ntchito ya pulezidenti para "Pulezidenti na Wachiŵiri wa Pulezidenti ŵafumiskika pa udindo, ŵafwa, ŵaleka ntchito, panji ŵatondeka kuchita milimo yawo". [[Dango la Kulondezgana pa Udindo wa Pulezidenti la 1947]] (ilo lili mu 3 U.S.C. § 19) likuti usange pulezidenti na wachiŵiri wa pulezidenti ŵafumapo pa udindo panji ŵangateŵetera yayi mu nyengo yawo ya udindo, [[Ndondomeko ya kulondezgana pa udindo wa pulezidenti wa United States|ndondomeko ya kulondezgana pa udindo wa pulezidenti]] yikulondezga nthowa iyi: wakulongozga wa Nyumba ya Ŵimiliri, ndipo usange pakukhumbikwa, pulezidenti ''pro tempore'' wa Senate, ndipo usange pakukhumbikwaso, ŵalongozgi ŵakwenelera ŵa [[Madipatimenti gha boma la United States|madipatimenti gha boma]] awo ŵakupanga [[Kabineti ya United States|Kabineti]] ya pulezidenti.{{Cite news |url=https://www.cnn.com/2013/08/27/us/succession-presidential-and-vice-presidential-fast-facts/index.html |title=Succession: Presidential and Vice Presidential Fast Facts |date=October 24, 2017 |access-date=July 19, 2018 |website=CNN}} Kabineti sono yili na ŵanthu 15, ndipo mulembi wa vya kuwaro ndiyo wali pakwamba pa mzere wa kulondezgana pa udindo. Ŵalembi ŵanyake ŵa Kabineti ŵakulondezga mwakulondezgana na nyengo iyo dipatimenti yawo, panji dipatimenti iyo yikaluta m'malo mwa yawo, yikapangikira. Ŵanthu awo Dango Likuru likuŵazomerezga yayi kusankhika kuŵa pulezidenti nawo ŵakukanizgika kupokera mazaza na milimo ya pulezidenti kwizira mu kulondezgana pa udindo. Pakaŵavya munthu wakudumbika na dango uyo wali kuchitapo ntchito ya pulezidenti. === Kupharazga kuleka kukwaniska kuchita ntchito === {{Main|[[Sintho la nambara 25 la Dango Likuru la United States]]}} Pasi pa Sintho la nambara 25, pulezidenti wangasamuskira kwa kanyengo mazaza na milimo yake kwa wachiŵiri wa pulezidenti, uyo pamanyuma wakuŵa [[Pulezidenti wakuchita milimo wa United States|pulezidenti wakuchita milimo]], para watumizga kalata ku [[Wakulongozga wa Nyumba ya Ŵimiliri ya United States|wakulongozga wa Nyumba ya Ŵimiliri]] na [[Pulezidenti pro tempore wa Senate ya United States|pulezidenti ''pro tempore'' wa Senate]] yakuyowoya kuti wangakwaniska yayi kuchita milimo yake. Pulezidenti wakupokeraso mazaza ghake para watumizga kalata yachiŵiri yakuyowoya kuti wangachitaso ntchito zake. Nthowa iyi yagwiliskirika ntchito na [[Ronald Reagan]] (kamoza), [[George W. Bush]] (kaŵiri), na [[Joe Biden]] (kamoza), wose pambere ŵandachite opaleshoni.{{cite news| last=Olsen| first=Jillian| title=How many other vice presidents have temporarily taken over presidential powers?| date=November 19, 2021| url=https://www.wtsp.com/article/news/history/presidential-transfer-of-power-biden-bush-reagan/67-17f1fa96-f44a-4050-a53c-593f55e4949f| publisher=[[WTSP]]| location=St. Petersburg, Florida| access-date=May 11, 2022}}{{cite news|last=Sullivan|first=Kate|title=For 85 minutes, Kamala Harris became the first woman with presidential power|date=November 19, 2021|url=https://www.cnn.com/2021/11/19/politics/kamala-harris-presidential-power/index.html|publisher=CNN|access-date=November 19, 2021}} Sintho la nambara 25 likupangaso kuti wachiŵiri wa pulezidenti, pamoza na ŵanandi mwa ŵabali ŵanyake ŵa [[Kabineti ya United States|Kabineti]], wasamuske mazaza na milimo ya pulezidenti kwa wachiŵiri wa pulezidenti para ŵatumizga kalata yakulembeka ku wakulongozga wa Nyumba ya Ŵimiliri na pulezidenti ''pro tempore'' wa Senate, yakuyowoya kuti pulezidenti wangakwaniska yayi kuchita mazaza na milimo yake. Usange pulezidenti pamanyuma wayowoya kuti kuleka kukwaniska uku kulije, wakupokeraso mazaza ghake, kweni usange wachiŵiri wa pulezidenti na Kabineti ŵatumizga kalata yachiŵiri yakuyowoya kuti pulezidenti wangakwaniska yayi, Congress ndiyo yikusankha nkhani iyi. Kuti mazaza gha pulezidenti ghafumiskike, pakukhumbikwa mavoti gha magawo ghaŵiri pa vitatu mu nyumba zose ziŵiri za Congress. === Kufumiskika pa udindo === {{Main|[[Mndandanda wa vyakuyesera kufumiska ŵapulezidenti ŵa United States pa udindo|Mndandanda wa vyakuyesera kufumiska ŵapulezidenti ŵa United States pa udindo]]|[[Kufumiska pa udindo wa boma ku United States]]|[[Mulandu wa kufumiska pa udindo wa boma ku United States]]}} [[Nkhani Yachiŵiri ya Dango Likuru la United States#Chigaŵa 4: Kufumiska pa udindo|Nkhani II, Chigaŵa 4]] ya Dango Likuru yikuzomerezga kuti ŵalongozgi ŵakuru ŵa boma, kusazgapo pulezidenti, ŵafumiskike pa udindo chifukwa cha "[[kupandukira charu]], [[kupokera viwongo]], panji [[milandu yikuru na viheni vikuru]]". [[Nkhani Yakwamba ya Dango Likuru la United States#Ndime 5: Wakulongozga na ŵalara ŵanyake; kufumiska pa udindo|Nkhani I, Chigaŵa 2, Ndime 5]] yikupereka mazaza ku Nyumba ya Ŵimiliri kuti yichite nga ni "[[juri yikuru]]" yakuti yisuske ŵalara aŵa na voti ya ŵanandi.{{Cite web |url=https://www.heritage.org/constitution/#!/articles/1/essays/17/trial-of-impeachment |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/1/essays/17/trial-of-impeachment |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article I: Impeachment |last=Presser |first=Stephen B. |website=Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=August 3, 2018}} [[Nkhani Yakwamba ya Dango Likuru la United States#Ndime 6: Milandu ya kufumiska pa udindo|Nkhani I, Chigaŵa 3, Ndime 6]] yikupereka mazaza ku Senate kuti yichite nga ni [[khoti]], ndipo yingafumiska pa udindo ŵalara awo ŵasangika na mulandu para ŵavotera na ŵanandi ŵakukwana magawo ghaŵiri pa vitatu.{{Cite web |url=https://www.heritage.org/constitution/#!/articles/1/essays/17/trial-of-impeachment |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/1/essays/17/trial-of-impeachment |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article I: Trial of Impeachment |last=Gerhardt |first=Michael J. |website=Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=August 3, 2018}} Ŵapulezidenti ŵatatu ŵasuskika na Nyumba ya Ŵimiliri: Andrew Johnson mu [[Kufumiska Andrew Johnson pa udindo|1868]], Bill Clinton mu [[Kufumiska Bill Clinton pa udindo|1998]], na Donald Trump mu [[Kufumiska Donald Trump pa udindo kakwamba|2019]] na [[Kufumiska Donald Trump pa udindo kachiŵiri|2021]]. Palije nanga njumoza uyo wakasangika na mulandu na Senate. [[Komiti ya Nyumba ya Ŵimiliri ya United States ya vya Malango|Komiti ya Nyumba ya Ŵimiliri ya vya Malango]] yikachita kafukufuku wa kufumiska Richard Nixon pa udindo mu [[Ndondomeko ya kufumiska Richard Nixon pa udindo|1973–74]] ndipo yikapeleka nkhani zitatu za kufumiska pa udindo ku Nyumba ya Ŵimiliri kuti yichitepo kanthu. Kweni wakaleka ntchito pambere Nyumba ya Ŵimiliri yindavotepo pa nkhani izi. === Kulekeska mazaza === Vinthu vyakususkana navyo vichitikirapo nyengo zinyake kwambura kufika pa kumufumiska pulezidenti pa udindo kuti ŵamazge nkharo yake yakuwoneka nga njambura kupwelera panji chifukwa cha kuleka kukwaniska kuchita ntchito kwa nyengo yitali. Nyengo zinyake, ŵantchito ŵakuleka dala kupeleka mauthenga kwa pulezidenti panji kufuma kwa iyo, kanandi kuti ŵaleke kuchita panji kovwira pulezidenti kulemba malango ghanyake. Ivi vyachitika kufuma apo Mulara wa Ŵantchito ŵa [[Richard Nixon]] wakatondeka kutumizga malango ku Kabineti chifukwa cha kumwa chomene kwa pulezidenti, mpaka apo ŵantchito ŵakafumyapo mapepala pa desiki la [[Donald Trump]].{{cite book |author=David Priess |title=How to Get Rid of a President: History's Guide to Removing Unpopular, Unable, or Unfit Chief Executives |publisher=PublicAffairs |year=2018 |isbn=978-1541788206 |chapter=2 Undermined by Opponents or Subordinates}} Vyaka vinandi pambere [[Sintho la nambara 25 la Dango Likuru la United States|Sintho la nambara 25]] lindazomerezgeke, mu 1919, Pulezidenti Woodrow Wilson wakadwala [[Ulongozgi wa Woodrow Wilson#Kuleka kukwaniska kuchita ntchito, 1919–1921|sitiroko]] iyo yikamulekeska kuchita milimo yinyake. Muwoli wake wakwamba, [[Edith Wilson]], wakabisa nkhani iyi kwa nyengo ku ŵanthu, ndipo mwakususkana, [[Edith Wilson#Udindo ukuru pamanyuma pa sitiroko ya mfumu wake|wakaŵa yekha munthu wakuzomerezga ŵanthu kufika kwa pulezidenti]] (kupatulako dokotala wake), wakamovwiranga na mapepala na kusankha ivyo vikaŵa "vyakuzirwa" kuti vimanyiskike kwa iyo.{{cite book |author=David Priess |title=How to Get Rid of a President: History's Guide to Removing Unpopular, Unable, or Unfit Chief Executives |publisher=PublicAffairs |year=2018 |isbn=978-1541788206 |chapter=2 Undermined by Opponents or Subordinates}} === Malipiro === {| class="wikitable floatright" ; margin-right:2em" |- ! colspan="3" |Mbiri ya malipiro gha pulezidenti |- ! Chakachakakhazikiskikira !! Malipiro !! Malipiro mu{{Inflation/year|US}} USD |- | 1789 || style="text-align:right;"| $25,000 || style="text-align:right;"| ${{Inflation|US|25000|1789|fmt=c}} |- | 1873 || style="text-align:right;"| $50,000 || style="text-align:right;"| ${{Inflation|US|50000|1873|fmt=c}} |- | 1909 || style="text-align:right;"| $75,000 || style="text-align:right;"| ${{Inflation|US|75000|1909|fmt=c}} |- | 1949 || style="text-align:right;"| $100,000 || style="text-align:right;"|${{Inflation|US|100000|1949|fmt=c}} |- | 1969 || style="text-align:right;"| $200,000 || style="text-align:right;"|${{Inflation|US|200000|1969|fmt=c}} |- | 2001 || style="text-align:right;"| $400,000 || style="text-align:right;"|${{Inflation|US|400000|2001|fmt=c}} |- ! colspan="3" | Malo ghakufumira:{{Cite web|url=http://www-personal.umich.edu/~graceyor/govdocs/fedprssal.html|title=Presidential and Vice Presidential Salaries Exclusive of Perquisites|website=Data from Congressional Quarterly's Guide to the Presidency|publisher=[[University of Michigan]]|access-date=July 31, 2020}}{{Cite web|url=https://www.measuringworth.com/calculators/uscompare/index.php|title=Seven Ways to Compute the Relative Value of a U.S. Dollar Amount, 1774 to Present|last=Williamson|first=Samuel H.|publisher=MeasuringWorth|access-date=July 31, 2020}}{{inflation/fn|US}} |} Kwambira mu 2001, malipiro gha chaka gha pulezidenti ghakhala $400,000, pamoza na ndalama za vyakugwiliskira ntchito zakukwana $50,000; akaunti yambura msonkho ya ndalama zakwendera ya $100,000; na akaunti ya ndalama zakuchitira mphwando ya $19,000{{clarify|date=August 2022}}. Malipiro gha pulezidenti ghakukhazikiskika na Congress, ndipo pasi pa [[Nkhani Yachiŵiri ya Dango Likuru la United States#Ndime 7: Malipiro|Nkhani II, Chigaŵa 1, Ndime 7]] ya Dango Likuru, kusazgirako panji kuchepeskako malipiro gha pulezidenti kungamba yayi kugwira ntchito pambere nyengo yakulondezgapo ya pulezidenti yindambe.{{Cite web|url=https://www.thoughtco.com/presidential-pay-and-compensation-3322194|title=Presidential Pay and Compensation|last=Longley|first=Robert|date=September 1, 2017|publisher=[[ThoughtCo]]|access-date=July 31, 2018}} === Malo ghakukhala === {{for-multi|malo ghakukhala gha boma agho Pulezidenti Washington wakakhalanga|[[Ulongozgi wa George Washington#Malo ghakukhala|Ulongozgi wa George Washington § Malo ghakukhala]]|malo ghakukhala gha munthu yekha gha ŵapulezidenti ŵakupambanapambana ŵa United States|[[Mndandanda wa malo ghakukhala gha ŵapulezidenti ŵa United States]]}} [[Malo Ghakukhala gha Executive]] gha [[White House]] ku [[Washington, D.C.]], ndigho [[malo ghakukhala gha boma]] gha pulezidenti. Malo agha ghakasankhika na George Washington, ndipo libwe lakwamba la maziko likayikika mu 1792. Pulezidenti waliyose kwambira [[John Adams]] mu 1800 wakhalapo penepapo. Mu nyengo zakupambanapambana za mbiri ya United States, nyumba iyi yikamanyikwanga kuti "Nyumba ya Pulezidenti", "Nyumba ya Mlongozgi", na "Nyumba ya Executive". Theodore Roosevelt ndiyo wakapeleka zina lakuti White House mwalamulo mu 1901.{{Cite web|url=https://www.whitehouse.gov/about-the-white-house/the-white-house/|title=The White House Building|website=[[White House|whitehouse.gov]]|access-date=August 3, 2018}} Boma la federal ndilo likulipira vyakurya vya pa mphwando za boma na milimo yinyake ya boma, kweni pulezidenti yekha ndiyo wakulipira ndalama za kulongoska vyakuvwara, vyakurya vya mbumba yake, na vya ŵalendo ŵake.{{Cite magazine|last=Bulmiller|first=Elisabeth|date=January 2009|title=Inside the Presidency: Few outsiders ever see the President's private enclave|url=https://www.nationalgeographic.com/magazine/2009/01/president/|archive-url=https://web.archive.org/web/20180714224047/https://www.nationalgeographic.com/magazine/2009/01/president/|url-status=dead|archive-date=July 14, 2018|magazine=[[National Geographic]]|location=Washington, D.C.|access-date=August 3, 2018}} [[Camp David]], ilo mwalamulo likuchemeka Naval Support Facility Thurmont, ni msasa wa ŵasilikari uwo uli mu mapiri mu [[Frederick County, Maryland]]. Ni malo gha pulezidenti ghakupumulirako ku mizi. Malo agha ghakumanyikwa chifukwa cha mtende na kupumura, ndipo ghagwiliskirika ntchito chomene kwambira m'ma 1940 pakupokelera ŵalongozgi ŵa vyaru vinyake.{{Cite web|url=https://www.whitehouse.gov/about-the-white-house/camp-david/|title=The White House Building|website=[[White House|whitehouse.gov]]|access-date=August 3, 2018}} == Kukhala pa Udindo == === Malire gha nyengo ya uteŵeti === [[File:William MacKinley (1843-1901), de 25ste president van de Verenigde Staten van Amerika, met naast, SFA002006258.jpg|thumb|Purezidenti [[William McKinley]] na munyake wake wakuphalirika kuŵa wachiŵiri kwa purezidenti, kazembe wa New York [[Theodore Roosevelt]], {{Circa|1900}}]] [[File:FDR 1944 Color Portrait.jpg|alt=|thumb|[[Franklin D. Roosevelt]] wakathereska ma [[chisankho cha purezidenti wa United States|chisankho cha purezidenti]] vinayi, mu [[1932 United States presidential election|1932]], [[1936 United States presidential election|1936]], [[1940 United States presidential election|1940]], na [[1944 United States presidential election|1944]], pambere [[Twenty-second Amendment to the United States Constitution|Sintho la Malango la 22]] lindambe kugwira ntchito mu 1951, ilo likakhazikiska mphaka wa nyengo ziŵiri za uteŵeti.]] Apo purezidenti wakwamba, [[George Washington]], wakapharazga mu [[George Washington's Farewell Address|mazgu ghake gha kupatura pa udindo]] kuti wangalutilira yayi kuphalirika nyengo yachitatu, wakakhazikiska mwambo wa "nyengo ziŵiri pera". Mwambo uwu ukazgoka mwambo wa boma apo [[Thomas Jefferson]] wakawovwira fundo iyi pakweru mu nyengo yake yachiŵiri, nga umo ŵakachitira ŵalondezgani ŵake ŵaŵiri, [[James Madison]] na [[James Monroe]].<ref name="TermsTenure">{{Cite web |url=http://www.whitehousetransitionproject.org/wp-content/uploads/2016/04/Terms-Tenure_101909-1.pdf |title=Presidential Terms and Tenure: Perspectives and Proposals for Change |last=Neale |first=Thomas H. |date=October 19, 2009 |publisher=Congressional Research Service |location=Washington, D.C. |access-date=August 3, 2018}}</ref> Nangauli mwambo wa kuteŵetera nyengo ziŵiri ukaŵa wakukhora, [[Ulysses S. Grant]] wakapenja kusankhika pa [[1880 Republican National Convention|Msonkhano Wapachaka wa Republican wa 1880]] kuti waphalirikeso nyengo yachitatu yakulondezgana yayi, kweni wakatondeka.<ref>{{Cite web |url=https://millercenter.org/president/grant/campaigns-and-elections |title=Ulysses S. Grant: Campaigns and Elections |last=Waugh |first=Joan |date=October 4, 2016 |publisher=Miller Center of Public Affairs, University of Virginia |access-date=August 3, 2018}}</ref> Mu 1940, pamanyuma pakulongozga charu mu nyengo ya [[Great Depression]] ndipo wakakhazikika pa kovwira ŵabwezi ŵa United States pa nkhondo na [[Axis powers]], Franklin Roosevelt wakasankhikaso ku nyengo yachitatu, kuswa mwambo uwo ukaŵapo kwa nyengo yitali. Vyaka vinayi pamanyuma pake, apo United States yikachitanga nkhondo mu [[Nkhondo Yachiŵiri ya Charu Chose]], wakasankhikaso nangauli thupi lake likalutilira kufoka; wakafwa mazuŵa 82 kufuma apo wakambira nyengo yake yachinayi pa Epulero 12, 1945.<ref name="22ndAPPC">{{Cite web |url=http://www.annenbergclassroom.org/page/twenty-second-amendment |title=Twenty-second Amendment |website=Annenberg Classroom |publisher=The Annenberg Public Policy Center |location=Philadelphia, Pennsylvania |access-date=August 2, 2018}}</ref> Pakuzgora uteŵeti utali wakuluska wa Roosevelt, [[Twenty-second Amendment to the United States Constitution|Sintho la Malango la 22]] likazomerezgeka mu 1951. Sintho ili likukanizga munthu waliyose kusankhika kuŵa purezidenti kanandi kuluska kaŵiri, panji kamoza pera usange wakateŵetera kujumpha vyaka viŵiri (myezi 24) ya nyengo ya vyaka vinayi ya purezidenti munyake. [[Harry S. Truman]], uyo wakaŵa purezidenti pa nyengo iyo sintho ili likatumizgikira ku maboma na Congress, wakafumiskikapo pa malire agha. Usange mphakawavyenge kulekeskeka uku, mphanyi wakazomerezgekanga yayi kuphalirikaso ku nyengo yachiŵiri yakukwana mu 1952, iyo wakayezga mwachoko kuyipenja, chifukwa wakateŵetera pafupifupi nyengo yose yakukhalako ya Roosevelt ya 1945–1949 ndipo wakasankhika ku nyengo yakukwana ya vyaka vinayi iyo yikambira mu 1949.<ref name=22ndAPPC /> === Malo ghambura munthu pa udindo na kulondezgana === {{Main|United States presidential line of succession}} Mwakuyana na [[Twenty-fifth Amendment to the United States Constitution#Section 1: Presidential succession|Gawo 1 la Sintho la Malango la 25]], ilo likazomerezgeka mu 1967, wachiŵiri kwa purezidenti wakuŵa purezidenti para purezidenti wafumiskika pa udindo, wafwa, panji waleka yekha. Kufwa kwa purezidenti kwachitika kanandi, kuleka udindo kwachitika kamoza pera, ndipo kufumiskika pa udindo kundachitikepo. Pambere Sintho la Malango la 25 lindazomerezgeke (ilo likalongosora makora nkhani ya kulondezgana), [[Article Two of the United States Constitution#Clause 6: Vacancy and disability|Article II, Section 1, Clause 6]] likati waka wachiŵiri kwa purezidenti wakutora "nkhongono na milimo" ya purezidenti para wafumiskika pa udindo, wafwa, waleka udindo, panji watondeka kuchita milimo yake.<ref name="FordhamLaw2011">{{Cite journal |last=Feerick |first=John D. |date=2011 |title=Presidential Succession and Inability: Before and After the Twenty-Fifth Amendment |url=http://ir.lawnet.fordham.edu/cgi/viewcontent.cgi?article=4695&context=flr |journal=Fordham Law Review |location=New York City |publisher=[[Fordham University School of Law]] |volume=79 |issue=3 |pages=907–949 |access-date=December 13, 2018}}</ref> Mwakuyana na ndime iyi, pakaŵa kususkana usange wachiŵiri kwa purezidenti waŵenge purezidenti nadi para malo ghakhala ghawaka, panji waŵenge waka [[Acting (law)|wakuchita milimo]] ya purezidenti,<ref name="ArticleIIessays">{{Cite web |url=https://www.heritage.org/constitution/#!/articles/2/essays/83/presidential-succession |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/2/essays/83/presidential-succession |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article II: Presidential Succession |last=Feerick |first=John |website=The Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=December 13, 2018}}</ref> ndipo ichi mphanyi chikapangiska kuti paŵe [[chisankho chapadera]]. Pamasinda pakufwa kwa Purezidenti [[William Henry Harrison]] mu 1841, Wachiŵiri kwa Purezidenti [[John Tyler]] wakapharazga kuti wali kunjira mu udindo uwu wekha, ndipo wakakana kupokera mapepala agho ghakalembekera "Purezidenti Wakuchita Milimo". Pamanyuma pake, Congress yikazomerezga fundo iyi. Usange malo gha purezidenti na gha wachiŵiri kwa purezidenti ghose ghawaka pa nyengo yimoza, Article II, Section 1, Clause 6 yikovwiraso Congress nkhongono zakulongosora uyo waŵenge wakuchita milimo ya purezidenti para purezidenti na wachiŵiri wake wafumiskika pa udindo, wafwa, waleka udindo, panji watondeka kuchita milimo yawo.<ref name=ArticleIIessays /> [[Presidential Succession Act]] ya 1947 (iyo yili kulembeka mu 3 U.S.C. § 19) yikulongora kuti usange purezidenti na wachiŵiri kwa purezidenti ŵafumapo pa udindo panji ŵaleka kutondeka kuteŵetera mu nyengo yawo, [[United States presidential line of succession|ndondomeko ya kulondezgana pa udindo wa purezidenti]] yikulondezgana nthena: [[Speaker of the United States House of Representatives|Speaker wa Nyumba ya Wimiliri]], ndipo usange ntchakukhumbikwa, [[President pro tempore of the United States Senate|purezidenti ''pro tempore'' wa Senate]], ndipo usange ntchakukhumbikwiraso, ŵalongozgi ŵakwenelera ŵa [[United States federal executive departments|madipatimenti gha boma]] agho ghakupanga [[Cabinet of the United States|Kabineti]] ya purezidenti.<ref name="cnn.com">{{Cite news |url=https://www.cnn.com/2013/08/27/us/succession-presidential-and-vice-presidential-fast-facts/index.html |title=Succession: Presidential and Vice Presidential Fast Facts |date=October 24, 2017 |access-date=July 19, 2018 |website=CNN}}</ref> Kabineti sono yili na ŵanthu 15, ndipo nduna ya vya kuwaro ndiyo yili pa malo ghakwamba mu mzere wa kulondezgana. Nduna zinyake zikulondezgana mwakuyana na nyengo iyo dipatimenti yawo, panji dipatimenti iyo yikazgoka yawo, yikapangikira. Ŵanthu awo ŵakukanizgika na Dango Likuru kusankhika kuŵa purezidenti nawo ŵakukanizgika kutora nkhongono na milimo ya purezidenti kwizira mu kulondezgana. Palije munthu uyo wakulongosoreka na dango uyo wali kuchitapo milimo ya purezidenti chifukwa cha ndondomeko iyi.<ref name="cnn.com"/> === Kuphara kuti watondeka kuchita milimo === {{Main|Twenty-fifth Amendment to the United States Constitution}} Mwakuyana na Sintho la Malango la 25, purezidenti wangapeleka nkhongono na milimo yake kwa wachiŵiri kwa purezidenti kwa nyengo yichoko waka, uyo pamanyuma wakuŵa [[Acting president of the United States|purezidenti wakuchita milimo]], para watumizga kalata kwa [[Speaker of the United States House of Representatives|Speaker wa Nyumba ya Wimiliri]] na [[President pro tempore of the United States Senate|purezidenti ''pro tempore'' wa Senate]] yakulongora kuti watondeka kuchita milimo yake. Purezidenti wakuweleraso ku nkhongono zake para watumizga kalata yachiŵiri yakulongora kuti sono wangachitaso milimo yake. Ndondomeko iyi yikagwiliskirika ntchito na [[Ronald Reagan]] (kamoza), [[George W. Bush]] (kaŵiri), na [[Joe Biden]] (kamoza), wose ŵakanozgekanga kuchita opareshoni.<ref>{{cite news| last=Olsen| first=Jillian| title=How many other vice presidents have temporarily taken over presidential powers?| date=November 19, 2021| url=https://www.wtsp.com/article/news/history/presidential-transfer-of-power-biden-bush-reagan/67-17f1fa96-f44a-4050-a53c-593f55e4949f| publisher=[[WTSP]]| location=St. Petersburg, Florida| access-date=May 11, 2022}}</ref><ref>{{cite news|last=Sullivan|first=Kate|title=For 85 minutes, Kamala Harris became the first woman with presidential power|date=November 19, 2021|url=https://www.cnn.com/2021/11/19/politics/kamala-harris-presidential-power/index.html|publisher=CNN|access-date=November 19, 2021}}</ref> Sintho la Malango la 25 likulongoraso kuti wachiŵiri kwa purezidenti, pamoza na ŵanandi mwa ŵabali ŵanyake ŵa [[Cabinet of the United States|Kabineti]], wangatora nkhongono na milimo ya purezidenti mwa kutumizga chikalata chakulembeka kwa Speaker wa Nyumba ya Wimiliri na purezidenti ''pro tempore'' wa Senate, chakulongora kuti purezidenti watondeka kuchita milimo yake. Usange pamanyuma purezidenti wakuti palije kutondeka kulikose, wakuweleraso ku nkhongono zake, kwambura kuti wachiŵiri kwa purezidenti na Kabineti ŵatumizge chikalata chachiŵiri chakulongora kuti watondeka. Para vyachitika nthena, Congress ndiyo yikusankha nkhani iyi. Kuti purezidenti watoreke nkhongono zake, pakukhumbikwa voti ya ŵanthu ŵaŵiri pa ŵatatu mu nyumba zose ziŵiri za Congress. === Kufumiskika pa udindo === {{Main|List of efforts to impeach presidents of the United States|Federal impeachment in the United States|Federal impeachment trial in the United States}} [[Article Two of the United States Constitution#Section 4: Impeachment|Article II, Section 4]] ya Dango Likuru yikovwira kufumiska pa udindo ŵalaraŵalara ŵa boma, kusazgapo purezidenti, chifukwa cha "[[treason|kupandukira charu]], [[bribery|kupokera vimbundi]], panji [[high crimes and misdemeanors|milandu yikuru na viheni vikuru]]". [[Article One of the United States Constitution#Clause 5: Speaker and other officers; Impeachment|Article I, Section 2, Clause 5]] yikovwira Nyumba ya Wimiliri kuchita nga ni [[grand jury]], ndipo yili na nkhongono zakwambiska mulandu wa impeachment na voti ya ŵanandi.<ref name="A1essaySBP">{{Cite web |url=https://www.heritage.org/constitution/#!/articles/1/essays/17/trial-of-impeachment |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/1/essays/17/trial-of-impeachment |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article I: Impeachment |last=Presser |first=Stephen B. |website=Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=August 3, 2018}}</ref> [[Article One of the United States Constitution#Clause 6: Trial of Impeachments|Article I, Section 3, Clause 6]] yikovwira Senate kuchita nga ni [[court|khoti]] ilo lili na nkhongono zakufumiska pa udindo ŵanthu awo ŵasangika na mulandu wa impeachment, na voti ya ŵanthu ŵaŵiri pa ŵatatu.<ref>{{Cite web |url=https://www.heritage.org/constitution/#!/articles/1/essays/17/trial-of-impeachment |archive-url=https://web.archive.org/web/20120421180046/http://www.heritage.org/constitution#!/articles/1/essays/17/trial-of-impeachment |url-status=unfit |archive-date=April 21, 2012 |title=Essays on Article I: Trial of Impeachment |last=Gerhardt |first=Michael J. |website=Heritage Guide to the Constitution |publisher=The Heritage Foundation |access-date=August 3, 2018}}</ref> Apurezidenti ŵatatu ŵali kupika mulandu wa impeachment na Nyumba ya Wimiliri: Andrew Johnson mu [[Impeachment of Andrew Johnson|1868]], Bill Clinton mu [[Impeachment of Bill Clinton|1998]], na Donald Trump mu [[First impeachment of Donald Trump|2019]] na [[Second impeachment of Donald Trump|2021]]. Palije nanga njumoza uyo wakasangika na mulandu mu Senate. [[United States House Committee on the Judiciary|Komiti ya Vyamalango ya Nyumba ya Wimiliri]] yikachita kufufuza kwa impeachment pa Richard Nixon mu [[Impeachment process against Richard Nixon|1973–74]] ndipo yikapeleka nkhani zitatu za impeachment ku Nyumba ya Wimiliri kuti yivoterenge. Kweni wakaleka udindo pambere Nyumba yindavotere pa nkhani izi.<ref name=A1essaySBP /> === Kulekeska nkhongono za purezidenti mwa nthowa zinyake === Nthowa zakususkana zinyake zili kugwiliskirika ntchito, kwambura kufumiska purezidenti pa udindo, kuti ŵachitepo kanthu pa purezidenti uyo wakuwoneka kuŵa wakupusa panji uyo wali na suzgo la nyengo yitali. Mu vinyake, ŵantchito ŵakakana dala kupeleka mauthenga ku purezidenti panji kufumira kwa iyo, kanandi kuti ŵalekeske kuchita panji kukhozgera malango agho purezidenti wakakhumbanga kulemba. Ivi vikachitika kufuma pa apo Chief of Staff wa [[Richard Nixon]] wakatondeka kutumizga malango ku Kabineti chifukwa cha kumwa chomene kwa purezidenti, m'paka apo ŵantchito ŵakafumiskanga memos pa desiki la [[Donald Trump]].<ref>{{cite book |author=David Priess |title=How to Get Rid of a President: History's Guide to Removing Unpopular, Unable, or Unfit Chief Executives |publisher=PublicAffairs |year=2018 |isbn=978-1541788206 |chapter=2 Undermined by Opponents or Subordinates}}</ref> Vyaka vinandi pambere Sintho la Malango la 25 lindachitike, mu 1919, Purezidenti Woodrow Wilson wakapwetekeka na [[Presidency of Woodrow Wilson#Incapacity, 1919–1921|stroke]] iyo yikamulemesa pachoko. Mwanakazi wake, [[Edith Wilson]], wakabisa nkhani iyi kwa nyengo yinyake, ndipo mwakususkana wakazgoka [[Edith Wilson#Increased role after husband's stroke|munthu yekha wakuzomerezga ŵanthu kufika kwa purezidenti]] (kupatulako dokotala wake), wakamovwiranga na mapepala ndipo wakasankhanga uthenga uwo wakaŵa "wakukhumbikwa" kuti ulongoreke kwa iyo. === Malipiro === {| class="wikitable floatright" ; margin-right:2em" |- ! colspan="3" |Mbiri ya malipiro gha purezidenti |- ! Chaka !! Malipiro !! Malipiro mu<br />{{Inflation/year|US}} USD |- | 1789 || style="text-align:right;"| $25,000 || style="text-align:right;"| ${{Inflation|US|25000|1789|fmt=c}} |- | 1873 || style="text-align:right;"| $50,000 || style="text-align:right;"| ${{Inflation|US|50000|1873|fmt=c}} |- | 1909 || style="text-align:right;"| $75,000 || style="text-align:right;"| ${{Inflation|US|75000|1909|fmt=c}} |- | 1949 || style="text-align:right;"| $100,000 || style="text-align:right;"| ${{Inflation|US|100000|1949|fmt=c}} |- | 1969 || style="text-align:right;"| $200,000 || style="text-align:right;"| ${{Inflation|US|200000|1969|fmt=c}} |- | 2001 || style="text-align:right;"| $400,000 || style="text-align:right;"| ${{Inflation|US|400000|2001|fmt=c}} |- ! colspan="3" | Vyakufumira:<ref>{{Cite web|url=http://www-personal.umich.edu/~graceyor/govdocs/fedprssal.html|title=Presidential and Vice Presidential Salaries Exclusive of Perquisites|website=Data from Congressional Quarterly's Guide to the Presidency|publisher=[[University of Michigan]]|access-date=July 31, 2020}}</ref><ref>{{Cite web|url=https://www.measuringworth.com/calculators/uscompare/index.php|title=Seven Ways to Compute the Relative Value of a U.S. Dollar Amount, 1774 to Present|last=Williamson|first=Samuel H.|publisher=MeasuringWorth|access-date=July 31, 2020}}</ref>{{inflation/fn|US}} |} Kufuma mu 2001, malipiro gha chaka gha purezidenti ni $400,000, pamoza na ndalama za vyakugwiliskira ntchito zakukwana $50,000; akaunti ya ulendo ya $100,000 yambura msonkho; na akaunti ya kulandilirako ŵalendo ya $19,000. Malipiro gha purezidenti ghakukhazikiskika na Congress, ndipo mwakuyana na [[Article Two of the United States Constitution#Clause 7: Salary|Article II, Section 1, Clause 7]] ya Dango Likuru, kusazgirako panji kuchepeskako malipiro gha purezidenti kungamba yayi kugwira ntchito pambere nyengo yakulondezgako ya purezidenti yindambe.<ref>{{Cite web|url=https://www.thoughtco.com/presidential-pay-and-compensation-3322194|title=Presidential Pay and Compensation|last=Longley|first=Robert|date=September 1, 2017|publisher=[[ThoughtCo]]|access-date=July 31, 2018}}</ref><ref name="cnbc"/> === Malo ghakukhala === {{for-multi|the official residences in which President Washington resided|Presidency of George Washington#Residences|the private residences of the various U.S. presidents|List of residences of presidents of the United States}} [[Executive Residence]] ya [[White House]] mu [[Washington, D.C.]], ndiyo [[malo ghakukhala gha boma]] gha purezidenti. Malo agha ghakasankhika na George Washington, ndipo libwe lakwamba likayikika mu 1792. Purezidenti waliyose kufuma pa John Adams mu 1800 wakhalapo penepapo. Pa nyengo zakupambanapambana mu mbiri ya United States, nyumba iyi yikachemekanga "President's Palace", "President's House", na "Executive Mansion". Theodore Roosevelt ndiyo wakapeleka zina lakuti White House mu 1901.<ref>{{Cite web|url=https://www.whitehouse.gov/about-the-white-house/the-white-house/|title=The White House Building|website=[[whitehouse.gov]]|access-date=August 3, 2018}}</ref> Boma la federali ndilo likulipira chakurya cha boma na vyakuchitika vinyake vya boma, kweni purezidenti yekha ndiyo wakulipira vyakurya vyake, vya banja lake, vya ŵalendo ŵake, kweniso kuwuska malaya ghake.<ref>{{Cite magazine|last=Bulmiller|first=Elisabeth|date=January 2009|title=Inside the Presidency: Few outsiders ever see the President's private enclave|url=https://www.nationalgeographic.com/magazine/2009/01/president/|archive-url=https://web.archive.org/web/20180714224047/https://www.nationalgeographic.com/magazine/2009/01/president/|url-status=dead|archive-date=July 14, 2018|magazine=[[National Geographic]]|location=Washington, D.C.|access-date=August 3, 2018}}</ref> [[Camp David]], ilo likumanyikwa mwaboma kuti Naval Support Facility Thurmont, ni msasa wa nkhondo wa mu mapiri ku [[Frederick County, Maryland]], ndipo ni malo gha kupumulirako gha purezidenti. Malo agha ghakumanyikwa chifukwa cha mtende na kuzgeŵa phokoso, ndipo ghagwiliskirika ntchito chomene kulandira ŵalongozgi ŵa vyaru vinyake kufuma m'ma 1940.<ref>{{Cite web|url=https://www.whitehouse.gov/about-the-white-house/camp-david/|title=The White House Building|website=[[whitehouse.gov]]|access-date=August 3, 2018}}</ref> === Kuleka ntchito ya pulezidenti (Post-presidency) === [[File:Five Presidents Oval Office.jpg|thumb|Kufuma kumazere kuya kumalyero: Mapulezidenti [[George H. W. Bush]], [[Barack Obama]], [[George W. Bush]], [[Bill Clinton]], na [[Jimmy Carter]] mu [[Oval Office]] pa Janyuwale 7, 2009; Obama wakanjira pa udindo mazuŵa 13 pamanyuma.]] ==== Milimo iyo ŵakuchita pamanyuma pa udindo ==== Mapulezidenti ghanyake ghakale ghakaŵa na ntchito zikuru chomene pamanyuma pakufuma pa udindo. Viyelezgero vikuru ni [[William Howard Taft]], uyo wakaŵa [[Chief Justice of the United States|mweruzgi mukuru wa United States]], na [[Herbert Hoover]], uyo wakalongozga ntchito zakuweleraso kupanga boma pamanyuma pa [[Nkhondo Yachiŵiri ya pa Charu Chose]]. Mapulezidenti ŵaŵiri ŵakaweleraso ku [[United States Congress|Congress]] pamanyuma pakufuma mu White House: [[John Quincy Adams]] wakasankhika ku [[United States House of Representatives|Nyumba ya Ŵimiliri]], uko wakateŵetera vyaka 17, ndipo [[Andrew Johnson]] wakaweleraso ku [[United States Senate|Senate]] mu 1875, nangauli wakafwa nyengo yichoko waka pamanyuma. Mapulezidenti ŵaŵiri nawo ŵakaweleraso ku upulezidenti: [[Grover Cleveland]] wakathera pa [[1888 United States presidential election|chisankho cha 1888]] ndipo wakatheraso pa [[1892 United States presidential election|chisankho cha 1892]], apo [[Donald Trump]] wakathera pa [[2020 United States presidential election|chisankho cha 2020]] ndipo wakatheraso pa [[2024 United States presidential election|chisankho cha 2024]]. Ŵapulezidenti ŵanyake ŵakakhalaso ŵakuchita vinandi pa nkhani za pa charu chose, kusazgapo [[Theodore Roosevelt]],<ref>Edmund Morris, ''Colonel Roosevelt'' (2011)</ref> [[Herbert Hoover]],<ref>Gary Dean Best, ''The Life of Herbert Hoover: Keeper of the Torch, 1933–1964'' (2013)</ref> [[Richard Nixon]],<ref>Kasey S. Pipes, ''After the Fall: The Remarkable Comeback of Richard Nixon'' (2019)</ref> na [[Jimmy Carter]].<ref>Douglas Brinkley. ''The Unfinished Presidency: Jimmy Carter's Journey Beyond the White House'' (1998).</ref><ref>{{cite journal | last1 = John Whiteclay | first1 = Chambers II | year = 1979 | title = Presidents Emeritus | journal = American Heritage | volume = 30 | issue = 4| pages = 16–25 }}</ref> Mapulezidenti ŵakwambilira ŵakaweleranga ku vikaya vyawo kukulongozga ntchito zachitemwa, panji kulaŵilira milimo yaulimi pa minda yawo na mapulante awo ghakanyalanyazgika apo ŵakaŵa pa udindo. [[Thomas Jefferson]] wakambiska [[University of Virginia]] pamanyuma pa upulezidenti wake, ndipo wakati wafwa, [[James Madison]] ndiyo wakamulondezga nga ni rector. Madison na [[James Monroe]] nawo ŵakawovwira kulemba mtundu umoza wa [[Virginia Constitution]], apo [[John Tyler]] wakateŵeteranga pa [[Confederate Constitution]] na mu [[Confederate Congress]]. Mapulezidenti ŵa pa nyengo iyo ŵaleka udindo ŵangatumika na pulezidenti uyo wali pa udindo kuti ŵafikiskenge mauthenga ghachisisi ku vyaru vinyake panji kuŵa ŵimiliri ŵaboma pa nyifwa za ŵalongozgi ŵa vyaru na pa vyakuchitika vikuru vya pa charu chose.<ref name="apreaction19810331">{{Cite news |url=https://news.google.com/newspapers?id=TE4tAAAAIBAJ&dq=reagan%20assassination%201981&pg=1392%2C4423618 |title=Shock and Anger Flash Throughout the United States |date=March 31, 1981 |access-date=March 11, 2011 |url-status=dead |archive-url=https://web.archive.org/web/20150906144021/https://news.google.com/newspapers?id=TE4tAAAAIBAJ&sjid=bM4FAAAAIBAJ&dq=reagan%20assassination%201981&pg=1392%2C4423618 |archive-date=September 6, 2015 |agency=Associated Press }}</ref><ref name="4presidentsphotos">{{Cite web |url=http://www.reagan.utexas.edu/archives/photographs/four.html |title=Four Presidents |publisher=Reagan Presidential Library, National Archives and Records Administration |access-date=April 3, 2011 |archive-date=May 12, 2011 |archive-url=https://web.archive.org/web/20110512020542/http://www.reagan.utexas.edu/archives/photographs/four.html |url-status=dead }}</ref> [[Richard Nixon]] wakachita maulendo ghanandi ku vyaru nga ni China na Russia ndipo wakalumbikika nga ni mulongozgi wakumanyikwa chomene.<ref>{{Cite web |url=https://obamawhitehouse.archives.gov/1600/presidents/richardnixon |work=[[whitehouse.gov]] |title=Biography of Richard M. Nixon |via=[[NARA|National Archives]] |date=December 30, 2014 }}</ref> Mu [[Post-presidency of Jimmy Carter|umoyo wake pamanyuma pa upulezidenti]], [[Jimmy Carter]] wakaŵa mulimbikira wa [[human rights]], muphalamano wa pa charu chose, na mulaŵiliri wa visankho, ndipo wakapokera [[Nobel Peace Prize]]. [[Bill Clinton]] nayo wakateŵeteranga nga ni nthumwi yambura udindo wa boma, chomenechomene pa kudumbiskana uko kukapangiska kuti ŵamasulike ŵalembi ŵa nkhani ŵa ku America [[Laura Ling]] na [[Euna Lee]] kufuma ku [[North Korea]]. Pa nyengo ya upulezidenti wake, [[George W. Bush]] wakapempha ŵapulezidenti ŵakale [[George H. W. Bush]] na Clinton kuti ŵawovwire pa ntchito za wovwiri wa ŵanthu pamanyuma pa [[2004 Indian Ocean earthquake and tsunami]]. Pulezidenti Obama nayo wakachita mwakuyana waka pakupempha Clinton na George W. Bush kuti ŵalongozge ntchito zakovwira Haiti pamanyuma pa [[2010 Haiti earthquake|chindindindi chikuru]] icho chikaparanya charu ichi mu 2010. Ubwezi wa Clinton na ŵa Bush ŵaŵiri ukaŵa wakwamba yayi pakati pa ŵapulezidenti ŵakale; Carter wakaŵaso na ubwezi na kulemberana makalata na [[Gerald Ford]], apo [[Thomas Jefferson]] na [[John Adams]] nawo ŵakalemberananga makalata kwa nyengo yitali pamanyuma pa maudindo ghawo. [[Post-presidency of Bill Clinton|Clinton]] walutilira kuŵa wakugwira ntchito za ndyali pamanyuma pa kuleka udindo, wakawovwira muwoli wake [[Hillary Clinton|Hillary]] pa [[Hillary Clinton 2008 presidential campaign|kampeni ya 2008]] na [[Hillary Clinton 2016 presidential campaign|ya 2016]], kweniso wakawovwira Pulezidenti Obama pa [[Barack Obama 2012 presidential campaign|kampeni yake ya kusankhikaso mu 2012]]. Obama nayo walutilira kuŵa wakuchita ndyali pamanyuma pa kuleka udindo, wakawovwira uyo wakaŵa muteŵeti wake [[Joe Biden]] pa [[Joe Biden 2020 presidential campaign|kampeni ya 2020]], kweniso wakawovwira muteŵeti wa Biden [[Kamala Harris]] pa [[Kamala Harris 2024 presidential campaign|kampeni yake ya 2024]] pamanyuma pakuti Pulezidenti Biden [[Withdrawal of Joe Biden from the 2024 United States presidential election|wafumiskepo bid yake ya kusankhikaso]]. Pamanyuma pakutaya chisankho cha 2020, Trump wakalutilira kuŵa wakugwira ntchito za ndyali ndipo wakasuskanga chomene mulondezgi wake na chipani cha Democratic Party. Wakasanganaso na milandu yinayi ya uchigeŵenga. Trump wakapharazga kuti waŵengepo pa chisankho cha upulezidenti kachinayi mu 2022, ndipo pamanyuma wakazgoka msankho wa chipani chake kachitatu, ndipo wakatheraso pa udindo wa upulezidenti mu 2024. ==== Penshoni na vyawanangwa vinyake ==== [[Former Presidents Act]] (FPA), iyo yikakhazikiskika mu 1958, yikupereka vyawanangwa vya umoyo wose ku ŵapulezidenti ŵakale na ŵalongosi ŵawo, kusazgapo penshoni ya mwezi uliwose, chovwiri cha munkhwala mu vipatala vya ŵasilikari, inshuwalansi ya umoyo, na chivikiliro cha [[United States Secret Service|Secret Service]]. Ndiposo boma likupeleka ndalama za ŵantchito ŵanyake na za ofesi. Dango ili lasinthika kanandi kuti likwezge ndalama za penshoni na za ŵantchito ŵa maofesi. FPA yikupereka yayi vyawanangwa ivi kwa pulezidenti uyo wakafumiskika pa udindo chifukwa cha [[Federal impeachment in the United States|impeachment]].<ref name="CRS">{{cite web |author1=Stephanie Smith |title=Federal Pension and Retirement Benefits |url=https://fas.org/sgp/crs/misc/98-249.pdf |website=Federation of American Scientists |publisher=Congressional Research Service, The Library of Congress |access-date=November 10, 2020 |date=March 18, 2008 |archive-date=January 7, 2021 |archive-url=https://web.archive.org/web/20210107170308/https://fas.org/sgp/crs/misc/98-249.pdf |url-status=live }}</ref> Mwakuyana na lipoti la [[Congressional Research Service]] la 2008:<ref name="CRS" /> <blockquote>Ŵalongozgi ŵakuru awo ŵakafumanga pa udindo pambere chaka cha 1958 chindafike kanandi ŵakalutiliranga kuchita ntchito zinyake ndipo ŵakapokeranga wovwiri uliwose yayi kufuma ku boma la federal. Apo mubizinesi Andrew Carnegie wakapharazga ndondomeko mu 1912 yakuti waŵapenge ŵapulezidenti ŵakale penshoni ya $25,000 pa chaka, ŵabali ŵanandi ŵa Congress ŵakawona kuti ntchambura kwenelera kuti kampani ya munthu payekha ndiyo yipelekenge penshoni yanthena. Mu chaka chenechira, dango lakukhazikiska mapenshoni gha ŵapulezidenti likayambiska kudumbiskika kakwamba, kweni likazomerezgeka yayi. Mu 1955, Congress yikawerezgaso kudumbiskana za dango ili chifukwa cha masuzgo gha ndalama agho wakaŵa nagho pulezidenti wakale Harry S. Truman pakulemba ŵantchito ŵa ofesi.</blockquote> Penshoni yakwezgeka kanandi mwakuzomerezgeka na Congress. Ŵapulezidenti ŵakale ŵakupokera penshoni yakuyana na malipiro gha mlembi wa dipatimenti ya Cabinet wa boma ilo lili pa udindo, agho ghakaŵa $199,700 pa chaka mu 2012.<ref>{{Cite web |url=https://fas.org/sgp/crs/misc/RS20115.pdf |title=President of the United States: Compensation |last=Schwemle |first=Barbara L. |date=October 17, 2012 |publisher=Congressional Research Service |access-date=January 10, 2013}}</ref> Ŵapulezidenti ŵakale awo ŵakateŵeteraso mu Congress ŵangapokeraso [[congressional pension]].<ref>{{Cite news |url=http://www.toledoblade.com/Politics/2007/01/07/Former-presidents-cost-U-S-taxpayers-big-bucks-tab-from-1977-to-2000-is-pegged-at-370-million.html |title=Former presidents cost U.S. taxpayers big bucks |date=January 7, 2007 |website=[[The Blade (Toledo)|Toledo Blade]] |access-date=May 22, 2007}}</ref> Dango ili likupelekaso ndalama za maulendo na wanangwa wa [[franking]]. Pambere chaka cha 1997 chindafike, ŵapulezidenti wose ŵakale, ŵawoli ŵawo, na ŵana ŵawo ŵasinkhu wa pasi pa vyaka 16 ŵakavikilirikanga na [[United States Secret Service|Secret Service]] mpaka nyifwa ya pulezidenti.<ref>{{usc|18|3056}}</ref><ref>{{Cite news |url=https://www.washingtonpost.com/politics/obama-signs-bill-granting-lifetime-secret-service-protection-to-former-presidents-and-spouses/2013/01/10/c4474416-5b5a-11e2-b8b2-0d18a64c8dfa_story.html |title=Obama signs bill granting lifetime Secret Service protection to former presidents and spouses |date=January 10, 2013 |newspaper=The Washington Post |access-date=January 10, 2013 |url-status=dead |archive-url=https://web.archive.org/web/20160823000643/https://www.washingtonpost.com/politics/obama-signs-bill-granting-lifetime-secret-service-protection-to-former-presidents-and-spouses/2013/01/10/c4474416-5b5a-11e2-b8b2-0d18a64c8dfa_story.html |archive-date=August 23, 2016 |agency=Associated Press}}</ref> Mu 1997, Congress yikadumura dango lakuti chivikiliro cha Secret Service chiŵe cha vyaka 10 pera kufuma apo pulezidenti wafumira pa udindo.<ref name="secretservice.gov">{{Cite web |url=https://www.secretservice.gov/protection/ |title=United States Secret Service: Protection |publisher=United States Secret Service |access-date=November 9, 2017}}</ref> Pa Janyuwale 10, 2013, Pulezidenti Obama wakasayina dango ilo likawelereska chivikiliro cha umoyo wose cha Secret Service kwa iyomwene, [[George W. Bush]], na ŵapulezidenti wose awo ŵazamwiza pamanyuma pake.<ref>{{Cite news |url=http://www.washingtontimes.com/news/2013/jan/10/inside-politics-obama-signs-protection-bill-for-fo/?page=all |title=Obama signs protection bill for former presidents |date=January 10, 2013 |work=The Washington Times |access-date=August 14, 2013}}</ref> [[First Spouse of the United States|Muwoli wa pulezidenti]] uyo wakutoraso nthengwa wakuleka kuŵa wakwenelera kupokera chivikiliro cha Secret Service.<ref name="secretservice.gov" /> === Kulemba mabuku === {{main|Mndandanda wa mabuku gha umoyo wa mapulezidenti gha United States}} Kufuma apo [[Ulysses S. Grant]] wakafumiska buku lake la ''[[Personal Memoirs of U. S. Grant|Personal Memoirs]]'' mu 1885, mapulezidenti ghanandi, kusazgapo pulezidenti waliyose uyo wakakhala wamoyo mpaka wamara nyengo yake kufuma kwa [[Calvin Coolidge]] kufika kwa [[Barack Obama]], walemba buku limoza panji ghakujumpha limoza la umoyo wake. Mabuku agha gha umoyo ghakuchita vinthu viŵiri: kuvikilira chuma cha Banja Lakwamba (First Family) (Bill Clinton wakasangapo ndalama zakujumpha $30 miliyoni chifukwa cha kulemba mabuku ghaŵiri<ref>{{cite news| url= https://news.bbc.co.uk/2/hi/americas/7331834.stm |title= Clintons' earnings exceed $100m| publisher= BBC News| date= April 5, 2008| access-date= June 26, 2015}}</ref>), kweniso kuvikilira panji kuwezgeraso mbiri ya upulezidenti wawo. === Kulemba === {{main|Mndandanda wa mabuku gha umoyo wa ŵapurezidenti ŵa United States}} Kwambira apo [[Ulysses S. Grant]] wakafumiskira buku lake la ''[[Mabuku gha Umoyo gha U. S. Grant]]'' mu 1885, ŵapurezidenti ŵanandi, kusazgapo pulezidenti waliyose uyo wakakhala wamoyo m'paka kumalizga nyengo yake ya uteŵeti kufuma kwa [[Calvin Coolidge]] mpaka [[Barack Obama]], ŵalemba buku limoza panji vinandi vya umoyo wawo. Mabuku agha ghakukhwaskana na umoyo wa ŵapurezidenti ghali na vilato viŵiri: kuvikilira ndalama za [[Banja Lakwamba la United States|Banja Lakwamba]] (mwachiyelezgero, [[Bill Clinton]] wakasanga ndalama zakujumpha madola 30 miliyoni kufuma ku kulemba mabuku ghaŵiri<ref>{{cite news| url= https://news.bbc.co.uk/2/hi/americas/7331834.stm |title= Clintons' earnings exceed $100m| publisher= BBC News| date= April 5, 2008| access-date= June 26, 2015}}</ref>), kweniso kuvikilira panji kuwezgerapo mbiri ya ulamuliro wawo. === Malaibulale gha ŵapurezidenti na malo ghakale === {{Main|Ndondomeko ya malaibulale gha ŵapurezidenti|Mndandanda wa nyumba za ŵapurezidenti ŵa United States}} Nyumba izo ŵapurezidenti ŵa United States ŵakababikiramo, ŵakakhalamo, panji ŵakapumulirangamo, kanandi zikusungika nga ni [[nyumba ya museum]] ndipo zikumanyikwa nga ni [[Mndandanda wa malo ghakale gha charu na mapaki gha mbiri gha United States|Malo Ghakale gha Charu]] panji kulembeka pa [[U.S. National Register of Historic Places]]. [[File:George W. Bush Presidential Center dedication.tif|alt=|thumb|Kufuma kumazere kuya kumanja: Ŵapurezidenti [[Barack Obama]], [[George W. Bush]], [[Bill Clinton]], [[George H. W. Bush]], na [[Jimmy Carter]] pa kujulira [[Laibulale na Museum ya Pulezidenti George W. Bush]] ku [[Dallas]] mu 2013.]] Pulezidenti waliyose kwambira [[Herbert Hoover]] wali kupanga [[malo ghakusungiramo vyakulemba]] agho ghakumanyikwa kuti [[ndondomeko ya malaibulale gha ŵapurezidenti|laibulale ya pulezidenti]] kuti ŵasungemo mapepala ghake, marekodi, na vinthu vinyake. Malaibulale agho ghazamala kuzengeka ghakuperekeka na kusungika na [[National Archives and Records Administration]] (NARA); ndalama zakwamba zakuzengera na kuvikonzeska zikufuma ku ŵanthu pawokha, osati ku boma la federal.<ref>{{usc|44|2112}}</ref> Pasono pali malaibulale 13 gha ŵapurezidenti agho ghali mu ndondomeko ya NARA. Paliso malaibulale gha ŵapurezidenti agho ghakusungika na maboma gha vigaŵa, maziko gha ŵanthu pawokha, kweniso mayunivesite, nga ni: * [[Laibulale na Museum ya Pulezidenti Abraham Lincoln]], iyo yikwendeskeka na Boma la [[Illinois]]; * [[Laibulale na Museum ya Pulezidenti George W. Bush]], iyo yikwendeskeka na [[Southern Methodist University]]; * [[Laibulale na Museum ya Pulezidenti George H. W. Bush]], iyo yikwendeskeka na [[Texas A&M University]]; na * [[Laibulale na Museum ya Pulezidenti Lyndon Baines Johnson]], iyo yikwendeskeka na [[University of Texas at Austin]]. Ŵapurezidenti ŵanyake ŵakawoneseska kuzenga na kujulira malaibulale ghawo ŵekha. Ŵanyake ŵakanozga kuti ŵazakasungikike pamalo agha para ŵafwa. Malaibulale ghanandi gha ŵapurezidenti ghali na madindi gha pulezidenti uyo ghakumulongosora: * [[Laibulale na Museum ya Pulezidenti Harry S. Truman]] ku [[Independence, Missouri]]; * [[Laibulale, Museum na Nyumba ya Uwana ya Dwight D. Eisenhower]] ku [[Abilene, Kansas]]; * [[Laibulale na Museum ya Pulezidenti Richard Nixon]] ku [[Yorba Linda, California]]; na * [[Laibulale na Museum ya Pulezidenti Ronald Reagan]] ku [[Simi Valley, California]]. Madindi agha ghali kujulika ku ŵanthu wose. Mu viyelezgero vinyake (nga ni vya Nixon), laibulale ya pulezidenti yili pafupi na nyumba yake yakale. Kweni kwa ŵanyake, nga ni [[Lyndon B. Johnson]] na [[Jimmy Carter]], laibulale ya pulezidenti na malo ghakale vili mu misumba yakupambana. == Chipani cha ndale == [[Vipani vya ndale vya United States|Vipani vya ndale]] vyalongozga [[Ndale za United States|ndale za America]] kwa nyengo yitali chomene ya mbiri ya charu ichi. Nangauli [[Ŵadada ŵakwambiska United States]] ŵakawonanga vipani vya ndale kuti vingagaŵa na kunanga wumoza wa charu, ndipo kuŵapo kwake kukayembekezgekanga yayi apo [[Dango Likuru la United States]] likalembekanga mu 1787, vipani vya ndale vyakukhazikika vikamba kuwoneka pakati pa m'ma 1790. Vikafuma ku [[gulu la ndale|magulu gha ndale]], agho ghakamba kuwoneka mwaluŵiro chomene pamanyuma pakukhazikika kwa boma la federal. Awo ŵakawovwiranga [[Ulamuliro wa George Washington]] ŵakamanyikwanga kuti "ŵakukhozgera boma", ndipo pamanyuma ŵakapanga [[Federalist Party]], apo awo ŵakasuskanga ŵakakolerana na [[Democratic-Republican Party]].<ref>{{Cite web|url=https://www.senate.gov/history/partydiv.htm|title=U.S. Senate: Party Division|publisher=U.S. Senate|access-date=January 2, 2017}}</ref> Chifukwa cha kufipa mtima na nkhongono izo vipani vya ndale vingamanya kuparanya wumoza wa charu, Washington wakakhalira [[wandale wambura chipani]] mu nyengo yose ya vyaka vinkhondi na viŵiri vya ulamuliro wake. Wakaŵa, ndipo wachali, pulezidenti yekha wa United States uyo wandakhalepo wa chipani chilichose cha ndale.<ref name="GWpps">{{Cite web|url=http://www.washingtontimes.com/news/2014/dec/31/george-washingtons-views-political-parties-america/|title=George Washington's views on political parties in America|last=Jamison|first=Dennis|date=December 31, 2014|website=[[The Washington Times]]|access-date=July 1, 2016}}</ref><ref>{{Cite web|url=https://www.mountvernon.org/george-washington/the-first-president/political-parties/|title=Political Parties|publisher=Mount Vernon Ladies' Association|location=Mount Vernon, Virginia|access-date=March 24, 2019}}</ref> Kwambira pa Washington, pulezidenti waliyose wa United States wakaŵa wa chipani cha ndale apo wakanjiliranga pa udindo. Ndipo kwambira mu 1869, pulezidenti waliyose wakaŵa wa [[Republican Party (United States)|Republican]] panji [[Democratic Party (United States)|Democratic]].<ref>{{Cite web|url=http://www.enchantedlearning.com/history/us/pres/list.shtml|title=The Presidents of the United States of America|website=Enchanted Learning|access-date=August 2, 2018}}</ref><ref>{{Cite web|url=https://www.presidentsusa.net/partyofpresidents.html|title=Political Parties of the Presidents|website=Presidents USA|access-date=August 2, 2018}}</ref> Chiŵelengero cha ŵapurezidenti malinga na chipani icho ŵakaŵamo apo ŵakalapanga ntchito pakwamba ni ichi: {| class=wikitable |- ! colspan=2| Chipani ! {{vertical header|Chiŵelengero cha<br>ŵapurezidenti}} ! Mazina |- | style="background-color:{{party color|Republican Party (United States)}}" | | [[Republican Party (United States)|Republican]] | style="text-align: center;" |19 | [[Chester A. Arthur]], [[George H. W. Bush]], [[George W. Bush]], [[Calvin Coolidge]], [[Dwight D. Eisenhower]], [[Gerald Ford]], [[James A. Garfield]], [[Ulysses S. Grant]], [[Warren G. Harding]], [[Benjamin Harrison]], [[Rutherford B. Hayes]], [[Herbert Hoover]], [[Abraham Lincoln]],{{efn|Republican Abraham Lincoln wakasankhikaso pa tikiti ya [[National Union Party (United States)|National Union Party]] pamoza na Democrat Andrew Johnson mu 1864.}} [[William McKinley]], [[Richard Nixon]], [[Ronald Reagan]], [[Theodore Roosevelt]], [[William Howard Taft]], na '''[[Donald Trump]] (wali pa udindo)''' |- | style="background: {{party color|Democratic Party (United States)}};" | | [[Democratic Party (United States)|Democratic]] | style="text-align: center;" |15 | [[Joe Biden]], [[James Buchanan]], [[Jimmy Carter]], [[Grover Cleveland]], [[Bill Clinton]], [[Andrew Jackson]], [[Lyndon B. Johnson]], [[John F. Kennedy]], [[Barack Obama]], [[Franklin Pierce]], [[James K. Polk]], [[Franklin D. Roosevelt]], [[Harry S. Truman]], [[Martin Van Buren]], na [[Woodrow Wilson]] |- | style="background-color:{{party color|Democratic-Republican Party}}" | | [[Democratic-Republican Party|Democratic-Republican]] | style="text-align: center;" |4 | [[John Quincy Adams]], [[Thomas Jefferson]], [[James Madison]], na [[James Monroe]] |- | style="background-color:{{party color|Whig Party (United States)}}" | | [[Whig Party (United States)|Whig]] | style="text-align: center;" |4 | [[Millard Fillmore]], [[William Henry Harrison]], [[Zachary Taylor]], na [[John Tyler]]{{efn|Democrat John Tyler wakasankhika kuŵa vice president pa tikiti ya Whig pamoza na Harrison mu 1840. Ndondomeko zake apo wakaŵa pulezidenti zikapambana na ivyo Whig Party yikakhumbanga, ndipo chipani chikamufumiska mu Seputembala 1841.}} |- | style="background-color:{{party color|Federalist Party}}" | | [[Federalist Party|Federalist]] | style="text-align: center;" |1 | [[John Adams]] |- | style="background-color:{{party color|National Union Party (United States)}}" | | nowrap | [[National Union Party (United States)|National Union]] | style="text-align: center;" |1 | [[Andrew Johnson]]{{efn|Democrat Andrew Johnson wakasankhika kuŵa vice president pa tikiti ya National Union Party pamoza na Republican Abraham Lincoln mu 1864. Pamanyuma, apo wakaŵa pulezidenti, wakayezga kupanga chipani cha ŵakugomezgeka kwa iyo pasi pa mbendera ya National Union kweni wakatondeka. Kufupi naumaliro wa ulamuliro wake, wakaweleraso ku Democratic Party.}} |- | style="background:#f5f5f5" | | [[Independent politician (United States)|Wambura chipani]] | style="text-align: center;" |1 | [[George Washington]] |} == Nyengo ya ŵapurezidenti == {{see also|Mndandanda wa ŵapurezidenti ŵa United States}} [[Bar chart|Chati ya nyengo]] iyi yikulongora umo ŵapurezidenti ŵa United States ŵakendeleranga mu nyengo kweniso [[chipani cha ndale]] icho ŵakaŵamo pa nyengo iyo ŵakanjiranga pa udindo. <div class="center">{{#tag:timeline| ImageSize = width:1500 height:auto barincrement:18 PlotArea = top:10 bottom:20 right:130 left:10 AlignBars = late DateFormat = x.y Period = from:1788.90 till:{{#expr:{{#time:Y}}+{{#time:m}}/6}} TimeAxis = orientation:horizontal ScaleMajor = unit:year increment:10 start:1790 ScaleMinor = unit:year increment:1 start:1789 Define $now = {{#expr:{{#time:Y}}+{{#time:m}}/12}} Colors = id:5year value:rgb(0.8, 0.8, 0.8) id:0year value:rgb(0.6, 0.6, 0.6) id:noparty value:rgb(0.7, 0.7, 0.7) id:fed value:rgb(0.85, 0.52, 0.38) id:demrep value:rgb(0, 0.5, 0) id:whig value:rgb(0.84, 0.74, 0.34) id:nlunion value:rgb(0.7, 0.13, 0.13) id:dem value:rgb(0.2, 0.2, 1) id:rep value:rgb(1, 0.2, 0.2) id:seat1 value:rgb(0.60,0.10,0.10) id:blank value:white BarData = barset:PresidentLine barset:Presidents PlotData= width:1 align:right fontsize:S shift:(-3,-4) anchor:from fontsize:8 color:black barset:PresidentLine from:1804 till:end text:Ŵapurezidenti width:6 align:left fontsize:S shift:(5,-4) anchor:till fontsize:10 barset:Presidents from:1789.40 till:1797.17 color:noparty text:"George Washington" from:1797.17 till:1801.17 color:fed text:"John Adams" from:1801.17 till:1809.17 color:demrep text:"Thomas Jefferson" from:1809.17 till:1817.17 color:demrep text:"James Madison" from:1817.17 till:1825.17 color:demrep text:"James Monroe" from:1825.17 till:1829.17 color:demrep text:"John Quincy Adams" from:1829.17 till:1837.17 color:dem text:"Andrew Jackson" from:1837.17 till:1841.17 color:dem text:"Martin Van Buren" from:1841.17 till:1841.26 color:whig text:"William Henry Harrison" from:1841.26 till:1845.17 color:whig text:"John Tyler" from:1845.17 till:1849.17 color:dem text:"James K. Polk" from:1849.17 till:1850.52 color:whig text:"Zachary Taylor" from:1850.52 till:1853.17 color:whig text:"Millard Fillmore" from:1853.17 till:1857.17 color:dem text:"Franklin Pierce" from:1857.17 till:1861.17 color:dem text:"James Buchanan" from:1861.17 till:1865.29 color:rep text:"Abraham Lincoln" from:1865.29 till:1869.17 color:nlunion text:"Andrew Johnson" from:1869.17 till:1877.17 color:rep text:"Ulysses S. Grant" from:1877.17 till:1881.17 color:rep text:"Rutherford B. Hayes" from:1881.17 till:1881.73 color:rep text:"James A. Garfield" from:1881.73 till:1885.17 color:rep text:"Chester A. Arthur" from:1885.17 till:1889.17 color:dem text:"Grover Cleveland" from:1889.17 till:1893.17 color:rep text:"Benjamin Harrison" from:1893.17 till:1897.17 color:dem text:"Grover Cleveland" from:1897.17 till:1901.72 color:rep text:"William McKinley" from:1901.72 till:1909.17 color:rep text:"Theodore Roosevelt" from:1909.17 till:1913.17 color:rep text:"William Howard Taft" from:1913.17 till:1921.17 color:dem text:"Woodrow Wilson" from:1921.17 till:1923.59 color:rep text:"Warren G. Harding" from:1923.59 till:1929.17 color:rep text:"Calvin Coolidge" from:1929.17 till:1933.17 color:rep text:"Herbert Hoover" from:1933.17 till:1945.28 color:dem text:"Franklin D. Roosevelt" from:1945.28 till:1953.05 color:dem text:"Harry S. Truman" from:1953.05 till:1961.05 color:rep text:"Dwight D. Eisenhower" from:1961.05 till:1963.89 color:dem text:"John F. Kennedy" from:1963.89 till:1969.05 color:dem text:"Lyndon B. Johnson" from:1969.05 till:1974.61 color:rep text:"Richard Nixon" from:1974.61 till:1977.05 color:rep text:"Gerald Ford" from:1977.05 till:1981.05 color:dem text:"Jimmy Carter" from:1981.05 till:1989.05 color:rep text:"Ronald Reagan" from:1989.05 till:1993.05 color:rep text:"George H. W. Bush" from:1993.05 till:2001.05 color:dem text:"Bill Clinton" from:2001.05 till:2009.05 color:rep text:"George W. Bush" from:2009.05 till:2017.05 color:dem text:"Barack Obama" from:2017.05 till:2021.05 color:rep text:"Donald Trump" from:2021.05 till:2025.05 color:dem text:"Joe Biden" from:2025.05 till:$now color:rep text:"Donald Trump" LineData= from:1842.00 till:1845.17 atpos:650 color:noparty width:6 from:1885.17 till:1889.17 atpos:439.5 color:dem width:6 from:2017.05 till:2021.05 atpos:52 color:rep width:6 layer:back at:1790.00 width:0.1 color:0year at:1795.00 width:0.1 color:5year at:1800.00 width:0.1 color:0year at:1805.00 width:0.1 color:5year at:1810.00 width:0.1 color:0year at:1815.00 width:0.1 color:5year at:1820.00 width:0.1 color:0year at:1825.00 width:0.1 color:5year at:1830.00 width:0.1 color:0year at:1835.00 width:0.1 color:5year at:1840.00 width:0.1 color:0year at:1845.00 width:0.1 color:5year at:1850.00 width:0.1 color:0year at:1855.00 width:0.1 color:5year at:1860.00 width:0.1 color:0year at:1865.00 width:0.1 color:5year at:1870.00 width:0.1 color:0year at:1875.00 width:0.1 color:5year at:1880.00 width:0.1 color:0year at:1885.00 width:0.1 color:5year at:1890.00 width:0.1 color:0year at:1895.00 width:0.1 color:5year at:1900.00 width:0.1 color:0year at:1905.00 width:0.1 color:5year at:1910.00 width:0.1 color:0year at:1915.00 width:0.1 color:5year at:1920.00 width:0.1 color:0year at:1925.00 width:0.1 color:5year at:1930.00 width:0.1 color:0year at:1935.00 width:0.1 color:5year at:1940.00 width:0.1 color:0year at:1945.00 width:0.1 color:5year at:1950.00 width:0.1 color:0year at:1955.00 width:0.1 color:5year at:1960.00 width:0.1 color:0year at:1965.00 width:0.1 color:5year at:1970.00 width:0.1 color:0year at:1975.00 width:0.1 color:5year at:1980.00 width:0.1 color:0year at:1985.00 width:0.1 color:5year at:1990.00 width:0.1 color:0year at:1995.00 width:0.1 color:5year at:2000.00 width:0.1 color:0year at:2005.00 width:0.1 color:5year at:2010.00 width:0.1 color:0year at:2015.00 width:0.1 color:5year at:2020.00 width:0.1 color:0year at:2025.00 width:0.1 color:5year }}</div> == Wonani so == {{Portal|United States|Politics}} * [[Outline of American politics]] {{Clear}} == Vyakulemba == {{Notelist}} == Ukaboni == {{Reflist}} == Vinandi == {{Refbegin}} * Edwards, George C. and Thomas G. Howell (eds.). 2009. ''The Oxford Handbook of the American Presidency''. Oxford University Press. * {{cite journal |last1=Kernell |first1=Samuel |last2=Jacobson |first2=Gary C. |year=1987 |title=Congress and the Presidency as News in the Nineteenth Century |url=http://pages.ucsd.edu/~skernell/resources/congresspresasnews.pdf |journal=Journal of Politics |volume=49 |issue=4 |pages=1016–1035 |doi=10.2307/2130782 |jstor=2130782 |s2cid=154834781}} * Howell, William G. 2023. ''The American Presidency: An Institutional Approach to Executive Politics''. Princeton University Press. * {{cite journal |last1=Sigelman |first1=Lee |last2=Bullock |first2=David |year=1991 |title=Candidates, issues, horse races, and hoopla: Presidential campaign coverage, 1888–1988 |url=https://blogs.cornell.edu/bigreddc/files/2013/09/SchoolsAmerican-Politics-Research-1991-Sigelman-5-32.pdf |journal=American Politics Quarterly |volume=19 |issue=1 |pages=5–32 |doi=10.1177/1532673x9101900101 |s2cid=154283367}} * [[John William Tebbel|Tebbel, John William]], and Sarah Miles Watts. ''The Press and the Presidency: From George Washington to Ronald Reagan'' (Oxford University Press, 1985). [https://www.jstor.org/stable/2131296 online review] * Waterman, Richard W., and Robert Wright. ''The Image-Is-Everything Presidency: Dilemmas in American Leadership'' (Routledge, 2018). * ''[[Presidential Studies Quarterly]]'', published by Wiley, is an academic journal on the presidency. {{Refend}} ==Pa intaneti== {{Sister project links|d=y|wikt=POTUS|voy=y|b=United States Government/The Executive Branch}} * [https://www.whitehouse.gov/ White House homepage] * [[hdl:10079/fa/beinecke.pres|United States Presidents Collection. General Collection]], Beinecke Rare Book and Manuscript Library, Yale University {{Presidents of the United States}} {{Navboxes|list = {{Lists of US Presidents and Vice Presidents}} {{United States topics}} {{US Chief Executives}} {{United States presidential elections}} {{US presidential memorials}} {{United States Armed Forces}} {{White House}} {{Heads of state and government of North America}} }} {{Authority control}} [[Category:Ŵalongozgi ŵa United States| ]] [[Category:Ulongozgi wa pulezidenti wa United States| ]] [[Category:Vyakukhazikiskika mu United States mu 1789]] [[Category:Ŵalongozgi ŵa boma ŵa United States]] [[Category:Nkhani izo zili na ma timeline gha chithuzithuzi]] j9sq9qce8ph06katsyh19uneer2yrgm Template:Politics of the United States 10 47766 116739 2026-07-06T03:32:27Z en>Dan Aldwin Padilla 0 116739 wikitext text/x-wiki {{#invoke: Sidebar | collapsible | name = Politics of the United States | templatestyles = Template:Politics of the United States/styles.css | bodyclass = US-politics-sidebar vcard hlist | pretitle = '''This article is part of a series on the''' | title = [[Politics of the United States|<small>Politics of the </small><br />United States]] | image = [[File:Greater coat of arms of the United States.svg|center|110px|link=|alt=]] | expanded = {{{expanded|{{{1|}}}}}} | style = width:18.5em; | list1title = [[Federal government of the United States|Federal government]] | list1 = * '''[[Constitution of the United States]]''' * [[Law of the United States|Laws]] * [[List of the United States treaties|Treaties]] | list2title = [[United States Congress|Legislature]] | list2 = * '''[[United States Congress]]''' [[File:(119th) US House of Representatives.svg|x25px]] [[File:119th United States Senate.svg|x27px]] ---- * '''[[United States House of Representatives|House of Representatives]]''' * [[Speaker of the United States House of Representatives|Speaker]] [[Mike Johnson]] (R) * [[Party leaders of the United States House of Representatives|Majority Leader]] [[Steve Scalise]] (R) * [[Party leaders of the United States House of Representatives|Minority Leader]] [[Hakeem Jeffries]] (D) * [[Party leaders of the United States House of Representatives|Majority Whip]] [[Tom Emmer]] (R) * [[Party leaders of the United States House of Representatives|Minority Whip]] [[Katherine Clark]] (D) * [[United States congressional district|Congressional districts]] ([[List of United States congressional districts|list]]) *[[Non-voting members of the United States House of Representatives|Non-voting members]] ---- * '''[[United States Senate|Senate]]''' * [[Vice President of the United States|President]] [[JD Vance]] (R) * [[President pro tempore of the United States Senate|President Pro Tempore]] [[Chuck Grassley]] (R) * [[Party leaders of the United States Senate|Majority Leader]] [[John Thune]] (R) * [[Party leaders of the United States Senate|Minority Leader]] [[Chuck Schumer]] (D) * [[Party leaders of the United States Senate|Majority Whip]] [[John Barrasso]] (R) * [[Party leaders of the United States Senate|Minority Whip]] [[Dick Durbin]] (D) | list3title = [[Executive branch of the United States|Executive]] | list3 = * '''[[President of the United States]]''' * [[Donald Trump]] (R) * '''[[Vice President of the United States]]''' * [[JD Vance]] (R) ---- * [[Cabinet of the United States|Cabinet]] * [[List of federal agencies in the United States|Federal agencies]] * [[Executive Office of the President of the United States|Executive Office]] | list4title = [[Federal judiciary of the United States|Judiciary]] | list4 = * '''[[Supreme Court of the United States]]''' * [[Chief Justice of the United States|Chief Justice]] [[John Roberts]] * [[Associate Justices of the Supreme Court of the United States |Associate Chief Justices]] * [[Clarence Thomas|Thomas]] * [[Samuel Alito|Alito]] * [[Sonia Sotomayor|Sotomayor]] * [[Elena Kagan|Kagan]] * [[Neil Gorsuch|Gorsuch]] * [[Brett Kavanaugh|Kavanaugh]] * [[Amy Coney Barrett|Barrett]] * [[Ketanji Brown Jackson|Jackson]] ---- * '''[[Article Three of the United States Constitution|Inferior Courts of the United States]]''' * [[United States courts of appeals|Courts of appeals]] * [[United States district court|District courts]] ([[List of United States district and territorial courts|list]]) * [[United States Court of International Trade| Court of International Trade]] * [[United States Alien Terrorist Removal Court|Alien Terrorist Removal Court]] * [[United States Judicial Panel on Multidistrict Litigation|Judicial Panel on Multidistrict Litigation]] * [[United States Foreign Intelligence Surveillance Court|Foreign Intelligence Surveillance Court]] * [[United States Foreign Intelligence Surveillance Court of Review|Foreign Intelligence Surveillance Court of Review]] ---- * '''[[Federal tribunals in the United States|Other tribunals]]''' | list5title = [[Elections in the United States|Elections]] | list5 = *''' National elections''' ---- * [[United States presidential election|Presidential elections]] * [[United States midterm election|Midterm elections]] * [[Off-year election]]s * [[Primary election#In the United States|Primary elections]] ** [[United States presidential primary|Presidential primary]] ---- *''' Elections by state and territory''' ---- * [[Elections in Alabama|Alabama]] * [[Elections in Alaska|Alaska]] * [[Elections in Arizona|Arizona]] * [[Elections in Arkansas|Arkansas]] * [[Elections in California|California]] * [[Elections in Colorado| Colorado]] * [[Elections in Connecticut|Connecticut]] * [[Elections in Delaware|Delaware]] * [[Elections in Florida|Florida]] * [[Elections in Georgia (U.S. state)|Georgia]] * [[Elections in Hawaii|Hawaii]] * [[Elections in Idaho|Idaho]] * [[Elections in Illinois|Illinois]] * [[Elections in Indiana|Indiana]] * [[Elections in Iowa|Iowa]] * [[Elections in Kansas|Kansas]] * [[Elections in Kentucky|Kentucky]] * [[Elections in Louisiana|Louisiana]] * [[Elections in Maine|Maine]] * [[Elections in Maryland|Maryland]] * [[List of elections in Massachusetts|Massachusetts]] * [[Elections in Michigan|Michigan]] * [[Elections in Minnesota|Minnesota]] * [[Elections in Mississippi|Mississippi]] * [[Elections in Missouri|Missouri]] * [[Elections in Montana|Montana]] * [[Elections in Nebraska|Nebraska]] * [[Elections in Nevada|Nevada]] * [[Elections in New Hampshire|New Hampshire]] * [[Elections in New Jersey|New Jersey]] * [[Elections in New Mexico|New Mexico]] * [[Elections in New York (state)|New York]] * [[Elections in North Carolina|North Carolina]] * [[Elections in North Dakota|North Dakota]] * [[Elections in Ohio|Ohio]] * [[Elections in Oklahoma|Oklahoma]] * [[Elections in Oregon|Oregon]] * [[Elections in Pennsylvania|Pennsylvania]] * [[Elections in Rhode Island|Rhode Island]] * [[Elections in South Carolina|South Carolina]] * [[Elections in South Dakota|South Dakota]] * [[Elections in Tennessee|Tennessee]] * [[Elections in Texas|Texas]] * [[Elections in Utah|Utah]] * [[Elections in Vermont|Vermont]] * [[Elections in Virginia|Virginia]] * [[Elections in Washington (state)|Washington]] * [[Elections in West Virginia|West Virginia]] * [[Elections in Wisconsin|Wisconsin]] * [[Elections in Wyoming|Wyoming]] * [[Elections in American Samoa|American Samoa]] * [[Elections in Guam|Guam]] * [[Elections in the Northern Mariana Islands|Northern Mariana Islands]] * [[Elections in Puerto Rico|Puerto Rico]] * [[Elections in the United States Virgin Islands|U.S. Virgin Islands]] ---- * '''[[Elections in the District of Columbia]]''' ---- *'''([[List of elections in the United States|List of elections]])''' | list6title = [[Political parties in the United States|Political parties]] | list6 = * [[Democratic Party (United States)|Democratic]] * [[Republican Party (United States)|Republican]] ---- * [[Third party (U.S. politics)|Third parties]] ** [[Constitution Party (United States)|Constitution]] ** [[Green Party of the United States|Green]] ** [[Libertarian Party (United States)|Libertarian]] ---- * [[List of political parties in the United States|List of political parties]] | list7title = [[Political ideologies in the United States|Political ideologies]] | list7 = * [[Third Way#United States|Centrism]] * [[Conservatism in the United States|Conservatism]] ** [[Black conservatism in the United States|Black]] ** [[Fiscal conservatism|Fiscal]] ** [[Liberal conservatism|Liberal]] ** [[Neoconservatism|Neo-]] ** [[Paleoconservatism|Paleo-]] ** [[Social conservatism in the United States|Social]] ** [[Traditionalist conservatism in the United States|Traditionalist]] ** [[Trumpism]] * [[Liberalism in the United States|Liberalism]] ** [[Classical liberalism#United States|Classical]] ** [[Conservative liberalism#United States|Conservative]] ** [[Modern liberalism in the United States|Modern]] ** [[Neoliberalism|Neo-]] * [[Libertarianism in the United States|Libertarianism]] ** [[Libertarian conservatism|Conservative]] *** [[Paleolibertarianism|Paleo-]] ** [[Night-watchman state|Minarchist]] ** [[Objectivism]] * [[Progressivism in the United States|Progressivism]] * [[Socialism in the United States|Socialism]] ---- * [[Abolitionism in the United States|Abolitionism]] * [[Constitutionalism in the United States|Constitutionalism]] * [[Environmentalism in the United States|Environmentalism]] * [[Feminism in the United States|Feminism]] * [[Anarchism in the United States|Anarchism]] ** [[Anarcho-capitalism|Capitalist]] ** [[Individualist anarchism in the United States|Individualist]] * [[Monarchism in the United States|Monarchism]] * [[American nationalism|Nationalism]] ** [[Nativism in United States politics|Nativism]] * [[Populism in the United States|Populism]] * [[Protectionism in the United States|Protectionism]] * [[Republicanism in the United States|Republicanism]] ---- *[[Political culture of the United States|Political culture]] *[[Political polarization in the United States|Political polarization]] | list8title = [[Federalism in the United States|Federalism]] | list8 = * '''[[State governments of the United States|State]] and [[Territories of the United States|territorial]] government''' * [[List of current United States governors|Governors]] * [[State legislature (United States)|Legislatures]] ([[List of United States state legislatures|list]]) * [[State court (United States)|Court]]s * [[Local government in the United States|Local government]] ---- * '''[[Government of the District of Columbia|District of Columbia government]]''' * [[Council of the District of Columbia|District Council]] * [[Mayor of the District of Columbia|Mayor]] * [[Superior Court of the District of Columbia|Superior Court]] | list9title = [[Foreign relations of the United States|Foreign relations]] | list9 = * [[United States Department of State|Department of State]] * [[United States Secretary of State|Secretary of State]]: [[Marco Rubio]] ---- * [[List of diplomatic missions of the United States|Diplomatic missions of]] / [[List of diplomatic missions in the United States|in the United States]] ---- * [[Citizenship of the United States|Nationality law]] * [[United States passport|Passports]] * [[Visa requirements for United States citizens|Visa requirements]] * [[Visa policy of the United States|Visa policy]] ---- * [[United States and the United Nations]] * [[United States–Gulf Cooperation Council relations]] | below = {{hlist | {{portal-inline|United States|size=tiny}} | {{portal-inline|Politics|size=tiny}} }}}}<noinclude>{{doc}}</noinclude> g62s5x6xmoyvhv5h7l4rfr2l2rw6vqp 116740 116739 2026-07-15T18:13:30Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Politics_of_the_United_States]] 116739 wikitext text/x-wiki {{#invoke: Sidebar | collapsible | name = Politics of the United States | templatestyles = Template:Politics of the United States/styles.css | bodyclass = US-politics-sidebar vcard hlist | pretitle = '''This article is part of a series on the''' | title = [[Politics of the United States|<small>Politics of the </small><br />United States]] | image = [[File:Greater coat of arms of the United States.svg|center|110px|link=|alt=]] | expanded = {{{expanded|{{{1|}}}}}} | style = width:18.5em; | list1title = [[Federal government of the United States|Federal government]] | list1 = * '''[[Constitution of the United States]]''' * [[Law of the United States|Laws]] * [[List of the United States treaties|Treaties]] | list2title = [[United States Congress|Legislature]] | list2 = * '''[[United States Congress]]''' [[File:(119th) US House of Representatives.svg|x25px]] [[File:119th United States Senate.svg|x27px]] ---- * '''[[United States House of Representatives|House of Representatives]]''' * [[Speaker of the United States House of Representatives|Speaker]] [[Mike Johnson]] (R) * [[Party leaders of the United States House of Representatives|Majority Leader]] [[Steve Scalise]] (R) * [[Party leaders of the United States House of Representatives|Minority Leader]] [[Hakeem Jeffries]] (D) * [[Party leaders of the United States House of Representatives|Majority Whip]] [[Tom Emmer]] (R) * [[Party leaders of the United States House of Representatives|Minority Whip]] [[Katherine Clark]] (D) * [[United States congressional district|Congressional districts]] ([[List of United States congressional districts|list]]) *[[Non-voting members of the United States House of Representatives|Non-voting members]] ---- * '''[[United States Senate|Senate]]''' * [[Vice President of the United States|President]] [[JD Vance]] (R) * [[President pro tempore of the United States Senate|President Pro Tempore]] [[Chuck Grassley]] (R) * [[Party leaders of the United States Senate|Majority Leader]] [[John Thune]] (R) * [[Party leaders of the United States Senate|Minority Leader]] [[Chuck Schumer]] (D) * [[Party leaders of the United States Senate|Majority Whip]] [[John Barrasso]] (R) * [[Party leaders of the United States Senate|Minority Whip]] [[Dick Durbin]] (D) | list3title = [[Executive branch of the United States|Executive]] | list3 = * '''[[President of the United States]]''' * [[Donald Trump]] (R) * '''[[Vice President of the United States]]''' * [[JD Vance]] (R) ---- * [[Cabinet of the United States|Cabinet]] * [[List of federal agencies in the United States|Federal agencies]] * [[Executive Office of the President of the United States|Executive Office]] | list4title = [[Federal judiciary of the United States|Judiciary]] | list4 = * '''[[Supreme Court of the United States]]''' * [[Chief Justice of the United States|Chief Justice]] [[John Roberts]] * [[Associate Justices of the Supreme Court of the United States |Associate Chief Justices]] * [[Clarence Thomas|Thomas]] * [[Samuel Alito|Alito]] * [[Sonia Sotomayor|Sotomayor]] * [[Elena Kagan|Kagan]] * [[Neil Gorsuch|Gorsuch]] * [[Brett Kavanaugh|Kavanaugh]] * [[Amy Coney Barrett|Barrett]] * [[Ketanji Brown Jackson|Jackson]] ---- * '''[[Article Three of the United States Constitution|Inferior Courts of the United States]]''' * [[United States courts of appeals|Courts of appeals]] * [[United States district court|District courts]] ([[List of United States district and territorial courts|list]]) * [[United States Court of International Trade| Court of International Trade]] * [[United States Alien Terrorist Removal Court|Alien Terrorist Removal Court]] * [[United States Judicial Panel on Multidistrict Litigation|Judicial Panel on Multidistrict Litigation]] * [[United States Foreign Intelligence Surveillance Court|Foreign Intelligence Surveillance Court]] * [[United States Foreign Intelligence Surveillance Court of Review|Foreign Intelligence Surveillance Court of Review]] ---- * '''[[Federal tribunals in the United States|Other tribunals]]''' | list5title = [[Elections in the United States|Elections]] | list5 = *''' National elections''' ---- * [[United States presidential election|Presidential elections]] * [[United States midterm election|Midterm elections]] * [[Off-year election]]s * [[Primary election#In the United States|Primary elections]] ** [[United States presidential primary|Presidential primary]] ---- *''' Elections by state and territory''' ---- * [[Elections in Alabama|Alabama]] * [[Elections in Alaska|Alaska]] * [[Elections in Arizona|Arizona]] * [[Elections in Arkansas|Arkansas]] * [[Elections in California|California]] * [[Elections in Colorado| Colorado]] * [[Elections in Connecticut|Connecticut]] * [[Elections in Delaware|Delaware]] * [[Elections in Florida|Florida]] * [[Elections in Georgia (U.S. state)|Georgia]] * [[Elections in Hawaii|Hawaii]] * [[Elections in Idaho|Idaho]] * [[Elections in Illinois|Illinois]] * [[Elections in Indiana|Indiana]] * [[Elections in Iowa|Iowa]] * [[Elections in Kansas|Kansas]] * [[Elections in Kentucky|Kentucky]] * [[Elections in Louisiana|Louisiana]] * [[Elections in Maine|Maine]] * [[Elections in Maryland|Maryland]] * [[List of elections in Massachusetts|Massachusetts]] * [[Elections in Michigan|Michigan]] * [[Elections in Minnesota|Minnesota]] * [[Elections in Mississippi|Mississippi]] * [[Elections in Missouri|Missouri]] * [[Elections in Montana|Montana]] * [[Elections in Nebraska|Nebraska]] * [[Elections in Nevada|Nevada]] * [[Elections in New Hampshire|New Hampshire]] * [[Elections in New Jersey|New Jersey]] * [[Elections in New Mexico|New Mexico]] * [[Elections in New York (state)|New York]] * [[Elections in North Carolina|North Carolina]] * [[Elections in North Dakota|North Dakota]] * [[Elections in Ohio|Ohio]] * [[Elections in Oklahoma|Oklahoma]] * [[Elections in Oregon|Oregon]] * [[Elections in Pennsylvania|Pennsylvania]] * [[Elections in Rhode Island|Rhode Island]] * [[Elections in South Carolina|South Carolina]] * [[Elections in South Dakota|South Dakota]] * [[Elections in Tennessee|Tennessee]] * [[Elections in Texas|Texas]] * [[Elections in Utah|Utah]] * [[Elections in Vermont|Vermont]] * [[Elections in Virginia|Virginia]] * [[Elections in Washington (state)|Washington]] * [[Elections in West Virginia|West Virginia]] * [[Elections in Wisconsin|Wisconsin]] * [[Elections in Wyoming|Wyoming]] * [[Elections in American Samoa|American Samoa]] * [[Elections in Guam|Guam]] * [[Elections in the Northern Mariana Islands|Northern Mariana Islands]] * [[Elections in Puerto Rico|Puerto Rico]] * [[Elections in the United States Virgin Islands|U.S. Virgin Islands]] ---- * '''[[Elections in the District of Columbia]]''' ---- *'''([[List of elections in the United States|List of elections]])''' | list6title = [[Political parties in the United States|Political parties]] | list6 = * [[Democratic Party (United States)|Democratic]] * [[Republican Party (United States)|Republican]] ---- * [[Third party (U.S. politics)|Third parties]] ** [[Constitution Party (United States)|Constitution]] ** [[Green Party of the United States|Green]] ** [[Libertarian Party (United States)|Libertarian]] ---- * [[List of political parties in the United States|List of political parties]] | list7title = [[Political ideologies in the United States|Political ideologies]] | list7 = * [[Third Way#United States|Centrism]] * [[Conservatism in the United States|Conservatism]] ** [[Black conservatism in the United States|Black]] ** [[Fiscal conservatism|Fiscal]] ** [[Liberal conservatism|Liberal]] ** [[Neoconservatism|Neo-]] ** [[Paleoconservatism|Paleo-]] ** [[Social conservatism in the United States|Social]] ** [[Traditionalist conservatism in the United States|Traditionalist]] ** [[Trumpism]] * [[Liberalism in the United States|Liberalism]] ** [[Classical liberalism#United States|Classical]] ** [[Conservative liberalism#United States|Conservative]] ** [[Modern liberalism in the United States|Modern]] ** [[Neoliberalism|Neo-]] * [[Libertarianism in the United States|Libertarianism]] ** [[Libertarian conservatism|Conservative]] *** [[Paleolibertarianism|Paleo-]] ** [[Night-watchman state|Minarchist]] ** [[Objectivism]] * [[Progressivism in the United States|Progressivism]] * [[Socialism in the United States|Socialism]] ---- * [[Abolitionism in the United States|Abolitionism]] * [[Constitutionalism in the United States|Constitutionalism]] * [[Environmentalism in the United States|Environmentalism]] * [[Feminism in the United States|Feminism]] * [[Anarchism in the United States|Anarchism]] ** [[Anarcho-capitalism|Capitalist]] ** [[Individualist anarchism in the United States|Individualist]] * [[Monarchism in the United States|Monarchism]] * [[American nationalism|Nationalism]] ** [[Nativism in United States politics|Nativism]] * [[Populism in the United States|Populism]] * [[Protectionism in the United States|Protectionism]] * [[Republicanism in the United States|Republicanism]] ---- *[[Political culture of the United States|Political culture]] *[[Political polarization in the United States|Political polarization]] | list8title = [[Federalism in the United States|Federalism]] | list8 = * '''[[State governments of the United States|State]] and [[Territories of the United States|territorial]] government''' * [[List of current United States governors|Governors]] * [[State legislature (United States)|Legislatures]] ([[List of United States state legislatures|list]]) * [[State court (United States)|Court]]s * [[Local government in the United States|Local government]] ---- * '''[[Government of the District of Columbia|District of Columbia government]]''' * [[Council of the District of Columbia|District Council]] * [[Mayor of the District of Columbia|Mayor]] * [[Superior Court of the District of Columbia|Superior Court]] | list9title = [[Foreign relations of the United States|Foreign relations]] | list9 = * [[United States Department of State|Department of State]] * [[United States Secretary of State|Secretary of State]]: [[Marco Rubio]] ---- * [[List of diplomatic missions of the United States|Diplomatic missions of]] / [[List of diplomatic missions in the United States|in the United States]] ---- * [[Citizenship of the United States|Nationality law]] * [[United States passport|Passports]] * [[Visa requirements for United States citizens|Visa requirements]] * [[Visa policy of the United States|Visa policy]] ---- * [[United States and the United Nations]] * [[United States–Gulf Cooperation Council relations]] | below = {{hlist | {{portal-inline|United States|size=tiny}} | {{portal-inline|Politics|size=tiny}} }}}}<noinclude>{{doc}}</noinclude> g62s5x6xmoyvhv5h7l4rfr2l2rw6vqp Template:Politics of North America templates 10 47767 116767 2014-01-20T11:33:50Z 213.246.92.65 noinclude 116767 wikitext text/x-wiki {{North America topic |name = Politics of North America templates |state = {{{1|{{{state|<noinclude>expanded</noinclude>}}}}}} |title = Politics of North America templates |prefix = Template:Politics of }}<noinclude> == See also == {{Politics by continent templates}} [[Category:North America politics and government templates| ]] </noinclude> qxnw71qhyk9ii4xn45at92kkydfdis4 116768 116767 2026-07-15T18:13:35Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Politics_of_North_America_templates]] 116767 wikitext text/x-wiki {{North America topic |name = Politics of North America templates |state = {{{1|{{{state|<noinclude>expanded</noinclude>}}}}}} |title = Politics of North America templates |prefix = Template:Politics of }}<noinclude> == See also == {{Politics by continent templates}} [[Category:North America politics and government templates| ]] </noinclude> qxnw71qhyk9ii4xn45at92kkydfdis4 Template:Politics of the United States/doc 10 47768 116769 2025-09-22T16:17:42Z en>Pagers 0 116769 wikitext text/x-wiki {{Documentation subpage}} {{Uses TemplateStyles|Template:History of the United States sidebar/styles.css}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> == See also == {{Politics of North America templates}} <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:United States politics sidebar templates| ]] [[Category:United States politics and government navigational boxes|Politics]] [[Category:Politics by country sidebar templates|United States]] }}</includeonly> nrwlvmlvvz1zmuafvw6wkpzbei3ewa5 116770 116769 2026-07-15T18:13:35Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Politics_of_the_United_States/doc]] 116769 wikitext text/x-wiki {{Documentation subpage}} {{Uses TemplateStyles|Template:History of the United States sidebar/styles.css}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> == See also == {{Politics of North America templates}} <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:United States politics sidebar templates| ]] [[Category:United States politics and government navigational boxes|Politics]] [[Category:Politics by country sidebar templates|United States]] }}</includeonly> nrwlvmlvvz1zmuafvw6wkpzbei3ewa5 Template:Politics of the United States/styles.css 10 47769 116771 2025-06-17T23:20:09Z en>Wabbuh 0 116771 sanitized-css text/css .US-politics-sidebar { width: 20em; border: 4px double #d69d36; } .US-politics-sidebar .sidebar-title-with-pretitle { background: #002868; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-title-with-pretitle a { color: #FFFFFF; } .US-politics-sidebar .sidebar-heading { background:#bf0a30; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-list-content { text-align: center; } .US-politics-sidebar .sidebar-list-title { text-align: center; background: #bf0a30; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-list-title a { color: #FFFFFF; } .US-politics-sidebar .mw-collapsible-text { color: #FFFFFF; } nosli0t4zgsjko1kmi25aza1i23t3e5 116772 116771 2026-07-15T18:13:35Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Politics_of_the_United_States/styles.css]] 116771 sanitized-css text/css .US-politics-sidebar { width: 20em; border: 4px double #d69d36; } .US-politics-sidebar .sidebar-title-with-pretitle { background: #002868; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-title-with-pretitle a { color: #FFFFFF; } .US-politics-sidebar .sidebar-heading { background:#bf0a30; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-list-content { text-align: center; } .US-politics-sidebar .sidebar-list-title { text-align: center; background: #bf0a30; color: #FFFFFF; border: 1px double #8C959A; } .US-politics-sidebar .sidebar-list-title a { color: #FFFFFF; } .US-politics-sidebar .mw-collapsible-text { color: #FFFFFF; } nosli0t4zgsjko1kmi25aza1i23t3e5 Template:History of the United States sidebar/styles.css 10 47770 116773 2025-06-28T18:54:18Z en>Indefatigable2 0 color 116773 sanitized-css text/css /* {{pp-template}} */ .US-history-sidebar { width: 22.0em; border: 4px double #d69d36; } .US-history-sidebar .sidebar-title-with-pretitle { background: #002868; color: #FFFFFF; background-clip:padding-box; } .US-history-sidebar .sidebar-title-with-pretitle a, .US-history-sidebar .sidebar-list-title a, .US-history-sidebar .mw-collapsible-text { color: #FFFFFF; } .US-history-sidebar .sidebar-caption { padding-bottom:0.3em; } .US-history-sidebar .sidebar-list-content { text-align: center; } .US-history-sidebar .sidebar-list-title { text-align: center; background: #bf0a30; color: #FFFFFF; } 137cp7f1xxnawbyhrzfwmw0fmu2x5ks 116774 116773 2026-07-15T18:13:35Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:History_of_the_United_States_sidebar/styles.css]] 116773 sanitized-css text/css /* {{pp-template}} */ .US-history-sidebar { width: 22.0em; border: 4px double #d69d36; } .US-history-sidebar .sidebar-title-with-pretitle { background: #002868; color: #FFFFFF; background-clip:padding-box; } .US-history-sidebar .sidebar-title-with-pretitle a, .US-history-sidebar .sidebar-list-title a, .US-history-sidebar .mw-collapsible-text { color: #FFFFFF; } .US-history-sidebar .sidebar-caption { padding-bottom:0.3em; } .US-history-sidebar .sidebar-list-content { text-align: center; } .US-history-sidebar .sidebar-list-title { text-align: center; background: #bf0a30; color: #FFFFFF; } 137cp7f1xxnawbyhrzfwmw0fmu2x5ks Template:United States constitutional law 10 47771 116775 2025-12-07T03:05:30Z en>Lemondoge 0 Accessibility: Unlink icon and give it a blank |alt= attribute so screen readers do not attempt to read it, per [[MOS:ALT]] (icon is in the public domain) 116775 wikitext text/x-wiki {{sidebar | name = United States constitutional law | title = [[Constitutional law of the United States|Constitutional law<br />of the United States]] | headingstyle = background:#f5f5dc | contentclass = hlist | image = [[File:Scale of justice 2.svg|100px|link=|alt=]] | heading1 = Overview | content1 = * [[Constitution of the United States|Articles]] * [[List of amendments to the Constitution of the United States|Amendments]] * [[History of the United States Constitution|History]] * [[Judicial review in the United States|Judicial review]] | heading2 = Principles | content2 = * [[Separation of powers under the United States Constitution|Separation of powers]] * [[Constitutional right#United States|Individual rights]] * [[Rule of law#United States|Rule of law]] * [[Federalism in the United States|Federalism]] * [[Republicanism in the United States|Republicanism]] * [[Equal footing]] * [[Standard of review|Tiers of scrutiny]] | heading3 = Government structure | content3 = * [[United States Congress|Legislative branch]] * [[President of the United States|Executive branch]] * [[Supreme Court of the United States|Judicial branch]] * [[State governments of the United States|State government]] * [[Local government in the United States|Local government]] | heading4 = Individual rights | content4 = * [[Freedom of religion in the United States|Freedom of religion]] * [[Freedom of speech in the United States|Freedom of speech]] * [[Freedom of the press in the United States|Freedom of the press]] * [[Freedom of assembly]] * [[Right to petition in the United States|Right to petition]] * [[Freedom of association#United States Constitution|Freedom of association]] * [[Right to keep and bear arms in the United States|Right to keep and bear arms]] * [[Juries in the United States|Right to trial by jury]] * [[United States constitutional criminal procedure|Criminal procedural rights]] * [[Privacy laws of the United States|Right to privacy]] * [[Thirteenth Amendment to the United States Constitution|Freedom from slavery]] * [[Due Process Clause|Due process]] * [[Equal Protection Clause|Equal protection]] * [[United States nationality law|Citizenship]] * [[Voting rights in the United States|Voting rights]] * [[Ballot access|Right to candidacy]] * [[Vagueness doctrine|Comprehensible rules]] | heading5 = Theory | content5 = * [[Living Constitution]] * [[Originalism]] * [[Substantive due process]] * [[Political process theory (law)|Political process theory]] * [[Judicial restraint]] * [[Purposive approach|Purposivism]] * [[Textualism]] * [[Strict constructionism]] * [[Common good constitutionalism]] * [[Unitary executive theory]] }}<noinclude>{{pp-template}} [[Category:United States law sidebar templates|Constitutional law]] </noinclude> dr97l72d97uf5j0wwey69nxi7uehzqs 116776 116775 2026-07-15T18:13:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:United_States_constitutional_law]] 116775 wikitext text/x-wiki {{sidebar | name = United States constitutional law | title = [[Constitutional law of the United States|Constitutional law<br />of the United States]] | headingstyle = background:#f5f5dc | contentclass = hlist | image = [[File:Scale of justice 2.svg|100px|link=|alt=]] | heading1 = Overview | content1 = * [[Constitution of the United States|Articles]] * [[List of amendments to the Constitution of the United States|Amendments]] * [[History of the United States Constitution|History]] * [[Judicial review in the United States|Judicial review]] | heading2 = Principles | content2 = * [[Separation of powers under the United States Constitution|Separation of powers]] * [[Constitutional right#United States|Individual rights]] * [[Rule of law#United States|Rule of law]] * [[Federalism in the United States|Federalism]] * [[Republicanism in the United States|Republicanism]] * [[Equal footing]] * [[Standard of review|Tiers of scrutiny]] | heading3 = Government structure | content3 = * [[United States Congress|Legislative branch]] * [[President of the United States|Executive branch]] * [[Supreme Court of the United States|Judicial branch]] * [[State governments of the United States|State government]] * [[Local government in the United States|Local government]] | heading4 = Individual rights | content4 = * [[Freedom of religion in the United States|Freedom of religion]] * [[Freedom of speech in the United States|Freedom of speech]] * [[Freedom of the press in the United States|Freedom of the press]] * [[Freedom of assembly]] * [[Right to petition in the United States|Right to petition]] * [[Freedom of association#United States Constitution|Freedom of association]] * [[Right to keep and bear arms in the United States|Right to keep and bear arms]] * [[Juries in the United States|Right to trial by jury]] * [[United States constitutional criminal procedure|Criminal procedural rights]] * [[Privacy laws of the United States|Right to privacy]] * [[Thirteenth Amendment to the United States Constitution|Freedom from slavery]] * [[Due Process Clause|Due process]] * [[Equal Protection Clause|Equal protection]] * [[United States nationality law|Citizenship]] * [[Voting rights in the United States|Voting rights]] * [[Ballot access|Right to candidacy]] * [[Vagueness doctrine|Comprehensible rules]] | heading5 = Theory | content5 = * [[Living Constitution]] * [[Originalism]] * [[Substantive due process]] * [[Political process theory (law)|Political process theory]] * [[Judicial restraint]] * [[Purposive approach|Purposivism]] * [[Textualism]] * [[Strict constructionism]] * [[Common good constitutionalism]] * [[Unitary executive theory]] }}<noinclude>{{pp-template}} [[Category:United States law sidebar templates|Constitutional law]] </noinclude> dr97l72d97uf5j0wwey69nxi7uehzqs Umoyo wakwambilila na masambiro gha Donald Trump 0 47772 116777 2026-07-15T18:23:58Z Tumbuka Arch 6863 Created page with "{{pp|small=yes}} {{Short description|Umoyo wakwambilira wa Donald Trump kufuma mu 1946 mpaka 1968}} {{Featured article}} {{Use American English|date=October 2025}} {{Use mdy dates|date=October 2025}} <!-- Mabuku ghakulembeka mwakugwiliskira ntchito ma shortened footnotes {{sfn}}, apo nkhani za manyuzipepala zikugwiliskira ntchito ma full inline references --> File:Donald Trump NYMA.jpg|thumb|alt=Chithuzi cha Trump chakufika pa mapewa, chakuda na chituŵa, wakumwetulir..." 116777 wikitext text/x-wiki {{pp|small=yes}} {{Short description|Umoyo wakwambilira wa Donald Trump kufuma mu 1946 mpaka 1968}} {{Featured article}} {{Use American English|date=October 2025}} {{Use mdy dates|date=October 2025}} <!-- Mabuku ghakulembeka mwakugwiliskira ntchito ma shortened footnotes {{sfn}}, apo nkhani za manyuzipepala zikugwiliskira ntchito ma full inline references --> [[File:Donald Trump NYMA.jpg|thumb|alt=Chithuzi cha Trump chakufika pa mapewa, chakuda na chituŵa, wakumwetulira|Chithuzi cha [[Donald Trump]] ku [[New York Military Academy]] pamoza na mendulo zakubwereka.{{Sfn|Craig|Buettner|2024|pp=68–69}}]] {{Donald Trump series|expanded=Business and personal}} [[Donald Trump]], pulezidenti wa 45 na wa 47 wa [[United States]], wakababika pa Juni 14, 1946, mu [[New York City]] kwa [[Fred Trump]], uyo wakaŵa wakuzenga na kuguliska malo na nyumba, na [[Mary Anne MacLeod Trump]], uyo wakafuma ku [[Scotland]]. Wakakulira mu nyumba yakulongozgeka mwankhongono, ndipo wakamba kulongora nkharo ya kususkana na kujikuzga kufuma waka pa uchoko wake. Trump wakanjira ku [[Kew-Forest School]], sukulu ya payekha iyo yikaŵa na ubwezi na Fred, apo wakaŵa na vyaka vinkhondi. Wakalongora luso mu maseŵero ghakupambanapambana, chomenechomene baseball. Apo wakaŵa mu giredi ya 7, Fred wakasanga kuti Trump wakalutanga mwakubisika ku [[Manhattan]], uko wakasangako mipeni. Pamanyuma pa ivi, Fred wakamutuma ku [[New York Military Academy]], uko wakamalizga masambiro mu Meyi 1964. Wakati wafumapo ku sukulu ya nkhondo iyi, Trump wakasambira vya vyachuma ku [[Fordham University]] kufuma mu 1964 mpaka 1966. Kulembeska kwake ku yunivesite—ndiposo kufumiskika chifukwa cha vyachipatala pamanyuma—kukamovwira kuti waleke kuyowoyeka ku nkhondo ya [[Vietnam War]]. Mu chaka chake chachiŵiri ku yunivesite, pakukhumba kupanga ubwezi ukuru mu bizinesi, wakasamukira ku [[Wharton School]] ya [[University of Pennsylvania]], sukulu iyo awiske ŵakayitemwanga. Kufuma pamanyuma pa chaka chake chakwamba, wakachitanga yayi milimo ya kuwaro kwa masambiro. Wakapokera digiri ya [[Bachelor of Science]] mu vyachuma ku University of Pennsylvania mu Meyi 1968. ==Umoyo wakwambilira== ===Uko wakafuma na uchoko=== {{See also|Trump Family}} [[File:85-15 Wareham Place, Trump childhood home.jpeg|thumb|upright|left|85{{hyphen}}15 Wareham Place ku [[Queens]], New York, uko Trump wakakhalanga mpaka wakaŵa na vyaka vinayi]] Donald John Trump wakababika pa Juni 14, 1946,{{Sfn|Kranish|Fisher|2017|p=30}} ku [[Jamaica Hospital Medical Center]] mu [[Jamaica, Queens]], [[New York City]].{{Sfn|Kranish|Fisher|2017|p=37}} Wakathya zina ili chifukwa cha ŵasepuru ŵake ŵa kwa anyina na ŵa kwa awiske.{{Sfn|Blair|2000|p=229}} Wakaŵa mwana wachinayi{{Sfn|Craig|Buettner|2024|p=26}} ndipo mwana wachiwiri mwanalume{{Sfn|Barrett|2016|p=44}} wa [[Mary Anne MacLeod Trump]] na [[Frederick Christ Trump]].{{Sfn|Kranish|Fisher|2017|p=30}}{{Efn|Fred na Mary ŵakaŵa na ŵana ŵatatu pambere Donald wandababike: [[Maryanne Trump Barry|Maryanne]] (1937–2023),<ref>{{Cite web |last1=Roberts |first1=Sam |last2=Haberman |first2=Maggie |url=https://www.nytimes.com/2023/11/13/us/politics/maryanne-trump-barry-dead.html |title=Maryanne Trump Barry, Retired Judge and Donald Trump Sister, Dies at 86 |date=November 13, 2023 |work=[[The New York Times]]}}</ref> [[Fred Trump Jr.|Fred Jr.]] (1938–1981),{{Sfn|Hurt|1993|p=75}}{{Sfn|Blair|2000|p=320}} na Elizabeth (wakababika mu 1942),{{Sfn|Hurt|1993|p=75}} ndipo pamanyuma ŵakababaso [[Robert Trump|Robert]] (1948–2020).<ref>{{Cite web |last=Karni |first=Annie |url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html |title=Robert S. Trump, the President's Younger Brother, Dies at 71 |date=August 15, 2020 |work=[[The New York Times]]}}</ref>{{Sfn|Hurt|1993|p=75}}}} Mary Anne wakaŵa mwana wa mulovi na mulimi wa ku mizi{{Sfn|Craig|Buettner|2024|p=18}} uyo wakasamukira ku United States kufuma ku [[Stornoway]], Scotland, apo wakaŵa na vyaka 18.{{Sfn|Hurt|1993|p=75}} Wakagwiranga ntchito ya munyumba ku nyumba ya [[Louise Whitfield Carnegie|Carnegie]] ku New York, uko wakamba kutemwa usambazi na vinthu vya ufumu, ivyo pamanyuma Donald nayo wakatemwa.{{Efn|Trump wakalemba mu ''[[The Art of the Deal]]'' kuti wakahara kwa anyina kutemwa kujilongora.{{Sfn|O'Brien|2005|p=43}}}} Wakati watengwa, Mary Anne wakaŵa mama wa panyumba.{{Sfn|O'Brien|2005|p=43}} Pamanyuma pa [[World War II]], Fred wakaleka kuzenga waka nyumba ndipo wakamba kuzenga ma apartment agho ghakapokeranga ngongole za [[FHA insured loan|FHA]], ivyo vikamupa zina likuru mu bizinesi ya malo na nyumba ku New York.{{Sfn|Barrett|2016|p=44}} Fred wakaŵa mubizinesi{{Sfn|Haberman|2022|p=28}} uyo kanandi wakapenjanga phindu mwankhongono{{Sfn|Haberman|2022|p=28}} ndipo wakaŵa na nkhongono yikuru pa ŵana ŵake. Kanandi wakamuphaliranga Trump kuti ni "themba" na "wakutonda".{{Sfn|Hurt|1993|p=13}} Trump nayo wakakhwaskika chomene na muliska wa Chiprotestanti [[Norman Vincent Peale]], uyo wakalemba buku lakuti ''[[The Power of Positive Thinking]]'' (1952).{{Efn|Pamanyuma Trump wakayezga kulondezga fundo za buku ili mu ''[[The Art of the Deal]]'' (1987).{{Sfn|Kranish|Fisher|2017|p=99}}}} Peale wakasambizganga kuti kujigomezga ndiko kukovwira munthu kusanga vinthu vyakwendana.{{Sfn|Haberman|2022|p=9}}{{Efn|Pamanyuma Trump wakati Peale na awiske ndiwo ŵakaŵa ŵasambizgi ŵake ŵekha mu umoyo wake.{{Sfn|Kranish|Fisher|2017|p=81}}}} Ŵa Trump, awo ŵakasamuka pa Devonshire Street pambere chaka cha 1946 chindafike, ŵakakhalanga pa [[85-15 Wareham Place|85{{hyphen}}15 Wareham Place]] ku [[Jamaica Estates]],{{Sfn|Barrett|2016|p=44}} nyumba ya vyaru viŵiri yakuzengeka mu kapangidwe ka [[Tudor Revival architecture|Tudor Revival]] iyo Fred wakazenga m'ma 1920.{{Sfn|Blair|2000|p=225}} Chifukwa chakuti nyumba yikaŵa yichoko ndipo banja likaŵa na ŵanthu ŵankhondi na ŵamoza, Fred wakamba kuzenga nyumba yinyake pa malo ghakuru agho ghakaŵa kumasinda kwa 85{{hyphen}}15 Wareham Place, pa Midland Parkway,{{Sfn|Blair|2000|p=225}} ndipo wakakhazikiska adiresi ya 85{{hyphen}}14 Midland Parkway.{{Sfn|Barrett|2016|p=44}} Mu 1948, pambere [[Robert Trump]] wandababike,{{Sfn|Barrett|2016|p=44}}{{Sfn|Blair|2000|p=226}} banja la Trump likasamukira ku nyumba yikuru ya vipinda vinkhondi na vinayi yakuzengeka mu kapangidwe ka [[Colonial Revival architecture|Colonial Revival]].{{Efn|Nyumba ya pa 85{{hyphen}}14 Midland Parkway yikuchemeka kuti njakuzengeka mu kapangidwe ka Colonial-Georgian na [[Wayne Barrett]] mu ''Trump'' (2016),{{Sfn|Barrett|2016|p=44}} kweni [[Michael D'Antonio]] mu ''Never Enough'' (2015){{Sfn|D'Antonio|2015|p=35}} kweniso [[Susanne Craig]] na [[Russ Buettner]] mu ''[[Lucky Loser (book)|Lucky Loser]]'' (2024){{Sfn|Craig|Buettner|2024|p=26}} ŵakuyichema Colonial Revival.}} Nyumba iyi yikawonekanga yakupambana na nyumba zinandi za Tudor izo zikaŵa mu Jamaica Estates.{{Sfn|D'Antonio|2015|p=35}} Pamanyuma, Trump wakalongosora Jamaica Estates kuti yikaŵa yakupatulika ku malo "ghankhaza" gha Queens.<ref>{{Cite web |last=Horowitz |first=Jason |url=https://www.nytimes.com/2015/09/23/us/politics/donald-trumps-old-queens-neighborhood-now-a-melting-pot-was-seen-as-a-cloister.html |title=Donald Trump's Old Queens Neighborhood Contrasts With the Diverse Area Around It |date=September 22, 2015 |work=[[The New York Times]]}}</ref> Mwakuyana na ivyo ŵana ŵake ŵakayowoya, Fred nyengo zose wakaŵanga wakugwira ntchito, kweni wakayezganga kuphalirapo ŵana ŵake mu ntchito zake para vingachitika.{{Sfn|Blair|2000|p=226}} Pamanyuma pa kubabika kwakusuzga kwa Robert mu chaka chenechira,{{Sfn|Craig|Buettner|2024|p=30}} Mary Anne wakamba kusuzgika na kuthika ndopa chomene ndipo wakachitikirika opaleshoni ya mwaluŵiro yakufumiskamo chiberekero ([[hysterectomy]]).{{Sfn|Blair|2000|p=227}} Trump nayo wakamba kuchita wofi wa tuzilombo na kugwirana mawoko na ŵanthu.{{Sfn|Kranish|Fisher|2017|p=37}} Banja la Trump likaŵa na malango ghankhongono. Ŵana ŵakeneranga kuwelera panyumba pa nyengo yakukhazikika, ŵakalekeskekanga kutuka na kurya pakati pa nyengo za chakurya. Mwakuyana na ŵabwezi ŵanyake awo ŵakaŵamanya, awo ŵakasweranga malango ŵakalangikanga na kulondezgeka panyumba panji kutimbika na supuni ya nkhuni.{{Sfn|Blair|2000|p=228}} ===Masambiro ghakwambilira=== [[File:Kew-Forest School's 1st Grade Class (1953).png|thumb|left|Kalasi ya giredi 1 ya [[Kew-Forest School]] mu 1953, Trump wali kumanyuma, wachinayi kufuma kumazere]] Apo wakaŵa na vyaka vitatu, Trump wakamba kusambira ku Carousel Pre-School, sukulu ya ŵana ŵachoko ku Jamaica Estates. Mulongozgi wa sukulu wakamukumbukanga kuti wakaŵa "wakutowa, wakutemweka na ŵanthu, kweniso wakukondwa kucheza".{{Sfn|Blair|2000|p=231}} Pa nyengo iyi, iyo na ŵabali ŵake ŵakambanga kale kusanga ndalama zakukwana {{USD|200000}} pa chaka, chifukwa cha nthowa zakupambanapambana izo Fred Trump wakagwiliskiranga ntchito kuti waleke kulipira msonkho; ndalama izi zikusintha mwakuyana na mtengo wa ndalama wa 2018. Trump wakaŵa kale miliyoniya apo wakaŵa na vyaka vinkhondi na vitatu.<ref>{{Cite web |last1=Barstow |first1=David |last2=Craig |first2=Susanne |last3=Buettner |first3=Russ |url=https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html |title=Trump Engaged in Suspect Tax Schemes as He Reaped Riches From His Father |date=October 2, 2018 |work=[[The New York Times]]}}</ref>{{Efn|Kufuma apo Trump wakaŵa na vyaka vitatu, awiske ŵakapelekanga mwana waliyose US$6,000 pa chaka, ndalama zikuru chomene izo zikazomerezgekanga kwambura kulipira msonkho wa mphaso. Kuti waleke misonkho, Fred wakapangiska ŵana ŵake kuŵa ŵenecho ŵa nyumba ziŵiri za ma apartment ndipo wakaŵalipiranga renti ya US$13,928 pa chaka.{{Sfn|Craig|Buettner|2024|pp=30–31}}}} Trump wakamba kutemwa vyakuseŵereska vyakuzengera na mabuloko,{{Sfn|Blair|2000|p=231}} kweniso wakaŵa wakususka chomene.{{Sfn|Hurt|1993|p=77}} Iyo na anyina{{Sfn|Craig|Buettner|2024|p=61}} ŵakafumba vya nyengo yimoza apo wakatora mabuloko gha Robert kuti wamalizge nyumba yikuru iyo wakazenganga, ndipo wakaghalumikizga na guluu mwakuti Robert wangaghagwiliskiraso ntchito yayi.{{Sfn|Hurt|1993|p=77}} Apo wakaŵa na vyaka vinkhondi, Trump wakanjira ku [[Kew-Forest School]], sukulu ya payekha ku [[Forest Hills, Queens]].{{Sfn|Blair|2000|p=231}} Fred wakaŵa pa komiti yakulongozga sukulu iyi ndipo wakapeleka vinthu vyakuzengera nyumba yinyake ya sukulu.{{Sfn|D'Antonio|2015|p=40}} Mwakupambana na Carousel, Kew-Forest yikaŵa na malango ghankhongono na ndondomeko yakukhazikika, kusazgapo vyakuvwara vya sukulu.{{Sfn|Blair|2000|p=231}} Ku Kew-Forest, Trump wakamanyikwanga chifukwa cha kusokoneza na kupanga viheni kwambura kupwerera ivyo vingachitika.{{Sfn|Kranish|Fisher|2017|p=34}} Pamanyuma wakayowoya kuti apo wakaŵa mu giredi 2 wakapweteka msambizgi wake wa sumu pa jiso,{{Sfn|Hurt|1993|p=76}} chifukwa wakagomezganga kuti msambizgi yura wakamanyanga yayi vya sumu.{{Sfn|D'Antonio|2015|p=40}}{{Efn|Trump wakakumbuska nkhani iyi mu ''[[The Art of the Deal]]'' (1987).{{Sfn|Kranish|Fisher|2017|p=34}}}} Ndipouli, mu mafumbo agho ghakachitika pakulemba ''[[Trump Revealed]]'' (2017), mubwezi wake wapafupi [[Peter Brant]] wakati wakukumbuka yayi kuti ichi chikachitika panji kuti Trump wakamuyowoyapo.{{Sfn|Kranish|Fisher|2017|p=35}} Chifukwa cha nkharo yake, kulangika kwa kusungika kusukulu (detention) ku Kew-Forest kukamba kuchemeka kuti "Donny Trumps".{{Sfn|Kranish|Fisher|2017|p=34}} Kweni ŵasambiri ŵanyake awo ŵakayowoya na [[Maggie Haberman]] pakulemba buku lake ''[[Confidence Man: The Making of Donald Trump and the Breaking of America|Confidence Man]]'' ŵakamulongosora Trump kuti wakaŵa "wakunozga mtima na wakukondweska kucheza nayo".{{Sfn|Haberman|2022|p=25}} [[File:Kew-Forest School's 6th Grade Class (1958).jpg|thumb|Kalasi ya giredi 6 ya [[Kew-Forest School]] mu 1958, Trump wali kumanyuma, wachinayi kufuma kumalyero]] Kuti ŵamukanizge kupanga viheni vinandi, anyina, awo ŵakaŵa Mkhristu wakugomezgeka, ŵakamutuma ku masambiro gha [[confirmation]] ku [[First Presbyterian Church in Jamaica]].{{Sfn|Hurt|1993|pp=76–77}} Ndipouli, nkharo ya Trump yikalutilira kuŵa yeneyira ku Sunday school na kunyumba, uko nyengo zinyake wakakananga kupulikira awiske.{{Sfn|D'Antonio|2015|p=40}} Mu giredi 4, Trump wakaŵa mulara chomene mu kalasi yake ya ŵana 16, ndipo ivi vikamovwira mu maseŵero.{{Sfn|Craig|Buettner|2024|p=61}} Nangauli magiredi ghake ghakaŵa ghawemi yayi, wakaŵa waluso mu maseŵero ghanandi, kusazgapo punchball, basketball, football na soccer. Chomene wakaŵa wakutemwa baseball, apo wakaseŵeranga malo gha [[catcher]]. Wakatemwanga ŵaseŵero ŵa catcher [[Yogi Berra]] wa [[New York Yankees]] na [[Roy Campanella]] wa [[Brooklyn Dodgers]]. Kanandi wakabiskanga wayilesi yichoko (transistor radio) mu kalasi na kupulikizga maseŵero gha baseball kwizira mu ma earplug.{{Sfn|Kranish|Fisher|2017|pp=35–36}} Trump wakendeskanga ntchito yakugaŵa manyuzipepala ndipo wakawunganyanga mabotolo kuti wasange ndalama za dipositi. Pamoza na Brant, ŵakendanga na [[New York City Subway]] kuluta ku [[Manhattan]] kukagura vinthu vyakusekeska nga ni [[smoke bombs]], ndipo pamanyuma [[switchblade]]s, kuti ŵaseŵerenge maseŵero ghakuponya mipeni pa chandamale.{{Sfn|Blair|2000|pp=232–233}} Chitemwa chawo pa mipeni chikamba pamanyuma pa kutulukira kwa sewero la ''[[West Side Story]]'', ilo likaŵa na nkhondo za mumisewu.{{Sfn|Craig|Buettner|2024|p=63}} Pa nyengo iyi, mu 1957, ŵakaŵa na vyaka 11.{{Sfn|Blair|2000|p=233}} ==Sukulu ya nkhondo== [[File:Donald Trump playing baseball (cropped) (cropped).jpg|thumb|alt=Trump wachinyamata wakuseŵera baseball|Trump wakuseŵera baseball mu 1962 (chithuzi cha buku la chaka la NYMA)]] Kufupi na umaliro wa chaka chake cha seveni pa sukulu, awiske a Trump, Fred, ŵakasanga mpeni zinyake izo wakaŵisunga mwachibisibisi ndipo ŵakamanya vya maulendo ghake ku [[Manhattan]].{{Sfn|Blair|2000|p=233}} Ivyo vikamukwiyiska chomene Fred, ndipo wakasankha kutuma Trump ku [[Sukulu ya Nkhondo ya New York]]{{Sfn|Blair|2000|p=233}} (NYMA) ku [[Cornwall-on-Hudson, New York]].{{Sfn|Kranish|Fisher|2017|p=38}} Pambere wandanjire ku sukulu iyi, Trump wakaluta ku Camp Hilltop, msasa wakudura wa Chikhristu wakuwoneseskeka makora ku [[Hancock, New York|Hancock]], nga umo mubali wake [[Fred Trump Jr.|Freddy]] wakachitira vyaka vinyake kumasinda. Vinthu ivi vikamupangiska kuŵa wakukwiya ndiposo wakuvuka.{{Sfn|Blair|2000|pp=234–235}} Wakafika ku NYMA mu Seputembala 1959, ndipo wakalongozgekanga na Theodore Dobias, msilikali wakale wa [[Nkhondo Yachiŵiri ya Charu Chose]].{{Sfn|Kranish|Fisher|2017|pp=38–39}} Dobias wakatimbanga ŵasambiri ŵambura kupulikira ndipo kaŵiri pa sabata wakachitiskanga nkhondo pakati pa ŵasambiri ŵakugaluka.{{Sfn|Kranish|Fisher|2017|p=39}} Trump wakatambuzgikanga mwakuthupi kwizira mu kutemeka na kutimbika.{{Sfn|Haberman|2022|p=26}} Ŵasambiri ŵalara kanandi ŵakagwiliskiranga ntchito nkhaza panji kuwopseza kuti ŵalondezgeke.{{Sfn|Craig|Buettner|2024|p=65}} Kuyana na Dobias, Trump pakwamba wakasuzgikanga kulondezga malango gha sukulu iyi, kweni mwaluŵiro wakamba kulondezga fundo za ukhondo, wakakhumbanga kuphalizgana pa mpikisano wa ndondomeko na utozi, ndipo wakachitanga phamphu kuti wasange mamakisi ghapachanya.{{Sfn|Kranish|Fisher|2017|pp=39–40}} Pamasinda Trump wakayowoya kuti umoyo wake ku sukulu iyi ukaŵa wakuthemba pa "kupona".{{Sfn|D'Antonio|2015|p=45}} Mu mafumbo ghakafumbika, ŵasambiri ŵanyake ŵakaphalira [[Gwenda Blair]] mu buku lake ''[[The Trumps: Three Generations That Built an Empire|The Trumps]]'' (2000) kuti Trump wakachezganga na ŵanthu pachoko waka, kupatulapo Dobias.{{Sfn|Blair|2000|p=237}} Chihanya chilichose Trump wakaweleranga ku [[Jamaica Estates]] kukawovwira awiske pa kunozga nyumba za maapartment.{{Sfn|Craig|Buettner|2024|p=66}} [[File:1964 NYMA - 5 students in uniform.jpg|thumb|alt=Ŵasambiri ŵankhondi ŵakwimilira mu yunifomu|Trump (wachiŵiri kufuma kumazere) mu 1964|left]] Trump wakaseŵeranga maseŵero ku NYMA—chaka chimoza cha mpira wa American football na soccer, ndipo vyaka vitatu vya baseball ya timu yikuru,{{Sfn|Craig|Buettner|2024|p=66}} wakaseŵeranga nga ni cleanup hitter ndipo mu chaka chake chaumaliro wakaŵa [[first baseman]].{{Sfn|Barrett|2016|p=73}} Dobias ndiyo wakamusambizganga Trump apo wakaŵa mu timu ya junior varsity baseball.{{Sfn|Craig|Buettner|2024|p=66}} Pambura kulembeka mwalamulo wakachemekanga kuti muteŵeti wa coach{{Sfn|Blair|2000|p=238}} ndiposo muteŵeti wa kaputeni mu chaka chake chaumaliro.{{Sfn|Craig|Buettner|2024|p=66}} Kuyana na mabuku gha maseŵero, Trump wakaŵa na batting average ya .056 mu chaka chake chaumaliro.{{Sfn|Craig|Buettner|2024|p=66}} Nangauli pamasinda wakajikuzganga, Trump wakaŵavya luso lukuru chomene pa baseball mu New York, panji kuŵa museŵeri wapachanya chomene pa sukulu.{{Sfn|Craig|Buettner|2024|p=71}} Dobias pamasinda wakaphalira Blair kuti Trump wakaŵa "wakwenda mwankhongono kweni wakasambizgikanga makora"; kuyana na Trump, wakamumanya makora Dobias mwa kumuchindika kwambura kumopa chomene.{{Sfn|Blair|2000|p=238}} Apo Trump wakaleka timu ya football mu chaka chake cha junior, chifukwa chakuti coach wakaŵa wakatimba ŵasambiri,{{Sfn|Kranish|Fisher|2017|p=42}} ŵasambiri ŵanyake ŵakamususka.{{Sfn|Hurt|1993|p=78}} Nyengo yinyake nyuzipepala ya kumalo yikalemba kuti wawovwira timu kupunda maseŵero gha baseball. Trump wakazizwa kuona zina lake mu nyuzipepala ndipo wakamba kujipulika kuti wamanyikwa.{{Sfn|Kranish|Fisher|2017|p=42}} Pamasinda Trump wakayowoya mwautesi kuti wakasankhika na magulu gha [[Major League Baseball|Major League Baseball]].{{Sfn|Craig|Buettner|2024|pp=71–72}} [[File:Donald Trump Truth Social Post on March 13, 2026—Military Academy.jpg|thumb|right|upright|Trump na ŵapapi ŵake ku NYMA]] Mu vyaka vinayi pa vyaka vinkhondi ivyo wakakhala ku NYMA, Trump wakalembeka pa mndandanda wa ŵasambiri ŵakuchita makora, uwo ukakhumbikwiranga mamakisi ghapakati gha 85; mu chaka chake chaŵiri wakasanga mamakisi ghapakati gha 80. Wakaŵavya mu ŵasambiri 10 pa 100 ŵakuchita makora chomene mu kalasi yake. Wakapokera mphotho ya geometry chifukwa cha kusanga mamakisi ghose ghakukwana.{{Sfn|Hurt|1993|p=78}} Trump, uyo wakambira nga ni private pamoza na ŵasambiri ŵanyake, wakakwera kuŵa corporal mu chaka chake chaŵiri, ndipo chaka chakulondezgapo wakaŵa supply sergeant wa Company E. Apo wakaŵa supply sergeant, wakalangura kuti msambiri munyake watimbike na tsache chifukwa chakuswa ndondomeko ya mzere. Pa nyengo ya kuwoneseska, Trump wakasanga kuti msambiri munyake, Ted Levine, wandawovwire bedi lake. Trump wakatora mabedi gha Levine na kuŵaponya pasi; Levine wakamuzgora mwa kumuponyera buledi la nkhondo ndipo likamukoma. Kuyana na Levine, Trump wakamukora na kuyezga kumuponya pa windo la chipinda cha pa mtunda wa chiŵiri.{{Sfn|Kranish|Fisher|2017|pp=41–43}} Mu chaka chake chaumaliro, Trump wakakwera kuŵa captain wa Company A. Mwezi umoza wakaŵa pa udindo uwu, sergeant uyo wakamulongozganga wakaponya msambiri munyake pa khoma chifukwa chakuleka kuzgora mwaluŵiro. Chifukwa cha nkhani zinyake za [[hazing|kutambuzga ŵasambiri ŵaphya]], Trump wakafumiskika pa udindo uwu ndipo wakasamuskikira kuŵa battalion training officer.{{Sfn|Kranish|Fisher|2017|p=44}} Mu chaka chake chaumaliro, Trump wakasankhika kulongozga gulu lapadera la drill pa [[Columbus Day Parade]] pa [[Fifth Avenue]].{{Sfn|Kranish|Fisher|2017|p=44}} Wakamanyikwanga chifukwa chakwiza na ŵanakazi ŵakutowa ku sukulu iyi.{{Sfn|Kranish|Fisher|2017|p=41}} Mu buku la chaka la sukulu, wakachemekanga kuti "ladies' man".{{Sfn|Blair|2000|p=237}} Kufika pa nyengo iyi, Trump wakasimikizga kuti ndiyo wazamulongozga bizinesi ya awiske, [[The Trump Organization|Fred Trump Organization]].{{Sfn|Blair|2000|p=238}} Wakamalizga sukulu ya NYMA mu Meyi 1964{{Sfn|Kranish|Fisher|2017|p=45}} na mamakisi gha B.{{Sfn|Barrett|2016|p=74}} Mamakisi ghake ghakalutilira kubisika pamanyuma pakuti [[Michael Cohen (lawyer)|Michael Cohen]], uyo pamasinda wakaŵa loya wake, wakaphalira sukulu yake ya sekondale, makoleji ghake, na [[College Board]] kuti ŵaleke kufumiska mamakisi ghake panji vya [[SAT]].<ref>{{Cite web |last=Ashford |first=Grace |url=https://www.nytimes.com/2019/02/27/us/politics/trump-school-grades.html |title=Michael Cohen Says Trump Told Him to Threaten Schools Not to Release Grades |date=February 27, 2019 |work=[[The New York Times]] |access-date=October 11, 2025 |archive-date=June 9, 2019 |archive-url=https://web.archive.org/web/20190609133119/https://www.nytimes.com/2019/02/27/us/politics/trump-school-grades.html |url-status=live }}</ref> Trump wakasanga mendulo zichoko waka, ntheura wakabwereka mendulo 12 kwa mubwezi wake kuti wazivwale pa chithuzi chake cha chaka chaumaliro.{{Sfn|Craig|Buettner|2024|pp=68–69}} Pa mwambo waumalizgi wa sukulu mwezi wakulondezgapo, Trump wakapokera ntchindi yimoza pera: saber ya ulemu chifukwa cha uteŵeti wake nga ni captain.{{Sfn|Craig|Buettner|2024|pp=69–70}} Apo [[Nkhondo ya Vietnam]] yikalutiliranga kukura,{{Sfn|Craig|Buettner|2024|p=71}} Trump wakakwaniska kulekeskeka kulembeka usilikali wa [[Vietnam War draft|Vietnam War draft]] mwa kusankha kuluta ku koleji.{{Sfn|Kranish|Fisher|2017|p=45}} Mu chihanya pamanyuma pakumalizga sukulu, Trump wakagwira ntchito na Fred pa nyumba za maapartment za Swifton Village ku [[Cincinnati]].{{Sfn|Kranish|Fisher|2017|p=45}} ==Yunivesite== ===Yunivesite ya Fordham=== Wakati Trump wakamalizga masambiro ghake ku NYMA, wakaghanaghananga kunjira ku [[Yunivesite ya Southern California]] pa [[Sukulu ya Mafilimu ya USC|sukulu ya mafilimu]] kuti wasambire vya mafilimu,{{Sfn|Kranish|Fisher|2017|p=45}}<ref>{{Cite web |last=Easton |first=Nina |url=https://www.latimes.com/archives/la-xpm-1988-07-24-tm-10040-story.html |title="Now, Mr. Trump, What About L.A.?" |date=July 24, 1988 |work=Los Angeles Times |access-date=April 6, 2026 |archive-date=April 25, 2026 |archive-url=https://web.archive.org/web/20260425042257/https://www.latimes.com/archives/la-xpm-1988-07-24-tm-10040-story.html |url-status=live }}</ref> kweni wakasankha kunjira ku [[Yunivesite ya Fordham]], [[yunivesite ya kafukufuku]] ya Chiyesuiti ku [[Bronx]], chifukwa yikaŵa pafupi na nyumba ya ŵapapi ŵake.{{Sfn|Blair|2000|p=239}} Ivyo wakasankha vikakondweska yayi adada ŵake Fred, awo ŵakhumbanga kuti Trump wasambire pa [[Wharton School]] ya [[Yunivesite ya Pennsylvania]], sukulu iyo mubali wake [[Fred Trump Jr.|Freddy]] nayo wakakana kusambirako. Mudumbu wake wa Trump, [[Maryanne Trump Barry|Maryanne]], mwakubisika wakayowoya kuti ndiyo wakamovwira kunjira ku Fordham.{{Sfn|Craig|Buettner|2024|p=72}} Trump wakendanga kufuma ku Jamaica Estates kuluta ku sukulu ya Fordham. Apo wakaŵa [[mwana wa chaka chakwamba]], usambazi wake na umo wakasambilira ku sukulu ya ŵasilikari vikamupangiska kuŵa kutali na ŵasambiri ŵanyake, nga umo wakalekera kukhweŵa na kumwa moŵa. Chaka chenechicho wakajoyina timu ya squash ya sukulu ndipo wakayezga kujiphalizga mu umoyo wa sukulu.{{Sfn|Blair|2000|pp=239–240}} Ku Fordham wakasambira vya vyauma.<ref>{{Cite web |last=Gray |first=Elijah |url=https://fordhamram.com/62224/news/a-bit-of-a-loner-former-classmates-remember-donald-trump-in-the-bronx/ |title="A Bit of a Loner," Former Classmates Remember Donald Trump in the Bronx" |date=January 9, 2024 |work=The Fordham Ram |access-date=November 29, 2025 |archive-date=December 11, 2025 |archive-url=https://web.archive.org/web/20251211052417/https://fordhamram.com/62224/news/a-bit-of-a-loner-former-classmates-remember-donald-trump-in-the-bronx/ |url-status=live }}</ref> Pa sukulu iyi, ŵabwezi ŵake ŵaŵiri ndiwo ŵakamulongosolera umo munthu wakuseŵera gofu, maseŵero agho wakaghatemwanga chomene. Pa mazuŵa ghakuzizima yayi, kanandi wakalekanga kuluta ku masambiro kuti wakaseŵere gofu.{{Sfn|Craig|Buettner|2024|p=98}} Trump wakapokerereka mu timu ya mpira wa ku America ya Division III ya sukulu nga ni [[Punter (gridiron football)|punter]], kweni wakaleka pakati pajumpha masabata ghatatu panji ghanayi chifukwa wakapweteka msingo wa lundi. Wakaseŵeraso tennis mu timu ya Fordham.{{Sfn|Barrett|2016|p=74}} Pa nyengo ya maholide gha kusukulu wakagwiranga ntchito pa [[Trump Village]] ya adada ŵake.{{Sfn|D'Antonio|2015|p=52}} Trump wakalembanga yayi vinthu mu kalasi; wakasambiranga mwa kupulika ivyo mubwezi wake wakamulongosoleranga. Wakajoyinapo pa pulogiramu ya [[Reserve Officers' Training Corps]], kweni wakafumamo mu [[mwana wa chaka chachiŵiri]] apo [[Nkhondo ya Vietnam]] yikakulirakuliranga; awo ŵakaŵa mu pulogiramu iyi ŵakeneranga kuzakaŵa ŵasilikari ŵa maudindo ndipo ŵakatumizgikanga ku Vietnam. Ku mayunivesite, ŵasambizgi, pakopa kutuma ŵawukirano ku nkhondo, kanandi ŵakasazgirangako ŵasambiri mamaki kuti ŵajumphenge. Trump wakakhuŵilizgikanga kuchita makora mu masambiro ghake. Wakafika yayi pa [[mndandanda wa Dean]] mu chaka chake chakwamba.{{Sfn|Craig|Buettner|2024|pp=98–99}} ===Yunivesite ya Pennsylvania=== Mu chaka chake chachiŵiri, Trump wakaphalira munthu munyake uyo wakasambirapo ku NYMA kuti wakakhumbanga [[kusintha yunivesite|kusamira]] ku Wharton School kuti "wapange maubwezi ghawemi pa vya bizinesi vyake vya kunthazi".{{Sfn|Craig|Buettner|2024|p=99}} Pamanyuma, mubali wake Freddy wakapempha mubwezi wake wa ku sekondare uyo wakagwiranga ntchito ku ofesi yakupokera ŵasambiri ya Yunivesite ya Pennsylvania kuti wawovwire Trump kupokerereka. Pa nyengo iyo, Trump wakaŵa na mamaki ghakukwana ndipo yunivesite yikaŵa yindazgoke yakusuzga chomene kunjiramo.{{Sfn|Craig|Buettner|2024|p=99}} Mbiri ya Penn yikakopanga mbumba ya Trump.{{Sfn|Haberman|2022|p=28}} Mwakuyana na [[Michael D'Antonio]] mu ''[[Never Enough: Donald Trump and the Pursuit of Success|Never Enough]]'' (2015), Fred wakakhumbisiska chomene kuti mwana wake wamalizge pa [[Ivy League]], nangauli Trump wakakhumbanga kuleka kusambira chomene.{{Sfn|D'Antonio|2015|p=68}} Trump wakaŵa membala wa kalabu yiliyose yayi, timu ya maseŵero yayi, panji fraternity yayi ku Penn, ndipo chithuzi chake chikawonekaso yayi mu buku la chaka la ŵamalizgi.{{Sfn|Barrett|2016|p=75}} Pamanyuma wakayowoya mwautesi kuti ndiyo wakaŵa wasukulu wakwamba mu kalasi yake ya ŵasambiri 333 ku Penn Wharton School, kweni nanga pa [[mndandanda wa ŵasambiri ŵakuchita makora]] wakafikapo yayi.{{Sfn|Kranish|Fisher|2017|pp=47–48}} Trump wakaphalira [[Timothy L. O'Brien]] mu ''[[TrumpNation]]'' kuti ivyo wakachita ku Wharton vikamovwira "kufumamo mu nkharo yira".{{Sfn|O'Brien|2005|p=51}} Apo [[kususka kunjilirapo kwa United States mu Nkhondo ya Vietnam]] kukakura pa masukulu ghapachanya, Penn yikakhwaskika pachoko waka na vyakususka boma. Nangauli Trump mwenecho wakasuskanga nkhondo iyi, wakajoyinapo yayi pa [[Mndandanda wa viwoneskero vyakususkira Nkhondo ya Vietnam|viwoneskero vyakususkira]].{{Sfn|D'Antonio|2015|pp=68–69}} Trump wakamalizga masambiro ghake ku Wharton School mu Meyi 1968 na digiri ya [[Bachelor of Science]] mu vyauma.<ref>{{Cite web |last=Yurow |first=Jeremy |url=https://www.usatoday.com/story/news/politics/elections/2024/09/10/did-donald-trump-attend-wharton/75168213007/ |title=Did Trump Go to Wharton School of Business? A Look at His Education |date=September 10, 2024 |work=[[USA Today]] |access-date=October 12, 2025 |archive-date=September 15, 2025 |archive-url=https://web.archive.org/web/20250915101641/https://www.usatoday.com/story/news/politics/elections/2024/09/10/did-donald-trump-attend-wharton/75168213007/ |url-status=live }}</ref> Kumalizga kwake sukulu kukapangiska kuti waŵe wakwenelera kuchemekeka ku usilikari pamanyuma pakuti wakaŵa wandachedwe chifukwa cha masambiro ghake ku Fordham na Penn.<ref name="Greenberg-2025">{{Cite web |last=Greenberg |first=Jon |url=https://www.politifact.com/article/2015/jul/21/was-trump-draft-dodger/ |title=Was Trump a 'Draft Dodger'? |date=July 21, 2015 |work=[[PolitiFact]] |access-date=October 28, 2025}}</ref> Wakaluta ku dokotala wa malundi uyo wakasanga kuti wakaŵa na [[bone spur]] pa vithende vyake—Trump wakalutilira kuseŵera maseŵero kweni wakazomerezgekanga yayi kunjira usilikari. Ivyo wakasanga dokotala vikwenera kuti vikakhozgeka na dokotala munyake.{{Sfn|Craig|Buettner|2024|p=103}} Pakati pajumpha myezi yiŵiri kufuma apo wakapokera chikalata chakumulekeska kunjira usilikari,<ref name="Greenberg-2025" /> pa [[Vietnam War draft#The 1969 Draft Lottery|lotale ya kusankha ŵanjira usilikari ya Nkhondo ya Vietnam]], iyo yikasankhanga ŵanthu mwangozi kuyana na zuŵa la kubabikira, zuŵa la kubabikira la Trump likafuma pafupi naumaliro wa mndandanda, likapokera nambala yikuru ya 356 pa 366, ndipo ichi chikamuponoska ku kukopeka mwankhongono kunjira usilikari.{{Sfn|Kranish|Fisher|2017|p=48}} ==Vyakulemba== {{Notelist}} ==Mabuku ghakulongosolera== {{Reflist}} ==Mabuku agha ghagwiliskirika ntchito== {{Refbegin|30em|indent=yes}} <!-- * {{Cite book |last1=Baker |first1=Peter |last2=Glasser |first2=Susan |author-link1=Peter Baker (journalist) |author-link2=Susan Glasser |date=2022 |title=The Divider: Trump in the White House, 2017-2021 |title-link=The Divider: Trump in the White House, 2017–2021 |location=New York |publisher=Penguin Random House |isbn={{format ISBN|9780385546539}}}} --> * {{Cite book |last=Barrett |first=Wayne |author-link=Wayne Barrett |date=2016 |title=Trump: The Greatest Show on Earth: The Deals, the Downfall, the Reinvention |location=New York |publisher=[[Regan Arts]] |isbn=978-1-68245-079-6}} * {{Cite book |last=Blair |first=Gwenda |author-link=Gwenda Blair |date=2000 |title=The Trumps: Three Generations That Built an Empire |title-link=The Trumps: Three Generations That Built an Empire |location=New York |publisher=[[Simon & Schuster]] |isbn=978-0-684-80849-9}} * {{Cite book |last1=Craig |first1=Susanne |last2=Buettner |first2=Russ |author-link1=Susanne Craig |author-link2=Russ Buettner |date=2024 |title=Lucky Loser: How Donald Trump Squandered His Father's Fortune and Created the Illusion of Success |title-link=Lucky Loser (book) |location=New York |publisher=[[Penguin Random House]] |isbn=978-0-593-29864-0}} * {{Cite book |last=D'Antonio |first=Michael |author-link=Michael D'Antonio |date=2015 |title=Never Enough: Donald Trump and the Pursuit of Success |title-link=Never Enough: Donald Trump and the Pursuit of Success |location=New York |publisher=[[Thomas Dunne Books]] |isbn=978-1-250-04238-5}} * {{Cite book |last=Haberman |first=Maggie |author-link=Maggie Haberman |date=2022 |title=[[Confidence Man: The Making of Donald Trump and the Breaking of America]] |location=New York |publisher=[[Penguin Press]] |isbn=978-90-295-4981-3}} * {{Cite book |last=Hurt |first=Harry |author-link=Harry Hurt III |date=1993 |title=Lost Tycoon: The Many Lives of Donald J. Trump |location=New York |publisher=[[W. W. Norton & Company]] |isbn=978-0-393-03029-7}} * {{Cite book |last1=Kranish |first1=Michael |last2=Fisher |first2=Marc |author-link1=Michael Kranish |author-link2=Marc Fisher |date=2017 |title=Trump Revealed: The Definitive Biography of the 45th President |title-link=Trump Revealed |location=New York |publisher=[[Simon & Schuster]] |isbn=978-1-4711-5973-2}} * {{Cite book |last=O'Brien |first=Timothy |author-link=Timothy L. O'Brien |date=2005 |title=TrumpNation: The Art of Being the Donald |title-link=TrumpNation |location=New York |publisher=[[Warner Books]] |isbn=978-0-446-69683-8}} {{Refend}} ==Kuŵazga kunyake== * {{cite journal| journal=[[Clio's Psyche]] |volume=27 |issue=1 |date=Fall 2020 |pages=37–41 |doi=10.70763/f40438b554cc0e3d96ee6064c5798f55 |title=The Abusive and Troubled Childhood of Donald Trump |last1=Petschauer |first1=Peter W. |first2=Sven |last2=Fuchs |url=https://cliospsyche.org/articles/fuchs-s-petschauer-p-w-2020-the-abusive-and-troubled-childhood-of-donald-trump-clios-psyche-271-37-41|url-access=subscription }} {{Donald Trump}} [[Category:Donald Trump]] [[Category:Umoyo wa paunyamata wa ŵapurezidenti ŵa United States|Trump, Donald]] 372qnax8pve1djg91svknaxeszeth2c Early life and education of Donald Trump 0 47773 116778 2026-07-15T18:25:53Z Tumbuka Arch 6863 Redirected page to [[Umoyo wakwambilila na masambiro gha Donald Trump]] 116778 wikitext text/x-wiki #REDIRECT [[Umoyo wakwambilila na masambiro gha Donald Trump]] ojqhlw6u5sbrmeg7908qc9ophwiqi67 Ntchito ya bizinesi ya Donald Trump 0 47774 116783 2026-07-15T19:03:38Z Tumbuka Arch 6863 Created page with "{{Short description|palije}} {{Use American English|date=July 2025}} {{Use mdy dates|date=August 2023}} [[File:Donald Trump with model of Television City.jpg|thumb|Trump muumaliro wa 1985 pamoza na chithuzithuzi cha "Television City", ntchakuzenga pa malo gha kale gha West Side rail yards, sono [[Riverside South, Manhattan|Riverside South]]]] {{Donald Trump series|expanded=Life and business}} Pambere wandachimbire pa udindo wa [[mlongozgi wa United States]] mu 2016, Do..." 116783 wikitext text/x-wiki {{Short description|palije}} {{Use American English|date=July 2025}} {{Use mdy dates|date=August 2023}} [[File:Donald Trump with model of Television City.jpg|thumb|Trump muumaliro wa 1985 pamoza na chithuzithuzi cha "Television City", ntchakuzenga pa malo gha kale gha West Side rail yards, sono [[Riverside South, Manhattan|Riverside South]]]] {{Donald Trump series|expanded=Life and business}} Pambere wandachimbire pa udindo wa [[mlongozgi wa United States]] mu 2016, [[Donald Trump]] wakachitanga bizinesi, chomenechomene pa kunozga na kuzenga vipangwa vikuruvikuru, mahotelo, makasino, na malo ghakuseŵerako [[malo ghakuseŵerako gofu|gofu]]. Umoyo wake wakutchuka, kayowoyero kake kakuwonekera pakweru, ndiposo mulimo wake mu pulogiramu ya [[NBC]] ya ''[[The Apprentice (American TV series)|The Apprentice]]'', vikamupangiska kuŵa [[Ntchito ya Donald Trump mu vyakupharazga|munthu wakumanyikwa chomene mu umoyo wa ŵanthu ŵa ku America]] kwa vyaka pafupifupi 50. Trump wakamba ntchito yake ku kampani ya vyamalo ya awiske [[Fred Trump]], Trump Management, mu 1968, iyo wakayitora mu 1971 ndipo pamanyuma wakayisintha zina kuŵa [[Trump Organization]] mu 1973. Wakakuliska bizinesi yake ku [[Manhattan]], uko wovwiri wa ndalama na wa ndale wa awiske ukamovwira kuchita malonda ghake ghakwamba, kusakaza na kunozga nyumba zakuzirwa. Trump wakanjira mu mabizinesi ghanyake agho ghakakhumbikwiranga yayi ndalama zinandi zakwambira, kusazgapo kupereka zina lake ku mabizinesi gha malo ghakukhalamo na [[mndandanda wa malo ghakuseŵerako gofu|malo ghakuseŵerako gofu]] pa charu chose. Pakuzenga pa kutchuka kwake mu manyuzipepara gha [[tabloid]] gha ku New York, pamanyuma wakazgoka nyenyezi ya pulogiramu ya pa TV ya ''The Apprentice''. Trump wakaŵa mwiniwake wa mpikisano unandi wa kutowa kwa ŵanakazi, panji wakaŵa na chigaŵa chikuru, pakati pa 1996 na 2015. Wakagwiliskiraso ntchito zina lake pakupharazga mapulojekiti ghanandi gha kuzenga na [[Mndandanda wa vinthu ivyo vikuthyeka zina la Donald Trump|vinthu vya malonda]]. Pamanyuma pakutonda [[Visola vya mlongozgi wa United States mu 2016|visola vya mlongozgi wa United States mu 2016]] na [[Kukhazikiskika kwakwamba kwa Donald Trump pa udindo wa mlongozgi|kukhazikiskika pa udindo mu Janyuwale 2017]], Trump wakaleka maudindo ghose ghakulongozga mu [[Trump Organization]] ndipo wakapeleka katundu wake wa bizinesi ku [[Trust (law)#Types|trust iyo yingasinthika]] yakulongozgeka na ŵana ŵake, [[Donald Trump Jr.|Donald Jr.]] na [[Eric Trump|Eric]].{{cite news|url=https://www.bbc.com/news/business-38587628|title=Trump hands over business empire to sons|date=January 11, 2017|work=[[BBC News]]|access-date=January 11, 2017}} == Malo na nyumba == {{See also|Trump Organization}} === Ntchito zake zakwambilira === Trump wakamba ntchito yake ya malonda gha malo pa kampani ya awiske,{{cite news |title=In Step With: Donald Trump |work=[[Parade (magazine)|Parade]] |date=November 14, 2004 |url=http://www.parade.com/articles/editions/2004/edition_11-14-2004/in_step_with_0 |archive-url=https://web.archive.org/web/20101014022222/http://www.parade.com/articles/editions/2004/edition_11-14-2004/in_step_with_0 |archive-date=October 14, 2010}} Trump Management,{{cite news|last1=Mahler|first1=Jonathan|last2=Eder|first2=Steve|url=https://www.nytimes.com/2016/08/28/us/politics/donald-trump-housing-race.html|title='No Vacancies' for Blacks: How Donald Trump Got His Start, and Was First Accused of Bias|work=[[The New York Times]]|date=August 27, 2016|access-date=January 31, 2022}} iyo yikakhumbikwiranga chomene pa nyumba zakubwereka za ŵanthu ŵapakati mu [[vigaŵa vya msumba wa New York|vigaŵa vya msumba]] vya [[Brooklyn]], [[Queens]], na [[Staten Island]]. Chimoza mwa ntchito zakwamba za Trump chikaŵa kuyezgayezga kunozga nyumba zakukhalamo za Swifton Village mu [[Cincinnati]], Ohio, izo awiske, [[Fred Trump]], ŵakagura pa malonda gha foreclosure pa ndalama zakukwana US$5.7 miliyoni mu 1962, zakuyana na US$63.2 miliyoni mu 2026.{{Cite web |date=2026-06-10 |title=Inflation Calculator {{!}} Find US Dollar's Value From 1913-2026 |url=https://www.usinflationcalculator.com/ |access-date=2026-06-14 |website=www.usinflationcalculator.com |language=en-US}}{{cite news |title=Donald Trump's Bond Hill connection |newspaper=The Enquirer |date=August 12, 2015}} Fred na Donald Trump ŵakagwiranga lumoza pa ntchito iyi. Pa nyengo iyo Trump wakamalizganga masambiro gha ku yunivesite mu 1968, wakapokanga vyawanangwa vyambura msonkho kufuma kwa awiske vyakuyana na US$1,000,000 pa chaka, mwakuyana na mtengo wa ndalama wa 2019.{{cite news|url=https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html|title=Trump Engaged in Suspect Tax Schemes as He Reaped Riches From His Father|last=David|first=Barstow|date=October 2, 2018|newspaper=[[The New York Times]]|access-date=June 29, 2019}} Wakati waŵa na vyaka 23, wakayezga kwanjira mu bizinesi ya vyakusanguluska kweni wakatondeka, wakati waika ndalama zakukwana US$70,000 kuti waŵe munyake waŵakupanga sewero la pa Broadway la 1970 lakuti ''[[Paris Is Out!]]''.{{cite news |url=https://www.nytimes.com/2016/03/07/theater/for-a-young-donald-j-trump-broadway-held-sway.html |title=For a Young Donald J. Trump, Broadway Held Sway |date=March 6, 2016 |access-date=March 7, 2016 |first=Michael |last=Paulson |work=[[The New York Times]]}} Mu 1971 wakazgoka pulezidenti wa kampani iyi ndipo wakamba kugwiliskira ntchito zina lakuti "The Trump Organization" nga ni zina likuru la mabizinesi ghake.{{sfn|Blair|2015b|p=[https://books.google.com/books?id=uJifCgAAQBAJ&pg=PA250 250]}}{{cite news |first=Conor |last=Kelly |title=Meet Donald Trump: Everything You Need To Know (And Probably Didn't Know) About The 2016 Republican Presidential Candidate |date=July 27, 2015 |work=[[ABC News (United States)|ABC News]] |url=https://abcnews.go.com/Politics/meet-donald-trump-2016-republican-presidential-candidate/story?id=32108595}} Chaka chenechicho, pa vyaka 25, wakasamukira ku [[Manhattan]], uko wakamba kugwira ntchito zikuru zakuzenga ndipo wakagwiliskiranga ntchito mapulani ghakutowa gha nyumba kuti wakope chidwi cha mawayilesi.[https://www.archpaper.com/2020/11/donald-trump-architecture/ How Donald Trump transformed New York without any regard for design quality] [[Nkhani za malango gha munthu na bizinesi ya Donald Trump#Mulandu wa nyumba wa boma la federal wa 1973|Mu 1973]], [[Unduna wa Vyeruzgo wa United States|Unduna wa Vyeruzgo]] ukati Trump Organization yikasankhiranga ŵanthu mwakusankhana mtundu pakubwerekesa nyumba ku ŵabwereki ŵafipa, m'malo mwa kusefa waka ŵanthu ŵakusuzgika ndalama nga umo kampani yikayowoyera. Unduna wa Vyeruzgo ukati ŵanthu ŵafipa awo ŵakachita nga mbakukhumba kubwereka nyumba ŵakatumika ku nyumba zakuluska hafu ya dazeni ndipo ŵakakanika kupokera nyumba, kweni munthu mzungu uyo wakachita mwakuyana waka wakapika nyumba mu nyumba yeneyira.{{cite news|url=http://www.thedailybeast.com/articles/2015/12/15/doj-trump-s-early-businesses-blocked-blacks.html|title=DOJ: Trump's Early Businesses Blocked Blacks|date=December 15, 2015|access-date=March 2, 2016|work=[[The Daily Beast]]|first=Gideon|last=Resnick }} Paumaliro, kampani ya Trump na ŵalaraŵalara ŵa boma la federal ŵakasayina phangano ilo Trump ŵakazomerezgapo yayi kuti ŵakananga, ndipo ŵakakolerana kuti ŵanthu ŵa mafuko ghachoko awo ŵakwenelera ŵaŵikenge panthazi na Urban League.{{cite news |last=Dunlap |first=David |date=July 30, 2015 |title=1973: Meet Donald Trump |url=https://www.nytimes.com/times-insider/2015/07/30/1973-meet-donald-trump/ |url-status=live |newspaper=[[The New York Times]] |archive-url=https://web.archive.org/web/20150731123300/http://www.nytimes.com/times-insider/2015/07/30/1973-meet-donald-trump/ |archive-date=July 31, 2015 |quote=Trump Management ... was also to allow the league to present qualified applicants for every fifth vacancy... Trump himself said he was satisfied that the agreement did not 'compel the Trump Organization to accept persons on welfare as tenants unless as qualified as any other tenant.'}}{{cite news |last1=Kranish |first1=Michael |last2=O'Harrow |first2=Robert |date=January 23, 2016 |title=Inside the government's racial bias case against Donald Trump's company, and how he fought it |url=https://www.washingtonpost.com/politics/inside-the-governments-racial-bias-case-against-donald-trumps-company-and-how-he-fought-it/2016/01/23/fb90163e-bfbe-11e5-bcda-62a36b394160_story.html |newspaper=[[The Washington Post]] |quote=Civil rights groups in the city viewed the Trump company as just one example of a nationwide problem of housing discrimination. But targeting the Trumps provided a chance to have an impact, said Eleanor Holmes Norton, who was then chairwoman of the city's human rights commission. 'They were big names.'}} Kufika mu 1973, Trump, nga ni pulezidenti wa Trump Organization, wakalaŵiliranga nyumba zakukwana 14,000 mu [[Brooklyn]], [[Queens]], na [[Staten Island]]. Mu 1978, msumba ukasankha malo ghake pa [[West Side (Manhattan)|West Side]] ya Manhattan kuti paŵe malo gha [[Jacob K. Javits Convention Center|Jacob Javits Convention Center]], pamanyuma pakusanga kuti wakaŵa yekha uyo wakaŵa na malo ghakunozgeka kale pa ntchito iyi. Wakapokera ndalama za [[mulongozgi wa malonda gha malo|broker]] pa kuguliska malo agha. Phangano lakwamba likuru la Trump mu [[Manhattan]]{{cite news |first=Glenn |last=Kessler |title=Trump's false claim he built his empire with a 'small loan' from his father |date=March 3, 2016 |newspaper=[[The Washington Post]] |url=https://www.washingtonpost.com/news/fact-checker/wp/2016/03/03/trumps-false-claim-he-built-his-empire-with-a-small-loan-from-his-father/}} likaŵa kuzenga [[Grand Hyatt New York|Grand Hyatt Hotel]] mu 1978 pafupi na [[Grand Central Terminal]]. Nyumba yakale ya Commodore Hotel yikabenekereskeka na magalasi, ndipo malo ghakupokelera ŵalendo ghakasinthika na kuŵa atrium.{{cite news |last=Van Zuylen-Wood |first=Simon |date=May 12, 2016 |title=Trump and the Artifice of the Deal |url=https://www.politico.com/magazine/story/2016/05/donald-trump-2016-father-artifice-of-the-deal-213888/ |newspaper=[[Politico]] |access-date= October 28, 2016}} Ntheura Commodore yikajurika nga ni Hyatt hotel iyo yikanozgekaso mu Seputembala 1980, ndipo ichi chikawovwira kuti Trump wamanyikwe chomene na ŵanthu.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=32–35 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Chigaŵa cha phangano ili chikaŵa ngongoli ya US$1 miliyoni iyo Village Construction Corp. ya Fred Trump yikapeleka kuti yiwezgerepo ndalama izo Donald wakatora pa Chase Manhattan credit line iyo Fred wakamunozgera apo wakazenganga hoteliyo, kweniso ngongoli ya US$70 miliyoni yakuzengera iyo Fred na Hyatt hotel chain ŵakazomerezgana kulipira lumoza. Fred wakaŵa mubwezi wambura kumanyikwa pa ntchito iyi chifukwa mbiri yake yikanangika kale mu bizinesi ya malo mu New York chifukwa cha mafumbo ghakukhwaskana na phindu lakujumphilira na nkhanza zinyake mu ntchito zake, ntheura Donald ndiyo wakaŵa panthazi pa phangano ili. Kuyana na mulembi Wayne Barrett, ubwezi wa vyaka 20 wa Fred na mukuru wa Equitable, Ben Holloway, ukawovwira kuti ŵazomerezge ntchito iyi. Donald wakadumbiskana na msumba kuti hoteliyo yiŵe na vyaka 40 vyambura kulipira msonkho, mwakusintha na kugawana phindu la bizinesi. Phangano ili likachepeskanga chiwopsezo cha ntchito iyi ndipo likakopanga ŵakuŵika ndalama kuti ŵanjirepo.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=34–35 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Mu 1981, Trump wakagura na kunozgaso nyumba iyo pamanyuma yikazgoka Trump Plaza, pa [[Third Avenue]] mu New York City.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV|url=https://books.google.com/books?id=NIPOonZnkDEC&pg=PA51 |pages=51–52 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Trump wakasandura nyumba iyi kuŵa [[nyumba yakukhalamo ya cooperative|cooperative ya nyumba]], umo ŵakukhala nyumba ŵakaŵirangako ŵenecho gawo la umwini wa nyumba. === Trump Tower === {{Main article|[[Trump Tower|Trump Tower]]}} [[File:Trump-Tower-3.jpg|thumb|upright|alt=a view upward toward the top of the Trump Tower, a 68-story building with a brown-glassed facade|[[Trump Tower]], pa [[Fifth Avenue]] mu [[Midtown Manhattan]]]] Mu 1983, Trump wakamalizga kuzenga [[Trump Tower]], nyumba yitali ya masitepe 58 mu [[Midtown Manhattan]]. Ntchito iyi yikakhumbikwiranga kudumbiskana kwakusuzga na ŵanthu ŵakupambanapambana pa nyumba ya [[Bonwit Teller]], malo, kweniso malo gha muchanya gha nyumba yakuzengeka kufupi nayo. Apo kudumbiskana kukamara mu 1978, ''The New York Times'' yikalemba kuti "chakuti Bambo Trump ŵakafiska kusanga malo agha ... chikulongora kulimbikira kwawo kweniso luso lwawo pakudumbiskana."{{cite news |title=The Expanding Empire of Donald Trump |date=April 8, 1984 |work=[[The New York Times]] |url=https://www.nytimes.com/1984/04/08/magazine/the-expanding-empire-of-donald-trump.html?pagewanted=3}} Trump Tower yili pa malo agho kale pakaŵa sitolo yikuru ya [[Bonwit Teller]], iyo yikaŵa yakuzirwa pa nkhani ya mapulani gha nyumba. Trump wakabwangandura nyumba iyi mu 1980 wakati wagura malo agha.{{cite news |url=https://www.nytimes.com/2014/10/05/realestate/fifth-avenue-bonwit-teller-opulence-lost.html |title=The Store That Slipped Through the Cracks |work=[[The New York Times]] |date=October 3, 2014 |access-date=August 22, 2015 |first=Christopher |last=Gray}}{{cite news |work=Preservation News |url=https://prn.library.cornell.edu/cgi-bin/cornell-prn?a=d&d=PRN19800701.2.10&e=-------en-20--1--txt-IN------ |title=New York City Trumped: Developer Smashes Panels |first=Michael |last=Leccese |date=July 1, 1980 |access-date=August 22, 2015}} Ŵanthu ŵanandi ŵakakwiyira chomene apo vithuzithuzi vyakuzirwa vya [[Art Deco]], ivyo vikaŵa pa nkhope ya nyumba ndipo Trump wakalayizga kuti vipelekekenge ku [[Metropolitan Museum of Art]], vikaparanyika pa nyengo yakubwangandura nyumba iyi mwakulondezga dango la Trump Organization. Kweniso kubwangandurwa kwa sitolo ya Bonwit Teller kukasuska chifukwa kontrakita wakagwiliskira ntchito ŵantchito ŵakujumpha 200 ŵa ku Poland awo ŵakaŵavya mazaza ghakugwira ntchito. Pakubwangandura nyumba mwaluŵiro, ŵakuti ŵakalipiranga madola 4 panji 5 pa ora pa ntchito ya maora 12.{{cite news |work=[[The New York Times]] |url=https://www.nytimes.com/1990/07/13/nyregion/trump-says-he-didn-t-know-he-employed-illegal-aliens.html |date=July 13, 1990 |access-date=August 23, 2015 |title=Trump Says He Didn't Know He Employed Illegal Aliens |first=Dean |last=Baquet}} Mu 1990, Trump wakachitira ukaboni kuti wakalutanga kanandi yayi pa malo agha ndipo wakamanyanga yayi vya ŵantchito ŵambura mazaza agha, ŵanyake awo ŵakakhalanga penepapo ndipo ŵakamanyikwanga kuti "Polish Brigade". Mu 1991, mweruzgi wakadumura kuti ŵakuzenga nyumba ŵakachita "chiŵembu chakunangira ndalama izo zikeneranga kupelekeka", pakung'anamura ndalama za penshoni na vyawovwiri vya mabungwe gha ŵantchito.{{cite news |last1=Hays |first1=Constance L. |title=Judge Says Trump Tower Builders Cheated Union on Pension Funds |url=https://www.nytimes.com/1991/04/27/nyregion/judge-says-trump-tower-builders-cheated-union-on-pension-funds.html |access-date=March 9, 2016 |work=[[The New York Times]] |date=April 27, 1991}} Ndipouli, pa apilo, vigaŵa vinyake vya cheruzgo ichi vikasinthika,{{cite news |url=https://www.nytimes.com/1998/06/14/nyregion/after-15-years-in-court-workers-lawsuit-against-trump-faces-yet-another-delay.html |title=After 15 Years in Court, Workers' Lawsuit Against Trump Faces Yet Another Delay |first=Selwyn |last=Raab |date=June 14, 1998 |access-date=August 24, 2015 |work=[[The New York Times]] |quote=Both sides, however, appealed the findings and each won partial victories. A federal appeals court upheld most of Judge Stewart's decisions but ruled that Trump-Equitable had been denied a full opportunity to rebut the charge that the funds had been damaged by the loss of contributions for the Polish workers. The appeals court also ruled that Judge Stewart wrongly dismissed a claim by the plaintiffs that the Trump group was responsible for payments to the funds because it had been the workers' actual employer.}} ndipo mbiri ya mulandu yikajalika apo mulandu wa ŵantchito uwo ukatora nyengo yitali ukamara mu 1999, pamanyuma pa vyaka 16 mu khoti.{{cite news |url=http://www.thedailybeast.com/articles/2015/07/08/trump-tower-was-built-on-undocumented-immigrants-backs.html |title=Trump Tower Was Built on Undocumented Workers' Backs |date=July 8, 2015 |access-date=August 24, 2015 |first=Michael |last=Daly |work=[[The Daily Beast]]}} Trump Tower yikazengeka na Trump pamoza na [[The Equitable Life Assurance Society of the United States|Equitable Life Assurance Company]], ndipo yikapangika na wakupanga mapulani gha nyumba [[Der Scutt]] wa [[Swanke Hayden Connell Architects]].{{cite news |url=https://www.nytimes.com/2010/03/16/arts/design/16scutt.html |title=Der Scutt, Modernist Architect, Dies at 75 |first=Fred A. |last=Bernstein |date=March 16, 2010 |access-date=August 23, 2015 |work=[[The New York Times]]}} Trump Tower muli nyumba yikuru ya [[nyumba ya penthouse|penthouse]] ya Donald Trump kweniso ofesi yikuru ya [[The Trump Organization|Trump Organization]].{{cite news |url=https://www.nytimes.com/2016/03/30/us/politics/new-york-primary.html?action=click&contentCollection=nyregion&region=rank&module=package&version=highlights&contentPlacement=2&pgtype=sectionfront&_r=0 |title=With the New York Presidential Primary, the Circus Is Coming Home |first1=Matt |last1=Flegenheimer |first2=Maggie |last2=Haberman |newspaper=[[The New York Times]] |date=March 29, 2016 |access-date=March 29, 2016}} Nyumba iyi yili na masitolo, makafeyi, maofesi, na malo ghakukhalamo. Atrium yake ya magawo ghankhondi yili na chiŵiya cha maji cha kutalika kwa mafiti 60, icho chili na nthowa yakwendamo yakujingilira pasi pa denga lagalasi.{{cite web |title=About Trump Tower |date=n.d. |access-date=May 24, 2016 |website=Trump Tower New York |url=http://www.trumptowerny.com/about}} Trump Tower ndiyo yikaŵa malo agho pulogiramu ya pa TV ya NBC yakuti ''The Apprentice'' yikajambulikirangapo, kusazgapo studio yakugwirira ntchito ya pa TV.{{cite web |title=History |date=n.d. |access-date=May 24, 2016 |website=Trump Tower New York |url=http://www.trumptowerny.com/trump-tower-new-york |archive-url=https://web.archive.org/web/20170129203922/http://www.trumptowerny.com/trump-tower-new-york |archive-date=January 29, 2017 |url-status=dead }} Nyumba iyi yikati yamara, nyumba zake za condominium zikaguliskika luŵiro, ndipo Trump Tower yikazgoka malo agho ŵalendo ŵanandi ŵakalutanga kukawona.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=43–53 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} === Kukura kwa bizinesi === [[Trump Plaza Hotel and Casino|Harrah's at Trump Plaza]] yikajurika mu Atlantic City mu 1984. Hotelo na kasino uyu vikazengeka na Trump na ndalama zakufuma ku Holiday Corp.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=57–58 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} ndipo vikendeskekanga na chigaŵa cha njuga cha Holiday Corp. Ivyo vikachitika pa kasino uyu vikayenda makora yayi, ndipo vikapangiska mphindano pakati pa Trump na Holiday Corp.{{cite news |title=Holiday, Trump drafting terms to end rocky alliance over Atlantic City casino |newspaper=[[The Wall Street Journal]] |first=Steve |last=Swartz |date=November 11, 1985 |id={{ProQuest|397993833}} }} {{subscription required}} Trump wakaguliraso Hilton Corporation nyumba iyo yikaŵa yindamare kuzengeka mu Atlantic City pa ndalama zakukwana US$320 miliyoni. Yikati yamara mu 1985, hotelo na kasino uyu ukamanyikwa kuti Trump Castle. Muwoli wa Trump, [[Ivana Trump|Ivana]], ndiyo wakalaŵiliranga malo agha.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=59–60 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Trump wakagura malo gha [[Mar-a-Lago]] ku [[Palm Beach, Florida]], mu 1985 pa ndalama zakukwana US$5 miliyoni, kweniso US$3 miliyoni za vinthu vya munyumba. Padera pa kugwiliskira ntchito nyumba iyi nga ni malo ghakupumulirako mu nyengo ya chiwuvi, Trump wakasanduraso nyumba iyi kuŵa kalabu ya ŵanthu payekha, iyo yikaŵa na ndalama zakunjiliramo za US$150,000. Pa nyengo yeneyiyo, wakaguraso nyumba zinyake za condominium ku West Palm Beach pamoza na [[Lee Iacocca]], izo pamanyuma zikazgoka [[Trump Plaza (West Palm Beach)|Trump Plaza of the Palm Beaches]].{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |page=62 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} [[File:Central Park Wollman Rink.jpg|thumb|right|alt=An outdoor skating rink with many people on the rink. There are skyscrapers in the background. This is the Wollman Rink in Central Park|[[Central Park]] [[Wollman Rink]] pamanyuma pa kunozgekaso na Trump]] Mu 1980, ntchito zakunozgekaso [[Wollman Rink]] ya mu [[Central Park]] zikamba, ndipo zikaghanaghanirikanga kuti zizamala mu vyaka viŵiri na hafu. Chifukwa cha masuzgo gha kapangidwe ka pulani na masuzgo ghanandi agho ghakachitika pa kuzenga, ntchito iyi yikaŵa yindamare mpaka mu Meyi 1986 ndipo ŵakaghanaghananga kuti yikakhumbikwiranga myezi yinyake 18 kweniso ndalama zakukwana $2 miliyoni mpaka $3 miliyoni kuti yimare.{{cite news |url=https://www.nytimes.com/1986/11/21/nyregion/new-york-hopes-to-learn-from-rink-trump-fixed-wollman-rink-scorecard.html |title=New York Hopes to Learn From Rink Trump Fixed; Wollman Rink Scorecard |newspaper=[[The New York Times]] |date=November 21, 1986 |access-date=May 9, 2018}}{{cite news |last1=Freedlander |first1=David |title=A 1980s New York City Battle Explains Donald Trump's Candidacy |url=https://www.bloomberg.com/politics/features/2015-09-29/a-1980s-new-york-city-battle-explains-donald-trump-s-candidacy |access-date=October 23, 2016 |publisher=[[Bloomberg News]] |date=September 29, 2015}} Trump wakapika kontrakiti nga ni kontrakita mukuru mu Juni 1986 kuti wamalizge ntchito iyi pambere Disembala 15 yindafike, ndipo mtengo wake ukeneranga kulekera pa $3 miliyoni, apo ndalama zose izo zikagwiriskika zikawerezgekanga na msumba. Trump wakalemba mulembezi wa mapulani, kampani yakuzenga, kweniso kampani ya ku Canada yakupanga malo ghakuselerapo pa ayezi, ndipo wakamalizga ntchito iyi mu myezi yinayi, na kugwiliska ntchito ndalama zakukwana $775,000 kuchepera pa bajeti. Wakalongozga malo agha kwa chaka chimoza ndipo wakapeleka gawo la phindu ku vyamawoko na ku ntchito za ŵanthu wose{{cite news |last1=Rosenthal |first1=Andrew |author1-link=Andrew Rosenthal |title=Trump reports large profit from Wollman Rink |url=https://www.nytimes.com/1987/04/01/nyregion/trump-reports-large-profit-from-wollman-rink.html |newspaper=[[The New York Times]] |date=April 1, 1987 |access-date=November 27, 2017}} mwakusintha na wanangwa wa [[Concession (contract)|chilolezgo cha kugwiliskira ntchito]] malo agha.{{cite news |url=https://www.washingtonpost.com/politics/trump-boasts-of-his-philanthropy-but-his-giving-falls-short-of-his-words/2016/10/29/b3c03106-9ac7-11e6-a0ed-ab0774c1eaa5_story.html |title=Trump boasts about his philanthropy. But his giving falls short of his words. |newspaper=[[The Washington Post]] |date=October 29, 2016 |access-date=July 3, 2018 |last=Fahrenthold |first=David A. |author-link=David Fahrenthold}} Trump wakalongozga rink iyi kufuma mu 1987 mpaka 1995. Wakapikaso kontrakiti yinyake mu 2001, iyo yikasazgikirapo mpaka mu 2021.{{cite news |last=Purnick |first=Joyce |author-link=Joyce Purnick |url=https://www.nydailynews.com/opinion/donald-trump-don-love-riding-high-polls-nyc-bad-side-article-1.145485 |title=The Donald Trump we know (and don't love): He's riding high in polls, but NYC's seen his bad side |newspaper=[[New York Daily News]] |date=May 1, 2011 |access-date=May 10, 2018}}{{cite news |last1=Kravitz |first1=Derek |last2=Podkul |first2=Cezary |url=https://www.propublica.org/article/trump-said-he-made-21-million-in-income-from-his-new-york-city-contracts |title=Trump Said He Made $21 Million in Income From His New York Contracts. He Actually Made a Lot Less. |publisher=[[ProPublica]] |date=February 28, 2017 |access-date=May 10, 2018}} Kuyana na mulembi wa nkhani [[Joyce Purnick]], "kupambana kwa Trump pa Wollman kukaŵaso nthano yakujizgora yekha iyo yikanozgekera makora kuti yimulengezge." Apo ntchito yikachitikanga, Trump wakachemeskanga maungano ghanandi gha ŵanthu ŵakulemba nkhani, nga nkhusangika pa kumalizga kuyika mapaipi na kuthira simenti.{{cite news |last=Geist |first=William E. |author-link=Bill Geist |url=https://www.nytimes.com/1986/11/15/nyregion/about-new-york-pssst-here-s-a-secret-trump-rebuilds-ice-rink.html |title=Trump reports large profit from Wollman Rink |newspaper=[[The New York Times]] |date=November 15, 1986 |access-date=May 10, 2018}} Mu 1987, wakayezgaso kwambura kutonda kukopa msumba kuti usinthe zina la malo agha kuŵa lake; chizindikiro cha Trump chikuwoneka chomene pa vigongwe vyakuzingilizga rink iyi, pa [[ice resurfacer|Zamboni]], pa sketi zakubwereka, kweniso pa webusayiti ya rink iyi.{{cite news |last1=Kula |first1=Irwin |author1-link=Irwin Kula |last2=Hatkoff |first2=Craig |author2-link=Craig Hatkoff |url=https://www.forbes.com/sites/offwhitepapers/2015/08/24/donald-trump-and-the-wollman-rinking-of-american-politics/ |title=Donald Trump And The Wollman Rinking of American Politics |work=[[Forbes]] |date=August 24, 2015 |access-date=May 10, 2018}} Pa Novembala 30, 1984, Trump wakavumbura pulani yakuzenga msumba uchoko mukati mwa New York City pa "malo ghakuru agho ghakaŵavya chitukuko" pa chilwa cha [[Manhattan]].{{cite web|url=https://www.nytimes.com/1984/12/01/nyregion/trump-set-to-but-lincoln-west-site.html|title=TRUMP SET TO BUT LINCOLN WEST SITE|first=Martin|last=Gottlieb|newspaper=[[The New York Times]]|date=December 1, 1984}} Pulani ya Television City, iyo pamanyuma yikachemeka Trump City, yikeneranga kuŵa na "pafupifupi maapatimenti na ma condominium 8,000 ghakukwana ŵanthu 20,000, malo ghakukwana magalimoto pafupifupi 10,000, malo ghakukwana masikweya fiti 3.6 miliyoni gha ma studio gha TV na mafilimu, kweniso malo ghakukwana masikweya fiti 2 miliyoni gha mashopu 'ghapachanya'."{{cite web|url=https://www.politico.com/magazine/story/2018/06/29/trump-robert-moses-new-york-television-city-urban-development-1980s-218836/|title=The Lost City of Trump|first=Michael|last=Kruse|magazine=Politico|date=July 2018}} Chikuru kuluska nyumba zose chikeneranga kuŵa chisanja chitali chomene pa nyengo iyo, chakukwana kaŵiri utali wa nyumba za vipinda 76 izo zikeneranga kuŵa pasi pake. Gulu la ŵanthu ŵakumanyikwa ilo likachemekanga Westpride, ilo likaŵa na ŵanthu nga ni [[Jerry Seinfeld]], [[Christopher Reeve]], na ŵanyake, likapangika ndipo likawunganiska ndalama zakususka pulani iyi. Meya [[Ed Koch]] wakakana kupeleka Trump kuchotcheka msonkho kuti wazenge pulani yake, m'malo mwake wakapeleka NBC mwa kuŵakanizga kusama kufuma ku [[Rockefeller Center]] kuluta ku pulani ya Trump. Trump wakagura [[Plaza Hotel]] mu Manhattan mu 1988. Wakapeleka ndalama zakukwana $400 miliyoni pa nyumba iyi ndipo wakapaso [[Ivana Trump|Ivana]] mulimo wakulongozga na kunozgekaso ntchito yake.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=65–66 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} [[File:AtlanticCityTajMahal.jpg|thumb|left|alt=The facade of the Trump Taj Mahal, a casino in Atlantic City. It has motifs evocative of the Taj Mahal in India. A tall building with the resort's name stands in the background.|[[Trump Taj Mahal]], pa 1000 Boardwalk mu [[Atlantic City, New Jersey]]]] Pamanyuma mu 1988, Trump wakagura [[Trump Taj Mahal|Kasino ya Taj Mahal]] mu [[Atlantic City, New Jersey]], mu mgwirizano na [[Merv Griffin]] kweniso [[Resorts International]].{{cite news |title=Seven Acquisitive Executives Who Made Business News in 1988: Donald Trump – Trump Organization; The Artist of the Deal Turns Sour into Sweet |last=Cuff |first=Daniel |date=December 18, 1988 |url=https://www.nytimes.com/1988/12/27/business/seven-acquisitive-executives-who-made-business-1988-donald-trump-trump.html |access-date=May 27, 2011 |work=[[The New York Times]]}} Kasino iyi yikajulika mu Epulero 1990, ndipo yikazengeka pa mtengo wose wa $1.1 biliyoni, uwo pa nyengo iyo ukaŵa kasino wakudura chomene kuzengekapo.{{cite news |url=https://www.nytimes.com/1990/04/08/business/trump-s-taj-open-at-last-with-a-scary-appetite.html |title=Trump's Taj – Open at Last, With a Scary Appetite |date=April 8, 1990 |last=Glynn |first=Lenny |work=[[The New York Times]] |access-date=August 14, 2016}}{{cite news |url=https://www.pbs.org/newshour/politics/new-owner-of-trumps-taj-mahal-wants-to-make-casino-great-again |title=New owner wants to make Trump's Taj Mahal casino great again |date=May 20, 2016 |first=Wayne |last=Parry |agency=[[Associated Press]] |publisher=[[PBS NewsHour]] |access-date=August 14, 2016}} Yikapeleka ndalama zakukwana $675 miliyoni mu [[junk bonds]] pa chiwongoladzanja cha 14%, ndipo ntchito iyi yikanjira mu [[Chapter 11 bankruptcy|Bankirapuse ya Chapter 11]] chaka chakulondezgapo.{{cite news |url=https://abcnews.go.com/Politics/donald-trump-filed-bankruptcy-times/story?id=13419250 |first=Amy |last=Bingham |title=Donald Trump's Companies Filed for Bankruptcy 4 Times |work=[[ABC News (United States)|ABC News]] |date=April 21, 2011 |access-date=February 20, 2015}} Mabanki na [[Bond (finance)|ŵakukolezga mabond]] awo ŵakaŵa pangozi yakutaya madola mazana ghanandi gha mamiliyoni, ŵakasankha [[debt restructuring|kunozgaso ngongoli]]. Kuumaliro wa 1990, Trump na Westpride ŵakazomerezgana pulani yinyake yakuleka pulani yakwambilira ya Trump City na kuzenga [[Riverside South, Manhattan|Riverside South]], kwambura chisanja chitali cha Trump ndipo m'malo mwake pakaŵa paki kweniso nyumba zifupi kuluska izo zikaghanaghanirikanga pakwamba za vipinda 76.{{cite web|url=https://www.nytimes.com/1991/08/11/arts/lower-skyline-higher-aspirations.html|title=Lower Skyline, Higher Aspirations|first=Paul|last=Goldberger|newspaper=[[The New York Times]]|date=August 11, 1991}} Mulembi wa vya mapangidwe gha nyumba [[Paul Goldberger]] wakalemba mu ''[[The New York Times]]'' mu Ogasiti 1991 kuti, "Bambo Trump ŵakamanya kuti likeneranga kuŵa dazi lakuzizima chomene mu Ogasiti pambere pulani yawo yindazomerezgeke, ndipo nga ni ndyali waluso waliyose, wakajibatika ku gulu lakususka mwamahara chomene mwakuti vikawoneka nga ni pulani yake yekha." The Taj Mahal wakafumapo ku bankufwa pa Okutobala 5, 1991, apo Trump wakapeleka 50% ya umwini wa kasinosi ku awo ŵakaŵa na mabondi mu malo mwa kususkika kwa viwongolero vya ndalama zakukwereska na kupokera nyengo yinandi yakumalira ngongoli.{{cite news |work=[[The New York Times]] |url=https://www.nytimes.com/1991/10/05/business/company-news-taj-mahal-is-out-of-bankruptcy.html |title=Taj Mahal is out of Bankruptcy |access-date=May 22, 2008 |date=October 5, 1991}} Kweniso wakaguliska ndege yake ya [[Trump Shuttle]] iyo yikaŵa na masuzgo gha ndalama kweniso sitima yake yapachanya ya mamita 282 (86 m), ''[[Kingdom 5KR|Trump Princess]]''.{{cite news |url=http://www.upi.com/Archives/1991/04/09/Trump-reaches-agreement-with-bondholders-on-Taj-Mahal/7261671169600/ |title=Trump reaches agreement with bondholders on Taj Mahal |work=United Press International |date=April 9, 1991 |access-date=March 21, 2016}}{{cite news |url=http://www.people.com/people/archive/article/0,,20122177,00.html |title=The Donald Ducks Out |date=May 19, 1997 |access-date=September 10, 2015 |work=[[People (magazine)|People]] |first=Karen S. |last=Schneider}}{{cite news |url=http://www.phillymag.com/news/2015/08/16/donald-trump-atlantic-city-empire/ |title=The Truth About the Rise and Fall of Donald Trump's Atlantic City Empire |work=Philadelphia Magazine |date=August 16, 2015 |access-date=March 21, 2016 |first=Dan |last=McQuade}} Trump wakasanganga wovwira wa ndalama wa Riverside South kufuma ku ŵamalonda ŵa ku [[Hong Kong]] pafupifupi madola miliyoni 90 gha ku United States, ivyo vikamovwira kulipira ndalama izo wakeneranga kupeleka ku mabanki pa malo agho wakaŵa na ngongoli kweniso pa [[back taxes|misonkho yakale]], ndipo Trump wakapokera 30% ya umwini kweniso kulutilira kulongozga ntchito ya kuzenga zuŵa na zuŵa. Kuyana na loya uyo wakaŵa pafupi na vyakudumbiskana, phangano likapafyanga kusuzgika kumara pamanyuma pakuti Trump "wakayowoya mazgu ghaheni, kusazgapo mazina ghakusuzga gha mitundu ghakuyana na Ŵaasia" pa nyengo ya vyakudumbiskana. Phangano likamovwira Trump kugega kufayiska bankruptcy yake yekha pamanyuma pakuti wakafayiska bankruptcy ya makampani kanayi kumasinda. Malo gha Taj Mahal ghakagulika so mu 1996 ndipo ghakaphatikizgika mu [[Trump Hotels & Casino Resorts]], iyo yikafayiska bankruptcy mu 2004 na ngongoli ya madola mabiliyoni 1.8, ndipo yikafayiskaso bankruptcy vyaka vinkhondi pamanyuma pake na chuma cha madola miliyoni 50 kweniso ngongoli ya madola miliyoni 500. Kukolerana kwa bizinesi pamanyuma pake kukaleka Trump na 10% ya umwini mu Trump Taj Mahal na malo ghanyake gha makasino gha Trump. Trump wakaŵa mulongozgi wa gulu ili, ilo likasintha zina kuŵa Trump Entertainment Resorts, kufuma pakati pa 1995 mpaka kukwambilira kwa 2009, ndipo wakaŵa CEO kufuma pakati pa 2000 mpaka pakati pa 2005.{{cite news |url=http://fortune.com/2016/03/10/trump-hotel-casinos-pay-failure/ |title=How Donald Trump Made Millions Off His Biggest Business Failure |work=[[Fortune (magazine)|Fortune]] |date=March 10, 2016 |access-date=March 21, 2016 |first=Shawn |last=Tully}} === Ma bankruptcy gha bizinesi === {{Further|Vyakupeleka vyakukhwaskana na malango gha Donald Trump#Kugwiliskira ntchito malango gha bankruptcy}} Nangauli Trump wandafayiske bankruptcy yake ya munthu payekha, mahotelo na makasino gha bizinesi yake ghakalengezga [[Chapter 11 bankruptcy|bankruptcy]]{{cite web|last1=Winter|first1=Tom|title=Trump Bankruptcy Math Doesn't Add Up|url=https://www.nbcnews.com/news/us-news/trump-bankruptcy-math-doesn-t-add-n598376|work=[[NBC News]]|date=June 24, 2016 |access-date=October 8, 2016}} kankhondi na kamoza pakati pa 1991 na 2009 chifukwa cha kutondeka kulipira malipiro ghakukhumbikwa kweniso kudumbiskana so vya ngongoli na mabanki, ŵenecho ŵa masheya na mabondi kweniso mabizinesi ghachoko (ŵakupeleka ngongoli ŵambura kuŵikika).{{cite news |url=https://www.vanityfair.com/news/2015/06/donald-trump-companies-bankruptcy-atlantic-city |title=4 Times Donald Trump's Companies Declared Bankruptcy |work=[[Vanity Fair (magazine)|Vanity Fair]] |date=June 29, 2015 |access-date=January 17, 2016 |author=Hood, Bryan}}{{cite news |url=http://www.ibtimes.com/donald-trump-questioned-his-bankruptcies-279717 |first=Hao |last=Li |title=Donald Trump Questioned on His Bankruptcies |work=[[International Business Times]] |date=April 12, 2011 |access-date=February 19, 2015}} Chifukwa chakuti mabizinesi agha ghakagwiliskira ntchito [[Chapter 11 bankruptcy|Chapter 11 bankruptcy]], ghakazomerezgeka kulutilira kugwira ntchito apo vyakudumbiskana vikalutilira. Trump wakazunulika na ''Newsweek'' mu 2011 kuti wakati, "Nkhugwiliskira ntchito malango gha bankruptcy—ghakuniwovwira chomene."{{cite news |last1=Kurtz |first1=Howard |title=Kurtz: The Trump Backlash |url=http://www.newsweek.com/kurtz-trump-backlash-66503 |access-date=March 14, 2016 |work=[[Newsweek]] |date=April 24, 2011}}{{cite news |last1=Stone |first1=Peter |title=Donald Trump's lawsuits could turn off conservatives who embrace tort reform |url=http://www.publicintegrity.org/2011/05/05/4478/donald-trumps-lawsuits-could-turn-conservatives-who-embrace-tort-reform |access-date=March 14, 2016 |work=The Center for Public Integrity |date=May 5, 2011}} Ma bankruptcy ghankhondi ghakaŵa chifukwa cha mabizinesi gha mahotelo na makasino agho ghakaŵa na ngongoli zinandi mu Atlantic City na New York: [[Trump Taj Mahal]] (1991), [[Trump Plaza Hotel and Casino]] (1992), [[Plaza Hotel]] (1992), [[Golden Nugget Atlantic City|Trump Castle Hotel and Casino]] (1992), Trump Hotels and Casino Resorts (2004), kweniso [[Trump Entertainment Resorts]] (2009).{{cite news |url=https://www.forbes.com/sites/clareoconnor/2011/04/29/fourth-times-a-charm-how-donald-trump-made-bankruptcy-work-for-him/ |first=Clare |last=O'Connor |title=Fourth Time's A Charm: How Donald Trump Made Bankruptcy Work For Him |work=[[Forbes]] |date=April 29, 2011 |access-date=February 19, 2015}} Trump wakati, "Nagwiliskira ntchito malango gha charu ichi kuchepeska ngongoli. ... Tizamuŵa na kampani. Tizayiponya mu chaputala. Tizadumbiskana na mabanki. Tizapanga phangano liwemi chomene. Mukumanya, vili nga mu ''The Apprentice''. Vili vya munthu yayi. Ni bizinesi pera." === Chiharo na kugula vinandi === Mu 1996, Trump wakagura nyumba ya maofesi yakusuzgika, ya vipinda 70 pa [[40 Wall Street]] ku Manhattan, wakayinozga, ndipo wakayipa zina la ''The Trump Building''.{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=81–82 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Mu 1998, [[Conseco]] na Trump ŵakagura General Motors Building pa mtengo wa madola miliyoni 878 kufuma ku [[Corporate Property Investors]].{{cite news|first=Charles V.|last=Bagli|url=https://query.nytimes.com/gst/fullpage.html?res=990CEFDB173EF933A15751C0A9649C8B63|title=Heavenly Match Becomes Real Estate War Over the G.M. Building|newspaper=[[The New York Times]]|date=February 20, 2002}}{{cite news|first=Jim|last=Yardley|url=https://query.nytimes.com/gst/fullpage.html?res=990CEEDE163BF932A05756C0A96E958260|title=Trump Buying The Landmark G.M. Building|newspaper=[[The New York Times]]|date=May 31, 1998}}{{cite book|first1=George H.|last1=Ross|first2=Andrew James|last2=McLean|first3=Donald J.|last3=Trump|title=Trump Strategies for Real Estate: Billionaire Lessons for the Small Investor|publisher=John Wiley and Sons|date=February 17, 2006|page=129|isbn=0-471-73643-0}} Gulu likapokera ngongoli ya madola miliyoni 700 kufuma ku [[Lehman Brothers]] pakugula uku ndipo vikayowoyeka kuti Trump wakaŵikamo ndalama zake za pakati pa madola miliyoni 15 na 20 pera pa bizinesi iyi.{{cite news|url=https://nypost.com/1999/04/18/trump-the-smarts-of-the-deal-how-donald-uses-mostly-other-peoples-money-to-build-a-kingdom-in-his-name/|title=Trump: The Smarts Of The Deal; How Donald Uses (Mostly) Other People's Money To Build A Kingdom In His Name|date=April 18, 1999|newspaper=[[New York Post]]|last=Salkin|first=Allen}} Trump wakakwezga malo gha pakati pa nyumba agho ghakaŵa pasi (sunken plaza), uko ŵanthu ŵachoko ŵakendangako, ndipo ghakanyozeka na Huxtable{{clarify|reason=Who is Huxtable?|date=December 2023}}, ndipo wakalembapo zina lake mu zilembo zagolide vya utali wa futi zinayi.{{cite news|url=https://query.nytimes.com/gst/fullpage.html?res=9F02E6DB1F3AF933A05755C0A96F958260| first=David W.|last=Dunlap|title=Courtyard Is Rising With New Look|newspaper=[[The New York Times]]|date=June 30, 1999|access-date=July 18, 2014}} Mu 2003, Trump na ŵanyake ŵakaguliska nyumba iyi pa mtengo wa madola biliyoni 1.4, uwo ukaŵa mtengo wapachanya chomene kulipirapo nyumba ya maofesi ku North America pa nyengo iyo, kwa [[Harry B. Macklowe|Macklowe Organization]].{{cite news|first=Charles V.|last=Bagli|url=https://query.nytimes.com/gst/fullpage.html?res=9400E7DE1738F933A0575BC0A9659C8B63|title=G.M. Building Sells for $1.4 Billion, a Record|newspaper=[[The New York Times]]|date=August 30, 2003|access-date=July 18, 2014}}{{cite news|first=Elaine|last=Misonzhnik|url=http://www.thefreelibrary.com/Macklowe+pays+%241.4B+for+GM+building%2c+highest+ever+paid+in+North...-a0109133630|title=Macklowe pays $1.4B for GM building, highest ever paid in North America|work=[[Real Estate Weekly]]|date=September 3, 2003|access-date=July 18, 2014}} Pamanyuma pa nyifwa ya awiske mu 1999, Trump na ŵabali ŵake ŵakapokera vigaŵa vyakuyana{{citation needed|date=March 2017}} vya chiharo cha awiske icho chikaŵa na mtengo wa madola 250–300 miliyoni.{{cite news |url=https://www.nytimes.com/1999/06/26/nyregion/fred-c-trump-postwar-master-builder-of-housing-for-middle-class-dies-at-93.html |title=Fred C. Trump, Postwar Master Builder of Housing for Middle Class, Dies at 93 |first=Tracy |last=Rozhon |date=June 26, 1999 |access-date=August 19, 2015 |work=[[The New York Times]]}} Mu 2001, Trump wakamalizga kuzenga [[Trump World Tower]], nyumba ya vipinda 72 ya ŵakukhala iyo yili pandunji pa [[Likuru la United Nations]].{{cite web |publisher=[[Emporis]] |url=http://www.emporis.com/en/wm/bu/?id=100377 |archive-url=https://web.archive.org/web/20040406233951/http://www.emporis.com/en/wm/bu/?id=100377 |url-status=usurped |archive-date=April 6, 2004 |title=Trump World Tower |access-date=May 22, 2008}} Trump wakambaso kuzenga [[Riverside South, Manhattan|Riverside South]], iyo wakayipanga zina la [[Trump Place]], chitukuko cha nyumba zinandi mumphepete mwa [[Mlonga wa Hudson]]. Wakapitilira kuŵa na malo gha malonda mu [[Trump International Hotel and Tower (New York)|Trump International Hotel and Tower]], nyumba ya vipinda 44 yakusazgapo mahotelo na ma kondomu pa [[Columbus Circle]] iyo wakagura mu 1996,{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |page=108 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} kweniso wakalutilira kuŵa na mamiliyoni gha masikweya futi gha malo ghanyake ghakuzirwa gha ku [[Manhattan]].{{cite news |work=[[Forbes]] |url=https://www.forbes.com/2006/09/20/trump-wealth-biz_06rich400_0921trump.html |title=What is Trump Worth? |access-date=July 4, 2008 |date=September 21, 2006 |first=Stephane |last=Fitch}} Trump wakagura hotelo yakale ya Hotel Delmonico ku Manhattan mu 2002. Yikajulika so mu 2004 na vipinda 35 vya ma kondomu gha uchindami ndipo yikachemeka [[Trump Park Avenue]].{{cite book |last=Wooten |first=Sara McIntosh |date=2009 |title=Donald Trump: From Real Estate to Reality TV |pages=86–87 |publisher=Enslow Publishing, LLC |isbn=978-0-7660-2890-6}} Trump waŵa na nyumba pa North [[Rodeo Drive]] mu chigaŵa cha [[Beverly Hills, California]]/[[Los Angeles]] kufuma mu 2007, iyo wakagura pa mtengo wa madola 7 miliyoni. Mu 2008 wakagura nyumba yinyake pafupi na iyi kufuma kwa [[Omar Bongo]], pulezidenti wa [[Gabon]] uyo wakafwa apo wakaŵa mu udindo mu 2009, pa mtengo wa madola 10.35 miliyoni. Trump wakaguliska nyumba yachiŵiri ya ku Los Angeles, iyo yikazengeka mu 1981, pa mtengo wa madola 9,500,095 mu 2009, ndipo wakataya madola 850,000 (8%). Nyumba yachiŵiri yikaweleraso pa msika pakati pa 2016 ndipo yikalembeka pafupifupi madola 30 miliyoni.Leitereg, Neal J., [https://www.latimes.com/business/realestate/hot-property/la-fi-hp-hotprop-20160827-snap-story.html "Daren Metropoulos takes ownership of Playboy Mansion, Hef included > A residential 'Trump' card"], ''[[Los Angeles Times]]'', August 27, 2016. The Trump properties have no relationship to the [[Playboy Mansion]]. It is a five-part 'listings and sales' story with the Playboy the lead part and the Trumps the fourth. Retrieved January 15, 2017. Trump [[The Trump Organization#Real estate licensing|wakapeleka layisensi ya zina na chithuzi chake]] kuti vigwiriskike ntchito pa chitukuko cha mapurojekiti ghanandi gha malo, kusazgapo mapurojekiti gha malo gha Trump ghaŵiri mu Florida agho ghakaŵa mu ndondomeko ya kutoleka na mabanki chifukwa cha kutondeka kulipira ngongoli.{{cite news |url=http://www.miamiherald.com/opinion/opn-columns-blogs/carl-hiaasen/article27059140.html |title=Carl Hiaasen: There will never be a President Trump |work=[[Miami Herald]] |date=July 11, 2015 |access-date=September 1, 2015 |first=Carl |last=Hiaasen}} Mwenecho wa ku Turkey wa [[Trump Towers Istanbul]], uyo wakalipiranga Trump kuti wagwiliskire ntchito zina lake, wakayowoyeka mu Disembala 2015 kuti wakapenjanga nthowa za malango kuti watimbanizge malo agha na Trump pamanyuma pa ivyo munthu uyo wakaŵa mupharazgi wa visola wakayowoya vya kujalira kanyengo Ŵasilamu awo ŵakukhumba kunjira mu United States.{{cite news |url=http://mobile.reuters.com/article/idUSKBN0TU0JD20151211 |title=Turkish partner condemns Donald Trump's anti-Muslim remarks, reviews ties |date=December 11, 2015 |access-date=December 11, 2015 |work=[[Reuters]]}} Trump wakapelekaso layisensi ya zina lake kwa mkamwana wake wa munakazi [[Jared Kushner]] wa [[Trump Bay Street]], nyumba ya vipinda 50 ya uchindami ku [[Jersey City]], iyo yikakwezga madola miliyoni 50 gha ndalama zake zakwenera kuŵa miliyoni 200, chomene kufuma ku ŵanthu ŵasambazi ŵa [[Han Chinese|Ŵachina]], awo pamanyuma pakulipira ndalama zakwamba za madola 500,000 mwakukolerana na ndondomeko ya boma ya [[EB-5 visa]], kanandi ŵangasanga wanangwa wakukhala mu United States kwa iwo na mbumba zawo pamanyuma pa vyaka viŵiri.{{cite news |url=https://www.bloomberg.com/politics/articles/2016-03-07/trump-tower-financed-by-rich-chinese-who-invest-cash-for-visas |title=Trump Tower Funded by Rich Chinese Who Invest Cash for Visas |date=March 6, 2016 |access-date=March 7, 2016 |work=[[Bloomberg News|Bloomberg]] |first=Jesse |last=Drucker}} Trump ni munyake wa [[Kushner Properties]] pa nkhani ya kupereka layisensi ya zina pera, kweni yayi pa nkhani ya ndalama zakuzengera nyumba iyi. Mu 2012, nyumba yitali ya 1290 Avenue of the Americas ku Manhattan yikapangaso ndondomeko yiphya ya ngongoli; Trump wakaŵa na 30% ya chigaŵa mu nyumba iyi. Kupanga so ngongoli kukapangiska kuti paŵe ngongoli ya madola miliyoni 211 kufuma ku [[Bank of China]] iyo ni ya boma. Ichi chikaŵa chakwamba kuti banki ya ku China yinjire mu [[commercial mortgage-backed securities]] mu United States. Bank of China yikaguliska ngongoli iyi mu 2012 mu msika, ntheura yikati yikaŵavya "umwini uliwose pa ngongoli iyi" kufuma apo. Chikalata cha 2017 icho chikapelekeka mu New York City chikayika Bank of China mwambura kwenelera nga ni [[ŵakukongozga|creditor]] wa nyengo iyi chifukwa cha kwananga kwa gulu ilo likapweleleranga ngongoli la [[Wells Fargo]]. === Malo gha gofu === {{See also|Donald Trump and golf}} [[File:Turnberry Hotel.jpg|thumb|alt=A wide, sprawling golf course. In the background is the Turnberry Hotel, a two-story hotel with white facade and a red roof. This picture was taken in Ayrshire, Scotland.|[[Turnberry Hotel]] in [[South Ayrshire]], Scotland]] Gulu la Trump likulamulira malo ghanandi gha [[maseŵera gha gofu]] na mahotelo gha mpumulo mu United States kweniso pa charu chose. Chiŵelengero cha malo gha gofu agho Trump wali nagho panji kulongozga chiri pafupifupi 18, kuyana na ''[[Golfweek]]''.{{cite news |first=Brentley |last=Romine |title=Donald Trump announces he will run for president in 2016 |date=July 14, 2015 |website=[[Golfweek]] |url=http://golfweek.com/news/2015/jun/16/donald-trump-us-president-2016-gop-golf-courses/ |url-status=dead |archive-url=https://web.archive.org/web/20160317081800/http://golfweek.com/news/2015/jun/16/donald-trump-us-president-2016-gop-golf-courses/ |archive-date=March 17, 2016 }} Chikalata cha ndalama za Trump icho wakapeleka ku [[Federal Election Commission]] chikayowoya kuti ndalama izo wakasanga kufuma ku gofu na malo gha mpumulo mu 2015 zikaŵa pafupifupi madola miliyoni 382.{{cite news |url=https://money.cnn.com/2016/05/18/news/trump-finances/ |archive-url=https://web.archive.org/web/20160518215705/http://money.cnn.com/2016/05/18/news/trump-finances/ |url-status=dead |archive-date=May 18, 2016 |title=A peek at Donald Trump's finances |first1=Cristina |last1=Alesci |first2=Laurie |last2=Frankel |first3=Jeanne |last3=Sahadi |publisher=[[CNN]] |date=May 19, 2016 |access-date=May 20, 2016}} Mu 2006, Trump wakagura malo gha Menie Estate mu [[Balmedie]], Aberdeenshire, Scotland, ndipo wakapanga malo gha gofu kwambura kukolerana na ivyo ŵanthu ŵakukhala mu malo agha ŵakakhumbanga{{cite news |url=http://upstart.bizjournals.com/views/columns/the-windup/2008/02/22/Scottish-Clash-Over-Trump-Golf-Plan.html?page=all |title=Landing In The Rough With Trump |date=February 22, 2008 |work=Upstart Business Journal |first=Franz |last=Lidz |author-link=Franz Lidz |access-date=March 14, 2016 |url-status=dead |archive-url=https://web.archive.org/web/20160405080648/http://upstart.bizjournals.com/views/columns/the-windup/2008/02/22/Scottish-Clash-Over-Trump-Golf-Plan.html?page=all |archive-date=April 5, 2016 }} mu chigaŵa icho chikaŵa cha [[Site of Special Scientific Interest]].{{cite news |first=Carolyn |last=Churchill |url=http://www.heraldscotland.com/news/home-news/first-look-at-trump-plan-for-world-s-best-course-1.1007048?54107 |archive-url=https://web.archive.org/web/20130521014558/http://www.heraldscotland.com/news/home-news/first-look-at-trump-plan-for-world-s-best-course-1.1007048?54107 |archive-date=May 21, 2013 |title=First look at Trump plan for 'world's best course{{'-}} |work=[[The Herald (Glasgow)|The Herald]] |location=Glasgow |date=February 16, 2010 |access-date=June 18, 2012}}{{cite news |first=Laurie |last=Tuffrey |url=https://www.theguardian.com/environment/2012/jul/10/donald-trump-scotland-golf-course |title=Trump opens controversial Scottish golf course |access-date=August 9, 2015}} Chikalata chakujiyimira payekha cha mu 2011, ''[[You've Been Trumped]],'' icho chikapangika na wopanga mafilimu wa ku Britain Anthony Baxter, chikulongosora umo malo gha gofu ghakazengekera kweniso masuzgo agho ghakaŵapo pakati pa ŵanthu ŵakukhala mu malo agha na Donald Trump.{{cite news |first=Roger |last=Ebert |date=October 17, 2012 |url=https://www.rogerebert.com/reviews/youve-been-trumped-2012 |title=You've Been Trumped |work=Rogerebert.com |access-date=January 19, 2016}} Mu Disembala 2015, pempho la Trump lakususka malo ghakupangira nkhongono ya mphepo pa nyanja ([[Aberdeen Bay Wind Farm]]) agho ghakaŵa mukuwoneka kufuma ku malo gha gofu likakanika.{{cite news |first1=Owen |last1=Bowcott |first2=Esther |last2=Addley |url=https://www.theguardian.com/us-news/2015/dec/16/donald-trump-loses-appeal-windfarms-scottish-golf-course |title=Alex Salmond brands Trump 'loser' after judges reject windfarm appeal | Environment |work=[[The Guardian]] |date=December 16, 2015 |access-date=December 16, 2015}} Nangauli Trump wakalayizga ntchito 6,000, mu 2016, mwakuyana na mazgu ghake, malo gha gofu ghakapeleka waka ntchito 200.{{cite news |first=John |last=Sweeney |url=https://www.independent.co.uk/news/uk/home-news/Donald-Trump-fails-to-deliver-on-golf-resorts-jobs-pledge-8693854.html |title=Donald Trump fails to deliver on golf resort jobs pledge |work=[[The Independent]] |date=July 7, 2013 |access-date=January 19, 2016}} Mu Juni 2019, [[Scottish Natural Heritage]] yikati malo gha gofu ghakaŵa "ghananga" ndondomeko ya tumapiri twa mchenga, ndipo vikapangiska kutayika kwamuyirayira kwa malo ghakukhala vinyama, ndipo yikayowoya kuti udindo wa SSSI ulekeke.{{cite news |first=Glenn |last=Campbell |url=https://www.bbc.co.uk/news/uk-scotland-48789620 |title='Destroyed' Trump golf course dunes to lose special status |work=[[BBC News]] |date=June 28, 2019 |access-date=June 28, 2019}} Udindo wapadera ukafumiskikapo mu Disembala 2020.{{cite news |url=https://www.bbc.com/news/uk-scotland-north-east-orkney-shetland-55244660 |title=Trump golf course dunes lose special environmental status |work=[[BBC News]] |date=December 9, 2020 |access-date=January 1, 2021}} Mu Epulero 2014, Trump wakagura hotelo ya [[Turnberry (golf course)|Turnberry]] na malo gha gofu ku [[Ayrshire]], Scotland, agho ghakaŵa chigaŵa chakuzomerezgeka nyengo zose mu ndondomeko ya [[the Open Championship]].{{cite news |url=https://www.bbc.co.uk/news/uk-scotland-glasgow-west-27203208 |title=US property tycoon Donald Trump buys Turnberry resort |work=[[BBC News]] |date=April 29, 2014 |access-date=April 29, 2014}}{{cite news |url=https://www.bbc.co.uk/sport/golf/27212412 |title=Turnberry: Donald Trump deal should not affect Open status |work=[[BBC News]] |date=April 29, 2014 |access-date=April 29, 2014 |first=Iain |last=Carter}} Pamanyuma pa [[2021 United States Capitol attack|nkhondo ya pa nyumba ya boma ya United States mu 2021]], awo ŵakapanga mashindano agha, [[The R&A]], ŵakapharazga kuti The Open lizamuŵakoso yayi ku Turnberry apo kukakhala kukolerana kwake na Trump Organization.{{Cite web|title=The R&A - R&A Turnberry Statement|url=https://www.randa.org/en/news/2021/01/turnberry-statement|access-date=2021-07-15|website=www.randa.org|language=en|archive-date=July 18, 2021|archive-url=https://web.archive.org/web/20210718023125/https://www.randa.org/en/news/2021/01/turnberry-statement|url-status=dead}}{{Cite news|title=The Open will not be played at iconic Turnberry while it is owned by Donald Trump|url=https://www.skysports.com/golf/news/12176/12185726/the-open-will-not-be-played-at-iconic-turnberry-while-it-is-owned-by-donald-trump |date=January 12, 2021 |access-date=January 1, 2022|website=Sky Sports}} == Masipoti gha maseŵera == {{see also|Donald Trump and American football}} [[File:Donald Trump delivering a press conference in the Trump Tower.jpg|thumb|Trump wakuyowoya mazgu pa ungano wa ŵanyamakuru wa [[New Jersey Generals]] mu 1985.]] [[File:President Trump at the World Series Game (48975694762).jpg|thumb|upright=0.9|Pulezidenti Donald J. Trump wakuzungunya mawoko ku wumba wa ŵanthu pa Game 5 ya MLB World Series pakati pa Washington Nationals na Houston Astros pa Sabata, Okutobala 27, 2019, pa Nationals Park ku Washington, D.C.]] Mu 1983, [[New Jersey Generals]] ya Trump yikaŵa yumoza mwa ŵambura kwambura mu gulu liphya la [[United States Football League]] (USFL). Pambere nyengo yakwamba yindambe mu 1983, Trump wakaguliska timu iyi kwa J. Walter Duncan, munthu musambazi wa mafuta ku [[Oklahoma]], ndipo wakayigulaso pamanyuma pa nyengo iyo. Pamanyuma wakayezga kumutora kochi wa nyengo yitali wa [[Miami Dolphins]] [[Don Shula]], kweni phangano likatondeka chifukwa chakuti wakakhumba yayi kuzomera ivyo Shula wakakhumbanga vya nyumba mu [[Trump Tower]]. Trump paumaliro wakasankha kochi wakale wa [[New York Jets]] [[Walt Michaels]].{{cite news |url=https://www.nytimes.com/1984/04/04/sports/sports-people-new-jersey-generalities.html |title=Sports People; New Jersey Generalities |access-date=February 11, 2011 |date=April 4, 1984 |work=[[The New York Times]]}}{{cite news |first=Dave |last=Anderson |title=Trump Ace: Michaels |date=December 12, 1983 |website=[[The New York Times]] |url=https://www.nytimes.com/1983/12/12/sports/trump-ace-michaels.html}} USFL yikaseŵera nyengo zitatu zakwamba mu chihanya na chilimika, kweni Trump wakakopa ŵenecho ŵanandi ŵa timu zinyake za USFL kuti ŵasinthe ndondomeko ya 1986 ya USFL kuŵa mu nyengo ya chihanya, mwakuyana na [[National Football League]] (NFL), chifukwa wakaghanaghananga kuti ichi chizamuchitiska kuti pamasinda paŵe kuphatikizika na NFL, ndipo ivi vikatenge vikusazgirenge chomene ndalama izo ŵakaŵikamo.{{cite news |url=https://www.washingtonpost.com/lifestyle/style/and-then-there-was-the-time-donald-trump-bought-a-football-team-/2015/10/19/35ae71ca-6dd6-11e5-aa5b-f78a98956699_story.html |title=And then there was the time Donald Trump bought a football team |newspaper=[[The Washington Post]] |date=October 19, 2015 |access-date=January 17, 2016 |author=Terris, Ben}} Pambere nyengo ya 1985 yindambe, Trump wakasayina [[Heisman Trophy]]-wakupokera mphotho wa quarterback [[Doug Flutie]] pa phangano la ntchito za vyaka 5 la madola 7 miliyoni. Ichi chikapangiska Flutie kuŵa mchezgani wa mpira wa malipiro ghapachanya chomene pa nyengo iyo, kweniso rookie wa malipiro ghapachanya chomene mu maseŵera ghaliyose gha ulendo.{{cite news|url=https://www.nytimes.com/1985/02/04/sports/be-honest-mr-trump.html|title=Be Honest, Mr. Trump|last=Anderson|first=Dave|work=[[The New York Times]]|date=February 4, 1985|access-date=October 7, 2016}} Pamanyuma pa nyengo iyo, Generals zikakolerana na [[Houston Gamblers]]. Trump wakaŵa na 50% ya umwini wa timu yiphya iyo yikeneranga kukhala mu New Jersey na kusunga zina lakuti Generals. Pa nyengo iyo, Trump wakajikuzga kuti "mbwenu iyi ni timu yiwemi chomene mu mpira." (New Jersey na Houston zose zikaŵa na nyengo ziwemi kweni zikaŵavya nyengo zakuzizwiska mu 1985: zose zikafika mu playoffs kweni zikathereska mu maseŵero ghakwamba.) Generals zikaseŵeraso yayi maseŵero ghanyake.{{cite news |first=Robert McG. Jr. |last=Thomas |title=Generals-Gamblers merger is official |date=August 2, 1985 |website=[[The New York Times]] |url=https://www.nytimes.com/1985/08/02/sports/generals-gamblers-merger-is-official.html}} Nyengo ya 1986 yikakanika pamanyuma pakuti USFL yikasanga [[pyrrhic victory|chitumbiko chakukwera mtengo kweni kwambura chandulo chikuru]] mu mulandu wa [[United States Football League#USFL v. NFL lawsuit|kususkana na NFL]] wa [[antitrust|malango ghakutondeska ukhali wa mabizinesi]]: NFL yikataya mwalamulo mulandu, kweni USFL yikapokera waka madola 3 gha ndalama zakulipira. USFL, iyo yikaŵa kuti yachepa kufuma pa timu 18 zakwamba kufika pa timu 7 pera izo zikagwiranga ntchito, yikamara pamanyuma pake.{{cite news |first=Arash |last=Markazi |title=5 things to know about Donald Trump's foray into doomed USFL |date=July 14, 2015 |publisher=[[ESPN]] |url=https://www.espn.com/espn/story/_/id/13255737/five-things-know-donald-trump-usfl-experience}}{{cite news |last=Pearlman |first=Jeff |url=https://www.theguardian.com/sport/2018/sep/11/the-day-donald-trumps-narcissism-killed-the-usfl |title=The day Donald Trump's narcissism killed the USFL |work=[[The Guardian]] |date=September 11, 2018 |access-date=August 13, 2025}} Trump wakalongora kuti wakakhumbanga kugura [[Cleveland Indians]] pa mtengo wa madola 13 miliyoni mu kalata ya Febuluwale 15, 1983 iyo yikalembeka na [[Kenneth Molloy]] kuluta kwa pulezidenti wa timu [[Gabe Paul]]. Trump wakasazgirako mtengo wake kufika pa madola 34 miliyoni mu chaka chenecho. Kutondeka kwake kulayizga kuti wasungenge timu iyi mu [[Cleveland]] kwa vyaka vitatu vyekha kukamutondeska kumalizga kugula uku.[http://www.cleveland.com/opinion/index.ssf/2015/10/donald_trumps_bid_for_the_clev.html Larkin, Brent. "Donald Trump's failed bid to buy the Cleveland Indians", ''The Plain Dealer'' (Cleveland), Thursday, October 8, 2015.] Trump wakalutilira kuŵa wakukhwaskika na maseŵera ghanyake pamanyuma pakuti Generals yamara, ndipo wakalutilira kulongozga malo gha gofu mu vyaru vinandi. Kweniso wakanozga maseŵero ghanandi gha nkhonya mu Atlantic City pa Trump Plaza, kusazgapo [[Mike Tyson vs. Michael Spinks|nkhonya ya Mike Tyson ya 1988]] yakulimbana na [[Michael Spinks]], ndipo nyengo yinyake wakaŵa wakupereka ulongozgi wa ndalama kwa [[Mike Tyson|Tyson]].{{cite news |url=https://www.nytimes.com/1988/07/12/sports/sports-of-the-times-trump-promoter-or-adviser.html |title=Sports of The Times; Trump: Promoter Or Adviser? |access-date=February 11, 2011 |date=July 12, 1988 |work=[[The New York Times]] |author=Anderson, Dave}}{{cite news |url=https://www.nytimes.com/1988/02/25/sports/trump-gets-tyson-fight.html |title=Trump Gets Tyson Fight |access-date=February 11, 2011 |date=February 25, 1988 |work=[[The New York Times]]}} Mu 1988, Trump wakagura kavalo ka mpikisano ka mtundu wa thoroughbred zina lake "D.J. Trump" pa mtengo wa madola 500,000, ndipo kakasambizgika na [[H. Allen Jerkens|Allen Jerkens]]. Kavalo aka kakatondeka kuchita mpikisano chifukwa cha matenda gha virus ndipo kakamba kuŵa na masuzgo ghakuru gha malundi. Ŵakuchizga ŵakachita nthowa yakofya kuti ŵawovwire tumakandiro twa kavalo kuti tukure so, kweni kakatondeka kuchita mpikisano. Kavalo aka kakafwa vyaka vitatu pamanyuma mu 1991.{{Cite news |date=2017-05-19 |title=The sad saga of thoroughbred D.J. Trump, Donald Trump's lone foray into horse racing |url=https://www.washingtonpost.com/news/sports/wp/2017/05/19/the-sad-saga-of-thoroughbred-d-j-trump-donald-trumps-lone-foray-into-horse-racing/ |access-date=2025-11-02 |newspaper=The Washington Post |language=en-US |issn=0190-8286}} Mu 1989 na 1990, Trump wakapeleka zina lake ku [[Tour de Trump]], mpikisano wa njinga uwo ukaŵa wakuyezga kupanga mpikisano wa ku America wakuyanako na mipikisano ya ku Europe nga ni [[Tour de France]] panji [[Giro d'Italia]]. Zina ili likapelekeka na munyake wa bizinesi, wakuyowoya vya mpira wa basketball [[Billy Packer]], uyo pakwamba wakakhumbanga kuchema mpikisano uwu kuti Tour de [[New Jersey|Jersey]]. Chigaŵa chakwamba cha mpikisano wakwamba chikamara mu msumba wa ŵasambiri wa [[New Paltz (village), New York|New Paltz, New York]], uko ŵakususka ŵakalindilira ŵaseŵeri na vimanyikwiro vyakususkana na Trump. Chigaŵa chachiŵiri chikambira mu New York City, ndipo [[Mayor of New York|Meya]] [[Ed Koch]], uyo wakayowoya kuti Trump ni "yumoza mwa ŵakupusika ŵakuru", wakakana kwiza ku ungano uwu. Chigaŵa chaumaliro cha mpikisano wa mtunda wa 837 miles wa ma stage 10 chikaŵa chakususka chomene. Pambere chigaŵa chaumaliro chindambe, msesele wa ku Belgium [[Eric Vanderaerden]] wakawonengeka kuti ndiyo wangatora chiphalizgano ichi, kweni wakataya nyengo ya sekondi 1 miniti na 20 chifukwa wakasankha nthowa yiheni pa msewu uwo ukaŵa na vimanyikwiro vyambura kuwoneka makora mu [[Atlantic City]], ndipo wakendapo mtunda wa kotala la mailo panji kujumphapo pa nthowa yake. Paumaliro wakamalira malo gha chitatu mu mpikisano wose, pamanyuma pa wakuluska [[Dag-Otto Lauritzen]] (msesele wa ku Norway uyo wakaŵa mu timu ya ku America ya [[7-Eleven (cycling team)|7-Eleven team]]) na wakatora malo gha chiŵiri [[Henk Lubberding]], uyo nayo wakasankha nthowa yiheni mu chigaŵa chaumaliro. Trump wakalekezga kovwira ndalama pa Tour de Trump yachiŵiri mu 1990 chifukwa mabizinesi ghake ghanyake ghakaŵa na masuzgo gha ndalama. Mpikisano uwu ukalutilira vyaka vinyake nga ni Tour DuPont.{{cite web|url=https://www.politico.com/magazine/story/2016/04/donald-trump-2016-tour-de-trump-bike-race-213801/|title=The Strange Tale of Donald Trump's 1989 Biking Extravaganza|website=[[Politico]] |date=April 10, 2016 }}{{cite news|url=https://www.nytimes.com/1989/05/15/sports/dispute-mars-end-of-the-tour-de-trump.html|title=Dispute Mars End of the Tour de Trump|first=Frank|last=Litsky|work=[[The New York Times]]|date=May 15, 1989|access-date=April 12, 2016}} Trump wakapeleka pempho la [[stalking horse bidder|wakwamba wakugula]] pa [[Buffalo Bills]] apo timu iyi yikaguliskikanga pamanyuma pa nyifwa ya [[Ralph Wilson]] mu 2014; paumaliro wakathereskeka pa malonda agha, nga umo wakaghanaghaniranga, ndipo [[Kim Pegula|Kim]] na [[Terrence Pegula]] ndiwo ŵakapokera timu iyi.{{cite news |url=http://www.torontosun.com/2014/07/29/probably-few-new-bidders-will-bid-today-for-bills |title=Probably few new bidders will bid today for Bills |date=July 29, 2014 |access-date=July 30, 2014 |first=John |last=Kryk |newspaper=[[Toronto Sun]]}} Pa nyengo iyo wakachitanga chiphalizgano cha visola vya pulezidenti mu 2016, wakasuska malango ghaphya gha NFL gha kuvikilira awo ŵakupwetekeka ku mutu, ndipo wakadandawura kuti maseŵero agha ghapangika kuŵa "ghapasi" na "ghakulopwa", ndipo wakati kupweteka ku mutu nkhwakuyana waka na "kugwazika pachanya pa mutu." Wakapokera ŵakwendeska maseŵero mulandu wakuti ŵakuponya [[penalty flag|vimanyikwiro vya chilango]] kwambura chifukwa kuti ŵawonekere pa TV "kuti ŵawoli ŵawo ŵaŵawone ku nyumba."{{cite news |first=Chuck |last=Schilken |date=October 13, 2016 |url=https://www.latimes.com/sports/nfl/la-sp-donald-trump-nfl-concussions-20161013-snap-story.html |title=Video: Donald Trump mocks the NFL for being too soft, calls concussions 'a little ding on the head' |work=[[Los Angeles Times]]}} Mu 2012, kilabu ya bola ya ku Scotland [[Rangers F.C.|Rangers]] yikaŵa mu suzgo la ndalama, ndipo chikapangiska kuti yiŵe mu ndondomeko ya [[Administration and liquidation of the Rangers Football Club plc|kulipiskika na kupanga so]]. Trump wakaghanaghananga kugura kilabu iyi, kweni wakawelera nyuma chifukwa cha ukuru wa masuzgo gha ndalama agho yikaŵa nagho.{{cite news |title=When US President Donald Trump backed out of buying Rangers |url=https://www.scotsman.com/sport/football/when-us-president-donald-trump-backed-out-of-buying-rangers-1462839 |access-date=November 16, 2024 |work=[[The Scotsman]] |date=November 9, 2016}}{{cite news |title=How Donald Trump almost bought Rangers (and Pablo Escobar's club) |url=https://www.theguardian.com/football/copa90/2017/jan/26/donald-trump-rangers-football-club-pablo-escobar |access-date=November 16, 2024 |work=[[The Guardian]] |date=January 26, 2017}} == Mapikisheni gha urembo == {{Further |Miss USA |Miss Universe|Miss Teen USA}} Kufuma mu 1996 mpaka 2015, apo wakaguliska chigaŵa chake cha umwini,<ref name=pageantsaleWME>{{cite news |url=https://www.nytimes.com/2015/09/15/business/media/trump-sells-miss-universe-organization-to-wme-img-talent-agency.html |title=Trump Sells Miss Universe Organization to WME-IMG Talent Agency |date=September 15, 2015 |work=[[The New York Times]] |access-date=January 9, 2016}}</ref> Trump wakaŵa na chigaŵa panji umwini wose wa mapikisheni gha urembo gha [[Miss Universe]], [[Miss USA]], na [[Miss Teen USA]]. Miss Universe yikamba kuwoneka pa [[CBS]], ndipo Miss Universe na Miss USA zose zikasintha kuluta ku [[NBC]] mu 2002.<ref>{{cite news |url=https://www.nytimes.com/2002/06/22/business/three-beauty-pageants-leaving-cbs-for-nbc.html |title=Three Beauty Pageants Leaving CBS for NBC |date=June 22, 2002 |first=Jim |last=Rutenberg |access-date=August 14, 2016 |work=[[The New York Times]]}}</ref><ref>{{cite news |url=https://www.washingtonpost.com/archive/lifestyle/2002/06/22/there-she-goes-pageants-move-to-nbc/2ba81b9a-bf67-4f3e-b8d6-1c2cc881ed19/ |title=There She Goes: Pageants Move to NBC |date=June 22, 2002 |first=Lisa |last=de Moraes |newspaper=[[The Washington Post]] |access-date=August 14, 2016}}</ref> Mu 2012, Trump wakapokera mphotho ya madola 5 miliyoni mu ndondomeko ya kususka phangano kwa mupikisana uyo wakayowoya kuti chiwonetsero ichi chikanozgeka kale.<ref>{{cite news|url=http://www.nydailynews.com/news/national/pay-usa-contestant-ordered-fork-5-million-donald-trump-calling-pageant-rigged-article-1.1390931|title=Miss USA contestant ordered to pay $5 million to Donald Trump for calling pageant 'rigged'|newspaper=[[New York Daily News]]|date=July 5, 2013|first1=Barbara|last1=Ross|first2=Larry|last2=McShane}}</ref> Mu 2015, NBC na [[Univision]] zose zikamara ubwezi wawo wa bizinesi na Miss Universe Organization mu nyengo ya chiphalizgano cha Trump cha kuŵa pulezidenti.<ref name="Tadena1">{{cite news |first=Natalie |last=Tadena |date=July 2, 2015 |url=https://blogs.wsj.com/cmo/2015/07/02/donald-trumps-miss-usa-pageant-lands-on-reelz-cable-channel/ |title=Donald Trump's Miss USA Pageant Lands on Reelz Cable Channel |work=[[The Wall Street Journal]]}}</ref><ref>{{cite news |author=Washington Post Staff |title=Full text: Donald Trump announces a presidential bid |date=June 16, 2015 |newspaper=[[The Washington Post]] |url=https://www.washingtonpost.com/news/post-politics/wp/2015/06/16/full-text-donald-trump-announces-a-presidential-bid/}}</ref> Pamanyuma pake Trump wakapharazga kuti wakaŵa mwenecho yekha wa Miss Universe Organization chifukwa wakagura chigaŵa cha NBC.<ref name="Corriston11Sept">{{cite news |url=http://www.people.com/people/mobile/article/0,,20951882,00.html |title=Donald Trump Says He Bought Out NBC, Now Owns All of Miss Universe Organization |date=September 11, 2015 |access-date=September 11, 2015 |work=[[People (magazine)|People]] |first=Michele |last=Corriston|url-status=dead|archive-url=https://web.archive.org/web/20150925081034/http://www.people.com/people/mobile/article/0,,20951882,00.html|archive-date=September 25, 2015 }}</ref> Wakaguliska umwini wake mu mapikisheni agha nyengo yichoko pamanyuma pake kwa [[William Morris Endeavor|WME]]/[[IMG (company)|IMG]].<ref name="pageantsaleWME" /> Mu 1999, vyaka vichoko pamanyuma pa kugura chigaŵa mu Miss Universe, Trump wakambiska kampani ya masambiro gha ŵanthu ŵakuwoneka, [[Trump Model Management]], iyo yikugwira ntchito mu chigaŵa cha [[SoHo]] mu [[Lower Manhattan]].<ref>{{cite news |first1=Blake |last1=Ellis |first2=Melanie |last2=Hicken |title=Trump's modeling agency broke immigration laws, attorneys say |url=https://money.cnn.com/2016/03/10/news/trump-model-visas/ |archive-url=https://web.archive.org/web/20160311032312/http://money.cnn.com/2016/03/10/news/trump-model-visas/ |url-status=dead |archive-date=March 11, 2016 |access-date=March 17, 2016 |publisher=[[CNN]] |date=March 10, 2016}}</ref> Pamoza na kampani yinyake ya Trump, Trump Management Group LLC, Trump Model Management yikizanga ŵanthu ŵanandi ŵakuwoneka ŵakufuma ku vyaru vinyake kunjira mu United States kuti ŵagwire ntchito mu [[fashion industry|makampani gha mafashoni]] kufuma mu 2000.<ref>{{cite news |first1=Mica |last1=Rosenberg |first2=Ryan |last2=McNeill |first3=Megan |last3=Twohey |first4=Michelle |last4=Conlin |title=Exclusive&nbsp;– Donald Trump's companies have sought visas to import at least 1,100 workers |url=http://uk.reuters.com/article/uk-usa-election-trump-exclusive-idUKKCN0Q62RV20150801 |archive-url=https://web.archive.org/web/20151225063445/http://uk.reuters.com/article/uk-usa-election-trump-exclusive-idUKKCN0Q62RV20150801 |url-status=dead |archive-date=December 25, 2015 |access-date=March 17, 2016 |agency=Reuters UK |date=August 1, 2015}}</ref> Bizinesi iyi na mapikisheni gha urembo vikakolerana pachoko, chifukwa ŵapikisana ŵanandi ŵa mapikisheni ŵakapokera mapangano gha ntchito ya kuwoneka.{{sfn|Kranish|Fisher|2016|p=[https://books.google.com/books?id=x2jUDQAAQBAJ&pg=PA165 165]}} == Yunivesite ya Trump == {{Main article|Yunivesite ya Trump|Cohen v. Trump (Yunivesite ya Trump)}} Trump University LLC<ref>{{cite news |last=Gitell |first=Seth |date=March 8, 2016 |title=I Survived Trump University |url=https://www.politico.com/magazine/story/2016/03/i-survived-trump-university-213710/ |newspaper=[[Politico]] |access-date=March 18, 2016}}</ref> yikaŵa kampani ya ku America ya [[for-profit education|masambiro gha kupenja phindu]] iyo yikendeskanga ndondomeko yakusambizga vya malo kufuma mu 2005 mpaka 2010 panji kusazgirapo. Pamanyuma pa milandu yinandi, sono yili kumara. Yikapangika na Donald Trump na ŵanyake ŵake, Michael Sexton na Jonathan Spitalny.<ref name=vf>{{cite news |url=https://www.vanityfair.com/news/2014/01/trump-university-fraud-scandal |title=Big Hair on Campus: Did Donald Trump Defraud Thousands of Real-Estate Students? |last=Cohan |first=William D. |website=[[Vanity Fair (magazine)|Vanity Fair]]|access-date=March 6, 2016}}</ref> Kampani iyi yikapelekanga masambiro gha vya malo, kulongozga chuma, kuyambiska mabizinesi, na kupanga usambazi, ndipo yikalipiskanga pakati pa madola 1,500 na 35,000 pa kosi yimoza.<ref name=nyt511>{{cite news |first=Michael |last=Barbaro |title=New York Attorney General Is Investigating Trump's For-Profit School |date=May 19, 2011 |website=[[The New York Times]] |url=https://www.nytimes.com/2011/05/20/nyregion/trumps-for-profit-school-said-to-be-under-investigation.html}}</ref> Mu 2005 ntchito iyi yikaphalazgika na ŵamazaza ŵa New York State kuti kugwiliskira ntchito lizgu lakuti "university" kukaswa malango gha boma. Pamanyuma pa chenjezgo linyake mu 2010, zina la ntchito iyi likasintha kuŵa "Trump Entrepreneurial Institute".<ref name="AppealsCourt2016" /> Trump wakasangika kuti wali na mulandu yekha chifukwa cha kutondeka kusanga layisensi ya bizinesi ya ntchito iyi.<ref name="reuters.2014">{{cite news |url=https://www.reuters.com/article/us-trump-nyag-lawsuit-idUSKCN0I52MW20141016 |first=Karen |last=Freifeld |title=New York judge finds Donald Trump liable for unlicensed school |work=[[Reuters]] |date=October 16, 2014 |access-date=February 20, 2015 |archive-date=June 27, 2018 |archive-url=https://web.archive.org/web/20180627033957/https://www.reuters.com/article/us-trump-nyag-lawsuit/new-york-judge-finds-donald-trump-liable-for-unlicensed-school-idUSKCN0I52MW20141016 |url-status=live }}</ref> Mu 2013 boma la New York likapeleka mulandu wa madola 40 miliyoni likuyowoya kuti Trump University yikapeleka mawu gha utesi ndipo yikapusikanga ŵanthu awo ŵakaguranga mautumiki agha.<ref name="AppealsCourt2016">{{cite news |first=David |last=Halperin |title=NY Court Refuses to Dismiss Trump University Case, Describes Fraud Allegations |date=March 3, 2016 |website=[[The Huffington Post]] |url=https://www.huffingtonpost.com/davidhalperin/ny-court-refuses-to-dismi_b_9358360.html}}</ref><ref>{{cite news |url=https://www.washingtonpost.com/news/fact-checker/wp/2016/02/27/donald-trumps-misleading-claim-that-hes-won-most-of-lawsuits-over-trump-university/ |first=Michelle Ye Hee |last=Lee |title=Donald Trump's misleading claim that he's 'won most of' lawsuits over Trump University |newspaper=[[The Washington Post]] |date=February 27, 2016 |access-date=February 27, 2016}}</ref> Kweniso, milandu yiŵiri ya gulu la ŵanthu yikapelekeka ku khoti la boma yakukhwaskana na Trump University; yikachema Donald Trump yekha kweniso makampani ghake.<ref name=twofront>{{cite news |url=https://www.usatoday.com/story/money/business/2013/08/26/trump-entrepreneur-initiative-case/2700811/ |title=Trump faces two-front legal fight over 'university' |work=[[USA Today]] |first=Kevin |last=McCoy |date=August 26, 2013}}</ref> Milandu yose yitatu yikamara na phangano mu Novembala 2016, pamanyuma pa chisankho cha Trump kuŵa pulezidenti, pa ndalama zose za madola 25 miliyoni.<ref>{{cite news|last1=Carroll|first1=Rory|title=Donald Trump settles fraud lawsuits relating to Trump University for $25m|url=https://www.theguardian.com/us-news/2016/nov/18/donald-trump-university-settles-president-lawsuit-25-million|access-date=November 18, 2016|work=[[The Guardian]]|date=November 18, 2016}}</ref> Trump repeatedly criticized a judge, [[Gonzalo P. Curiel]], who is overseeing two of the Trump University cases. During campaign speeches and interviews up until June 2016, Trump called Curiel a "hater of Donald Trump", saying his rulings have been unfair, and that Curiel "happens to be, we believe, Mexican, which is great. I think that's fine",<ref name="rule-of-law">{{cite news |work=[[The New York Times]] |title=Donald Trump Could Threaten U.S. Rule of Law, Scholars Say |url=https://www.nytimes.com/2016/06/04/us/politics/donald-trump-constitution-power.html |date=June 3, 2016 |first=Adam |last=Liptak |quote=Mr. Trump accused the judge of bias, falsely said he was Mexican and seemed to issue a threat}}</ref> while suggesting that the judge's ethnicity posed a conflict of interest in light of Trump's proposal to build a wall on the United States–Mexican border.<ref name=RappeportNYT>{{cite news |last=Rappeport |first=Alan |date=June 3, 2016 |title=That Judge Attacked by Donald Trump? He's Faced a Lot Worse |url=https://www.nytimes.com/2016/06/04/us/politics/donald-trump-university-judge-gonzalo-curiel.html |newspaper=[[The New York Times]] |access-date= June 4, 2016}}</ref><ref name=Ford>{{cite magazine |last=Ford |first=Matt |date=June 3, 2016 |title=Why Is Donald Trump So Angry at Judge Gonzalo Curiel? |magazine=The Atlantic |url=https://www.theatlantic.com/politics/archive/2016/06/donald-trump-gonzalo-curiel/485636/|access-date=June 3, 2016}}</ref><ref name=Finnegan>{{cite news |last1=Finnegan |first1=Michael |work=[[Los Angeles Times]] |title=Trump trashes judge overseeing Trump University fraud case, says it's fine that he's Mexican |url=https://www.latimes.com/politics/la-na-trailguide-05272016-trump-trashes-judge-overseeing-1464393140-htmlstory.html |date=May 27, 2016 |access-date=May 29, 2016}}</ref> Many legal experts were critical of Trump's attacks on Curiel, often viewing them as racially charged, unfounded, and an affront to the concept of an independent judiciary.<ref>{{cite news |work=[[The Wall Street Journal]] |title=Trump Says Judge's Mexican Heritage Presents 'Absolute Conflict' |url=https://www.wsj.com/articles/donald-trump-keeps-up-attacks-on-judge-gonzalo-curiel-1464911442 |date=June 3, 2016 |first=Brent |last=Kendall |quote=Donald Trump on Thursday escalated his attacks on the federal judge presiding over civil fraud lawsuits against Trump University, amid criticism from legal observers who say the presumptive GOP presidential nominee's comments are an unusual affront on an independent judiciary}}</ref><ref>{{cite news |newspaper=[[The Washington Post]] |title=Trump's personal, racially tinged attacks on federal judge alarm legal experts |url=https://www.washingtonpost.com/politics/2016/06/01/437ccae6-280b-11e6-a3c4-0724e8e24f3f_story.html |first1=Jose |last1=DelReal |first2=Katie |last2=Zezima |date=June 1, 2016 |quote=Donald Trump's highly personal, racially tinged attacks on a federal judge overseeing a pair of lawsuits against him have set off a wave of alarm among legal experts, who worry that the Republican presidential candidate's vendetta signals a remarkable disregard for judicial independence}}</ref><ref>{{cite news |work=[[ABC News (United States)|ABC News]] |title=Legal Experts Worry After Trump Attacks Judge for Alleged Bias, Judge's Brother Calls Trump a 'Blowhard' |url=https://abcnews.go.com/Politics/legal-experts-worry-trump-attacks-judge-alleged-bias/story?id=39589590 |date=June 3, 2016 |first1=Shushannah |last1=Walshe |first2=Meghan |last2=Keneally}}</ref> On June 7, 2016, Trump issued a lengthy statement saying that his criticism of the judge had been "misconstrued" and that his concerns about Curiel's impartiality were not based upon ethnicity alone, but also upon rulings in the case.<ref name=Jackson>{{cite news |url=https://www.usatoday.com/story/news/politics/elections/2016/06/07/donald-trump-paul-ryan-mitch-mcconnell/85559392/ |title=Trump says judge comments 'misconstrued' amid GOP uprising |last=Jackson |first=David |date=June 7, 2016 |work=[[USA Today]] |access-date=June 8, 2016 |quote=I do not intend to comment on this matter any further}}</ref><ref>[full text] {{cite news |first=Donald J. |last=Trump |title=Donald Trump's Statement on Trump University |date=June 7, 2016 |website=[[The New York Times]] |url=https://www.nytimes.com/2016/06/08/us/politics/trump-university-statement.html}}</ref> == ACN, Inc. == Kufuma mu 2005 mpaka 2015, Trump wakapokera $8.8&nbsp; miliyoni cifukwa ca kuphalazga kampani ya matelefoni ya [[multi-level marketing]] [[ACN Inc.]] na malonda ghake pa webusayiti ya ACN,<ref name="Donald J. Trump on ACN's Home Based Business2">{{cite web|title=Donald J. Trump on ACN's Home Based Business |url=http://acninc.com/acn/us/trump_events.html |archive-url=https://web.archive.org/web/20110303071345/http://www.acninc.com/acn/us/trump_events.html |url-status=dead |archive-date=March 3, 2011 |access-date=July 20, 2012 |website=acninc.com}}</ref> ma DVD gha kuphalazgira na pa vyakucitika vyawo, kweniso pa pulogiramu yake ya pa TV ya ''The Apprentice''.<ref>{{cite news |last=Voytko |first=Lisette |url=https://www.nytimes.com/interactive/2020/09/28/us/donald-trump-taxes-apprentice.html |title=Trump's Biggest Side Hustle Outside Of 'Apprentice'? Multi-Level Marketing Schemes |work=[[Forbes]] |date=September 29, 2020 |access-date=July 3, 2021 |archive-date=October 1, 2020 |archive-url=https://web.archive.org/web/20201001172923/https://www.nytimes.com/interactive/2020/09/28/us/donald-trump-taxes-apprentice.html |url-status=live}}</ref><ref>{{cite news |last1=McIntire |first1=Mike |last2=Buettner |first2=Russ |last3=Craig |first3=Susanne |author-link2=Susanne Craig |url=https://www.nytimes.com/interactive/2020/09/27/us/donald-trump-taxes.html |title=Reality-TV Fame Handed Trump a $427 Million Lifeline |work=[[The New York Times]] |date=September 28, 2020 |access-date=July 3, 2021 |archive-date=September 27, 2020 |archive-url=https://web.archive.org/web/20200927211558/https://www.nytimes.com/interactive/2020/09/27/us/donald-trump-taxes.html |url-status=live }}</ref> Mu 2018, ŵanthu ŵakugura vinthu ŵanayi ŵakafayila mulandu wa boma mu khoti la [[United States District Court for the Southern District of New York|Southern District of New York]] kwimikana na Donald Trump na ŵana ŵake Donald Jr., [[Ivanka Trump|Ivanka]], na Eric cifukwa ca vimbundi na milandu ya kucita vinthu mwa upandu. Mu Julayi 2019, jaji wa khoti wakazomerezga kuti mulandu ulutilire na milandu ya boma ya vimbundi, malonda ghakupusika, na kuphalazga mwambura kwenelera.<ref>{{cite web |url=https://www.courtlistener.com/docket/8096633/doe-v-the-trump-corporation/ |title=Docket for Doe v. The Trump Corporation, 1:18-cv-09936 |website=CourtListener.com |date=2019-05-09 |access-date=2019-10-08 |archive-date=November 27, 2021 |archive-url=https://web.archive.org/web/20211127172737/https://www.courtlistener.com/docket/8096633/doe-v-the-trump-corporation/ |url-status=live }}</ref><ref>{{cite web |url=https://www.courtlistener.com/recap/gov.uscourts.nysd.503637/gov.uscourts.nysd.503637.1.0.pdf |title=Complaint (final for filing) 4818-9714-0089 v.1 - gov.uscourts.nysd.503637.1.0 - Case 1:18-cv-09936 - Document 1 |website=CourtListener.com |date=2018-10-29 |access-date=2019-10-08 |archive-date=March 15, 2021 |archive-url=https://web.archive.org/web/20210315231431/https://www.courtlistener.com/recap/gov.uscourts.nysd.503637/gov.uscourts.nysd.503637.1.0.pdf |url-status=live }}</ref><ref>{{cite news |last=Stempel |first=Jonathan |title=Trump must face marketing scam lawsuit, escapes racketeering claims: NY judge |url=https://www.reuters.com/article/us-usa-trump-marketing-lawsuit/trump-must-face-marketing-scam-lawsuit-escapes-racketeering-claims-ny-judge-idUSKCN1UJ349 |date=2019-07-24 |access-date=2019-10-08 |work=[[Reuters]] |archive-date=July 26, 2019 |archive-url=https://web.archive.org/web/20190726062428/https://www.reuters.com/article/us-usa-trump-marketing-lawsuit/trump-must-face-marketing-scam-lawsuit-escapes-racketeering-claims-ny-judge-idUSKCN1UJ349 |url-status=live }}</ref> Ŵa Trump ŵakaphalirika kuti ŵakaphaliranga yayi kuti ŵakapokeranga malipiro kufuma ku ACN apo ŵakakhumbanga kupangiska ŵanthu kugura masheya mu kampani iyi. Nga cigaŵa ca kusanda ukaboni wa mulandu, mu Malici 2020, Ŵa Trump ŵakalangulirika kupereka malipoti kufuma ku mabuku gha bizinesi ya Trump Organization kwambira mu 2005.<ref>{{cite news |last=Jacobs |first=Shayna |title=Trump ordered to expand document search in suit alleging he endorsed pyramid scam |url=https://www.washingtonpost.com/national-security/trump-ordered-to-expand-document-search-in-suit-alleging-he-endorsed-pyramid-scam/2020/03/14/c903fa0e-6579-11ea-acca-80c22bbee96f_story.html |date=March 14, 2020 |access-date=March 14, 2020 |newspaper=[[The Washington Post]] |archive-date=March 15, 2020 |archive-url=https://web.archive.org/web/20200315053058/https://www.washingtonpost.com/national-security/trump-ordered-to-expand-document-search-in-suit-alleging-he-endorsed-pyramid-scam/2020/03/14/c903fa0e-6579-11ea-acca-80c22bbee96f_story.html |url-status=live }}</ref> Mu Epulero 2020, jaji wa boma wakalangura [[MGM]], uyo ni mwimiliri mukuru wa ''[[Celebrity Apprentice]]'', kuti wapereke matepi gha vigaŵa viŵiri vya pulogiramu iyi ivyo vikaŵa vindawoneke ku maloya gha ŵalanda awo ŵakati Ŵa Trump ŵanayi ŵakaŵapusika kuti ŵagule mu ACN; mu vigaŵa ivi, ŵanthu ŵakumanyikwa ŵakacitanga cipharazgo ca malonda gha ACN.<ref name=":13" /> Ŵa Trump ŵakapempha kuti languro ili lisinthike ndipo ŵakakhumbanga kumazga nkhani iyi kwizira mu [[arbitration]], kweni ŵakatondeka.<ref>{{cite news |last=Chan |first=J. Clara |url=https://www.thewrap.com/mgm-must-hand-over-unaired-celebrity-apprentice-trump-tapes-judge-rules/ |title=MGM Must Hand Over Unaired 'Celebrity Apprentice' Trump Tapes, Judge Rules |work=[[TheWrap]] |date=April 9, 2020 |access-date=November 27, 2021 |archive-date=October 11, 2021 |archive-url=https://web.archive.org/web/20211011134003/https://www.thewrap.com/mgm-must-hand-over-unaired-celebrity-apprentice-trump-tapes-judge-rules/ |url-status=live }}</ref> Mu Novembala 2021, jaji wa boma wakalangura MGM kuti yipe matepi agha ku maloya gha ŵalanda pa malo ghakusungika mwakuvikilika.<ref name=":13">{{cite news |last=Paglieri |first=Jose |url=https://www.thedailybeast.com/angry-entrepreneurs-will-finally-see-trumps-apprentice-outtakes |title=Angry Entrepreneurs Will Finally See Trump's 'Apprentice' Outtakes |work=[[The Daily Beast]] |date=November 25, 2021 |access-date=November 27, 2021 |archive-date=November 26, 2021 |archive-url=https://web.archive.org/web/20211126145109/https://www.thedailybeast.com/angry-entrepreneurs-will-finally-see-trumps-apprentice-outtakes |url-status=live }}</ref> Trump na ŵana ŵake ŵakapokelereka mafumbo gha khoti mu 2022.<ref>{{cite news |last=Scannell |first=Kara |url=https://edition.cnn.com/2022/03/25/politics/donald-trump-children-deposition-lawsuit/index.html |title=Donald Trump and his children agree to be deposed in fraudulent marketing lawsuit |work=[[CNN]] |date=March 25, 2022 |access-date=August 8, 2023}}</ref><ref>{{cite news |last=Larson |first=Eric |url=https://www.pressherald.com/2022/10/20/trump-deposed-in-suit-by-investors-claiming-fraud-in-apprentice-videophone-pitches/ |title=Trump deposed in suit by investors claiming fraud in 'Apprentice' videophone pitches |work=[[Bloomberg News]] |via=[[Portland Press Herald]] |date=March 25, 2022 |access-date=August 8, 2023}}</ref> Mu Meyi 2023, ŵalanda ŵakawuskako milandu yawo kwimikana na ŵana ŵake kuti "ŵapange kuti nkhani iyi yiŵe yipusu pambere pajumpha pa mulandu".<ref>{{cite news |last=Larson |first=Eric |url=https://www.bnnbloomberg.ca/trump-children-dropped-from-suit-over-apprentice-pitches-1.1922734 |title=Trump Children Dropped From Suit Over 'Apprentice' Pitches |work=[[Bloomberg News]] |via=[[BNN Bloomberg]] |date=June 15, 2023 |archive-url=https://web.archive.org/web/20230525224830/https://www.bnnbloomberg.ca/trump-children-dropped-from-suit-over-apprentice-pitches-1.1922734 |archive-date=May 25, 2023 |access-date=August 8, 2023}}</ref> Mulandu uwu ukakhazikika kuti uyambe pa Januwale 29, 2024.<ref>{{cite news |last=Orden |first=Erica |url=https://www.politico.com/news/2023/06/15/trump-trial-date-carroll-lawsuit-00102328 |title=Trump now faces four trials over six-month span during critical phase of 2024 campaign |work=[[Politico]] |date=June 15, 2023 |access-date=August 8, 2023}}</ref> == Donald J. Trump Foundation == {{Main article|Donald J. Trump Foundation}} The Donald J. Trump Foundation yikaŵa [[foundation ya pachoko|bungwe la vyawanangwa la pachoko]] la ku United States<ref name=":0b">{{Cite web|url=https://projects.propublica.org/nonprofits/organizations/133404773|title=Nonprofit Explorer – ProPublica|last=ProPublica|first=Mike Tigas, Sisi Wei|date=May 9, 2013 |access-date=September 9, 2016}}</ref> ilo likakhazikiskika mu 1988 na chilato chakwamba chakuti lipereke ndalama izo zikafumanga mu buku ''[[Trump: The Art of the Deal|Trump: Luso la Kuchita Malonda]]'' ilo lili kulembeka na Trump pamoza na [[Tony Schwartz (author)|Tony Schwartz]].<ref>{{Cite web|url=https://www.guidestar.org/profile/13-3404773|title=Donald J Trump Foundation Inc – GuideStar Profile|publisher=guidestar.org|access-date=September 9, 2016}}</ref><ref name=":1b">{{Cite news |first=David A. |last=Fahrenthold |url=https://www.washingtonpost.com/news/post-politics/wp/2016/09/01/trump-pays-irs-a-penalty-for-his-foundation-violating-rules-with-gift-to-florida-attorney-general/ |title=Trump pays IRS a penalty for his foundation violating rules with gift to aid Florida attorney general |newspaper=[[The Washington Post]] |date=September 1, 2016}}</ref> Ndalama zinandi za foundation iyi zikafumanga ku ŵanthu ŵanyake awo ŵakaperekanga vyawanangwa, padera pa Trump,<ref name="WaPoMissing">{{Cite news |url=https://www.washingtonpost.com/politics/a-portrait-of-trump-the-donor-free-rounds-of-golf-but-no-personal-cash/2016/04/10/373b9b92-fb40-11e5-9140-e61d062438bb_story.html |title=Missing from Trump's list of charitable giving: His own personal cash |date=April 10, 2016 |last2=Helderman |first2=Rosalind S. |newspaper=[[The Washington Post]] |first1=David A. |last1=Fahrenthold}}</ref> ndipo ndalama zakumalizga izo Trump wakapereka yekha ku foundation iyi zikaŵa mu 2008.<ref name="WaPoMissing" /> Ŵanthu awo ŵakapereka ndalama zinandi chomene ku foundation iyi pakati pa 2004 na 2014 ŵakaŵa [[Vince McMahon|Vince]] na [[Linda McMahon]] ŵa ku [[World Wrestling Entertainment]], awo ŵakapereka $5 miliyoni ku foundation iyi pamanyuma pakuti Trump wawonekera pa [[WrestleMania]] mu 2007.<ref name="WaPoMissing" /> Kwizira mu mafomu gha misonkho gha foundation iyi, awo ŵakapokera vyawanangwa ŵakaŵa mabungwe gha vya umoyo na maseŵero, kweniso magulu gha ndyali gha chisungililo.<ref>Solnik, Claude. [http://libn.com/2016/09/15/taking-a-peek-at-trumps-foundation-tax-returns/ "Taking a peek at Trump's (foundation) tax returns"], [[Long Island Business News]] (September 15, 2016): "charitable giving to conservative political groups, healthcare and sports-related charities".</ref> Mu 2009, mwachiyelezgero, foundation iyi yikapeleka $926,750 ku magulu pafupifupi 40, ndipo ndalama zikuru zikapelekeka ku [[Arnold Palmer Hospital for Children#Arnold Palmer Medical Center|Arnold Palmer Medical Center Foundation]] ($100,000), [[New York Presbyterian Hospital]] ($125,000), [[Police Athletic League]] ($156,000), na [[Clinton Foundation]] ($100,000).<ref name="SearchingforEvid">{{Cite news |first1=David A. |last1=Fahrenthold |first2=Danielle |last2=Rindler |url=https://www.washingtonpost.com/graphics/politics/2016-election/trump-charity-donations/ |title=Searching for evidence of Trump's personal giving |newspaper=[[The Washington Post]] |date=August 18, 2016}}</ref><ref>Qiu, Linda (August 28, 2016). [http://www.politifact.com/punditfact/statements/2016/aug/28/david-plouffe/yes-donald-trump-donated-100000-clinton-foundation/ Yes, Donald Trump donated $100,000 to Clinton Foundation.] ''PolitiFact.com''. Retrieved September 16, 2016.</ref> Kuyambira mu 2016, ''[[The Washington Post]]'' yikamba kufufuza umo foundation iyi yikasonkhera na kuperekera ndalama. ''Post'' yikasanga vinthu ivyo vingapangiska kuti pakhale kuswa malango na nkhani za makhaliro, nga ni vinthu vya [[self-dealing|kujipindulira yekha]] kweniso kusuzga pa vya misonkho.<ref>Cillizza, Chris and Fahrenthold, David. [https://www.washingtonpost.com/amphtml/news/the-fix/wp/2016/09/15/how-the-reporter-behind-the-trump-foundation-stories-does-it/ "Meet the reporter who's giving Donald Trump fits"] {{Webarchive|url=https://web.archive.org/web/20161002103244/https://www.washingtonpost.com/amphtml/news/the-fix/wp/2016/09/15/how-the-reporter-behind-the-trump-foundation-stories-does-it/ |date=October 2, 2016 }}, ''[[The Washington Post]]'' (September 15, 2016).</ref> [[New York State attorney general|Mwanangwa mukuru wa malango wa boma la New York]] wakamba kufufuza foundation iyi "kuti wawone usange yikukolerana na malango agho ghakulongozga mabungwe gha vyawanangwa mu New York."<ref name=hit>{{cite news|url=http://www.cnn.com/2016/09/13/politics/eric-schneiderman-donald-trump-foundation/|title=NY attorney general began investigating Trump Foundation practices|date=September 14, 2016|publisher=[[CNN]]|access-date=September 25, 2016}}</ref><ref>{{Cite web|url=http://fortune.com/2016/09/14/donald-trump-foundation/|title=Trump Foundation Falls Under Investigation By New York Attorney General|date=September 14, 2016|website=[[Fortune (magazine)|Fortune]]|access-date=September 27, 2016}}</ref> Munthu uyo wakayimiranga Trump wakati kufufuza uku kukaŵa "ntchito ya ndyali yakumupweteka."<ref name=hit /> Pa Okutobala 3, 2016, ofesi ya mwanangwa mukuru wa malango wa New York yikaphalira Trump Foundation kuti yikaŵa ikuswa malango gha New York agho ghakukhwaska mabungwe gha vyawanangwa ndipo yikalangura foundation iyi kuti yileke mwaluŵiro kusonkha ndalama mu boma la New York. Foundation iyi, iyo yikazomera kuti yikachitapo vinthu vya [[self-dealing|kujipindulira yekha]] pa fomu yake ya misonkho ya IRS ya 2015, yikazomera kulondezga languro ili.<ref>Farenthold, David. [http://www.washingtonpost.com/politics/trump-foundation-ordered-to-stop-fundraising-by-ny-attorney-generals-office/2016/10/03/1d4d295a-8987-11e6-bff0-d53f592f176e_story.html "Trump Foundation ordered to stop fundraising by N.Y. attorney general's office"], ''[[The Washington Post]]'' (October 3, 2016).</ref> Mlandu uwo ukayambika mu 2018 na mwanangwa mukuru wa malango wa New York ukati Trump wakagwiliskira ntchito ndalama za foundation mwambura kwenelera, kusazgapo kugura vithuzithuzi vyake, kulipira vyakukwana vya malango gha mabizinesi ghake, kweniso kovwira kampeni yake ya kupenja urongozgi wa charu.<ref>{{cite news|url=https://www.washingtonpost.com/politics/trump-paid-2-million-in-damages-ordered-by-judge-over-misuse-of-charity-funds-new-york-attorney-general-said/2019/12/10/2132645e-1b7e-11ea-b4c1-fd0d91b60d9e_story.html|first=David A.|last=Fahrenthold|title=Trump pays $2 million in damages ordered by judge over misuse of charity funds, according to NY attorney general|date=December 10, 2019|newspaper=[[The Washington Post]]|access-date=January 19, 2021}}</ref> Mweruzgi wakasanga kuti Donald J. Trump Foundation yikaswa malango ndipo wakalangura Trump kulipira $2 miliyoni nga ni chilangulo. Trump wakazomera kupereka ndalama izi pamoza na ndalama zakukhalapo mu foundation iyi, zakukwana $1.8 miliyoni, ku mabungwe 8 gha vyawanangwa, kusazgapo Army Emergency Relief, United Negro College Fund, na U.S. Holocaust Memorial Museum, kweniso kutseka foundation iyi.<ref>{{cite news|url=https://www.washingtonpost.com/politics/trump-paid-2-million-in-damages-ordered-by-judge-over-misuse-of-charity-funds-new-york-attorney-general-said/2019/12/10/2132645e-1b7e-11ea-b4c1-fd0d91b60d9e_story.html|first=David A.|last=Fahrenthold|title=Trump pays $2 million in damages ordered by judge over misuse of charity funds, according to NY attorney general|date=December 10, 2019|newspaper=[[The Washington Post]]|access-date=January 19, 2021}}</ref> == Kupanga zina na kupereka mazina gha malonda == {{Further|List of things named after Donald Trump|Mndandanda wa vinthu ivyo vili na zina la Donald Trump}} [[File:20140627 Trump International Hotel and Tower (Chicago) sign 2.JPG|thumb|right|[[Trump International Hotel and Tower (Chicago)|Hotelo na Tower ya Trump International ku Chicago]]]] [[File:Panama 08 2013 Trump Ocean Tower 7085.JPG|thumb|upright|alt=A tall, white- and grey-colored building with a curved facade, towering above shorter buildings nearby. This is the Trump Ocean Club International Hotel and Tower in Panama City, Panama|[[Trump Ocean Club International Hotel and Tower]] mu [[Panama City]], Panama]] Trump wakalembesha zina lake pa mapulojekiti ghanandi gha nyumba, kweniso pa vinthu vya malonda na mauteŵeti ghanyake. Ichi chikaŵa na vyakupambana pa umo vikayendera kwa iyo, ŵanyake awo wakachitira nawo malonda, na awo ŵakaŵa na ndalama mu mapulojekiti agha.<ref name="MiamiH3Mar2016">{{cite news |last1=Sallah |first1=Michael |title=From the Herald archives: Donald Trump's tower of trouble |url=http://www.miamiherald.com/news/politics-government/election/article63879697.html |access-date=March 11, 2016 |work=[[Miami Herald]] |date=March 3, 2016 }}</ref><ref name=Trumps_Hollywood_Star>{{cite news |last=Johnson |first=M. Alex |title='The Answer Is No': Bill Cosby's Hollywood Walk of Fame Star Is Staying Put |url=https://www.nbcnews.com/storyline/bill-cosby-scandal/answer-no-bill-cosbys-hollywood-walk-fame-star-staying-put-n390836 |access-date=August 1, 2015 |work=[[NBC News]] |date=July 13, 2015}}</ref> {{refn|group=nb|Mabizinesi na mapulojekiti ghake gha kuwaro kweniso ndalama ghakasazgapo [[Trump Mortgage|Trump Financial]] (kampani ya ngongoli za nyumba), Trump Sales and Leasing (malonda gha nyumba), Trump International Realty (kampani yakuguliska na kubwerekeska malo gha nyumba), [[The Trump Entrepreneur Initiative|Trump Entrepreneur Initiative]] (kampani ya masambiro gha bizinesi yakupangira phindu, iyo kale yikachemekanga [[Trump University|Trump University]]), Trump Restaurants (malo gha vyakurya agho ghakaŵa mu Trump Tower ndipo ghakasazgapo Trump Buffet, Trump Catering, Trump Ice Cream Parlor, na Trump Bar), GoTrump (injini yakusangira maulendo pa intaneti<ref name="auto10">{{cite news |url=https://finance.yahoo.com/news/12-donald-trump-businesses-that-no-longer-exist-204923129.html |title=12 Donald Trump businesses that no longer exist |work=Yahoo Finance |date=October 10, 2014 |access-date=January 17, 2016 |author=Holodny, Elena}} See also [https://web.archive.org/web/*/http://www.gotrump.com archived website] of this business.</ref>), Select By Trump (mzere wa zakumwa za khofi),<ref>{{cite web |url=http://tworiversco.com/brands/select-by-trump/ |title=Select By Trump |access-date=January 17, 2016 |archive-url=https://web.archive.org/web/20160124043610/http://tworiversco.com/brands/select-by-trump/ |archive-date=January 24, 2016 |url-status=usurped }}</ref> Trump Drinks (chakumwa cha mphamvu cha misika ya Israel na Palestine),<ref name="Max Abelson">{{cite magazine |url=https://www.bloomberg.com/politics/graphics/2015-how-trump-invented-trump/ |title=How Trump Invented Trump |magazine=Bloomberg Business |date=September 3, 2015 |access-date=January 17, 2016 |first=Max |last=Abelson}}</ref> Donald J. Trump Signature Collection (malaya gha ŵanalume, vinthu vyakupambanapambana vya ŵanalume, na mawotchi), Donald Trump The Fragrance (2004), SUCCESS by Donald Trump (furuŵeya yinyake iyo yikafumiskika mu 2012), [[Trump Ice]] maji gha mu mabotolo, ''[[Trump magazines|Trump Magazine]]'', Trump Golf, Trump Chocolate, [[Trump Home]] (vyakupangira mu nyumba), [[Trump Productions]] (kampani yakupanga mapulogalamu gha pa TV), [[Trump Institute]], [[Trump: The Game]] (maseŵero gha pa bolodi gha 1989), [[Donald Trump's Real Estate Tycoon]] (maseŵero gha kompyuta gha bizinesi), mabuku gha Trump, [[Trump Model Management]], Trump Shuttle, [[Trump Mortgage]], [[The Trump Network|Trump Network]] (kampani ya malonda gha mavitamini, vyakutowa, na urayizi wa milimo ya thupi), [[Trump Vodka]], Trump Steakhouse, na [[Trump Steaks]].<ref name=Koffler7Aug />}} Mu 2011, ŵakusanda vya ndalama ku ''[[Forbes]]'' ŵakayaniska kuti mtengo wa zina la Trump ukaŵa pafupifupi $200 miliyoni. Trump wakasuska chiŵerengero ichi, wakati zina lake likwenera kuŵa na mtengo wa pafupifupi $3 biliyoni.<ref>{{cite news |url=https://blogs.forbes.com/kerenblankfeld/2011/04/28/donald-trump-on-his-brand-value-forbes-numbers-are-ridiculous/ |title=Donald Trump on His Brand Value: Forbes' Numbers Are Ridiculous |work=[[Forbes]] |first=Keren |last=Blankfeld}}</ref> The Donald J. Trump Foundation likaŵa [[private foundation|mazaza gha vya lusungu gha pawokha]] gha ku United States<ref name=":0b">{{Cite web|url=https://projects.propublica.org/nonprofits/organizations/133404773|title=Nonprofit Explorer – ProPublica|last=ProPublica|first=Mike Tigas, Sisi Wei|date=May 9, 2013 |access-date=September 9, 2016}}</ref> agho ghakakhazikiskika mu 1988 na chilato chakwamba cha kupeleka ndalama izo zikasangika kufuma mu buku ''[[Trump: The Art of the Deal]]'' ilo lili la Trump na [[Tony Schwartz (author)|Tony Schwartz]].<ref>{{Cite web|url=https://www.guidestar.org/profile/13-3404773|title=Donald J Trump Foundation Inc – GuideStar Profile|publisher=guidestar.org|access-date=September 9, 2016}}</ref><ref name=":1b">{{Cite news |first=David A. |last=Fahrenthold |url=https://www.washingtonpost.com/news/post-politics/wp/2016/09/01/trump-pays-irs-a-penalty-for-his-foundation-violating-rules-with-gift-to-florida-attorney-general/ |title=Trump pays IRS a penalty for his foundation violating rules with gift to aid Florida attorney general |newspaper=[[The Washington Post]] |date=September 1, 2016}}</ref> Ndalama za mazaza agha zikafumanga chomene kwa ŵakupeleka ndalama ŵanyake kuluska Trump yekha,<ref name="WaPoMissing">{{Cite news |url=https://www.washingtonpost.com/politics/a-portrait-of-trump-the-donor-free-rounds-of-golf-but-no-personal-cash/2016/04/10/373b9b92-fb40-11e5-9140-e61d062438bb_story.html |title=Missing from Trump's list of charitable giving: His own personal cash |date=April 10, 2016 |last2=Helderman |first2=Rosalind S. |newspaper=[[The Washington Post]] |first1=David A. |last1=Fahrenthold}}</ref> ndipo ivyo Trump wakapeleka yekha ku mazaza agha paumaliro vikaŵa mu 2008.<ref name="WaPoMissing" /> Ŵakupeleka ndalama ŵakuru chomene ku mazaza agha pakati pa 2004 na 2014 ŵakaŵa [[Vince McMahon|Vince]] na [[Linda McMahon]] ŵa [[World Wrestling Entertainment]], awo ŵakapeleka ndalama zakukwana $5 miliyoni ku mazazas agha pamanyuma pakuti Trump wawonekera pa [[WrestleMania]] mu 2007.<ref name="WaPoMissing" /> Mwakuyana na malipoti gha msonkho gha mazaza agha, awo ghakapokera chandulo ghakaŵa ma charity gha vya munkhwala na maseŵero, kweniso magulu ghakulongozgeka na fundo za ndyali za ku chitemwa.<ref>Solnik, Claude. [http://libn.com/2016/09/15/taking-a-peek-at-trumps-foundation-tax-returns/ "Taking a peek at Trump's (foundation) tax returns"], [[Long Island Business News]] (September 15, 2016): "charitable giving to conservative political groups, healthcare and sports-related charities".</ref> Mu 2009, mwachiyelezgero, mazazas agha ghakapeleka $926,750 ku magulu pafupifupi 40, ndipo vyawanangwa vikuru vikapelekeka ku [[Arnold Palmer Hospital for Children#Arnold Palmer Medical Center|Arnold Palmer Medical Center Foundation]] ($100,000), [[New York Presbyterian Hospital]] ($125,000), [[Police Athletic League]] ($156,000), na [[Clinton Foundation]] ($100,000).<ref name="SearchingforEvid">{{Cite news |first1=David A. |last1=Fahrenthold |first2=Danielle |last2=Rindler |url=https://www.washingtonpost.com/graphics/politics/2016-election/trump-charity-donations/ |title=Searching for evidence of Trump's personal giving |newspaper=[[The Washington Post]] |date=August 18, 2016}}</ref><ref>Qiu, Linda (August 28, 2016). [http://www.politifact.com/punditfact/statements/2016/aug/28/david-plouffe/yes-donald-trump-donated-100000-clinton-foundation/ Yes, Donald Trump donated $100,000 to the Clinton Foundation.] ''PolitiFact.com''. Retrieved September 16, 2016.</ref> Kwambira mu 2016, ''[[The Washington Post]]'' yikamba kufufuza umo mazazas agha ghakasangiranga na kupeleka ndalama. ''Post'' yikasanga vinthu vinyake ivyo vikawonekanga kuti vingaŵa vyakususkana na malango na vya makhaliro, nga ni [[self-dealing|kuchita vinthu vya ndalama ivyo vikamovwiranga mwenecho]] na kukhweŵa msonkho.<ref>Cillizza, Chris and Fahrenthold, David. [https://www.washingtonpost.com/amphtml/news/the-fix/wp/2016/09/15/how-the-reporter-behind-the-trump-foundation-stories-does-it/ "Meet the reporter who's giving Donald Trump fits"] {{Webarchive|url=https://web.archive.org/web/20161002103244/https://www.washingtonpost.com/amphtml/news/the-fix/wp/2016/09/15/how-the-reporter-behind-the-trump-foundation-stories-does-it/ |date=October 2, 2016 }}, ''[[The Washington Post]]'' (September 15, 2016).</ref> Wakhala wa boma la [[New York State attorney general|ŵimiliri wa boma wa New York]] wakamba kufufuza mazazas agha "kuti wawoneseske kuti ghakukolerana na malango agho ghakulongozga ma charity mu New York."<ref name=hit>{{cite news|url=http://www.cnn.com/2016/09/13/politics/eric-schneiderman-donald-trump-foundation/|title=NY attorney general began investigating Trump Foundation practices|date=September 14, 2016|publisher=[[CNN]]|access-date=September 25, 2016}}</ref><ref>{{Cite web|url=http://fortune.com/2016/09/14/donald-trump-foundation/|title=Trump Foundation Falls Under Investigation By New York Attorney General|date=September 14, 2016|website=[[Fortune (magazine)|Fortune]]|access-date=September 27, 2016}}</ref> Muyowoyeri wa Trump wakati kufufuza uku kukaŵa "nkhondo ya ndyali".<ref name=hit /> Pa Okutobala 3, 2016, ofesi ya ŵimiliri wa boma la New York yikaphalira Trump Foundation kuti yikuswa malango gha New York agho ghakukhwaska ma charity ndipo yikayilangura kuti yileke nyengo yeneyiyo kupenja ndalama mu chigaŵa cha New York. Mazazas agha, agho ghakazomera kuti ghakachita vinthu vya kujipempha chandulo mu fomu yake ya IRS ya 2015, ghakazomera ivyo vikalangulirika.<ref>Farenthold, David. [http://www.washingtonpost.com/politics/trump-foundation-ordered-to-stop-fundraising-by-ny-attorney-generals-office/2016/10/03/1d4d295a-8987-11e6-bff0-d53f592f176e_story.html "Trump Foundation ordered to stop fundraising by N.Y. attorney general's office"], ''[[The Washington Post]]'' (October 3, 2016).</ref> Mulandu uwo ukapelekeka mu 2018 na ŵimiliri wa boma la New York ukati Trump wakagwiliskira ntchito ndalama za mazazas agha mwambura kuzomerezgeka kuti wagule vithuzithuzi vyake, kulipira ivyo mabizinesi ghake ghakeneranga kulipira, na kovwira kampeni yake ya usankho. Mweruzgi wakaweruzga kwakususkana na Donald J. Trump Foundation ndipo wakalangura Trump kulipira $2 miliyoni nga ni chilango. Trump wakazomera kupeleka ndalama izo pamoza na ndalama zakukhalapo za mazazas agha zakukwana $1.8 miliyoni ku ma charity 8, kusazgapo Army Emergency Relief, United Negro College Fund, na US Holocaust Memorial Museum, ndipo kumazga mazazas agha.<ref>{{cite news|url=https://www.washingtonpost.com/politics/trump-paid-2-million-in-damages-ordered-by-judge-over-misuse-of-charity-funds-new-york-attorney-general-said/2019/12/10/2132645e-1b7e-11ea-b4c1-fd0d91b60d9e_story.html|first=David A.|last=Fahrenthold|title=Trump pays $2 million in damages ordered by judge over misuse of charity funds, according to NY attorney general|date=December 10, 2019|newspaper=[[The Washington Post]]|access-date=January 19, 2021}}</ref> == Kulemba zina na kuphalazga malonda == {{Further|List of things named after Donald Trump}} [[File:20140627 Trump International Hotel and Tower (Chicago) sign 2.JPG|thumb|right|[[Trump International Hotel and Tower (Chicago)|Trump International Hotel and Tower]]]] [[File:Panama 08 2013 Trump Ocean Tower 7085.JPG|thumb|upright|alt=A tall, white- and grey-colored building with a curved facade, towering above shorter buildings nearby. This is the Trump Ocean Club International Hotel and Tower in Panama City, Panama|Trump Ocean Club International Hotel and Tower mu [[Panama City]], Panama]] Trump wakagwiliskira ntchito zina lake pa mapulojekiti ghanandi gha nyumba kweniso pa malonda na mauteŵeti ghakupambanapambana, ndipo ichi chikawovwira iye, ŵanyake awo wakachitanga nawo bizinesi, na ŵakuŵika ndalama mu mapulojekiti agha mwakupambanapambana.<ref name="MiamiH3Mar2016">{{cite news |last1=Sallah |first1=Michael |title=From the Herald archives: Donald Trump's tower of trouble |url=http://www.miamiherald.com/news/politics-government/election/article63879697.html |access-date=March 11, 2016 |work=[[Miami Herald]] |date=March 3, 2016 }}</ref><ref name=Trumps_Hollywood_Star>{{cite news |last=Johnson |first=M. Alex |title='The Answer Is No': Bill Cosby's Hollywood Walk of Fame Star Is Staying Put |url=https://www.nbcnews.com/storyline/bill-cosby-scandal/answer-no-bill-cosbys-hollywood-walk-fame-star-staying-put-n390836 |access-date=August 1, 2015 |work=[[NBC News]] |date=July 13, 2015}}</ref> Ŵanthu ŵanandi awo ŵakuzenga nyumba ŵakalipiranga Trump kuti walangiske malo ghawo na kuŵa chisko cha mapulojekiti ghawo.<ref name="Trump on Trump">{{cite news |last=Frangos |first=Alex |title=Trump on Trump: Testimony Offers Glimpse of How He Values His Empire |url=https://www.wsj.com/articles/SB124261067783429043 |date=May 18, 2009 |access-date=April 14, 2011 |work=[[The Wall Street Journal]]}}</ref> Chifukwa cha ichi, Trump kuti ndiyo mweneko wa nyumba zinandi yayi izo zili na zina lake.<ref name="Trump on Trump" /> Mwakuyana na ''Forbes'', chigaŵa ichi cha bizinesi ya Trump, icho ŵana ŵake ndiwo ŵakuchendeska chomene, ndicho chikaŵa chakuzirwa chomene, ndipo chikaŵa na mtengo wa madola mamiliyoni 562. Mwakuyana na ''Forbes'', pakaŵa mapulojekiti 33 gha malayisensi agho ghakaŵa mu ndondomeko yakuzengeka, kusazgapo "condo hotels" 7 (mapulojekiti 7 gha Trump International Hotel and Tower). Mu Juni 2015, ''Forbes'' yikati mtengo wa zina lakuti Trump ukaŵa madola mamiliyoni 125.<ref name="auto4">{{cite news |url=https://www.forbes.com/sites/erincarlyle/2015/06/16/trump-exaggerating-his-net-worth-by-100-in-presidential-bid/ |title=Trump Exaggerating His Net Worth (By 100%) In Presidential Bid |work=[[Forbes]] |date=June 16, 2015 |access-date=January 27, 2016 |first=Erin |last=Carlyle}}</ref> Ivi vikachitika apo makampani nga ni [[Macy's Inc.]] na [[Serta Mattresses]] ghakamba kuleka kuguliska vinthu vyakulembeka zina la Trump.<ref>{{cite news |url=http://www.cnn.com/2015/07/01/politics/donald-trump-macys/ |title=First on CNN: Macy's dumps Donald Trump |publisher=[[CNN]] |date=July 1, 2015 |access-date=January 27, 2016 |first=MJ |last=Lee}}</ref><ref>{{cite news |url=https://www.nbcnews.com/news/latino/serta-mattress-maker-latest-dump-trump-n385851 |title=Serta Mattress Maker Latest to Dump Trump |work=[[NBC News]] |date=July 2, 2015 |access-date=January 27, 2016}}</ref> Mtengo wa zina la Trump ukwenera kuti ukakhira chifukwa cha kampeni yake ya kukhala purezidenti. Pamanyuma pakuti kampeni yake ya 2016 yayamba, kafukufuku wa mkati wa kampani ya [[Young & Rubicam]] pa umo ŵanthu ŵasambazi ŵakawonera zina la Trump ukalongora kuti fundo nga ni "yapachanya", "ya ŵanthu ŵapachanya", na "yakukondweska" zikakhira chomene kuumaliro wa chaka cha 2015. Ichi chikang'anamuranga kuti mabizinesi gha Trump ghangasangana na masuzgo gha msika na kusanga ndalama mu nyengo yakunthazi.<ref name="Johnson11Jan">{{cite news |url=https://www.politico.com/magazine/story/2016/01/donald-trump-2016-brand-business-213515/ |title=Trump's Campaign Is Damaging His Brand |date=January 11, 2016 |access-date=January 11, 2016 |first1=Will |last1=Johnson |first2=Michael |last2=D'Antonio |work=[[Politico]]}}</ref> Ŵanthu ŵanyake ŵakati ŵakukana kugura vinthu na mauteŵeti agho ghali na zina la Trump nga ni nthowa yakulwera Trump na kampeni yake.<ref>{{Cite news|url=https://www.nytimes.com/2016/10/18/us/politics/donald-trump-brand-reaction.html|title=The New Protesters Defying Donald Trump: His Customers|last=Barbaro|first=Michael|date=October 17, 2016|newspaper=[[The New York Times]]|issn=0362-4331|access-date=October 18, 2016}}</ref> Mu 2016, ŵanthu awo ŵakalutanga ku mahotelo na kasino izo zikaŵa na zina la Trump ŵakakhira chomene, chomenechomene chifukwa chakuti ŵanakazi ŵakachepeska kuluta ku malo agha.<ref>{{cite news |last=Wolff-Mann |first=Ethan |date=May 26, 2016 |title=8 Epic Business Failures with Donald Trump's Name on Them |work=[[Money.com]] |url=https://money.com/donald-trump-name-business-failures/ |url-status=live |access-date=October 18, 2016 |archive-url=https://web.archive.org/web/20220531144158/https://money.com/donald-trump-name-business-failures/ |archive-date=May 31, 2022}}</ref><ref>{{cite news|url=https://www.cnbc.com/2016/08/04/trump-hotels-and-casino-traffic-has-taken-a-huge-hit-since-trump-started-running-for-president-commentary.html|title=Trump hotels and casino traffic has taken a huge hit since Trump started running for president|date=August 4, 2016|work=[[CNBC]]|access-date=October 18, 2016}}</ref> Pamanyuma pakufumiskika kwa matepi gha [[Access Hollywood tape recordings|''Access Hollywood'']] mu Okutobala 2016, mtengo wa zina la Trump ukati wakhira chomene, ndipo ŵakawona kuti mtengo wa zina lake ukakhira kufika pa 13 [[percentage point]]s.<ref name="auto2">{{Cite news|url=https://www.wsj.com/articles/is-trump-teflon-most-say-no-as-brand-perception-takes-a-hit-1476202205|title=Is Trump Teflon? Most Say No as Brand Perception Takes a Hit|last=Bruell|first=Alexandra|date=October 11, 2016|newspaper=[[The Wall Street Journal]]|issn=0099-9660|access-date=October 12, 2016}}</ref><ref>{{Cite web|url=https://www.cnbc.com/2016/10/10/tape-release-further-erodes-trump-brand-survey.html|title=Tape release further erodes Trump brand: Survey|last=Castillo|first=Michelle|date=October 10, 2016|website=[[CNBC]]|access-date=October 12, 2016}}</ref> Mu Malichi 2024, Trump wakamba kulimbikiska Baibolo la $60 lakuti ''[[God Bless the U.S.A. Bible]]'', ilo lili na Baibolo la chiyowoyero cha [[King James Version|King James]]; [[Constitution of the United States|Dango likuru la United States]], [[United States Bill of Rights|Bill of Rights]], [[United States Declaration of Independence|Declaration of Independence]], na [[Pledge of Allegiance|Layizgo la Kugomezgeka ku Charu]]. Kweniso lili na mazgu gha sumu ya [[Lee Greenwood]] yakuti [[God Bless the U.S.A.]], agho ghali kulembeka na woko. Webusayiti iyo yikuguliska Baibolo ili yikuti iyi ni "Baibolo yekha iyo Trump wakuzomerezga", ndipo zina lake, chithuzithuzi chake, na umo wakuwonekera vikugwiliskirika ntchito mwakulipira layisensi kufuma ku gulu limoza la Trump lakuti CIC Ventures LLC.<ref>{{cite news |last1=Gold |first1=Michael |last2=Haberman |first2=Maggie | url=https://www.nytimes.com/2024/03/26/us/politics/trump-bible.html |title=Trump's Newest Venture? A $60 Bible. |work=[[The New York Times]] |date=March 26, 2024 |access-date=March 28, 2024}}</ref><ref>{{cite news |last=Colvin |first=Jill |url=https://apnews.com/article/trump-god-bless-usa-bible-greenwood-2713fda3efdfa297d0f024efb1ca3003 |title=Trump is selling 'God Bless the USA' Bibles for $59.99 as he faces mounting legal bills|work=[[Associated Press]] |date=March 26, 2024 |access-date=March 28, 2024}}</ref> == Masheya, mabondi, ndalama zakusungiramo ndalama, na vinthu vinyake vyakuyana == {{ multiple image | total_width=450 | image1= 20240326 Trump Media DJT stock price, weekly.svg |caption1= Mtengo wa masheya gha DJT ukafika pachanya pa madola 79 pa share yimoza pamanyuma pa kwamba kuguliskika ku msika wa masheya, kweni pamanyuma ukakhira.<ref>{{cite web |title=Trump Media & Technology Group Corp. (DJT) |url=https://finance.yahoo.com/quote/DJT/history/?period1=1709251200&period2=1764440401&frequency=1wk |website=finance.yahoo.com |publisher=Yahoo Finance |archive-url=https://web.archive.org/web/20251130043633/https://finance.yahoo.com/quote/DJT/history/? |archive-date=30 November 2025 |date=29 November 2025 |url-status=live}} (Select time span / Historical prices / Weekly)</ref> | image2= 2024- DJT net income.svg | caption2= Kufuma apo yikamba kuguliskika ku msika wa masheya, Trump Media & Technology Group Corp. yikhalanga na kupeleka ndalama zakutaya pa ntchito zake.<ref>[https://finance.yahoo.com/quote/DJT/financials/ Trump Media & Technology Group Corp. (DJT)], Yahoo Finance, accessed January 22, 2026</ref> }} Malo agho Trump wali kusungamo ndalama mu misika ya ndalama ghakukoleka chomene ku misika ya vya ndalama na katundu.<ref>{{cite book | url=https://books.google.com/books?id=VucCAAAAMBAJ&q=Trump&pg=PA24 | title=Feeding Frenzy | work=New York | date=June 26, 1999 | access-date=January 17, 2016| publisher=New York Media }}</ref><ref>{{cite web | url=https://www.csmonitor.com/Business/Saving-Money/2015/1010/Stocks-or-real-estate-What-Trump-can-teach-us-about-investing | title=Stocks or real estate? What Trump can teach us about investing | work=The Christian Science Monitor | date=October 10, 2015 | access-date=January 17, 2016 | author=Bogart, Jeff}}</ref> Ndalama izi zikumupangira phindu na ndalama zakugwiliskira ntchito kwizira mu nthowa zakupambanapambana nga ni magawa gha masheya (dividends), phindu la kuguliska vinthu (capital gains), na ndalama zakupokelera chifukwa cha kusunga ndalama kwa nyengo yitali (carried interest). Wakaŵikamo ndalama zakukwana madola 70 miliyoni mu masheya.<ref name=zacks>{{cite web | url=http://www.zacks.com/stock/news/188898/why-its-worth-watching-donald-trumps-stock-portfolio | title=Why It's Worth Watching Donald Trump's Stock Portfolio | publisher=Zacks Equity Research | date=September 3, 2015 | access-date=January 16, 2016 | archive-url=https://web.archive.org/web/20160131055755/http://www.zacks.com/stock/news/188898/why-its-worth-watching-donald-trumps-stock-portfolio | archive-date=January 31, 2016 | url-status=dead }}</ref> Nangauli malo gha nyumba (real estate) ghakaŵa mtundu wa katundu uwo wakatemwanga chomene, Trump wakamba kuŵa msangali wa misika ya ndalama mu 2011 pamanyuma pakukhuŵara chifukwa cha kuchepa kwa msika wa nyumba ku America. Pa nyengo iyo, ndalama zakupokera chiwongolero mu ma certificate of deposit (CDs) kufuma ku Federal Reserve zikaŵa zichoko chomene.<ref>{{cite web | url=https://www.forbes.com/sites/steveschaefer/2011/08/11/trump-grabs-blue-chips-in-battered-market/#2715e4857a0b6b9bdc6e28e5 | title=Trump Grabs Blue-Chips in Battered Market | work=[[Forbes]] | date=August 11, 2011 | access-date=January 17, 2016 | author=Schaefer, Steve}}</ref><ref name=Forbes02/> Trump wakati wakakhumbanga chomene yayi kuŵa msangali wa msika wa masheya, kweni malo ghapachanya gha nyumba agho ghakaŵa na mitengo yiwemi ghakaŵa ghakusuzga kusanga pa nyengo iyo, ndipo masheya na vinthu vya ndalama vikaŵa vyakutchipa kweniso vikapanga ndalama ziwemi kwizira mu dividends.<ref name="auto6">{{cite web | url=http://seekingalpha.com/article/287974-6-stocks-that-donald-trump-recently-bought | title=6 Stocks That Donald Trump Recently Bought | publisher=Seeking Alpha | date=August 7, 2011 | access-date=January 16, 2016}}</ref> Wakapanga phindu pa masheya 40 pa masheya 45 agho wakagura ndipo wakaguliska mu 2014, ichi chikapangiska kuti waŵe na chipambano cha pafupifupi 90% pa kuŵa na phindu la mtengo wa katundu (capital appreciation), padera pa mamiliyoni gha madola agho wakapokera nga ni dividends. Masheya agho ghakamupangira phindu likuru chomene ghakaŵa gha [[Bank of America Corporation]], [[The Boeing Company]], na [[Facebook, Inc.]], agho ghakamupangira phindu la madola 6.7 miliyoni, madola 3.96 miliyoni, na madola 3.85 miliyoni, mwakuyana.<ref name="zacks" /> Malo agho Trump wakaŵikamo masheya ghakaŵa na mtengo wakukhala pakati pa madola 33.4 miliyoni na madola 87.9 miliyoni mu 2015 ndipo ghakaŵa mu vigawo vinandi, kusazgapo makampani ghakuguliska vinthu, malo ghakuguliskirako vinthu, makampani gha mankhwala, makampani ghakupanga vinthu vya mafakitale, magulu gha mabanki, makampani gha mafuta, makampani gha tekinoloje yapachanya, na makampani ghakupanga vinthu vya vya nkhondo.<ref>{{cite web | url=http://www.businessinsider.com/donald-trumps-10-billion-financial-disclosure-report-2015-7 | title=The government just released a document detailing Donald Trump's alleged $10 billion fortune | website=[[Business Insider]] | date=July 22, 2015 | access-date=January 17, 2016 | first=Hunter |last=Walker}}</ref> Masheya gha makampani agho ghakaŵa mu malo ghake gha ndalama ghakasazgapo [[General Electric]], [[Chevron Corporation|Chevron]], [[United Parcel Service|UPS]], [[The Coca-Cola Company|Coca-Cola]], [[Home Depot]], [[Comcast]], [[Sanofi]], [[Ford Motor Company|Ford]], [[ConocoPhillips]], [[Energy Transfer Partners]], [[Altera]], [[Verizon Communications]], [[Procter & Gamble]], [[Bank of America]], [[Nike, Inc.|Nike]], [[Google]], [[Apple Inc.]], [[Altria Group|Philip Morris]], [[Citigroup]], [[Morgan Stanley]], [[Whole Foods Market|Whole Foods]], [[Intel]], [[IBM]], [[Bristol-Myers Squibb]], [[Johnson & Johnson]], [[Caterpillar Inc.|Caterpillar]], [[Kinder Morgan]], [[AT&T]] na Facebook.<ref name="auto6" /><ref name="auto7">{{cite web | url=https://blogs.wsj.com/moneybeat/2015/07/24/wealth-adviser-daily-briefing-a-peek-inside-donald-trumps-portfolio/ | title=Wealth Adviser Daily Briefing: A Peek Inside Donald Trump's Portfolio | work=[[The Wall Street Journal]] | date=July 24, 2015 | access-date=January 17, 2016}}</ref> Wakaŵa na ndalama zakukwana madola 78 miliyoni mu vinthu vya ndalama nga ni masheya, mabondi, mutual funds, private equity funds, fund of funds, na hedge funds.<ref>{{cite web | url=http://www.moneytalksnews.com/why-youre-probably-better-investing-than-donald-trump/2/ | title=Trump Worth $10 Billion Less Than If He'd Simply Invested in Index Funds | publisher=Money Talks News | date=December 9, 2015 | access-date=January 17, 2016 | author=Bowsher, Karla}}</ref> Maakaunti ghake gha ndalama ghakaŵikika ku [[JPMorgan]], [[Barclays]], [[Deutsche Bank]] na [[Oppenheimer Holdings|Oppenheimer]].<ref name="auto7" /><ref>{{cite web | url=http://www.investmentnews.com/article/20150723/FREE/150729940/donald-trumps-investment-portfolio-a-messy-hodgepodge-advisers | title=Donald Trump's investment portfolio a messy hodgepodge: advisers | publisher=Investment News | date=July 23, 2015 | access-date=January 17, 2016 | author=Hunnicutt, Trevor}}</ref> Trump wakasazgirako kuŵika ndalama mu ndalama zakuguliska izo zikuyang'ana mabizinesi ghapakati na ghachoko nga ni [[Tesla Motors]], kampani iyo yikupanga magalimoto gha magesi, ndipo wakaŵikangaso ndalama pa charu chose mu ndalama zakuguliska za misika iyo yikwamba kukura, ndalama zakukulira mabizinesi, kweniso hedge funds izo zili mu Europe na Asia.<ref name="auto8">{{cite web | url=http://www.seattletimes.com/business/how-donald-trump-rates-as-a-fund-investor/ | title=How Donald Trump rates as a fund investor | work=[[The Seattle Times]] | date=August 1, 2015 | access-date=January 16, 2016 | author=Jaffe, Chuck}}</ref> Wakaŵikangaso ndalama mu private equity na hedge funds zinandi, kusazgapo ndalama zakukwana $1 miliyoni m'paka $5 miliyoni mu Advantage Plus, $1 miliyoni m'paka $5 miliyoni mu AG Diversified Funds, $2 miliyoni mu [[MidOcean Partners|MidOcean Credit Opportunities]], $4 miliyoni mu [[Paulson & Co.]], kweniso pafupifupi $5 miliyoni mu [[Angelo, Gordon & Co.]].<ref>{{cite news | url=http://dealbreaker.com/2015/07/president-trump-cant-even-deal-with-these-financial-disclosure-forms-designed-for-poor-people/ | title=President Trump Can't Even Deal With These Financial Disclosure Forms Designed For Poor People | newspaper=Dealbreaker | date=July 15, 2015 | access-date=January 17, 2016 | author=Mcenery, Thornton}}</ref><ref>{{cite web | url=http://www.hedgefundintelligence.com/Article/3482050/Absolute-Return-News/The-Donald-trumps-expectations-in-election-poll.html | title=The Donald' trumps expectations in election poll | publisher=Hedge Fund Intelligence | access-date=January 16, 2016 | author=Kemmerer, Gillian}}</ref><ref>{{cite news | url=https://ca.finance.yahoo.com/news/peak-donald-trumps-mutual-funds-120012162.html | title=A Peak into Donald Trump's Mutual Funds | work=Yahoo Finance | date=October 7, 2015 | access-date=January 16, 2016 | author=Das, Gourab}}</ref> Ndalama zikuru chomene izo Trump wakaŵikamo ndalama zikaŵa mu Obsidian Fund ya [[BlackRock|Black Rock]], ndipo chigaŵa chake chikayowoyeka kuti chikaŵa pakati pa $25 miliyoni na $50 miliyoni.<ref name="auto9">{{cite web | url=http://www.myajc.com/news/business/stock-market-blues-dont-look-for-trumps-bets-to-da/nnT58/ | title=Stock market blues? Don't look for Trump's bets to dazzle | publisher=myAJC | date=August 31, 2015 | access-date=January 16, 2016 | author=Kempner, Matt}}</ref> Pafupifupi ndalama zose za Trump izo zikaŵa mu open-end mutual funds zikaŵa mu Baron Capital Management, gulu la mutual funds la ukuru wapakati ilo likulongozgeka na munthu wakumanyikwa pa vya ndalama zakuguliska, [[Ronald S. Baron]].<ref name="auto8" /><ref>{{cite web | url=https://www.msn.com/en-us/money/mutualfunds/donald-trump-fails-the-fiscal-responsibility-test-in-his-fund-picks/ar-AAdylqM | title=Donald Trump fails the fiscal responsibility test in his fund picks | publisher=MSN Money | access-date=January 17, 2016 | author=Jaffe, Chuck | url-status=dead | archive-url=https://web.archive.org/web/20160127183451/http://www.msn.com/en-us/money/mutualfunds/donald-trump-fails-the-fiscal-responsibility-test-in-his-fund-picks/ar-AAdylqM | archive-date=January 27, 2016 | df=mdy-all }}</ref> Trump wakaŵika ndalama zakukwana $16.2 miliyoni mu Baron Capital Management, ndipo ichi chikamupanga kuŵa mweneko wa chigaŵa chikuru cha masheya gha kampani iyi.<ref name=Forbes02>{{cite web | url=https://www.forbes.com/sites/steveschaefer/2015/09/30/donald-trump-stock-investments-facebook-bofa-boeing/#2715e4857a0b51ec5a303a82 | title=When Donald Trump Dabbled in Stocks: Why He Started Buying And How Much He Made | work=[[Forbes]] | date=September 30, 2015 | access-date=January 17, 2016 | author=Schaefer, Steve}}</ref> Wakati wakasanga ndalama zakujumpha $22 miliyoni kufuma ku private equity, hedge funds, na mutual fund investments zake, ndipo wakasanga ndalama zapakati pa $1.5 miliyoni na $10 miliyoni mu chaka, chomene kufuma ku vinthu nga ni dividends, capital gains, na carried interest.<ref>{{cite web | url=http://www.businessinsider.com/donald-trump-relationship-with-hedge-funds-2015-8 | title=Donald Trump has millions invested with 'paper pusher' hedge fund managers | website=[[Business Insider]] | access-date=January 16, 2016 | author=LaRoche, Julia}}</ref> Trump wakaŵikangaso chigaŵa cha ndalama zake mu mabondi gha boma la United States (U.S. Treasury bonds).<ref name="auto9" /> Pa fomu ya boma iyo wakajaza mu 2015, Trump wakayowoya kuti wakaŵa na golide wathupi, uyo mtengo wake ukaŵa pakati pa $100,001 na $250,000.<ref>{{cite web | url=http://www.businessinsider.com/donald-trump-owns-gold-2015-7 | title=Donald Trump owns gold | website=[[Business Insider]] | date=July 22, 2015 | access-date=January 16, 2016 | author=Udland, Myles}}</ref> == Misonkho na ndalama == {{main|Tax returns of Donald Trump}} {{See also|Donald Trump presidential campaign, 2016|Wealth of Donald Trump}} [[File:1982- Net worth of Donald Trump.svg |thumb |upright=1.25 |Ndalama izo Trump wakaŵa nazo nyengo na nyengo, kuyana na umo magazini ya ''[[Forbes]]'' yikawerengera<ref name=Forbes1982->Chigaba cha vyaka 1982–2000: {{cite magazine |date=October 3, 2023 |title=Here's How Much Donald Trump Is Worth |url=https://www.forbes.com/sites/danalexander/article/the-definitive-networth-of-donaldtrump/ |archive-url=https://web.archive.org/web/20231110003952/https://www.forbes.com/sites/danalexander/article/the-definitive-networth-of-donaldtrump/ |archive-date=November 10, 2023 |magazine=[[Forbes]] |access-date=March 28, 2026}} Palije vyakulongora vya vyaka 1990 m'paka 1995 chifukwa Trump wakalembeka yayi mu ndandanda ya [[Forbes 400|''Forbes'' 400]].</ref><ref name=Forbes2001->Chigaba cha vyaka 2001–2026: {{cite magazine |date=March 25, 2026 |title=Here's How Much Donald Trump Is Worth |url=https://www.forbes.com/sites/danalexander/article/the-definitive-networth-of-donaldtrump/ |magazine=[[Forbes]] |archive-url=https://web.archive.org/web/20260325200507/https://www.forbes.com/sites/danalexander/article/the-definitive-networth-of-donaldtrump/ |archive-date=25 March 2026 |url-status=live}}</ref>]] Trump wakafumiska chigaŵa cha chidziŵitso cha ndalama zake mu 2015,<ref name="Financial 2015" /> kweni wakakana kufumiska pa wumba mafomu ghake ghose gha misonkho,<ref name=WSJ19FebTax>{{cite news |work=[[The Wall Street Journal]] |date=February 19, 2016 |access-date=February 22, 2016 |url=https://www.wsj.com/articles/donald-trumps-tax-obligation-1455925753 |title=Donald Trump's Tax Obligation}}</ref> nangauli wakati wazamufumiska pambere chisankho cha 2016 chindafike usange kafukufuku wa [[income tax audit|Internal Revenue Service (IRS)]] uyo maloya ghake ghakayowoya kuti wachitika wakamara, uwo ukaŵa pa mafomu gha misonkho gha vyaka 2009 m'paka 2016.<ref>{{cite news |first=Jeremy |last=Diamond |title=Trump campaign releases letter confirming IRS audit |date=March 31, 2016 |website=[[CNN]] |url=http://www.cnn.com/2016/03/30/politics/donald-trump-tax-audit-letter/}}</ref><ref>{{cite news |first=Jeremy |last=Diamond |title=Donald Trump: I'll release tax returns after audit |date=May 12, 2016 |website=[[CNN]] |url=http://www.cnn.com/2016/05/11/politics/donald-trump-tax-returns/}}</ref> Kuyana na uthenga uwo kampeni yake yikafumiska mu Julayi 2015, "ndalama" za Trump mu 2014 zikaŵa $362 miliyoni ("izo zikasazgangapo dividends, interest, capital gains, rent, na ndalama zakufuma ku malayisensi").<ref name="auto1">{{cite web |url=https://www.donaldjtrump.com/images/uploads/DJT_PFD_Statement_(1).pdf |title=Donald J. Trump Files Personal Financial Disclosure Statement With Federal Election Commission |first=Corey R. |last=Lewandowski |date=July 15, 2015 |access-date=March 8, 2016 |url-status=dead |archive-url=https://web.archive.org/web/20160309043101/https://www.donaldjtrump.com/images/uploads/DJT_PFD_Statement_%281%29.pdf |archive-date=March 9, 2016 }}</ref> Mafomu ghake ghakulongora ndalama gha chaka cha 2015 ghakalongora kuti ndalama zake zose izo zikafuma zikaŵa zakujumpha $611 miliyoni.<ref name="Financial 2015">{{cite news |url=https://www.washingtonpost.com/wp-stat/graphics/politics/trump-archive/docs/trump-fec-financial-disclosure-2015.pdf |title=Donald Trump Personal Financial Disclosure Form 2015|newspaper=[[The Washington Post]]}}</ref> Magazini ya ''[[Fortune (magazine)|Fortune]]'' yikati ndalama zakukwana $362 miliyoni izo zikalembeka mu mafomu gha [[Federal Election Commission]] (FEC) zikaŵa yayi "ndalama izo wakasanga" kweni zikaŵa ndalama zose izo zikanjira pambere malipiro gha ŵantchito, chiwongolero cha ngongoli, na ndalama zinyake za bizinesi zindachitike. Ndalama izo Trump wakasanga nadi zikaghanaghanirika kuti zikaŵa pafupifupi chigaŵa chimoza mwa vitatu cha ndalama izo zikalembeka.<ref name=Tully2Mar>{{cite news |url=http://fortune.com/2016/03/02/donald-trump-tax-returns-income/ |title=Why Donald Trump's Tax Returns May Prove He's Not That Rich |work=[[Fortune (magazine)|Fortune]] |first=Shawn |last=Tully |date=March 2, 2016 |access-date=March 10, 2016}}</ref><ref name=Elstein8Mar /> Kuyana na malipoti gha wumba, Trump wakapokera chikwaniro cha msonkho cha ku New York cha $302 mu 2013 (kweniso mu vyaka vinyake viŵiri vyasono), icho chikapelekeka ku ŵanthu awo ŵakupanga ndalama zakukhira pa $500,000 pa chaka ndipo ŵakupereka mafomu gha misonkho gha boma lawo kuti ŵalongore umboni.<ref name=Elstein8Mar>{{cite news |url=http://www.crainsnewyork.com/article/20160308/BLOGS02/160309865/how-did-trump-qualify-for-a-middle-class-tax-break |title=Trump qualified for a tax break for New Yorkers making $500K or less |work=Crain's |date=March 8, 2016 |access-date=March 10, 2016 |first=Aaron |last=Elstein}}</ref> Mulaŵiliri wa kampeni ya Trump wakayowoya kuti chikwaniro cha msonkho ichi chikaŵa kupuvya.<ref name=Elstein8Mar /> Mu Okutobala 2016, vikavumbukwa kuti Trump wakalemba kuti wakataya ndalama zakukwana $916 miliyoni pa mafomu gha misonkho gha 1995. Chifukwa chakuti kutaya ndalama pa chaka chimoza kungagwiliskirika ntchito kuchepeska ndalama izo zikulipirika msonkho mu vyaka vyakulondezgapo, kutaya ndalama uku kukamovwira kuchepeska panji kuleka kulipira msonkho wa ndalama ku boma la United States mu nyengo ya vyaka 18 iyo ndalama zakutayika zikapokera kunthazi.<ref>{{cite web|url=https://www.nytimes.com/2016/10/02/us/politics/donald-trump-taxes.html|title=Donald Trump Tax Records Show He Could Have Avoided Taxes for Nearly Two Decades, The Times Found|date=October 2, 2016|work=[[The New York Times]]}}</ref> Trump wakazomera kuti wakagwiliskira ntchito kutaya ndalama uku, kweni wakakana kupereka unenesko wakukwana nga ni vyaka ivyo kutaya ndalama uku kukagwiliskirika ntchito.<ref>{{cite news|url=https://www.nytimes.com/2016/10/10/us/politics/donald-trump-taxes.html|title=Donald Trump Acknowledges Not Paying Federal Income Taxes for Years|newspaper=[[The New York Times]]|date=October 10, 2016|first1=Steve|last1=Eder|first2=Megan|last2=Twohey}}</ref> Nkhani yakufufuza ya ''New York Times'' yikasanga kuti mu vyaka vya m'ma 1990 pakwamba, kuti vileke kufika ku "kuparanyika kwachuma", mabizinesi gha Trump ghakagwiliskira ntchito nthowa izo zikaŵa "zakukayikiska pa nkhani ya malango" kuti ghaleke kulipira misonkho, ndipo ŵalongozgi ŵa malango ŵa Trump ŵakayowoya kuti vinthu ivi vikaŵa "vambura kwenelera".<ref>{{cite web |last1=Salisbury |first1=Ian |date=November 1, 2016 |title=Did Trump Really Lose $1 Billion in One Year? |url=https://money.com/trump-tax-strategies-business-practices/ |url-status=live |archive-url=https://web.archive.org/web/20200814121636/https://money.com/trump-tax-strategies-business-practices/ |archive-date=August 14, 2020 |access-date=November 1, 2016 |website=[[Money.com]] |quote=Trump, or his tax advisers, had somehow devised a way to claim large business losses tied to debts that had been forgiven without reporting offsetting income that would have reduced his staggering loss ... documents that appear to show during the early 1990s Trump indeed used a strategy of swapping partnership interests to his creditors in exchange for having his businesses debts forgiven, eliminating the need for him to report this relief as income. There are still plenty of unknowns.}}</ref> Ŵanthu ŵakuzimanya makora nkhani za misonkho ŵakayowoya kuti "nthowa yakuzengera apa yikaŵa kuti yikagwiliskika ntchito mwakwenelera yayi, kweni yikakankhika kufika ku malo agho yikaŵa yakuleka kumanyikikwa", ndipo yikaŵa ya "mauryarya gha manambara". Chifukwa chakuti misonkho iyi yikaŵa yakukhwaskana na kuchepa kwa ngongoli zikuru za Trump za ma bond gha pachanya kweniso kuparanyika kwa makasino ghatatu gha Trump, nthowa izi zikuyowoyeka kuti zikukolerana na hasara ya $916 miliyoni iyo Trump wakayowoya pa fomu yake ya misonkho ya mu 1995.<ref>{{cite web|url=https://www.nytimes.com/2016/11/01/us/politics/donald-trump-tax.html|title=Donald Trump Used Legally Dubious Method to Avoid Paying Taxes|date=November 1, 2016|work=[[The New York Times]]|access-date=November 1, 2016}}</ref> == Wonaniso == * [[Annual financial disclosures of Donald Trump|Kuvumbura chuma kwa chaka kwa Donald Trump]] * [[Business projects of Donald Trump in Russia|Mapulojekiti gha bizinesi gha Donald Trump ku Russia]] * [[Media career of Donald Trump|Umoyo wa Donald Trump mu vyakufalitsa nkhani]] == Ukaboni == {{Reflist|group="nb"}} == Ukaboni unyake == {{reflist|30em}} == Mabuku agho ghagwiliskika ntchito == <!-- TChigaŵa ichi chili cha mabuku pera agho ghazunulika mu mazgu gha pasi gha nkhani iyi ya Wikipedia. --> {{Refbegin}} * {{cite book|url=https://books.google.com/books?id=uJifCgAAQBAJ|title=The Trumps: Three Generations That Built an Empire|last=Blair|first=Gwenda|publisher=[[Simon & Schuster]]|year=2015b|orig-year=2001|isbn=978-1-5011-3936-9}} * {{cite book|last1=Kranish|first1= Michael|last2= Fisher|first2= Marc|author-link1=Michael Kranish|author-link2=Marc Fisher|year=2016|title=Trump Revealed: An American Journey of Ambition, Ego, Money, and Power|publisher=[[Simon and Schuster]]|isbn=9781508226758|quote=His new agency, originally conceived as Trump Models Inc., ended up with the name T Models...|title-link=Trump Revealed}} * {{cite book|title=Trumped! The Inside Story of the Real Donald Trump, His Cunning Rise and Spectacular Fall|last=O'Donnell|first=James R.|publisher=Simon & Schuster|year=1991|isbn=978-0-671-73735-1}} {{refend}} {{Donald Trump}} {{Trump businesses}} [[Category:Ntchito za bizinesi za Donald Trump| ]] [[Category:Ntchito za bizinesi za munthu payekha|Trump, Donald]] sjeo0k4og0ae8j26tpuu7qhrchk30rz Template:Donald Trump 10 47775 116784 2026-07-07T15:29:40Z en>RedBlueGreen93 0 116784 wikitext text/x-wiki {{#invoke:navbox|navbox | name = Donald Trump | title = [[Donald Trump]] | state = {{{state|autocollapse}}} | bodyclass = hlist | above = * <span class="nowrap">[[First presidency of Donald Trump|45th]] (2017–2021) and [[Second presidency of Donald Trump|47th]] (2025–present) [[president of the United States]]</span> | group1 = Life and<br>politics | list1 = subgroup | 1_list1 = * [[Early life and education of Donald Trump|Early life and education]] * [[Board of Peace]] * [[Shield of the Americas]] * [[Media career of Donald Trump|Media career]] ** ''[[The Apprentice (American TV series)|The Apprentice]]'' * [[Donald Trump and American football|American football]] * [[Donald Trump and golf|Golf]] * [[List of awards and honors received by Donald Trump|Honors and awards]] * [[Makeup of Donald Trump|Makeup]] * [[Political positions of Donald Trump|Political positions]] ** [[Trumpism]] ** [[Donald Trump and fascism|Relationship to fascism]] ** [[Donald Trump and antisemitism|Relationship to antisemitism]] * [[Rhetoric of Donald Trump|Rhetoric]] * [[List of political endorsements by Donald Trump|Political endorsements]] * [[False or misleading statements by Donald Trump|False or misleading statements]] ** [[False or misleading statements by Donald Trump (first term)|first term]] ** [[False or misleading statements by Donald Trump (between terms)|between terms]] ** [[False or misleading statements by Donald Trump (second term)|second term]] ** [[List of conspiracy theories promoted by Donald Trump|promotion of conspiracy theories]] * [[Protests against Donald Trump|Protests]] ** [[Timeline of protests against Donald Trump|timeline]] * [[Racial views of Donald Trump|Racial views]] * [[Age and health concerns about Donald Trump|Age and health concerns]] *[[Donald Trump and religion|Religion]] ** [[Catholicism in the Trump administrations|Catholicism]] | 1_group2 = [[Business career of Donald Trump|Business career]] | 1_list2 = * [[The Trump Organization]] * [[Personal and business legal affairs of Donald Trump|legal affairs]] * [[Business projects of Donald Trump in Russia|business projects in Russia]] * [[Wealth of Donald Trump|wealth]] * [[Tax returns of Donald Trump|tax returns]] * [[Trump Media & Technology Group]] | 1_group3 = [[Security incidents involving Donald Trump|Security incidents]] | 1_list3 = * [[2016 Donald Trump Las Vegas rally incident|2016 Las Vegas incident]] * [[Attempted assassination of Donald Trump in Pennsylvania|July 2024 assassination attempt]] ** [[Donald Trump raised-fist photographs|raised-fist photographs]] ** [[Thomas Crooks|perpetrator]] * [[Attempted assassination of Donald Trump in Florida|September 2024 assassination attempt]] ** [[Ryan Routh|perpetrator]] * [[2026 White House Correspondents' Dinner shooting]] | group2 = [[Trump family|Family]] | list2 = subgroup | 2_group1 = Children | 2_list1 = * [[Donald Trump Jr.]] * [[Ivanka Trump]] * [[Eric Trump]] * [[Tiffany Trump]] * [[Barron Trump]] | 2_list2 = * [[Melania Trump]] (wife) * [[Fred Trump]] (father) * [[Mary Anne MacLeod Trump]] (mother) * [[Maryanne Trump Barry]] (sister) * [[Fred Trump Jr.]] (brother) * [[Robert Trump]] (brother) * [[Frederick Trump]] (grandfather) * [[Elizabeth Christ Trump]] (grandmother) * [[John G. Trump]] (uncle) * [[Mary L. Trump]] (niece) * [[Fred Trump III]] (nephew) * [[John W. Walter]] (cousin) | group3 = Campaigns | list3 = subgroup | 3_list1 = * [[Donald Trump 2000 presidential campaign|2000 presidential campaign]] * "[[Make America Great Again]]" ** [[Make America Great Again#MAGA hat|hat]] * [[Republican Accountability|Republican opposition]] ** [[Never Trump movement]] ** [[List of Republicans who opposed the Donald Trump 2016 presidential campaign|2016]] ** [[Mitt Romney's 2016 anti-Trump speech|Mitt Romney speech]] ** [[List of Republicans who opposed the Donald Trump 2020 presidential campaign|2020]] ** [[List of Republicans who opposed the Donald Trump 2024 presidential campaign|2024]] ** [[Donald Trump Access Hollywood tape|''Access Hollywood'' recording]] * "[[Kamala is for they/them]]" (attack ad) * [[God Bless the U.S.A. Bible|Trump Bible]] * "[[God Bless the U.S.A.]]" (campaign song) * "[[Y.M.C.A. (song)|Y.M.C.A.]]" (campaign song) | 3_group2 = [[Donald Trump 2016 presidential campaign|2016]] | 3_list2 = * [[Donald Trump 2016 presidential campaign#Announcement|Announcement]] * [[List of rallies for the 2016 Donald Trump presidential campaign|Rallies]] * [[Links between Trump associates and Russian officials|Links between campaign officials and Russian government officials]] * [[Crossfire Hurricane (FBI investigation)|Crossfire Hurricane]] * [[2016 Republican Party presidential primaries|Republican primaries]] ** [[2016 Republican Party presidential debates and forums|debates]] ** [[2016 Republican Party vice presidential candidate selection|running mate selection]] ** [[2016 Republican National Convention|convention]] * [[2016 United States presidential election|General election]] ** [[List of Donald Trump 2016 presidential campaign endorsements|endorsements]] ** [[2016 United States presidential debates|debates]] ** [[International reactions to the 2016 United States presidential election|reactions]] ** [[First presidential transition of Donald Trump|transition]] | 3_group3 = [[Donald Trump 2020 presidential campaign|2020]] | 3_list3 = * [[List of Donald Trump rallies (December 2016–2022)#2020 presidential campaign|Rallies]] ** [[2020 Tulsa Trump rally|Tulsa rally]] * [[2020 Republican Party presidential primaries|Republican primaries]] ** [[2020 Republican National Convention|convention]] ***[[Logistics of the 2020 Republican National Convention|logistics]] ***[[Schedule of the 2020 Republican National Convention|schedule]] ***[[Cancelled plans for 2020 Republican National Convention in Jacksonville|Cancelled plans for Jacksonville]] * [[2020 United States presidential election|General election]] ** [[List of Donald Trump 2020 presidential campaign political endorsements|political endorsements]] ** [[List of Donald Trump 2020 presidential campaign non-political endorsements|non-political endorsements]] ** [[2020 United States presidential debates|debates]] ** [[Attempts to overturn the 2020 United States presidential election|attempts to overturn]] *** [[Trump fake electors plot|fake electors plot]] **** [[Kenneth Chesebro#Legal work|Chesebro memos]] **** [[Eastman memos]] *** [[Post-election lawsuits related to the 2020 U.S. presidential election|lawsuits]] **** ''[[Texas v. Pennsylvania]]'' *** [[Jeffrey Clark letter]] ** [[Republican reactions to Donald Trump's claims of 2020 election fraud|Republican reactions to Trump's election fraud claims]] ** [[Presidential transition of Joe Biden|Biden transition]] | 3_group4 = [[Donald Trump 2024 presidential campaign|2024]] | 3_list4 = * [[Donald Trump 2024 presidential campaign#Announcement|Announcement]] * [[List of rallies for the 2024 Donald Trump presidential campaign|Rallies]] * [[2024 Republican Party presidential primaries|Republican primaries]] ** [[2024 Republican Party presidential debates and forums|debates]] ** [[2024 Republican Party vice presidential candidate selection|running mate selection]] ** [[2024 Republican National Convention|convention]] ***[[Logistics of the 2024 Republican National Convention|logistics]] * [[2024 United States presidential election|General election]] ** [[Presidential eligibility of Donald Trump|eligibility]] ** [[List of Donald Trump 2024 presidential campaign endorsements|endorsements]] ** [[2024 United States presidential debates|debates]] ** [[Second presidential transition of Donald Trump|transition]] | group4 = Legal affairs | list4 = * [[FBI investigation into Donald Trump's handling of government documents|FBI investigation into handling of government documents]] * [[FBI search of Mar-a-Lago]] * [[Gulf of Mexico naming controversy]] * [[New York investigations of the Trump Organization]] ** [[Stormy Daniels–Donald Trump scandal|Stormy Daniels scandal]] ** [[New York business fraud lawsuit against the Trump Organization|civil]] ** [[New York investigations of the Trump Organization#Criminal investigation|criminal]] * ''[[E. Jean Carroll v. Donald J. Trump|Carroll v. Trump]]'' * [[Trump v. United States (2022)|''Trump v. United States'' (2022)]] * [[Donald Trump sexual misconduct allegations|Sexual misconduct allegations]] ** [[Relationship of Donald Trump and Jeffrey Epstein|Epstein ties]] * State prosecutions ** [[Georgia election racketeering prosecution|Georgia]] ** [[Prosecution of Donald Trump in New York|New York]] * [[Smith special counsel investigation]] * Federal prosecution ** [[Federal prosecution of Donald Trump (classified documents case)|classified documents case]] ** [[Federal prosecution of Donald Trump (election obstruction case)|election obstruction case]] * [[Mug shot of Donald Trump|Trump mug shot]] * ''[[Trump v. United States]]'' | group5 = Related | list5 = * [[Donald J. Trump Foundation|Foundation]] * [[Donald J. Trump Presidential Library|Presidential library]] * [[Donald Trump in popular culture|In popular culture]] ** "[[Best Sex I've Ever Had]]" ** [[Trump dance]] ** [[Donald Trump filmography|filmography]] ** [[Donald Trump in music|in music]] ** [[Saturday Night Live parodies of Donald Trump|''SNL'' parodies]] * [[Residences of Donald Trump|Residences]] ** [[Residences of Donald Trump#Queens|85-15 Wareham Place]] ** [[Trump Tower]] *** [[Trump Tower penthouse of Donald Trump|penthouse apartment]] ** [[Trump National Golf Club Bedminster|Bedminster]] ** [[Mar-a-Lago]] * ''[[The Visionary]]'' * [[Colorado State Capitol portrait of Donald Trump|Colorado State Capitol portrait]] * Social media ** [[Social media use by Donald Trump|use]] ** [[Donald Trump's conflict with the news media|conflict]] ** [[Trump–Musk feud|Feud with Elon Musk]] ** [[Use of X by Donald Trump|X]] ** [[Trump Tower wiretapping allegations|wiretapping allegations]] * ''[[Real News Update]]'' * ''[[covfefe]]'' * [[Donald J. Trump State Park]] * [[List of nicknames used by Donald Trump|Nicknames used]] * [[Trump Force One]] * [[Trump derangement syndrome]] * [[Fort Trump]] * [[Official portraits of Donald Trump|Official portraits]] * Support groups ** [[Bikers for Trump]] ** [[Michael the Black Man|Blacks for Trump]] ** [[Black Voices for Trump]] ** [[Gays for Trump]] ** [[Trumpettes USA]] ** [[Women for Trump]] * [[Pseudonyms used by Donald Trump|Pseudonyms]] * [[Wikipedia coverage of Donald Trump|Wikipedia coverage]] ** [[Wikipedia:Not every single thing Donald Trump does deserves an article|Notability guidelines]] | below = * '''[[Barack Obama|← Barack Obama]]''' * '''[[Joe Biden|← Joe Biden →]]''' ---- * {{#invoke:Icon|main|Category}} [[:Category:Donald Trump|Category]] }}<noinclude> {{documentation|Template:Donald Trump/doc}} {{navbox documentation}} {{DEFAULTSORT:Trump, Donald}} [[Category:Donald Trump-related templates| ]] [[Category:President of the United States navigational boxes]] [[Category:Businesspeople templates]] [[Category:United States television personality navigational boxes]] </noinclude> 855maanmly2movrgxnvox8m7e4j9euu 116785 116784 2026-07-15T19:07:00Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Donald_Trump]] 116784 wikitext text/x-wiki {{#invoke:navbox|navbox | name = Donald Trump | title = [[Donald Trump]] | state = {{{state|autocollapse}}} | bodyclass = hlist | above = * <span class="nowrap">[[First presidency of Donald Trump|45th]] (2017–2021) and [[Second presidency of Donald Trump|47th]] (2025–present) [[president of the United States]]</span> | group1 = Life and<br>politics | list1 = subgroup | 1_list1 = * [[Early life and education of Donald Trump|Early life and education]] * [[Board of Peace]] * [[Shield of the Americas]] * [[Media career of Donald Trump|Media career]] ** ''[[The Apprentice (American TV series)|The Apprentice]]'' * [[Donald Trump and American football|American football]] * [[Donald Trump and golf|Golf]] * [[List of awards and honors received by Donald Trump|Honors and awards]] * [[Makeup of Donald Trump|Makeup]] * [[Political positions of Donald Trump|Political positions]] ** [[Trumpism]] ** [[Donald Trump and fascism|Relationship to fascism]] ** [[Donald Trump and antisemitism|Relationship to antisemitism]] * [[Rhetoric of Donald Trump|Rhetoric]] * [[List of political endorsements by Donald Trump|Political endorsements]] * [[False or misleading statements by Donald Trump|False or misleading statements]] ** [[False or misleading statements by Donald Trump (first term)|first term]] ** [[False or misleading statements by Donald Trump (between terms)|between terms]] ** [[False or misleading statements by Donald Trump (second term)|second term]] ** [[List of conspiracy theories promoted by Donald Trump|promotion of conspiracy theories]] * [[Protests against Donald Trump|Protests]] ** [[Timeline of protests against Donald Trump|timeline]] * [[Racial views of Donald Trump|Racial views]] * [[Age and health concerns about Donald Trump|Age and health concerns]] *[[Donald Trump and religion|Religion]] ** [[Catholicism in the Trump administrations|Catholicism]] | 1_group2 = [[Business career of Donald Trump|Business career]] | 1_list2 = * [[The Trump Organization]] * [[Personal and business legal affairs of Donald Trump|legal affairs]] * [[Business projects of Donald Trump in Russia|business projects in Russia]] * [[Wealth of Donald Trump|wealth]] * [[Tax returns of Donald Trump|tax returns]] * [[Trump Media & Technology Group]] | 1_group3 = [[Security incidents involving Donald Trump|Security incidents]] | 1_list3 = * [[2016 Donald Trump Las Vegas rally incident|2016 Las Vegas incident]] * [[Attempted assassination of Donald Trump in Pennsylvania|July 2024 assassination attempt]] ** [[Donald Trump raised-fist photographs|raised-fist photographs]] ** [[Thomas Crooks|perpetrator]] * [[Attempted assassination of Donald Trump in Florida|September 2024 assassination attempt]] ** [[Ryan Routh|perpetrator]] * [[2026 White House Correspondents' Dinner shooting]] | group2 = [[Trump family|Family]] | list2 = subgroup | 2_group1 = Children | 2_list1 = * [[Donald Trump Jr.]] * [[Ivanka Trump]] * [[Eric Trump]] * [[Tiffany Trump]] * [[Barron Trump]] | 2_list2 = * [[Melania Trump]] (wife) * [[Fred Trump]] (father) * [[Mary Anne MacLeod Trump]] (mother) * [[Maryanne Trump Barry]] (sister) * [[Fred Trump Jr.]] (brother) * [[Robert Trump]] (brother) * [[Frederick Trump]] (grandfather) * [[Elizabeth Christ Trump]] (grandmother) * [[John G. Trump]] (uncle) * [[Mary L. Trump]] (niece) * [[Fred Trump III]] (nephew) * [[John W. Walter]] (cousin) | group3 = Campaigns | list3 = subgroup | 3_list1 = * [[Donald Trump 2000 presidential campaign|2000 presidential campaign]] * "[[Make America Great Again]]" ** [[Make America Great Again#MAGA hat|hat]] * [[Republican Accountability|Republican opposition]] ** [[Never Trump movement]] ** [[List of Republicans who opposed the Donald Trump 2016 presidential campaign|2016]] ** [[Mitt Romney's 2016 anti-Trump speech|Mitt Romney speech]] ** [[List of Republicans who opposed the Donald Trump 2020 presidential campaign|2020]] ** [[List of Republicans who opposed the Donald Trump 2024 presidential campaign|2024]] ** [[Donald Trump Access Hollywood tape|''Access Hollywood'' recording]] * "[[Kamala is for they/them]]" (attack ad) * [[God Bless the U.S.A. Bible|Trump Bible]] * "[[God Bless the U.S.A.]]" (campaign song) * "[[Y.M.C.A. (song)|Y.M.C.A.]]" (campaign song) | 3_group2 = [[Donald Trump 2016 presidential campaign|2016]] | 3_list2 = * [[Donald Trump 2016 presidential campaign#Announcement|Announcement]] * [[List of rallies for the 2016 Donald Trump presidential campaign|Rallies]] * [[Links between Trump associates and Russian officials|Links between campaign officials and Russian government officials]] * [[Crossfire Hurricane (FBI investigation)|Crossfire Hurricane]] * [[2016 Republican Party presidential primaries|Republican primaries]] ** [[2016 Republican Party presidential debates and forums|debates]] ** [[2016 Republican Party vice presidential candidate selection|running mate selection]] ** [[2016 Republican National Convention|convention]] * [[2016 United States presidential election|General election]] ** [[List of Donald Trump 2016 presidential campaign endorsements|endorsements]] ** [[2016 United States presidential debates|debates]] ** [[International reactions to the 2016 United States presidential election|reactions]] ** [[First presidential transition of Donald Trump|transition]] | 3_group3 = [[Donald Trump 2020 presidential campaign|2020]] | 3_list3 = * [[List of Donald Trump rallies (December 2016–2022)#2020 presidential campaign|Rallies]] ** [[2020 Tulsa Trump rally|Tulsa rally]] * [[2020 Republican Party presidential primaries|Republican primaries]] ** [[2020 Republican National Convention|convention]] ***[[Logistics of the 2020 Republican National Convention|logistics]] ***[[Schedule of the 2020 Republican National Convention|schedule]] ***[[Cancelled plans for 2020 Republican National Convention in Jacksonville|Cancelled plans for Jacksonville]] * [[2020 United States presidential election|General election]] ** [[List of Donald Trump 2020 presidential campaign political endorsements|political endorsements]] ** [[List of Donald Trump 2020 presidential campaign non-political endorsements|non-political endorsements]] ** [[2020 United States presidential debates|debates]] ** [[Attempts to overturn the 2020 United States presidential election|attempts to overturn]] *** [[Trump fake electors plot|fake electors plot]] **** [[Kenneth Chesebro#Legal work|Chesebro memos]] **** [[Eastman memos]] *** [[Post-election lawsuits related to the 2020 U.S. presidential election|lawsuits]] **** ''[[Texas v. Pennsylvania]]'' *** [[Jeffrey Clark letter]] ** [[Republican reactions to Donald Trump's claims of 2020 election fraud|Republican reactions to Trump's election fraud claims]] ** [[Presidential transition of Joe Biden|Biden transition]] | 3_group4 = [[Donald Trump 2024 presidential campaign|2024]] | 3_list4 = * [[Donald Trump 2024 presidential campaign#Announcement|Announcement]] * [[List of rallies for the 2024 Donald Trump presidential campaign|Rallies]] * [[2024 Republican Party presidential primaries|Republican primaries]] ** [[2024 Republican Party presidential debates and forums|debates]] ** [[2024 Republican Party vice presidential candidate selection|running mate selection]] ** [[2024 Republican National Convention|convention]] ***[[Logistics of the 2024 Republican National Convention|logistics]] * [[2024 United States presidential election|General election]] ** [[Presidential eligibility of Donald Trump|eligibility]] ** [[List of Donald Trump 2024 presidential campaign endorsements|endorsements]] ** [[2024 United States presidential debates|debates]] ** [[Second presidential transition of Donald Trump|transition]] | group4 = Legal affairs | list4 = * [[FBI investigation into Donald Trump's handling of government documents|FBI investigation into handling of government documents]] * [[FBI search of Mar-a-Lago]] * [[Gulf of Mexico naming controversy]] * [[New York investigations of the Trump Organization]] ** [[Stormy Daniels–Donald Trump scandal|Stormy Daniels scandal]] ** [[New York business fraud lawsuit against the Trump Organization|civil]] ** [[New York investigations of the Trump Organization#Criminal investigation|criminal]] * ''[[E. Jean Carroll v. Donald J. Trump|Carroll v. Trump]]'' * [[Trump v. United States (2022)|''Trump v. United States'' (2022)]] * [[Donald Trump sexual misconduct allegations|Sexual misconduct allegations]] ** [[Relationship of Donald Trump and Jeffrey Epstein|Epstein ties]] * State prosecutions ** [[Georgia election racketeering prosecution|Georgia]] ** [[Prosecution of Donald Trump in New York|New York]] * [[Smith special counsel investigation]] * Federal prosecution ** [[Federal prosecution of Donald Trump (classified documents case)|classified documents case]] ** [[Federal prosecution of Donald Trump (election obstruction case)|election obstruction case]] * [[Mug shot of Donald Trump|Trump mug shot]] * ''[[Trump v. United States]]'' | group5 = Related | list5 = * [[Donald J. Trump Foundation|Foundation]] * [[Donald J. Trump Presidential Library|Presidential library]] * [[Donald Trump in popular culture|In popular culture]] ** "[[Best Sex I've Ever Had]]" ** [[Trump dance]] ** [[Donald Trump filmography|filmography]] ** [[Donald Trump in music|in music]] ** [[Saturday Night Live parodies of Donald Trump|''SNL'' parodies]] * [[Residences of Donald Trump|Residences]] ** [[Residences of Donald Trump#Queens|85-15 Wareham Place]] ** [[Trump Tower]] *** [[Trump Tower penthouse of Donald Trump|penthouse apartment]] ** [[Trump National Golf Club Bedminster|Bedminster]] ** [[Mar-a-Lago]] * ''[[The Visionary]]'' * [[Colorado State Capitol portrait of Donald Trump|Colorado State Capitol portrait]] * Social media ** [[Social media use by Donald Trump|use]] ** [[Donald Trump's conflict with the news media|conflict]] ** [[Trump–Musk feud|Feud with Elon Musk]] ** [[Use of X by Donald Trump|X]] ** [[Trump Tower wiretapping allegations|wiretapping allegations]] * ''[[Real News Update]]'' * ''[[covfefe]]'' * [[Donald J. Trump State Park]] * [[List of nicknames used by Donald Trump|Nicknames used]] * [[Trump Force One]] * [[Trump derangement syndrome]] * [[Fort Trump]] * [[Official portraits of Donald Trump|Official portraits]] * Support groups ** [[Bikers for Trump]] ** [[Michael the Black Man|Blacks for Trump]] ** [[Black Voices for Trump]] ** [[Gays for Trump]] ** [[Trumpettes USA]] ** [[Women for Trump]] * [[Pseudonyms used by Donald Trump|Pseudonyms]] * [[Wikipedia coverage of Donald Trump|Wikipedia coverage]] ** [[Wikipedia:Not every single thing Donald Trump does deserves an article|Notability guidelines]] | below = * '''[[Barack Obama|← Barack Obama]]''' * '''[[Joe Biden|← Joe Biden →]]''' ---- * {{#invoke:Icon|main|Category}} [[:Category:Donald Trump|Category]] }}<noinclude> {{documentation|Template:Donald Trump/doc}} {{navbox documentation}} {{DEFAULTSORT:Trump, Donald}} [[Category:Donald Trump-related templates| ]] [[Category:President of the United States navigational boxes]] [[Category:Businesspeople templates]] [[Category:United States television personality navigational boxes]] </noinclude> 855maanmly2movrgxnvox8m7e4j9euu Template:Trump businesses 10 47776 116798 2026-03-27T17:17:12Z en>Rich Farmbrough 0 116798 wikitext text/x-wiki {{#invoke:Navbox|navbox | name = Trump businesses | title = [[Business career of Donald Trump|Businesses]] of [[Donald Trump]] | bodyclass = hlist | state = {{{state<includeonly>|collapsed</includeonly>}}} | above = {{flatlist}} * '''[[The Trump Organization]]''' ** [[Donald Trump Jr.]] ** [[Eric Trump]] ** [[Allen Weisselberg]] * [[Personal and business legal affairs of Donald Trump]] * [[List of things named after Donald Trump]] {{endflatlist}} | group1 = [[New York City|NYC]] properties | list1 = * [[40 Wall Street|The Trump Building (40 Wall Street)]] * [[Trump Parc|Trump Parc and Trump Parc East]] * [[Trump Park Avenue]] * [[Trump Tower]] * [[Trump World Tower]] |group2 = Hotels and resorts |list2 = * Trump International Hotel and Tower ** [[Trump International Hotel and Tower (Chicago)|Chicago]] ** [[Trump International Hotel Las Vegas|Las Vegas]] *** [[2025 Las Vegas Cybertruck explosion|2025 explosion]] ** [[Trump International Hotel Maldives|Maldives]] ** [[Trump International Hotel and Tower (New York City)|New York City]] * [[Mar-a-Lago]] | group3 = Golf courses | list3 = subgroup | 3_group1 = US | 3_list1 = * [[Trump National Golf Club Bedminster|Bedminster, NJ]] * [[Trump National Doral Miami|"Doral" Miami, FL]] * [[Trump National Golf Club Jupiter|Jupiter, FL]] * [[Trump National Golf Club Los Angeles|Los Angeles, CA]] * [[Trump National Golf Club Philadelphia|Pine Hill, NJ]] * [[Trump National Golf Club Washington, D.C.|Washington, D.C.]] * [[Trump National Golf Club Westchester|Westchester, NY]] * [[Trump International Golf Club (West Palm Beach)|West Palm Beach, FL]] | 3_group2 = Europe | 3_list2 = * [[Trump International Golf Links, Scotland|Balmedie, Scotland]] ** [[Trump International Golf Club Scotland Ltd v The Scottish Ministers|wind farm dispute]] * [[Trump International Golf Links and Hotel Ireland|Doonbeg, Ireland]] * [[Turnberry (golf course)|Turnberry, Scotland]] | group4 = Other current ventures | list4 = * [[$Trump]] * [[Cryptocurrency in the second Donald Trump administration|Cryptocurrency]] * [[Never Surrender High-Top]] * [[Trump Media & Technology Group]] ** [[Truth Social]] * [[Trump Mobile]] * [[Trump Winery]] |group5 = Name licensing |list5 = * [[Trump Bay Street]] * [[Trump Palace Condominiums]] ** [[Trump Plaza (Jersey City)|Jersey City, NJ]] ** [[Trump Plaza (New Rochelle)|New Rochelle, NY]] ** [[Trump Plaza (New York City)|New York City, NY]] * Trump Tower ** [[Trump Towers Istanbul|Istanbul, Turkey]] ** [[Trump Tower Manila|Manila, Philippines]] ** [[Trump Towers Pune|Pune, India]] ** [[Trump Tower Punta del Este|Punta del Este, Uruguay]] ** [[Trump Towers (Sunny Isles Beach)|Sunny Isles Beach, FL]] | group6 = Former properties | list6 = * [[General Motors Building (Manhattan)|GM Building]] * [[Hyatt Grand Central New York]] * [[JW Marriott Panama]] * [[Ka Laʻi Waikiki Beach Hotel]] * [[LSH Hotel]] (Brazil) * [[Old Post Office (Washington, D.C.)]] * [[Paradox Hotel Vancouver]] * [[Park Tower Stamford]] * [[Plaza Hotel]] * [[The Dominick]] (Trump SoHo) * [[The Plaza (West Palm Beach)|The Plaza]] (West Palm Beach, FL) * [[The St. Regis Toronto]] * [[The Tower at City Place]] (White Plains, NY) | group7 = Cancelled real<br>estate projects | list7 = * [[Business projects of Donald Trump in Russia|Russian projects]] **[[Trump Tower Moscow]] * Trump International Hotel and Tower ** [[Trump International Hotel and Tower (Baku)|Baku, Azerbaijan]] ** [[Trump International Hotel and Tower (Dubai)|Dubai, UAE]] ** [[Conrad Fort Lauderdale|Fort Lauderdale, FL]] ** [[Trump International Hotel and Tower (New Orleans)|New Orleans, LA]] ** [[Trump International Hotel & Residence|Phoenix, AZ]] * [[Trump Ocean Resort Baja Mexico]] * Trump Tower ** [[Trump Towers Rio|Brazil]] ** [[TD Trump Deutschland|Germany]] ** [[Elite Tower|Israel]] ** [[Trump Tower (Tampa)|Tampa, FL]] | group8 = Former ventures | list8 = * [[Central Park Carousel]] * [[Donald Trump dolls]] * [[Donald J. Trump Foundation]] * [[GoTrump.com]] * [[Davis Center|Lasker Rink]] * [[Miss Universe]] ** [[Miss USA]] ** [[Miss Teen USA]] * [[New Jersey Generals]] * ''[[Paris Is Out!]]'' * [[Tour DuPont|Tour de Trump]] * [[Trump Home]] * [[Trump Entertainment Resorts]] ** [[Golden Nugget Atlantic City|Trump's Castle / Trump Marina]] ** [[Trump Plaza Hotel and Casino]] ** [[Hard Rock Hotel & Casino Atlantic City|Trump Taj Mahal]] ** [[Trump World's Fair]] ** [[Majestic Star II|Trump Casino Indiana]] * [[Trump magazines]] * [[Trump Model Management]] * [[Trump Mortgage]] * [[The Trump Network|Trump Network]] * [[Riverside South, Manhattan|Trump Place]] * [[Trump Productions]] * [[Trump Shuttle]] * [[Trump Steaks]] * [[Trump University]] * [[Trump Vodka]] * [[Trump Ice]] * [[Trump Village]] * [[Wollman Rink]] }}<noinclude> {{documentation | Template:Donald_Trump/doc}} {{Navbox documentation}} [[Category:United States company navigational boxes]] [[Category:Donald Trump-related templates|Businesses]] </noinclude> 18m9ezfvji0oio8zm5d1am8npvh718c 116799 116798 2026-07-15T19:08:02Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Trump_businesses]] 116798 wikitext text/x-wiki {{#invoke:Navbox|navbox | name = Trump businesses | title = [[Business career of Donald Trump|Businesses]] of [[Donald Trump]] | bodyclass = hlist | state = {{{state<includeonly>|collapsed</includeonly>}}} | above = {{flatlist}} * '''[[The Trump Organization]]''' ** [[Donald Trump Jr.]] ** [[Eric Trump]] ** [[Allen Weisselberg]] * [[Personal and business legal affairs of Donald Trump]] * [[List of things named after Donald Trump]] {{endflatlist}} | group1 = [[New York City|NYC]] properties | list1 = * [[40 Wall Street|The Trump Building (40 Wall Street)]] * [[Trump Parc|Trump Parc and Trump Parc East]] * [[Trump Park Avenue]] * [[Trump Tower]] * [[Trump World Tower]] |group2 = Hotels and resorts |list2 = * Trump International Hotel and Tower ** [[Trump International Hotel and Tower (Chicago)|Chicago]] ** [[Trump International Hotel Las Vegas|Las Vegas]] *** [[2025 Las Vegas Cybertruck explosion|2025 explosion]] ** [[Trump International Hotel Maldives|Maldives]] ** [[Trump International Hotel and Tower (New York City)|New York City]] * [[Mar-a-Lago]] | group3 = Golf courses | list3 = subgroup | 3_group1 = US | 3_list1 = * [[Trump National Golf Club Bedminster|Bedminster, NJ]] * [[Trump National Doral Miami|"Doral" Miami, FL]] * [[Trump National Golf Club Jupiter|Jupiter, FL]] * [[Trump National Golf Club Los Angeles|Los Angeles, CA]] * [[Trump National Golf Club Philadelphia|Pine Hill, NJ]] * [[Trump National Golf Club Washington, D.C.|Washington, D.C.]] * [[Trump National Golf Club Westchester|Westchester, NY]] * [[Trump International Golf Club (West Palm Beach)|West Palm Beach, FL]] | 3_group2 = Europe | 3_list2 = * [[Trump International Golf Links, Scotland|Balmedie, Scotland]] ** [[Trump International Golf Club Scotland Ltd v The Scottish Ministers|wind farm dispute]] * [[Trump International Golf Links and Hotel Ireland|Doonbeg, Ireland]] * [[Turnberry (golf course)|Turnberry, Scotland]] | group4 = Other current ventures | list4 = * [[$Trump]] * [[Cryptocurrency in the second Donald Trump administration|Cryptocurrency]] * [[Never Surrender High-Top]] * [[Trump Media & Technology Group]] ** [[Truth Social]] * [[Trump Mobile]] * [[Trump Winery]] |group5 = Name licensing |list5 = * [[Trump Bay Street]] * [[Trump Palace Condominiums]] ** [[Trump Plaza (Jersey City)|Jersey City, NJ]] ** [[Trump Plaza (New Rochelle)|New Rochelle, NY]] ** [[Trump Plaza (New York City)|New York City, NY]] * Trump Tower ** [[Trump Towers Istanbul|Istanbul, Turkey]] ** [[Trump Tower Manila|Manila, Philippines]] ** [[Trump Towers Pune|Pune, India]] ** [[Trump Tower Punta del Este|Punta del Este, Uruguay]] ** [[Trump Towers (Sunny Isles Beach)|Sunny Isles Beach, FL]] | group6 = Former properties | list6 = * [[General Motors Building (Manhattan)|GM Building]] * [[Hyatt Grand Central New York]] * [[JW Marriott Panama]] * [[Ka Laʻi Waikiki Beach Hotel]] * [[LSH Hotel]] (Brazil) * [[Old Post Office (Washington, D.C.)]] * [[Paradox Hotel Vancouver]] * [[Park Tower Stamford]] * [[Plaza Hotel]] * [[The Dominick]] (Trump SoHo) * [[The Plaza (West Palm Beach)|The Plaza]] (West Palm Beach, FL) * [[The St. Regis Toronto]] * [[The Tower at City Place]] (White Plains, NY) | group7 = Cancelled real<br>estate projects | list7 = * [[Business projects of Donald Trump in Russia|Russian projects]] **[[Trump Tower Moscow]] * Trump International Hotel and Tower ** [[Trump International Hotel and Tower (Baku)|Baku, Azerbaijan]] ** [[Trump International Hotel and Tower (Dubai)|Dubai, UAE]] ** [[Conrad Fort Lauderdale|Fort Lauderdale, FL]] ** [[Trump International Hotel and Tower (New Orleans)|New Orleans, LA]] ** [[Trump International Hotel & Residence|Phoenix, AZ]] * [[Trump Ocean Resort Baja Mexico]] * Trump Tower ** [[Trump Towers Rio|Brazil]] ** [[TD Trump Deutschland|Germany]] ** [[Elite Tower|Israel]] ** [[Trump Tower (Tampa)|Tampa, FL]] | group8 = Former ventures | list8 = * [[Central Park Carousel]] * [[Donald Trump dolls]] * [[Donald J. Trump Foundation]] * [[GoTrump.com]] * [[Davis Center|Lasker Rink]] * [[Miss Universe]] ** [[Miss USA]] ** [[Miss Teen USA]] * [[New Jersey Generals]] * ''[[Paris Is Out!]]'' * [[Tour DuPont|Tour de Trump]] * [[Trump Home]] * [[Trump Entertainment Resorts]] ** [[Golden Nugget Atlantic City|Trump's Castle / Trump Marina]] ** [[Trump Plaza Hotel and Casino]] ** [[Hard Rock Hotel & Casino Atlantic City|Trump Taj Mahal]] ** [[Trump World's Fair]] ** [[Majestic Star II|Trump Casino Indiana]] * [[Trump magazines]] * [[Trump Model Management]] * [[Trump Mortgage]] * [[The Trump Network|Trump Network]] * [[Riverside South, Manhattan|Trump Place]] * [[Trump Productions]] * [[Trump Shuttle]] * [[Trump Steaks]] * [[Trump University]] * [[Trump Vodka]] * [[Trump Ice]] * [[Trump Village]] * [[Wollman Rink]] }}<noinclude> {{documentation | Template:Donald_Trump/doc}} {{Navbox documentation}} [[Category:United States company navigational boxes]] [[Category:Donald Trump-related templates|Businesses]] </noinclude> 18m9ezfvji0oio8zm5d1am8npvh718c Kusora ŵanthu ŵa ndale mu boma la Trump 0 47777 116806 2026-07-15T19:14:31Z Tumbuka Arch 6863 Created page with "{{Short description|palije}} <!-- Chigaŵa ichi cha malongosolekero ghafupi chili mwadala kuti chiŵe "palije" - chonde wonani WP:SDNONE pambere mundasinthenge! --> {{Incomplete list|date=June 2026}} Ichi ntchandanda wa [[political endorsement|vyakukhozgera ŵandyali]] ivyo vikapelekeka na [[Donald Trump]], pulezidenti wa nambara 45 na 47 wa [[United States|Charu cha United States]], pambere wandazgoke pulezidenti kweniso pa nyengo iyo wakaŵa pulezidenti, na pakati pa m..." 116806 wikitext text/x-wiki {{Short description|palije}} <!-- Chigaŵa ichi cha malongosolekero ghafupi chili mwadala kuti chiŵe "palije" - chonde wonani WP:SDNONE pambere mundasinthenge! --> {{Incomplete list|date=June 2026}} Ichi ntchandanda wa [[political endorsement|vyakukhozgera ŵandyali]] ivyo vikapelekeka na [[Donald Trump]], pulezidenti wa nambara 45 na 47 wa [[United States|Charu cha United States]], pambere wandazgoke pulezidenti kweniso pa nyengo iyo wakaŵa pulezidenti, na pakati pa maulamuliro ghake ghaŵiri. <!-- MUNGASAZGIRAKO VYAKUKHOZGERA VINTHU VYAŴALIŴOSE YAYI KWAMBURA SOURCE NDIPO MUPALIRENDENGE NDANDANDA WA MAZINA KUTOLERA KU A KU Z! --> {{Donald Trump series|expanded=Views and ideology}} == Vyacharu chamukati == (''[[Italic type|Malembo ghakupendekeka]]'' ghakulongora [[incumbent|ŵandyali awo ŵali mu udindo sono]]) === Pambere wandazgoke pulezidenti === ==== 2008 ==== {| class="wikitable sortable" !Udindo !Munthu uyo wakakhozgeka !Vyakafuma |- |{{flagicon|United States of America}} [[2008 United States presidential election|Pulezidenti]] |[[Hillary Clinton]]<ref>{{Cite news |last=Shabad |first=Rebecca |date=Dec 29, 2015 |title=Trump in 2008: Hillary Clinton would make a "great" president |url=https://www.cbsnews.com/news/trump-in-2008-hillary-clinton-would-make-a-great-president/ |publisher=CBS News}}</ref> |{{Icon|no}} Wakathereskeka pa chisankho cha chipani |- |{{flagicon|United States of America}} [[2008 United States presidential election|Pulezidenti]] |[[John McCain]]<ref>{{Cite news |last=Allen |first=Mike|date=Sep 17, 2008 |title=Trump endorses McCain on Larry King |url=https://www.politico.com/story/2008/09/trump-endorses-mccain-on-larry-king-013558 |work=Politico}}</ref> |{{Icon|no}} Wakathereskeka pa chisankho chikuru |} ==== 2012 ==== {| class="wikitable sortable" !Udindo !Munthu uyo wakakhozgeka !Vyakafuma |- |{{flagicon|United States of America}} [[2012 United States presidential election|Pulezidenti]] |[[Mitt Romney]]<ref>{{Cite news |last1=Preston |first1=Mark |last2=Silverleib |first2=Alan |date=Feb 3, 2012 |title=Trump endorses Romney |url=https://www.cnn.com/2012/02/02/politics/campaign-wrap |publisher=CNN}}</ref> |{{Icon|no}} Wakathereskeka pa chisankho chikuru |} ==== 2016 Chisankho cha Senate ==== {| class="wikitable sortable" !Boma !Munthu uyo wakakhozgeka !Vyakafuma |- |{{flagicon|Arizona}} [[2016 United States Senate election in Arizona|Arizona]] |''[[John McCain]]''<ref name=":5">{{Cite news |last=Flores |first=Reena|date=Aug 5, 2016 |title=Donald Trump endorses Ryan, McCain, Ayotte ahead of primary races |url=https://www.cbsnews.com/news/donald-trump-paul-ryan-endorsement/ |publisher=CBS News}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|Florida}} [[2016 United States Senate election in Florida|Florida]] |''[[Marco Rubio]]''<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=736016335197458434 |date=May 26, 2016 |title=Poll data shows that @marcorubio does by far the best in holding onto his Senate seat in Florida. Important to keep the MAJORITY. Run Marco!}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|Louisiana}} [[2016 United States Senate election in Louisiana|Louisiana]] |[[John Kennedy (Louisiana politician)|John Kennedy]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=805127720749383680 |date=Dec 3, 2016 |title=Our great VPE, @mike_pence, is in Louisiana campaigning for John Kennedy for US Senate. John will be a tremendous help to us in Washington.}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|New Hampshire}} [[2016 United States Senate election in New Hampshire|New Hampshire]] |''[[Kelly Ayotte]]''<ref name=":5" /> |{{Icon|no}} Wakathereskeka pa chisankho chikuru |} ==== 2016 Chisankho cha Nyumba ya Ŵimiliri ==== {| class="wikitable sortable" !Chigaŵa !Munthu uyo wakakhozgeka !Vyakafuma |- |{{flagicon|California}} [[California's 49th congressional district|CA-49]] |''[[Darrell Issa]]''<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=793524189240188928 |date=November 1, 2016 |title=.@DarrellIssa is a very good man. Help him win his congressional seat in California.}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|Wisconsin}} [[Wisconsin's 1st congressional district|WI-01]] |''[[Paul Ryan]]''<ref name=":5" /> |'''{{Icon|aa}}''' '''Wakasankhika''' |} === Nyengo yake yakwamba nga pulezidenti === ==== 2017 Chisankho cha ŵalongozgi ŵa maboma ==== {| class="wikitable sortable" !Boma !Munthu uyo wakakhozgeka !Vyakafuma |- |{{flagicon|Virginia}} [[2017 Virginia gubernatorial election|Virginia]] |[[Ed Gillespie]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=916120435762266114 |date=Oct 5, 2017 |title=Ralph Northam,who is running for Governor of Virginia,is fighting for the violent MS-13 killer gangs & sanctuary cities. Vote Ed Gillespie!}}</ref> |{{Icon|no}} Wakathereskeka pa chisankho chikuru |} ==== 2017 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |rowspan="2"|{{flagicon|Alabama}} [[2017 United States Senate special election in Alabama|Alabama (special)]] |''[[Luther Strange]]''<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=910635327672512512 |date=Sep 20, 2017 |title=Alabama is sooo lucky to have a candidate like "Big" Luther Strange. Smart, tough on crime, borders & trade, loves Vets & Military. Tuesday!}}</ref> |{{Icon|no}} Lost primary |- |[[Roy Moore]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump|number=937641904338063361 |date=Dec 4, 2017 |title=Democrats refusal to give even one vote for massive Tax Cuts is why we need Republican Roy Moore to win in Alabama. We need his vote on stopping crime, illegal immigration, Border Wall, Military, Pro Life, V.A., Judges 2nd Amendment and more. No to Jones, a Pelosi/Schumer Puppet!}}</ref> |{{Icon|no}} Lost general |} ==== 2017 House elections ==== {| class="wikitable sortable" !Chigaŵa !Munthu uyo wakapika !Ivyo vikachitika |- |{{flagicon|Georgia (U.S. state)}} [[2017 Georgia's 6th congressional district special election|GA-06 (chisankho chapadera)]] |[[Karen Handel]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=876901304207069185 |date=Jun 19, 2017 |title=....because he doesn't even live there! He wants to raise taxes and kill healthcare. On Tuesday, #VoteKarenHandel.}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|Kansas}} [[2017 Kansas's 4th congressional district special election|KS-04 (chisankho chapadera)]] |[[Ron Estes]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=851781714028494849 |date=Apr 11, 2017 |title=Ron Estes is running TODAY for Congress in the Great State of Kansas. A wonderful guy, I need his help on Healthcare & Tax Cuts (Reform).}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|Montana}} [[2017 Montana's at-large congressional district special election|MT-AL (chisankho chapadera)]] |[[Greg Gianforte]]<ref>{{Cite news |date=24 May 2017 |title= First on CNN: Trump records robocall for Montana special election |url=https://www.cnn.com/2017/05/24/politics/trump-robocall-montana-special-election-ryan-zinke/index.html |publisher=[[CNN]]}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |- |{{flagicon|South Carolina}} [[2017 South Carolina's 5th congressional district special election|SC-05 (chisankho chapadera)]] |[[Ralph Norman]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=876899176562524160 |date=June 19, 2017 |title=Ralph Norman, who is running for Congress in SC's 5th District, will be a fantastic help to me in cutting taxes, and....}}</ref> |'''{{Icon|aa}}''' '''Wakasankhika''' |} ==== 2018 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Alaska}} [[2018 Alaska gubernatorial election|Alaska]] |[[Mike Dunleavy (politician)|Mike Dunleavy]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 25, 2018 |user=realDonaldTrump |number=1055555764901822466 |title=.@MikeDunleavyGov will make a fantastic Governor of Alaska. Mike is for Energy and Jobs, is tough on Crime, loves our Vets and our Great Second Amendment. Mike has my Complete and Total Endorsement!}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[2018 Arizona gubernatorial election|Arizona]] |''[[Doug Ducey]]''<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=1034128943480299521 |date=Aug 27, 2018 |title=Governor Doug Ducey of Arizona is doing a great job. It would be really nice to show your support tomorrow by voting for him in Tuesdays Primary. Doug is strong on Crime, the Border, and our Second Amendment. Loves our Military & our Vets. He has my full and complete Endorsement.}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arkansas}} [[2018 Arkansas gubernatorial election|Arkansas]] |''[[Asa Hutchinson]]''<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=998704493335334912 |date=May 21, 2018 |title=.@AsaHutchinson, the great Governor of Arkansas, is in a primary tomorrow. He has done an incredible job with a focus on lower taxes, border security, and crime prevention. Asa loves our military and our veterans. I fully endorse Asa for Governor!}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[2018 California gubernatorial election|California]] |[[John H. Cox]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=997597940444221440 |date=May 18, 2018 |title=California finally deserves a great Governor, one who understands borders, crime and lowering taxes. John Cox is the man - he'll be the best Governor you've ever had. I fully endorse John Cox for Governor and look forward to working with him to Make California Great Again!}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Colorado}} [[2018 Colorado gubernatorial election|Colorado]] |[[Walker Stapleton]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 10, 2018 |user=realDonaldTrump |number=1050004777034309633 |title=Walker Stapleton is running as the highly respected Republican Candidate for Governor of the Great State of Colorado. His credentials and talents are impeccable. He has my complete and total Endorsement!}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Connecticut }} [[2018 Connecticut gubernatorial election|Connecticut]] |[[Bob Stefanowski]]<ref>{{Cite tweet |last=Trump |first=Donald |user=realDonaldTrump |number=1029724286121074689 |date=Aug 15, 2018 |title=It is about time that Connecticut had a real and talented Governor. Bob Stefanowski is the person needed to do the job. Tough on crime, Bob is also a big cutter of Taxes. He will win in November and make a Great Governor, a major difference maker. Bob has my total Endorsement!}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Florida}} [[2018 Florida gubernatorial election|Florida]] |[[Ron DeSantis]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 22, 2018 |title=Congressman Ron DeSantis, a top student at Yale and Harvard Law School, is running for Governor of the Great State of Florida. Ron is strong on Borders, tough on Crime & big on Cutting Taxes - Loves our Military & our Vets. He will be a Great Governor & has my full Endorsement! |user=realDonalTrump |number=1010129956222001153}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Georgia (U.S. state)}} [[2018 Georgia gubernatorial election|Georgia]] |[[Brian Kemp]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 21, 2018 |title=Brian Kemp, who is running for Governor of Georgia and has my full endorsement, is campaigning tonight with VP @mike_pence. Brian is very strong on Crime and Borders, LOVES our Military, Vets and the 2nd Amendment. He will be a GREAT Governor! |user=realDonalTrump |number=1020808378594054144}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kansas}} [[2018 Kansas gubernatorial election|Kansas]] |[[Kris Kobach]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 6, 2018 |title=Kris Kobach, a strong and early supporter of mine, is running for Governor of the Great State of Kansas. He is a fantastic guy who loves his State and our Country - he will be a GREAT Governor and has my full & total Endorsement! Strong on Crime, Border & Military. VOTE TUESDAY! |user=realDonalTrump |number=1026495277824401408}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Michigan}} [[2018 Michigan gubernatorial election|Michigan]] |[[Bill Schuette]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 17, 2017 |title=Attorney General Bill Schuette will be a fantastic Governor for the great State of Michigan. I am bringing back your jobs and Bill will help |user=realDonalTrump |number=909381488445190145}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[2018 Minnesota gubernatorial election|Minnesota]] |[[Jeff Johnson (Minnesota politician)|Jeff Johnson]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 15, 2018 |title=Jeff Johnson of Minnesota had a big night in winning the Republican nomination for Governor against a very strong and well known opponent! Thanks for all of the support you showed me. You have my complete and total Endorsement. You will win in November! |user=realDonalTrump |number=1029717542842052608}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Nevada}} [[2018 Nevada gubernatorial election|Nevada]] |[[Adam Laxalt]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 12, 2018 |title=I strongly endorse Adam Laxalt for Governor of Nevada. Adam is smart, works hard, and knows how to win. He will be a great Governor. Also, will fight hard to lower your taxes and is tough on crime! |user=realDonalTrump |number=1006619872367804416}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Ohio}} [[2018 Ohio gubernatorial election|Ohio]] |[[Mike DeWine]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 30, 2018 |title=@MikeDeWine will be a great Governor for the People of Ohio. He is an outstanding man who loves his State – and always produces big.... |user=realDonalTrump |number=1057325714721124355}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Oklahoma}} [[2018 Oklahoma gubernatorial election|Oklahoma]] |[[Kevin Stitt]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 30, 2018 |title=Kevin Stitt ran a great winning campaign against a very tough opponent in Oklahoma. Kevin is a very successful businessman who will be a fantastic Governor. He is strong on Crime & Borders, the 2nd Amendment, & loves our Military & Vets. He has my complete and total Endorsement! |user=realDonalTrump |number=1035233203609657344}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|South Carolina}} [[2018 South Carolina gubernatorial election|South Carolina]] |''[[Henry McMaster]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 9, 2018 |title=Henry McMaster loves the people of South Carolina and was with me from the beginning. He is strong on Crime and Borders, great for our Military and our Vets. He is doing a fantastic job as your Governor, and has my full endorsement, a special guy. Vote on Tuesday! |user=realDonalTrump |number=1005548570332631040}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{Flagicon|South Dakota}} [[2018 South Dakota gubernatorial election|South Dakota]] |[[Kristi Noem]]<ref>{{Cite news |last=Akhtar |first=Monica |date=September 7, 2018 |title=Trump endorses Noem in South Dakota |newspaper=The Washington Post |url=https://www.washingtonpost.com/video/politics/trump-endorses-noem-in-south-dakota/2018/09/07/1b0b5e5a-b2f2-11e8-8b53-50116768e499_video.html}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[2018 Tennessee gubernatorial election|Tennessee]] |[[Bill Lee (Tennessee politician)|Bill Lee]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 3, 2018 |title=Congratulations to Bill Lee of Tennessee on his big primary win for Governor last night. He ran a great campaign and now will finish off the job in November. Bill has my total and enthusiastic Endorsement! |user=realDonalTrump |number=1025386253892694016}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas gubernatorial election|Texas]] |''[[Greg Abbott]]''<ref name=":7">{{Cite tweet |last=Trump |first=Donald |date=Feb 27, 2018 |title=I want to encourage all of my many Texas friends to vote in the primary for Governor Greg Abbott, Senator Ted Cruz, Lt. Gov. Dan Patrick, and Attorney General Ken Paxton. They are helping me to Make America Great Again! Vote early or on March 6th. |user=realDonalTrump |number=968549117625602054}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Wisconsin}} [[2018 Wisconsin gubernatorial election|Wisconsin]] |''[[Scott Walker (politician)|Scott Walker]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 15, 2018 |title=Scott Walker is very special and will have another great win in November. He has done a fantastic job as Governor of Wisconsin and will always have my full support and Endorsement! |user=realDonalTrump |number=1029716105420595200}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Wyoming}} [[2018 Wyoming gubernatorial election|Wyoming]] |[[Foster Friess]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 21, 2018|title=To the incredible people of the Great State of Wyoming: Go VOTE TODAY for Foster Friess - He will be a fantastic Governor! Strong on Crime, Borders & 2nd Amendment. Loves our Military & our Vets. He has my complete and total Endorsement! |user=realDonalTrump |number=1031917972099612673}}</ref> |{{Icon|no}} Lost primary |} ==== 2018 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Arizona}} [[2018 United States Senate election in Arizona|Arizona]] |[[Martha McSally]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 29, 2018 |title=Martha McSally is an extraordinary woman. She was a very talented fighter jet pilot and is now a highly respected member of Congress. She is Strong on Crime, the Border and our under siege 2nd Amendment. Loves our Military and our Vets. Has my total and complete Endorsement! |user=realDonalTrump |number=1034785759377727490}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Florida}} [[2018 United States Senate election in Florida|Florida]] |[[Rick Scott]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 27, 2018 |title=Rick Scott of Florida is doing a fantastic job as Governor. Jobs are pouring into the State and its economic health is better than ever before. He is strong on Crime, Borders, and loves our Military and Vets. Vote for Rick on Tuesday! |user=realDonalTrump |number=1034128239579549696}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Indiana}} [[2018 United States Senate election in Indiana|Indiana]] |[[Mike Braun]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 30, 2018 |title=Will be going to Evansville, Indiana, tonight for a big crowd rally with Mike Braun, a very successful businessman who is campaigning to be Indiana's next U.S. Senator. He is strong on Crime & Borders, the 2nd Amendment, and loves our Military & Vets. Will be a big night! |user=realDonalTrump |number=1035162684633825286}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Michigan}} [[2018 United States Senate election in Michigan|Michigan]] |[[John James (Michigan politician)|John James]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 27, 2018 |title=.@JohnJamesMI, who is running in the Republican Primary in the great state of Michigan, is SPECTACULAR! Vote on August 7th. Rarely have I seen a candidate with such great potential. West Point graduate, successful businessman and an African American leader... |user=realDonalTrump |number=1022872574634729472}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[2018 United States Senate special election in Minnesota|Minnesota (special)]] |[[Karin Housley]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 4, 2018 |title=Just made my second stop in Minnesota for a MAKE AMERICA GREAT AGAIN rally. We need to elect @KarinHousley to the U.S. Senate, and we need the strong leadership of @TomEmmer, @Jason2CD, @JimHagedornMN and @PeteStauber in the U.S. House! |user=realDonalTrump |number=1047984297607618565}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Mississippi}} [[2018 United States Senate special election in Mississippi|Mississippi (special)]] |''[[Cindy Hyde-Smith]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 25, 2018 |title=Mississippi, Vote for @cindyhydesmith on Tuesday. Respected by all. We need her in Washington!. Thanks! |user=realDonalTrump |number=1066786854643662848}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Mississippi}} [[2018 United States Senate election in Mississippi|Mississippi]] |''[[Roger Wicker]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 5, 2018 |title=Senator @RogerWicker of Mississippi has done everything necessary to Make America Great Again! Get out and vote for Roger, he has my total support! |user=realDonalTrump |number=1003997350791188482}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Missouri}} [[2018 United States Senate election in Missouri|Missouri]] |[[Josh Hawley]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 13, 2018 |title=Senator Claire McCaskill of the GREAT State of Missouri flew around in a luxurious private jet during her RV tour of the state. RV's are not for her. People are really upset, so phony! Josh Hawley should win big, and has my full endorsement. |user=realDonalTrump |number=1006992524366503941}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[2018 United States Senate election in Montana|Montana]] |[[Matt Rosendale]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 7, 2018 |title=Matt Rosendale will be a Great Senator from a Great State, Montana! He is a fighter who will be tough on Crime and the Border, fight hard for our 2nd Amendment and loves our Military and our Vets. He has my full and complete Endorsement! |user=realDonalTrump |number=1038022020691161088}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Nebraska}} [[2018 United States Senate election in Nebraska|Nebraska]] |''[[Deb Fischer]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=May 15, 2018 |title=Nebraska - make sure you get out to the polls and VOTE for Deb Fischer today! |user=realDonalTrump |number=996442654568341505}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nevada}} [[2018 United States Senate election in Nevada|Nevada]] |''[[Dean Heller]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 3, 2018 |title=Get out and VOTE for @DeanHeller! |user=realDonalTrump |number=1058758825300365312}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New Jersey}} [[2018 United States Senate election in New Jersey|New Jersey]] |[[Bob Hugin]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 6, 2018 |title=Bob Hugin, successful all of his life, would be a Great Senator from New Jersey. He has my complete and total Endorsement! Get out and Vote for Bob. |user=realDonalTrump |number=1059870147845017601}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Dakota}} [[2018 United States Senate election in North Dakota|North Dakota]] |[[Kevin Cramer]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 13, 2018 |title=Congratulations to @KevinCramer on his huge win in North Dakota. We need Kevin in the Senate, and I strongly endorse him. Heidi voted NO on our Tax Cuts, and always will vote no when we need her. Kevin is strong on Crime & Borders, big on Cutting Taxes! |user=realDonalTrump |number=1007002252467458048}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Ohio}} [[2018 United States Senate election in Ohio|Ohio]] |[[Jim Renacci]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 24, 2018 |title=.@JimRenacci has worked so hard on Tax Reductions, Illegal Immigration, the Border and Crime. I need Jim very badly to help our agenda and to keep MAKING AMERICA GREAT AGAIN! He will be a fantastic Senator for the Great State of Ohio, and has my full endorsement! |user=realDonalTrump |number=988856839893897222}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Pennsylvania}} [[2018 United States Senate election in Pennsylvania|Pennsylvania]] |[[Lou Barletta]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 11, 2018 |title=Rep. Lou Barletta, a Great Republican from Pennsylvania who was one of my very earliest supporters, will make a FANTASTIC Senator. He is strong & smart, loves Pennsylvania & loves our Country! Voted for Tax Cuts, unlike Bob Casey, who listened to Tax Hikers Pelosi and Schumer! |user=realDonalTrump |number=962784821389996033}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Tennessee}} [[2018 United States Senate election in Tennessee|Tennessee]] |[[Marsha Blackburn]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 19, 2018 |title=.@MarshaBlackburn is a wonderful woman who has always been there when we have needed her. Great on the Military, Border Security and Crime. Loves and works hard for the people of Tennessee. She has my full endorsement and I will be there to campaign with her! |user=realDonalTrump |number=987038167730552832}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 United States Senate election in Texas|Texas]] |''[[Ted Cruz]]''<ref name=":7" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Utah}} [[2018 United States Senate election in Utah|Utah]] |[[Mitt Romney]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 19, 2018 |title=.@MittRomney has announced he is running for the Senate from the wonderful State of Utah. He will make a great Senator and worthy successor to @OrrinHatch, and has my full support and endorsement! |user=realDonalTrump |number=965773283554668544}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |rowspan="2"|{{flagicon|West Virginia}} [[2018 United States Senate election in West Virginia|West Virginia]] |[[Evan Jenkins (politician)|Evan Jenkins]] ''(co-endorsement with Morrisey)''<ref name="auto">{{Cite tweet |last=Trump |first=Donald |date=May 7, 2018 |title=To the great people of West Virginia we have, together, a really great chance to keep making a big difference. Problem is, Don Blankenship, currently running for Senate, can't win the General Election in your State...No way! Remember Alabama. Vote Rep. Jenkins or A.G. Morrisey! |user=realDonalTrump |number=993443781281271808}}</ref> |{{Icon|no}} Lost primary |- |[[Patrick Morrisey]] ''(co-endorsement with Jenkins)''<ref name="auto" /> |{{Icon|no}} Lost general |- |{{flagicon|Wisconsin}} [[2018 United States Senate election in Wisconsin|Wisconsin]] |[[Leah Vukmir]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 15, 2018 |title=Congratulations to Leah Vukmir of Wisconsin on your great win last night. You beat a very tough and good competitor and will make a fantastic Senator after winning in November against someone who has done very little. You have my complete and total Endorsement! |user=realDonalTrump |number=1029712857724792832}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Wyoming}} [[2018 United States Senate election in Wyoming|Wyoming]] |''[[John Barrasso]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 31, 2018 |title=.@SenJohnBarrasso has a Primary on August 21st. He doesn't need any help because he is absolutely outstanding in every way, but I hope the great people of Wyoming will go out and show their support anyway. John is absolutely top of the line & has my Complete & Total Endorsement! |user=realDonalTrump |number=1024342307624103937}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2018 House elections ==== {| class="wikitable sortable" !District !Candidate !Result |- |{{flagicon|Alabama}} [[Alabama's 2nd congressional district|AL-02]] |''[[Martha Roby]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 22, 2018 |title=Congresswoman Martha Roby of Alabama has been a consistent and reliable vote for our Make America Great Again Agenda. She is in a Republican Primary run-off against a recent Nancy Pelosi voting Democrat. I fully endorse Martha for Alabama 2nd Congressional District! |user=realDonalTrump |number=1010126805850902528|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[Arizona's 8th congressional district|AZ-08]] |''[[Debbie Lesko]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 24, 2018 |title=Arizona, please get out today and vote @DebbieLesko for Congress in #AZ08. Strong on Border, Immigration and Crime. Great on the Military. Time is ticking down - get out and VOTE today. We need Debbie in Congress! |user=realDonalTrump |number=988840512571441152|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 8th congressional district|CA-08]] |''[[Paul Cook (politician)|Paul Cook]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 4, 2018 |title=Paul Cook is a decorated Marine Corps Veteran who loves and supports our Military and Vets. He is Strong on Crime, the Border, and supported Tax Cuts for the people of California. Paul has my total and complete Endorsement! |user=realDonalTrump |number=1037081791599915008|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 21st congressional district|CA-21]] |''[[Devin Nunes]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 5, 2018 |title=Vote for Congressman Devin Nunes, a true American Patriot the likes of which we rarely see in our modern day world....he truly loves our country and deserves everyone's support! |user=realDonalTrump |number=1003995933540044800|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 23rd congressional district|CA-23]] |''[[Kevin McCarthy]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 5, 2018 |title=Get the vote out in California today for Rep. Kevin McCarthy and all of the great GOP candidates for Congress. Keep our country out of the hands of High Tax, High Crime Nancy Pelosi. |user=realDonalTrump |number=1003987298072002565|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 48th congressional district|CA-48]] |''[[Dana Rohrabacher]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 5, 2018 |title=Dana Rohrabacher has been a great Congressman for his District and for the people of Cal. He works hard and is respected by all - he produces! Dems are desperate to replace Dana by spending vast sums to elect a super liberal who is weak on Crime and bad for our Military & Vets! |user=realDonalTrump |number=1059317426653933568|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|California}} [[California's 49th congressional district|CA-49]] |[[Diane Harkey]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 20, 2018 |title=.@DianeHarkey is an extraordinary woman of great accomplishment & potential. She is running as a very popular Republican for the Congressional seat of my friend Darrell Issa-with his complete support. Diane is strong on crime, loves our Military & Vets-has my total Endorsement! |user=realDonalTrump |number=1031719084680007680|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Florida}} [[Florida's 1st congressional district|FL-01]] |''[[Matt Gaetz]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 13, 2018 |title=Congressman Matt Gaetz of Florida is one of the finest and most talented people in Congress. Strong on Crime, the Border, Illegal Immigration, the 2nd Amendment, our great Military & Vets, Matt worked tirelessly on helping to get our Massive Tax Cuts. He has my Full Endorsement! |user=realDonalTrump |number=1017650505043140609|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 2nd congressional district|FL-02]] |''[[Neal Dunn]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 17, 2018 |title=Congressman Neal Dunn (@DunnCampaign) of Florida has done an outstanding job at everything having to do with #MAGA. Now working hard on hurricane relief and rebuild. Strong on Crime, strong on Borders, loves our Military and our Vets. Neal has my highest Endorsement! |user=realDonalTrump |number=1052644447853453312|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 3rd congressional district|FL-03]] |''[[Ted Yoho]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 9, 2018 |title=Congressman Ted Yoho of Florida is doing a fantastic job and has my complete and total Endorsement! Tough on Crime and Borders, Ted was really helpful on Tax Cuts. Vote all the way for Ted in the upcoming Primary - he will never let you down! |user=realDonalTrump |number=1027600571530969088|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 6th congressional district|FL-06]] |[[Mike Waltz]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 6, 2018 |title=Florida, very important - get out and vote for Florida Congressional Candidate Michael Waltz (R). He has my Strong Endorsement! |user=realDonalTrump |number=1059896399595225089|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 15th congressional district|FL-15]] |[[Ross Spano]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 24, 2018 |title=A vote for Ross Spano in FL-15 is a vote for more jobs and bigger paychecks for Florida families! It's also a vote for a leader who will stand up for our AMERICA FIRST agenda! Vote Spano on Nov. 6th! |url=https://www.facebook.com/DonaldTrump/videos/vote-ross-spano/255101881871360/ |via=Facebook}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Illinois}} [[Illinois's 14th congressional district|IL-14]] |''[[Randy Hultgren]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 6, 2018 |title=Congressman Randy Hultgren (R) of Illinois is doing a great job. Get out and Vote for Randy - Total Endorsement! |user=realDonalTrump |number=1059897349005283334|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Iowa}} [[Iowa's 1st congressional district|IA-01]] |''[[Rod Blum]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 29, 2018 |title=Congressman @RodBlum of Iowa got a desperately needed Flood Wall for Cedar Rapids that was almost impossible to get. He makes a BIG difference for Iowa! Border, Military, Vets etc. We need Rod in D.C. He has my Strong Endorsement! |user=realDonalTrump |number=1057106631652196354|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Kansas}} [[Kansas's 3rd congressional district|KS-03]] |''[[Kevin Yoder]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 18, 2018 |title=Thank you to Congressman Kevin Yoder! He secured $5 BILLION for Border Security. Now we need Congress to support. Kevin has been strong on Crime, the Border, the 2nd Amendment, and he loves our Military and Vets. @RepKevinYoder has my full and total endorsement! |user=realDonalTrump |number=1019695583853010944|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Kentucky}} [[Kentucky's 6th congressional district|KY-06]] |''[[Andy Barr]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 13, 2018 |title=Heading to the Great State of Kentucky - Big Rally for Congressman Andy Barr - Fantastic guy, need his vote for MAGA! Strong on Crime, Tax Cuts, Military, Vets & 2nd A. His opponent will NEVER vote for us, only for Pelosi. Andy has my Strongest Endorsement!!! See you in Kentucky. |user=realDonalTrump |number=1051168800324931584|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[Louisiana's 3rd congressional district|LA-03]] |''[[Clay Higgins]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 24, 2018 |title=.@RepClayHiggins has been a great help to me on Cutting Taxes, creating great new healthcare programs at low cost, fighting for Border Security, our Military and are Vets. He is tough on Crime and has my full Endorsement. The Great State of Louisiana, we want Clay! |user=realDonalTrump |number=1011053439575576576|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Maine}} [[Maine's 2nd congressional district|ME-02]] |''[[Bruce Poliquin]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 25, 2018 |title=.@BrucePoliquin from Maine is a great Congressman. He is in a tough fight against a very liberal Nancy Pelosi Democrat. Bruce has helped bring JOBS back to his State and totally protects your Great Second Amendment. We need to keep Bruce in Washington. He has my Full Endorsement! |user=realDonalTrump |number=1055559438977900544|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Michigan}} [[Michigan's 11th congressional district|MI-11]] |Lena Epstein<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 6, 2018 |title=Epstein all the way in Michigan House 11. She is a wonderful person and, at the same time, a real fighter. Has my Strong Endorsement! |user=realDonalTrump |number=1059880322500833281|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[Minnesota's 1st congressional district|MN-01]] |[[Jim Hagedorn]]<ref name=":9">{{Cite tweet |last=Trump |first=Donald |date=Oct 4, 2018 |title=Just made my second stop in Minnesota for a MAKE AMERICA GREAT AGAIN rally. We need to elect @KarinHousley to the U.S. Senate, and we need the strong leadership of @TomEmmer, @Jason2CD, @JimHagedornMN and @PeteStauber in the U.S. House! |user=realDonalTrump |number=1047984297607618565|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Minnesota}} [[Minnesota's 2nd congressional district|MN-02]] |''[[Jason Lewis (Minnesota politician)|Jason Lewis]]''<ref name=":9" /> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[Minnesota's 3rd congressional district|MN-03]] |''[[Erik Paulsen]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 23, 2018 |title=Congressman Erik Paulsen of the Great State of Minnesota has done a fantastic job in cutting Taxes and Job Killing Regulations. Hard working and very smart. Keep Erik in Congress. He has my Strong Endorsement! |user=realDonalTrump |number=1054588738641178624|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[Minnesota's 6th congressional district|MN-06]] |''[[Tom Emmer]]''<ref name=":9" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Minnesota}} [[Minnesota's 7th congressional district|MN-07]] |Dave Hughes<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 8, 2018 |title=Dave Hughes is running for Congress in the Great State of Minnesota. He will help us accomplish our America First policies, is strong on Crime, the Border, our 2nd Amendmen, Trade, Military and Vets. Running against Pelosi Liberal Puppet Petterson. Dave has my Total Endorsement! |user=realDonalTrump |number=1038437927506923521|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[Minnesota's 8th congressional district|MN-08]] |[[Pete Stauber]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 15, 2018 |title=.@PeteStauber won big last night in Minnesota. A big star in Hockey, he will be an even bigger star in politics. It all begins with a win in November. Pete has my complete and total Endorsement! |user=realDonalTrump |number=1029722249232826368|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[Montana's at-large congressional district|MT-AL]] |''[[Greg Gianforte]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 3, 2018 |title=If Chuck Schumer and Nancy Pelosi gain the majority, they will try to raise your taxes, restore job-killing regulations, shut down your coal mines and timber mills, take away your healthcare, impose socialism, and ERASE your borders. VOTE for @MattForMontana and @GregForMontana! |user=realDonalTrump |number=1058820790546821120|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nevada}} [[Nevada's 3rd congressional district|NV-03]] |[[Danny Tarkanian]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 15, 2018 |title=.@DannyTarkanian of Nevada is a great friend who supports the Trump Agenda. He is Strong on Crime, the Border and our under siege 2nd Amendment. Danny Loves our Military and our Vets. He has my total and complete Endorsement! |user=realDonalTrump |number=1041068591527993344|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New Jersey}} [[New Jersey's 11th congressional district|NJ-11]] |[[Jay Webber]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 20, 2018 |title=.@JayWebberNJ is running for Congress in the 11th District of New Jersey. He is outstanding in every way. Strong on Borders, loves our Military and our Vets. Big Crime fighter. Jay has my Full and Total Endorsement! |user=realDonalTrump |number=1042828275121369088|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New York}} [[New York's 1st congressional district|NY-01]] |''[[Lee Zeldin]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 26, 2018 |title=Congressman Lee Zeldin is doing a fantastic job in D.C. Tough and smart, he loves our Country and will always be there to do the right thing. He has my Complete and Total Endorsement! |user=realDonalTrump |number=1045003711104331776|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New York}} [[New York's 2nd congressional district|NY-02]] |''[[Peter King (American politician)|Peter King]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 6, 2018 |title=Congressman Peter King of New York is a hardworking gem. Loves his Country and his State. Get out and VOTE for Peter! |user=realDonalTrump |number=1059833982777544705|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New York}} [[New York's 11th congressional district|NY-11]] |''[[Dan Donovan (politician)|Dan Donovan]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=May 30, 2018 |title=There is no one better to represent the people of N.Y. and Staten Island (a place I know very well) than @RepDanDonovan, who is strong on Borders & Crime, loves our Military & our Vets, voted for Tax Cuts and is helping me to Make America Great Again. Dan has my full endorsement! |user=realDonalTrump |number=1001973090107248641|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New York}} [[New York's 19th congressional district|NY-19]] |''[[John Faso]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 23, 2018 |title=Congressman John Faso of New York has worked hard and smart. Strong on Crime, Borders and our 2nd Amendment, John is respected by all. Vote for John. He has my complete and total Endorsement! |user=realDonalTrump |number=1054759617165754372|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New York}} [[New York's 22nd congressional district|NY-22]] |''[[Claudia Tenney]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 5, 2018 |title=I need @claudiatenney of #NY22 to be re-elected in order to get our big plans moving. Her opponent would be a disaster. Nobody works harder than Claudia, and she is a producer. I look forward to working together with her - she has my Strongest Endorsement! Vote Claudia! |user=realDonalTrump |number=1059460759179198470|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New York}} [[New York's 23rd congressional district|NY-23]] |''[[Tom Reed (politician)|Tom Reed]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 3, 2018 |title=Thank you to Congressman Tom Reed of New York for your wonderful comments on our great new Trade Deal with Mexico and Canada, the USMCA. I have long ago given you my Full Endorsement, and for good reason. Keep up the Great Work! @Varneyco |user=realDonalTrump |number=1047486972976095233|via=Twitter}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|North Carolina}} [[North Carolina's 9th congressional district|NC-09]] |[[Mark Harris (North Carolina politician)|Mark Harris]]<ref name=":10">{{Cite tweet |last=Trump |first=Donald |date=Oct 26, 2018 |title=Fantastic evening in Charlotte, North Carolina with great PATRIOTS. Get out and VOTE for @buddforcongress and @MarkHarrisNC9! http://Vote.GOP #MAGARally replay: facebook.com/DonaldTrump/videos/1841987799204126/ |user=realDonalTrump |number=1055987125701742592|via=Twitter}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Carolina}} [[North Carolina's 13th congressional district|NC-13]] |''[[Ted Budd]]''<ref name=":10" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Ohio}} [[2018 Ohio's 12th congressional district special election|OH-12 (special)]] |[[Troy Balderson]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 21, 2018 |title=Troy Balderson of Ohio is running for Congress against a Nancy Pelosi Liberal who is WEAK on Crime & Borders. Troy is the total opposite, and loves our Military, Vets & 2nd Amendment. EARLY VOTING just started with Election Day on August 7th. Troy has my Full & Total Endorsement! |user=realDonalTrump |number=1020811550771294211}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Ohio}} [[Ohio's 12th congressional district|OH-12]] |''[[Troy Balderson]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 25, 2018 |title=.@Troy_Balderson of Ohio is doing a great job as your Congressman, already very respected in Washington. Get out and VOTE for Troy - we need him – great guy – has my Total Endorsement! |user=realDonalTrump |number=1055548549595873280}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 8th congressional district|PA-08]] |John Chrin<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 25, 2018 |title=.@JohnChrin of Pennsylvania is fantastic. He is strong on the Border, Crime, the Military, our Vets and the 2nd Amendment. He is a powerful vote for #MAGA and loves the Great State of Pennsylvania. Please get out and vote for John, he has my Total and very Strong Endorsement! |user=realDonalTrump |number=1055548456469778432}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 10th congressional district|PA-10]] |''[[Scott Perry]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 2, 2018 |title=Scott Perry of Pennsylvania is fantastic. He is strong on the Border, Crime, the Military, our Vets and the Second Amendment. Scott has my Total Endorsement! |user=realDonalTrump |number=1058553398172237824}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 11th congressional district|PA-11]] |''[[Lloyd Smucker]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 25, 2018 |title=.@LloydSmuckerPA is doing a great job for the people of Pennsylvania. He is strong on the Border, Crime, the Military, our Vets and the 2nd Amendment. Lloyd has my Total Endorsement! |user=realDonalTrump |number=1055555312864952321}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 17th congressional district|PA-17]] |''[[Keith Rothfus]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 23, 2018 |title=.@VP Pence is heading to Pittsburgh, Pennsylvania where we have both strongly endorsed one of the finest men around, Congressman Keith @RothfusForPA. He is running against #LambTheSham, who is telling... |user=realDonalTrump |number=1010522933498806278}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Pennsylvania}} [[2018 Pennsylvania's 18th congressional district special election|PA-18 (special)]] |[[Rick Saccone]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jan 18, 2018 |title=Will be going to Pennsylvania today in order to give my total support to RICK SACCONE, running for Congress in a Special Election (March 13). Rick is a great guy. We need more Republicans to continue our already successful agenda! |user=realDonalTrump |number=953973568035086336}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|South Carolina}} [[South Carolina's 1st congressional district|SC-01]] |[[Katie Arrington]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 12, 2018 |title=Mark Sanford has been very unhelpful to me in my campaign to MAGA. He is MIA and nothing but trouble. He is better off in Argentina. I fully endorse Katie Arrington for Congress in SC, a state I love. She is tough on crime and will continue our fight to lower taxes. VOTE Katie! |user=realDonalTrump |number=1006630395067039744}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Tennessee}} [[Tennessee's 8th congressional district|TN-08]] |''[[David Kustoff]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 27, 2018 |title=Congressman David Kustoff has been a champion for the Trump Agenda - I greatly appreciate his support. David is strong on crime and borders, loves our Military, Vets and Second Amendment. Get out and vote for David on Thursday, August 2nd. He has my full and total Endorsement! |user=realDonalTrump |number=1022936690267176971}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 8th congressional district|TX-08]] |''[[Kevin Brady]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 30, 2018 |title=Congressman Kevin Brady of Texas is so popular in his District, and far beyond, that he doesn't need any help - but I am giving it to him anyway. He is a great guy and the absolute "King" of Cutting Taxes. Highly respected by all, he loves his State & Country. Strong Endorsement! |user=realDonalTrump |number=1057247021919297536}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 32nd congressional district|TX-32]] |''[[Pete Sessions]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 15, 2018 |title=Congressman Pete Sessions of Texas is doing a great job. He is a fighter who will be tough on Crime and the Border, fight hard for our Second Amendment and loves our Military and our Vets. He has my full and complete Endorsement! |user=realDonalTrump |number=1041065107969777664}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Virginia}} [[Virginia's 5th congressional district|VA-05]] |[[Denver Riggleman]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 29, 2018 |title=.@Denver4VA of the 5th District in Virginia is a popular guy who really knows how to get the job done! Really big help with Tax Cuts, the Military and our great Vets. He has my Total Endorsement! |user=realDonalTrump |number=1057106123260678144}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Virginia}} [[Virginia's 7th congressional district|VA-07]] |''[[Dave Brat]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 18, 2018 |title=Congressman @DaveBratVA7th is one of the hardest working, and smartest, people in Washington. He is strong on the Border, Crime, the Military, our Vets and the 2nd Amendment. He is a powerful vote for MAGA and loves the Great State of Virginia. Dave has my Total Endorsement! |user=realDonalTrump |number=1052914382986973184}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Washington}} [[Washington's 5th congressional district|WA-05]] |''[[Cathy McMorris Rodgers]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 29, 2018 |title=Congresswoman @cathymcmorris of Washington State is an incredible leader who is respected by everyone in Congress. We need her badly in D.C. to keep building on #MAGA. She has my Strong Endorsement! |user=realDonalTrump |number=1057108130662899713}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|West Virginia}} [[West Virginia's 3rd congressional district|WV-03]] |[[Carol Miller (politician)|Carol Miller]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 2, 2018 |title=I need the people of West Virginia to send a message to Chuck Schumer, Maxine Waters, Nancy Pelosi and the Radical Democrats by voting for Carol Miller and Patrick Morrisey! |user=realDonalTrump |number=1058498592208494592}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Wisconsin}} [[Wisconsin's 1st congressional district|WI-01]] |[[Bryan Steil]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 15, 2018 |title=Congratulations to Bryan Steil on a wonderful win last night. You will be replacing a great guy in Paul Ryan, and your win in November will make the entire State of Wisconsin very proud. You have my complete and total Endorsement! |user=realDonalTrump |number=1029717928130818048}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2018 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Georgia (U.S. state)}} [[2018 Georgia Secretary of State election|Georgia]] |[[Georgia Secretary of State|Secretary of State]] |[[Brad Raffensperger]]<ref>{{Cite tweet |last=Trump |first=Donald |date=July 21, 2018 |title=Brad Raffensperger will be a fantastic Secretary of State for Georgia - will work closely with @BrianKempGA. It is really important that you get out and vote for Brad - early voting.... |user=realDonalTrump |number=1020808378594054144}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas elections#Commissioner of the General Land Office|Texas]] |[[Texas General Land Office#Texas Land Commissioner|Land Commissioner]] |''[[George P. Bush]]''<ref name=":8">{{Cite tweet |last=Trump |first=Donald |date=Feb 27, 2018 |title=Texas LC George P. Bush backed me when it wasn't the politically correct thing to do, and I back him now. Also, AC Sid Miller has been with me from the beginning, he is "Trump's Man in Texas." Also support Comptroller Glenn Hegar, and Railroad Commissioner Christi Craddick. |user=realDonalTrump |number=968620661349470209}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas elections#Railroad Commissioner|Texas]] |[[Railroad Commission of Texas#Commissioners|Railroad Commissioner]] |''[[Christi Craddick]]''<ref name=":8" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas elections#Comptroller of Public Accounts|Texas]] |[[Texas Comptroller of Public Accounts#List of Texas comptrollers|Comptroller of Public Accounts]] |''[[Glenn Hegar]]''<ref name=":8" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas elections#Commissioner of Agriculture|Texas]] |[[Texas Department of Agriculture#Commissioners of the Texas Department of Agriculture|Commissioner of Agriculture]] |''[[Sid Miller (politician)|Sid Miller]]''<ref name=":8" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas lieutenant gubernatorial election|Texas]] |[[Lieutenant Governor of Texas|Lieutenant Governor]] |''[[Dan Patrick (politician)|Dan Patrick]]''<ref name=":7" /> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2018 Texas Attorney General election|Texas]] |[[Texas Attorney General|Attorney General]] |''[[Ken Paxton]]''<ref name=":7" /> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 Speaker of the House of Representatives election ==== {| class="wikitable sortable" !Position !Candidate !Result |- |{{Flagicon|United States}} [[2019 Speaker of the United States House of Representatives election|Speaker]] |[[Nancy Pelosi]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 7, 2018 |title=In all fairness, Nancy Pelosi deserves to be chosen Speaker of the House by the Democrats. If they give her a hard time, perhaps we will add some Republican votes. She has earned this great honor! |user=DonaldTrump |number=1060162807960870913}}</ref> ([[Democratic Party (United States)|Democrat]]) |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Kentucky}} [[2019 Kentucky gubernatorial election|Kentucky]] |''[[Matt Bevin]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 15, 2019 |title=Governor @MattBevin has done a wonderful job for the people of Kentucky! He continues to protect your very important Second Amendment. Matt is Strong on Crime and the Border, he Loves our Great Vets and Military. Matt has my Complete and Total Endorsement, and always has! | |user=realDonaldTrump |number=1184129465070297090}}</ref> |{{Icon|no}} Lost general |- | rowspan="2" |{{flagicon|Louisiana}} [[2019 Louisiana gubernatorial election|Louisiana]] |[[Eddie Rispone]] ''(co-endorsement with Abraham)''<ref name="auto2">{{cite web | last=Trump |first=Donald |date=Oct 1, 2019 |title=REPUBLICANS of Louisiana, it is really important for you to go out and vote on October 12th for either Eddie Rispone or Ralph Abraham (both Great), which will lead to a runoff against.... |url=https://twitter.com/realDonaldTrump/status/1179157911374897166}}</ref> |{{Icon|no}} Lost runoff |- |[[Ralph Abraham (politician)|Ralph Abraham]] ''(co-endorsement with Rispone)''<ref name="auto2" /> |{{Icon|no}} Lost primary |- |{{flagicon|Mississippi}} [[2019 Mississippi gubernatorial election|Mississippi]] |[[Tate Reeves]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 2, 2019 |title=Mississippi, there is a VERY important election for Governor on November 5th. I need you to Get Out and Vote for our Great Republican nominee, @TateReeves. Tate is strong on Crime, tough on Illegal Immigration, and will protect your Second Amendment.... |user=realDonalTrump |number=1179538517992595458}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 House elections ==== {| class="wikitable sortable" !District !Candidate !Result |- |{{flagicon|North Carolina}} [[2019 North Carolina's 3rd congressional district special election|NC-03 (special)]] |[[Greg Murphy (politician)|Greg Murphy]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 4, 2019 |title=State Rep Greg Murphy is running for Congress in North Carolina, District 3. We really need Greg in Washington. He is great w/ the Military, our Vets, & your 2A. Strong on Crime and the Border, has had my Total Endorsement for a long time. Please vote for Greg on September 10th! |user=realDonalTrump |number=1169366511439552512}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|North Carolina}} [[2019 North Carolina's 9th congressional district special election|NC-09 (special)]] |[[Dan Bishop]]<ref>{{Cite tweet |last=Trump |first=Donald |date=May 16, 2019 |title=Congratulations to Dan Bishop on his big Republican Primary victory in the 9th Congressional District of North Carolina. Dan is strong on Crime, Loves our Military, Vets, 2A, and great Healthcare. He has my Complete and Total Endorsement! #MAGA |user=realDonalTrump |number=1129067332725297152}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[2019 Pennsylvania's 12th congressional district special election|PA-12 (special)]] |[[Fred Keller (politician)|Fred Keller]]<ref>{{Cite tweet |last=Trump |first=Donald |date=May 20, 2019 |title=Fred Keller of the Great State of Pennsylvania has been an outstanding State Representative. Now he is running as the Republican Nominee for Congress, and has my Complete and Total Endorsement. He will do a fantastic job - I look forward to seeing everyone tonight! #MAGA |user=realDonalTrump |number=1130535532868571137}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 state court elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Pennsylvania}} [[2019 Pennsylvania elections#Judge of the Superior Court|Pennsylvania]] |Superior Court Judge |[[Megan McCarthy King]]<ref>{{Cite tweet |last=Trump |first=Donald |date=May 20, 2019 |title=Megan King, who is running for Superior Court Judge in the Pennsylvania election, has my Full and Total Endorsement. She is tough on crime and fully understands all aspects of the law. Vote for Megan tomorrow (Tuesday). |user=realDonalTrump |number=1130655064631238658}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Kentucky}} [[2019 Kentucky Attorney General election|Kentucky]] |[[Attorney General of Kentucky|Attorney General]] |[[Daniel Cameron (American politician)|Daniel Cameron]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 29, 2019 |title=The Republican Party has a new STAR, his name is Daniel Cameron (@djaycameron), and he is running for Attorney General of the Commonwealth of Kentucky.... |user=realDonalTrump |number=1155938087886700544}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2019 state legislative elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Virginia}} [[2019 Virginia Senate election#District 13|Virginia]] |State Senator |[[Geary Higgins]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 4, 2019 |title=Great Republican Geary Higgins has my complete and total Endorsement for Virginia Senate, 13th District. He is strong on Crime, the Border, our Military, Cutting Taxes, and protecting your 2nd Amendment. Dem John Bell will take your guns & raise your taxes. Vote for Geary Higgins |user=realDonalTrump |number=1191218806468820994}}</ref> |{{Icon|no}} Lost general |} ==== 2020 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Alabama}} [[2020 United States Senate election in Alabama|Alabama]] |[[Tommy Tuberville]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Mar 10, 2020 |title=....(which is under siege), is strong on Crime and the Border, and truly LOVES our Military and our Vets. He will be a great Senator for the people of Alabama. Coach Tommy Tuberville, a winner, has my Complete and Total Endorsement. I love Alabama! |user=realDonalTrump |number=1237557412048986120}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alaska}} [[2020 United States Senate election in Alaska|Alaska]] |''[[Dan Sullivan (U.S. senator)|Dan Sullivan]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Dec 17, 2019 |title=Senator Dan Sullivan is doing a great job for the people of Alaska while supporting our #MAGA Agenda. He fights hard everyday to support our Veterans and the Military. Dan is Strong on the #2A and is 100% pro-jobs. I give Dan Sullivan my Complete and Total Endorsement! |user=realDonalTrump |number=1207053956142292994}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[2020 United States Senate special election in Arizona|Arizona (special)]] |''[[Martha McSally]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 25, 2019 |title=....Martha is strong on Crime and Borders, the 2nd Amendment, and loves our Military and Vets. She has my Complete and Total Endorsement! |user=realDonalTrump |number=1143601087238172672}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Colorado}} [[2020 United States Senate election in Colorado|Colorado]] |''[[Cory Gardner]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 29, 2020 |title=Senator @CoryGardner from Colorado is a GREAT Senator who always fights for the people of his state. He protects your #2A, loves our Vets and Military, and cares deeply about our BEAUTIFUL public lands. Cory has my Complete and Total Endorsement! #COSEN |user=realDonalTrump |number=1277683493179400193}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Georgia (U.S. state)}} [[2020–21 United States Senate election in Georgia|Georgia]] |''[[David Perdue]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 11, 2020 |title=We need our Great David Perdue (@PerdueSenate) in the Senate to Drain the Swamp & Make America Great Again! His Radical Liberal opponent, Jon Ossoff (who we beat in 2017), supports LAWLESS Sanctuary Cities, wants to raise your taxes, & weaken our Great Military. He is a puppet... |user=realDonalTrump |number=1271163756144279552}}</ref> |{{Icon|no}} Lost runoff |- |{{flagicon|Georgia (U.S. state)}} [[2020–21 United States Senate special election in Georgia|Georgia (special)]] |''[[Kelly Loeffler]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Nov 16, 2020 |title=I strongly stand with Kelly & David. They are both great and MUST WIN! |user=realDonalTrump |number=1328330303103000577}}</ref> |{{Icon|no}} Lost runoff |- |{{flagicon|Idaho}} [[2020 United States Senate election in Idaho|Idaho]] |''[[Jim Risch]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 16, 2019 |title=Senator Jim Risch of the Great State of Idaho has been an incredible supporter of our Agenda! He is tough on Crime, Strong on Borders, and will continue to fight for our Second Amendment. Jim will never let you down. He has my Full and Complete Endorsement! |user=realDonalTrump |number=1162414717505277952}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Iowa}} [[2020 United States Senate election in Iowa|Iowa]] |''[[Joni Ernst]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 11, 2020 |title=...Unlike her Radical Liberal opponent, Theresa Greenfield, and Theresa's failed record in real estate, Joni stands for Iowa. Vote for Joni Ernst on November 3rd, a big day for us all! #IASEN |user=realDonalTrump |number=1271166412019527680}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kansas}} [[2020 United States Senate election in Kansas|Kansas]] |[[Roger Marshall]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 5, 2020 |title=A great race run by Roger against a very tough and smart opponent. Roger loves Kansas and will represent it incredibly well. He has my Complete and Total Endorsement. Will be a Big Win on November 3rd. This is not the opponent the Democrats wanted! |user=realDonalTrump |number=1290952940602130437}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kentucky}} [[2020 United States Senate election in Kentucky|Kentucky]] |''[[Mitch McConnell]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 19, 2020 |title=Senator Mitch McConnell (@Team_Mitch) always delivers for the people of Kentucky, who will hopefully re-elect their powerful Senate Majority Leader. Mitch has helped us Make America Great Again, and has my Complete and Total Endorsement! #KYSEN secure.winred.com/mitchmcconnell/ |user=realDonalTrump |number=1274074948743630853}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[2020 United States Senate election in Louisiana|Louisiana]] |''[[Bill Cassidy]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Mar 2, 2020 |title=THANK YOU @BillCassidy for all of your support with our #MAGA Agenda. You are doing an outstanding job representing the people of Louisiana & the U.S.A. You have my Complete and Total Endorsement! #KAG2020 |user=realDonalTrump |number=1234566159774756864}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Michigan}} [[2020 United States Senate election in Michigan|Michigan]] |[[John James (Michigan politician)|John James]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 18, 2020 |title=John James will be a GREAT Senator for Michigan! |user=realDonalTrump |number=1251549076786733056}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[2020 United States Senate election in Minnesota|Minnesota]] |[[Jason Lewis (Minnesota politician)|Jason Lewis]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 10, 2020 |title=Jason Lewis (@LewisForMN) will be an incredible Senator for the State of Minnesota! He is a proven leader who will help us Lower your Taxes, Protect our Communities and Defend your Second Amendment… |user=realDonalTrump |number=1292880641311334400}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Mississippi}} [[2020 United States Senate election in Mississippi|Mississippi]] |''[[Cindy Hyde-Smith]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 21, 2020 |title=Senator @CindyHydeSmith delivers for Mississippi! She helped us Cut your Taxes, Secure our Border, and Defend the Second Amendment. Cindy's opponent, Mike Espy, is a Corrupt Politician who will Raise your Taxes and Open your Borders! Vote for Cindy! #MSSEN secure.winred.com/cindy-hyde-smith/donate |user=realDonalTrump |number=1319017749931319297}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[2020 United States Senate election in Montana|Montana]] |''[[Steve Daines]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 5, 2020 |title=True. Steve is a GREAT SENATOR. Need him badly in Washington. Complete and Total Endorsement! |user=realDonalTrump |number=1268879488223522816}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nebraska}} [[2020 United States Senate election in Nebraska|Nebraska]] |''[[Ben Sasse]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 10, 2019 |title=Senator Ben Sasse has done a wonderful job representing the people of Nebraska. He is great with our Vets, the Military, and your very important Second Amendment. Strong on Crime and the Border, Ben has my Complete and Total Endorsement! |user=realDonalTrump |number=1171595113673347072}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New Hampshire}} [[2020 United States Senate election in New Hampshire|New Hampshire]] |Bryant "Corky" Messner<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 12, 2020 |title=Corky Messner (@CorkyForSenate) will be a fantastic Senator for New Hampshire! A West Point graduate, he served our Country in the Army with distinction. Strong on Jobs, Crime, Vets, Military and the Second Amendment... |user=realDonalTrump |number=1271482304716845057}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Carolina}} [[2020 United States Senate election in North Carolina|North Carolina]] |''[[Thom Tillis]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 25, 2019 |title=Senator Thom Tillis of North Carolina has really stepped up to the plate. Thom is tough on Crime, Strong on the Border and fights hard against Illegal Immigration. He loves our Military, our Vets and our great Second Amendment. I give Thom my Full and Total Endorsement! |user=realDonalTrump |number=1143645216907378695}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Oklahoma}} [[2020 United States Senate election in Oklahoma|Oklahoma]] |''[[Jim Inhofe]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Mar 9, 2020 |title=THANK YOU, Jim, for your incredible support of our #MAGA Agenda! You are a tremendous Senator for the people of the Great State of Oklahoma and you have my Complete and Total Endorsement! |user=realDonalTrump |number=1237130072571731968}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|South Carolina}} [[2020 United States Senate election in South Carolina|South Carolina]] |''[[Lindsey Graham]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 7, 2020 |title=Senator @LindseyGrahamSC is a good friend and strong voice for the people of South Carolina. He's helped us confirm GREAT Judges, rebuild the Military, and keep our Country SAFE. Strong on Life and our Vets. Lindsey has my Complete and Total Endorsement! secure.winred.com/team-graham/donate |user=realDonalTrump |number=1269703029588209665}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|South Dakota}} [[2020 United States Senate election in South Dakota|South Dakota]] |''[[Mike Rounds]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jun 2, 2020 |title=Senator Mike Rounds (@RoundsforSenate) continues to deliver for South Dakota! Mike is working hard for our incredible Farmers and he is strong on Trade, Military, our Vets, and the Second Amendment. Mike has my Complete and Total Endorsement! #SDSen secure.winred.com/rounds/home |user=realDonalTrump |number=1267809766627315712}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[2020 United States Senate election in Tennessee|Tennessee]] |[[Bill Hagerty]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 12, 2019 |title=Tennessee loving Bill Hagerty, who was my Tennessee Victoy Chair and is now the very outstanding Ambassador to Japan, will be running for the U.S. Senate. He is strong on crime, borders & our 2nd A. Loves our Military & our Vets. Has my Complete & Total Endorsement! |user=realDonalTrump |number=1149779387077791749}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2020 United States Senate election in Texas|Texas]] |''[[John Cornyn]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 21, 2019 |title=Senator John Cornyn has done an outstanding job for the people of Texas. He is strong on Crime, the Border, the Second Amendment and loves our Military and Vets. John has my complete and total endorsement. MAKE AMERICA GREAT AGAIN! |user=realDonalTrump |number=1098676390780719104}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|West Virginia}} [[2020 United States Senate election in West Virginia|West Virginia]] |''[[Shelley Moore Capito]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=May 1, 2020 |title=....Together we will Fight for Small Businesses and Protect American Energy workers! Shelley has my Complete and Total Endorsement! |user=realDonalTrump |number=1256313938247127041}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Wyoming}} [[2020 United States Senate election in Wyoming|Wyoming]] |[[Cynthia Lummis]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 13, 2020 |title=...She will be a great Senator, and has my Complete and Total Endorsement! secure.winred.com/lummis-for-wyoming/senate_red?sc=winred-directory |user=realDonalTrump |number=1294051967933841415}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2020 House elections ==== {| class="wikitable sortable" !District !Candidate !Result |- |{{flagicon|Alabama}} [[Alabama's 1st congressional district|AL-01]] |[[Jerry Carl]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 23, 2020 |title=We need Jerry Carl (@CarlForAlabama) in Congress for the People of Alabama! He Loves our Veterans, Stands for Law & Order, and is Strong on Jobs and the Second Amendment. Jerry has my Complete and Total Endorsement! #AL01 |user=realDonalTrump |number=1308870438542508032}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alabama}} [[Alabama's 2nd congressional district|AL-02]] |[[Barry Moore (American politician)|Barry Moore]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 23, 2020 |title=Barry Moore (@RepBarryMoore) will be a terrific Congressman for Alabama! An early supporter of our #MAGA agenda, he is Strong on Jobs, Life, the Wall, Law & Order and the Second Amendment. Barry has my Complete and Total Endorsement! #AL02 secure.winred.com/barrymoore/donate |user=realDonalTrump |number=1308870520281104385}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alabama}} [[Alabama's 5th congressional district|AL-05]] |''[[Mo Brooks]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 14, 2020 |title=.@MoInTheHouse Brooks is running for Congress in the Great State of Alabama. He is a huge supporter of the #MAGA Agenda. Mo fully supports Securing our Border w/the WALL, he Loves our Military & Vets, & is Strong on the #2A. Mo has my Complete Endorsement! |user=realDonalTrump |number=1228438881969885184}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alaska}} [[Alaska's at-large congressional district|AK-AL]] |''[[Don Young]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Aug 13, 2020 |title=.@DonYoungAK really produces for Alaska. He is an incredible Congressman who loves his State and works tirelessly for it. Strong on Public Lands, Energy, and our Second Amendment. He will never let you down, and has my Complete and Total Endorsement! |user=realDonalTrump |number=1294052825845182464}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[Arizona's 1st congressional district|AZ-01]] |Tiffany Shedd<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 10, 2020 |title=We need Tiffany Shedd (@Tiffany_Shedd) in Congress to fight for the people of Arizona! She will be a tremendous ally and advocate for Arizona's Farmers, the Second Amendment and the Border. Tiffany has my Complete and Total Endorsement! #AZ01 |user=realDonalTrump |number=1315091499823099909}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Arizona}} [[Arizona's 4th congressional district|AZ-04]] |''[[Paul Gosar]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 3, 2020 |title=Congressman @DrPaulGosar is a tremendous supporter of our #MAGA agenda! He is Strong on the Wall, Law Enforcement and the Second Amendment, and he always puts America First! Paul has my Complete and Total Endorsement. #AZ04 |user=realDonalTrump |number=1279161110336278531}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[Arizona's 8th congressional district|AZ-08]] |''[[Debbie Lesko]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 8, 2020 |title=Total and complete Endorsement for Debbie Lesko! @RepDLesko Love Arizona. |user=realDonalTrump |number=1226231262928678915}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 4th congressional district|CA-04]] |''[[Tom McClintock]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 14, 2020 |title=.@TomMcClintock is a strong Conservative Leader who will always fight for the people of California. He fully supports our #MAGA Agenda, will continue to Secure Our Border, Loves our Military & Vets, & is Strong on the #2A. Tom has my Complete Endorsement! secure.winred.com/mcclintock/donate |user=realDonalTrump |number=1228442887081295873}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 8th congressional district|CA-08]] |[[Jay Obernolte]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Feb 12, 2020 |title=.@JayObernolte of California is running for Congress in 2020. Jay will help me to continue securing the Southern Border, he Loves our GREAT Law Enforcement Officers, Military, Vets, and he will protect your #2A. Jay has my Complete and Total Endorsement! secure.winred.com/JayObernolte/donate |user=realDonalTrump |number=1227702453052813312}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[2020 California's 25th congressional district special election|CA-25]] |[[Mike Garcia (politician)|Mike Garcia]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 20, 2020 |title=...He is Strong on Crime, the Border, and Second Amendment. Mike has my Complete and Total Endorsement! Turn your Ballots in now and track them, watching for dishonesty. Report to Law Enforcement. secure.winred.com/mikegarcia/donate/ |user=realDonalTrump |number=1252417321685053440}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 43rd congressional district|CA-43]] |Joe Collins<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 12, 2020 |title=Maxine Waters has long been considered "the most corrupt person in Congress". Only habit keeps her there. Vote for Joe E. Collins lll and get this long time CROOK, Maxine Waters, out of office!!! |user=realDonalTrump |number=1315659219287314433}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|California}} [[California's 50th congressional district|CA-50]] |''[[Darrell Issa]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Jul 2, 2020 |title=Darrell always has had my full support and complete and total Endorsement. We need him badly in Washington! |user=realDonalTrump |number=1278830576141729792}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Colorado}} [[Colorado's 3rd congressional district|CO-03]] |[[Lauren Boebert]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 10, 2020 |title=.@LaurenBoebert is a tremendous fighter for the people of Colorado! A Rising Star, Lauren is Strong on the Second Amendment, Jobs, Energy, Healthcare and our incredible Military & Vets. Lauren has my Complete and Total Endorsement! #CO03 secure.winred.com/lauren-boebert-for-congress/donate |user=realDonalTrump |number=1304166640112881664}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Colorado}} [[Colorado's 3rd congressional district|CO-03]] |''[[Scott Tipton]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Dec 20, 2019 |title=Congressman @ScottRTipton is a great supporter of the #MAGA Agenda! He fights for your #2A rights and the Border Wall. Scott is working hard for Colorado and has my Complete and Total Endorsement! |user=realDonalTrump |number=1208129708690464771}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|Colorado}} [[Colorado's 4th congressional district|CO-04]] |''[[Ken Buck]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Oct 21, 2020 |title=Congressman Ken Buck (@BuckForColorado) is a champion for the incredible People of Colorado! He is Strong on Law & Order, Low Taxes, Border Security, our Military & Vets, and he will always defend your Second Amendment. Ken has my Complete and Total Endorsement! #CO04 |user=realDonalTrump |number=1319017831766368259}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 3rd congressional district|FL-03]] |[[Kat Cammack]]<ref>{{Cite tweet |last=Trump |first=Donald |date=Sep 10, 2020 |title=.@Kat_Cammack will be an incredible Congresswoman and leader for Florida! A Successful Businesswoman, she strongly supports our Brave First Responders & Law Enforcement, Life and the Second Amendment! Kat has my Complete and Total Endorsement #FL03 secure.winred.com/katcammack/donate |user=realDonalTrump |number=1304166604972924929}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 4th congressional district|FL-04]] |''[[Bill Posey]]''<ref>{{Cite tweet |last=Trump |first=Donald |date=Apr 23, 2020 |title=Congressman Bill Posey is a tremendous fighter for the Great State of Florida. He is a big supporter of our #MAGA Agenda – Strong on Crime, the Second Amendment, and Loves our Veterans and Law Enforcement. Bill has my Complete and Total Endorsement! |user=realDonalTrump |number=1253467417482801154}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |} === Between presidential terms === ==== 2022 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Alaska}} [[2022 Alaska gubernatorial election|Alaska]] |''[[Mike Dunleavy (politician)|Mike Dunleavy]]''<ref>{{Cite web |last=Harrington |first=Liz |date=Dec 28, 2021 |title=NEW! President Donald J. Trump:"Mike Dunleavy has been a strong and consistent Conservative since his time in the Alaska State Senate. I was proud to endorse his first run for Governor, and I am proud to support his reelection, too. From his handling of the virus, support... |url=https://x.com/realLizUSA/status/1475950916985630728}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[2022 Arizona gubernatorial election|Arizona]] |[[Kari Lake]]<ref>{{Cite web |last=Harrington |first=Liz |date=Sep 28, 2021 |title=NEW! President Donald J. Trump announces his endorsement of Kari Lake for Governor of Arizona |url=https://x.com/realLizUSA/status/1442973485395968005}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Arkansas}} [[2022 Arkansas gubernatorial election|Arkansas]] |[[Sarah Huckabee Sanders]]<ref>{{Cite web |last= Huckabee Sanders |first=Sarah |date=Jan 25, 2021 |title=Thank you President Trump for your endorsement and for always believing in me. As governor I will defend our freedom and lead with heart |url=https://x.com/SarahHuckabee/status/1353919930333327360}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Georgia (U.S. state)}} [[2022 Georgia gubernatorial election|Georgia]] |[[David Perdue]]<ref>{{Cite web |last=Harrington |first=Liz |date=Dec 6, 2021 |title=NEW! President Donald J. Trump announces his endorsement of David Perdue for Governor of Georgia |url=https://x.com/realLizUSA/status/1468014176719314948}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|Idaho}} [[2022 Idaho gubernatorial election|Idaho]] |[[Janice McGeachin]]<ref>{{Cite web |last=Harrington |first=Liz |date=Nov 9, 2021 |title= NEW! President Donald J. Trump announces his endorsement of Janice McGeachin for Governor of Idaho |url=https://x.com/realLizUSA/status/1458221166867501060}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|Illinois}} [[2022 Illinois gubernatorial election|Illinois]] |[[Darren Bailey]]<ref>{{Cite news |date=Jun 25, 2022 |title=Former President Trump Endorses Darren Bailey in Race for Illinois Governor |url=https://www.nbcchicago.com/news/local/former-president-trump-endorses-darren-bailey-in-race-for-illinois-governor/2866296/ |publisher=NBC Chicago}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Iowa}} [[2022 Iowa gubernatorial election|Iowa]] |''[[Kim Reynolds]]''<ref>{{Cite web |last=Trump |first=Donald |date=Jun 4, 2022 |title=Kim Reynolds is a strong leader and fantastic Governor for the incredible people of Iowa!" Trump's statement read. "Kim Reynolds is an America First Conservative, and she has my Complete and Total Endorsement! |url=https://www.donaldjtrump.com/news/news-k3xzvqrxbz0 |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kansas}} [[2022 Kansas gubernatorial election|Kansas]] |[[Derek Schmidt]]<ref>{{Cite tweet |last=Harrington |first=Liz |user=realLizUSA |number=1458221166867501060 |date=November 9, 2021 |title= NEW! President Donald J. Trump announces his endorsement of Derek Schmidt for Governor of Kansas}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Maryland}} [[2022 Maryland gubernatorial election|Maryland]] |[[Dan Cox]]<ref>{{Cite web |last=Harrington |first=Liz |date=Nov 22, 2021 |title= NEW! President Donald J. Trump announces his endorsement of Dan Cox for Governor of Maryland |url=https://x.com/realLizUSA/status/1462906941257269259}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Massachusetts}} [[2022 Massachusetts gubernatorial election|Massachusetts]] |[[Geoff Diehl]]<ref>{{Cite web |last=Harrington |first=Liz |date=Oct 5, 2021 |title= NEW! President Donald J. Trump announces his endorsement of Geoff Diehl against "RINO" Massachusetts Governor Charlie Baker |url=https://x.com/realLizUSA/status/1445536859073908738}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Michigan}} [[2022 Michigan gubernatorial election|Michigan]] |[[Tudor Dixon]]<ref>{{Cite web |last=Trump |first=Donald |date=Aug 22, 2022 |title=Tudor Dixon MUST defeat Gretchen Whitmer in November! I have talked to Tudor about the race and her choice of a running mate, Shane Hernandez. Since then, I have checked and found him to be an outstanding person. In fact, he was named Michigan's most Conservative legislator, and is strongly committed to Election Integrity. The MAGA movement should support the ticket! This is who Tudor wants and therefore, Shane is who I want as your next Lieutenant Governor… |url=https://truthsocial.com/@realDonaldTrump/108869239755629273 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Minnesota}} [[2022 Minnesota gubernatorial election|Minnesota]] |[[Scott Jensen (Minnesota politician)|Scott Jensen]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 25, 2022 |title=Minnesota finally has a chance to have a great Governor. His name is Dr. Scott Jensen, the Republican Gubernatorial Candidate, and he will bring Minnesota back from the brink. Strong on both fighting Crime and delivering Solid and Sensible Education, the results will be quickly seen - and there won't be any more fiery takeovers of police precincts. Minnesota will be Great Again. Dr. Scott Jensen has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/109232524594099405 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Nebraska}} [[2022 Nebraska gubernatorial election|Nebraska]] |[[Charles Herbster]]<ref>{{Cite web |last=Trump |first=Donald |date=May 10, 2022 |title=Nebraska, go out and vote today for Charles W. Herbster. He will be a great Governor! |url=https://truthsocial.com/users/realDonaldTrump/statuses/108277388770242605 |via=Truth Social}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|Nevada}} [[2022 Nevada gubernatorial election|Nevada]] |[[Joe Lombardo]]<ref>{{Cite web |last=Harrington |first=Liz |date=Apr 27, 2022 |title=NEW! President Donald J. Trump announces his endorsement of Joe Lombardo for Governor of Nevada |url=https://x.com/realLizUSA/status/1519477479974522880}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New Mexico}} [[2022 New Mexico gubernatorial election|New Mexico]] |Mark Ronchetti<ref>{{Cite web |last=Trump |first=Donald |date=Oct 31, 2022 |title=New Mexico has an absolutely terrible Governor, Michelle Lujan Grisham. She is WEAK on Crime, bad on the Border where illegal aliens are pouring into our Country at record numbers, & has almost no support from Law Enforcement, which fully understands what a disaster she has been. Also, Drugs & Human Trafficking are OUT OF CONTROL. The good news is that Republican Nominee Mark Ronchetti is outstanding. He will be tough & smart on Crime, the Border & everything else. Mark as my Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/109261470831895118 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New York}} [[2022 New York gubernatorial election|New York]] |[[Lee Zeldin]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 16, 2022 |title=I have watched and known Congressman Lee Zeldin for many years. He is a great and brilliant lawyer who was a "must see" for others in Congress when they had a complex legal problem that was holding up legislation. Lee was strong on the Border, Crime, our great Military & Vets (like few others!), and fought hard to protect our 2nd Amendment, and succeeded. Lee Zeldin is a WINNER who GOT THINGS DONE. He will be a GREAT Governor of New York, and has my Complete & Total Endorsement. GOOD LUCK LEE! |url=https://truthsocial.com/@realDonaldTrump/109177903368464493 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Ohio}} [[2022 Ohio gubernatorial election|Ohio]] |''[[Mike DeWine]]''<ref>{{Cite web |last= DeWine |first=Mike |date=Sep 7, 2022 |title=Lt. Governor @JonHusted and I are grateful for President Trump's support! Thank you. #WinningForOH |url=https://x.com/MikeDeWine/status/1567651155504775169}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Oklahoma}} [[2022 Oklahoma gubernatorial election|Oklahoma]] |''[[Kevin Stitt]]''<ref>{{Cite web |last=Harrington |first=Liz |date=Mar 14, 2022 |title=NEW! President Donald J. Trump announces his endorsement of Governor Kevin Stitt |url=https://x.com/realLizUSA/status/1503475090666754055}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[2022 Pennsylvania gubernatorial election|Pennsylvania]] |[[Doug Mastriano]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 16, 2022 |title=Doug Mastriano will be a GREAT Governor for Pennsylvania. I know him well and he is a fantastic guy who will fight totally out of control Violent Crime (his opponent is pathetic on fighting Crime), Strengthen our Borders, Protect Life, Defend our Second Amendment, and help our Military and our Vets. Doug is a fighter like few others, and has been with me right from the beginning. He will NEVER let you down. Doug Mastriano, an outstanding WARRIOR & PATRIOT, has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/109192353202698867 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|South Carolina}} [[2022 South Carolina gubernatorial election|South Carolina]] |''[[Henry McMaster]]''<ref>{{Cite web |last=McMaster |first=Henry |date=Mar 8, 2021 |title=My re-election campaign has been endorsed by President Donald J. Trump, and I am incredibly grateful. Now, I'm asking for your endorsement. Please make a donation today! #MAGA secure.winred.com/mcmaster-evette-2022/djt-endorsement-s/thank-you/preview |url=https://x.com/henrymcmaster/status/1369047979949232129}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|South Dakota}} [[2022 South Dakota gubernatorial election|South Dakota]] |''[[Kristi Noem]]''<ref>{{Cite web |last=Harrington |first=Liz |date=Feb 8, 2022 |title=NEW! President Donald J. Trump announces his endorsement of Governor Kristi Noem |url=https://x.com/realLizUSA/status/1491149829468160001}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[2022 Tennessee gubernatorial election|Tennessee]] |''[[Bill Lee (Tennessee politician)|Bill Lee]]''<ref>{{Cite web |last=Harrington |first=Liz |date=Aug 13, 2021 |title=NEW! President Donald J. Trump announces his endorsement of Tennessee Governor Bill Lee |url=https://x.com/realLizUSA/status/1426256022230945792}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2022 Texas gubernatorial election|Texas]] |''[[Greg Abbott]]''<ref>{{Cite web |last=Abbott |first=Greg |date=Jun 30, 2021 |title=President Trump: "Thank you Greg. What a great partner you've been for 4 years… I gave him a complete & total endorsement… You have done a great job & it's an honor to be with you." Thank you, President Trump. TX is grateful for our shared commitment to secure the border. |url=https://x.com/GregAbbott_TX/status/1410375871005966340}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Wisconsin}} [[2022 Wisconsin gubernatorial election|Wisconsin]] |Tim Michels<ref>{{Cite web |last=Trump |first=Donald |date=Aug 9, 2022 |title=Congratulations to Tim Michels on his win against a wonderful and highly-competitive opponent, Rebecca Kleefisch. I know both sides will come together and defeat one of the worst Governors in the Country, Tony Evers. |url=https://truthsocial.com/@realDonaldTrump/108796564343503982 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |} ==== 2022 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |rowspan="2"|{{flagicon|Alabama}} [[2022 United States Senate election in Alabama|Alabama]] |<s>[[Mo Brooks]]</s> ''(rescinded endorsement)''<ref>{{Cite web |last=Harrington |first=Liz |date=Jul 10, 2021 |title="I see that the RINO Sen from Ala, close friend of Old Crow Mitch McConnell, Richard Shelby, is pushing hard to have his "assistant" fight the great Mo Brooks for his Senate seat. She is not in any way qualified and is certainly not what our Country needs...Vote for Mo Brooks!" |url=https://x.com/realLizUSA/status/1413991469380247556}}</ref><ref>{{Cite web |last=Harrington |first=Liz |date=Mar 23, 2022 |title=NEW! President Donald J. Trump: "Mo Brooks of Alabama made a horrible mistake recently when he went "woke" and stated, referring to the 2020 Presidential Election Scam, "Put that behind you, put that behind you," despite the fact that the Election was rife with fraud and… |url=https://x.com/realLizUSA/status/1506604116662964232}}</ref> |{{Icon|no}} Lost primary |- |[[Katie Britt]]<ref>{{Cite web |last=Britt |first=Katie |date=Jun 10, 2022 |title=President Trump knows that Alabamians are sick and tired of failed, do-nothing career politicians. In the Senate, I will fight to defend Alabama's values, advance the America First agenda, and preserve the American Dream for generations to come. #alsen |url=https://x.com/KatieBrittforAL/status/1535451426238906368}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alaska}} [[2022 United States Senate election in Alaska|Alaska]] |Kelly Tshibaka<ref>{{Cite web |last=Trump |first=Donald |date=Jul 9, 2022 |title=On my way to Alaska to get rid of the horrible Alaska-Hating Lisa Murkowski. Speech honoring Kelly Tshibaka and Sarah Palin—big crowd (Alaska record-setting!) in Anchorage. See you soon! |url=https://truthsocial.com/@realDonaldTrump/108619667749492625 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Arizona}} [[2022 United States Senate election in Arizona|Arizona]] |[[Blake Masters]]<ref>{{Cite web |last=Trump |first=Donald |date=Jul 29, 2022 |title=Blake Masters yes, all the way! Will be a BIG WIN FOR ARIZONA! |url=https://truthsocial.com/@realDonaldTrump/108730475995354829 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Arkansas}} [[2022 United States Senate election in Arkansas|Arkansas]] |''[[John Boozman]]''<ref>{{Cite web |last=Boozman |first=John |date=Mar 8, 2021 |title=I'm grateful to have Pres. Trump's endorsement for my re-election to the Senate. We worked together to lower taxes, roll back regulations, secure our border, defend our Second Amendment rights and Protect Life. #arpx |url=https://x.com/Boozman4AR/status/1369088471785218049}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Connecticut}} [[2022 United States Senate election in Connecticut|Connecticut]] |[[Leora Levy]]<ref>{{Cite web |last=Trump |first=Donald |date=Aug 4, 2022 |title=Endorsement of Leora Levy… |url=https://truthsocial.com/@realDonaldTrump/108767642231474063 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Florida}} [[2022 United States Senate election in Florida|Florida]] |''[[Marco Rubio]]''<ref>{{Cite web |last=Trump |first=Donald |date=Apr 9, 2021 |title=It is my honor to give U.S. Senator Marco Rubio my Complete and Total Endorsement. Marco has been a tireless advocate for the people of Florida, fighting to cut taxes, supporting our Second Amendment, our Military and our Vets, a strong national defense, and all of the forgotten men and women of America. Together, we worked closely with the Cuban and Venezuelan communities, and have made great progress. He also ruled that 'President Trump was in no way involved with Russia,' as he presided over the Senate Intelligence Committee on the FAKE Russia, Russia, Russia Hoax. Marco will never let the great people of Florida, or our Country, down! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Georgia (U.S. state)}} [[2022 United States Senate election in Georgia|Georgia]] |[[Herschel Walker]]<ref>{{Cite web |last=Trump |first=Donald |date=Dec 5, 2022 |title=To the Great State of Georgia, Get Out and Vote for the WONDERFUL Herschel Walker TOMORROW. Herschel was a fantastic Athlete, and he will be an even greater United States Senator! To all MAGA Voters, that is, people that want to Make America Great Again and Put America First, tomorrow is a big day. Vote for Herschel! |url=https://truthsocial.com/@realDonaldTrump/109464232232767808 |via=Truth Social}}</ref> |{{Icon|no}} Lost runoff |- |{{flagicon|Idaho}} [[2022 United States Senate election in Idaho|Idaho]] |''[[Mike Crapo]]''<ref>{{Cite web |last=Trump |first=Donald |date=May 18, 2022 |title=Mike Crapo has been a tremendous Senator for the Great State of Idaho, and a true champion for all Americans. Mike has been a strong leader on the issues that matter most to the Forgotten Men and Women of our Country, including fighting to secure our Border, unleashing American Energy Independence, and protecting our Second Amendment Rights. Mike has my Complete and Total Endorsement for re-election, and he has my full support in the General Election. A wonderful man who will never let you down! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Iowa}} [[2022 United States Senate election in Iowa|Iowa]] |''[[Chuck Grassley]]''<ref>{{Cite web |author=RSBN |date=Oct 9, 2021 |title=President Trump has given @ChuckGrassley his "complete and total endorsement for reelection!" #SaveAmericaRally #GrassleyWorks |url=https://x.com/rsbnetwork/status/1447019548230696961?s=46}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kansas}} [[2022 United States Senate election in Kansas|Kansas]] |''[[Jerry Moran]]''<ref>{{Cite web |last=Trump |first=Donald |date=Feb 25, 2021 |title=Senator Jerry Moran is doing a terrific job for the wonderful people of Kansas. Strong on Military, Vets, the Border, and our Second Amendment, Jerry has my Complete and Total Endorsement for his re-election in 2022! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Kentucky}} [[2022 United States Senate election in Kentucky|Kentucky]] |''[[Rand Paul]]''<ref>{{Cite web |last=Trump |first=Donald |date=Mar 1, 2022 |title=Senator Rand Paul has been a great friend and ally to our America First Agenda, and has been a tremendous help in our efforts to Make America Great Again. He has been a Fighter for the Great People of Kentucky, and a Champion for our Military and our Veterans. Rand has a proven record of fighting against the Radical Left Democrats and their Socialist Agenda, and he will continue to be a strong voice against the Biden Border Crisis, the Weaponization of the Federal Government, and the Corrupt and Incompetent Biden Administration. Rand Paul has my Complete and Total Endorsement for re-election, and he will not let you down! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[2022 United States Senate election in Louisiana|Louisiana]] |''[[John Kennedy (Louisiana politician)|John Kennedy]]''<ref>{{Cite web |last=Trump |first=Donald |date=Apr 14, 2021 |title=Senator John Kennedy is a fantastic Senator, and a true Champion for the Great People of Louisiana. He has been a tireless advocate for our Farmers and Ranchers, our Energy Workers, and all Americans who want to Make America Great Again. John has fought hard against the Radical Left Democrats and their Socialist Agenda, and he will continue to be a strong voice for our Military, our Veterans, and our Second Amendment Rights. John Kennedy has my Complete and Total Endorsement for re-election, and he will not let you down! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |rowspan="2"|{{flagicon|Missouri}} [[2022 United States Senate election in Missouri|Missouri]] |[[Eric Schmitt]] ''(co-endorsement with Greitens)''<ref name=":1">{{Cite web |last=Trump |first=Donald |date=Aug 1, 2022 |title=President Trump on Truth Social |url=https://truthsocial.com/@realDonaldTrump/posts/108749916238646651 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |[[Eric Greitens]] ''(co-endorsement with Schmitt)''<ref name=":1" /> |{{Icon|no}} Lost primary |- |{{flagicon|Nevada}} [[2022 United States Senate election in Nevada|Nevada]] |[[Adam Laxalt]]<ref>{{Cite web |last=Harrington |first=Liz |date=Aug 20, 2021 |title= NEW! President Trump announces endorsement of Adam Laxalt for Senate in Nevada |url=https://x.com/realLizUSA/status/1428903233578315777}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New Hampshire}} [[2020 United States Senate election in New Hampshire|New Hampshire]] |[[Don Bolduc]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 31, 2022 |title=General Don Bolduc has run a great campaign to be the U.S. Senator from the beautiful State of New Hampshire. He was a strong and proud "Election Denier," a big reason that he won the Nomination, but he then disavowed. He has since come back, at least on busing, but that is only a small part of N.H. Election Fraud. Nevertheless, Don Bolduc has asked for my Endorsement, and he's got it, Complete & Total. His opponent is a disaster on Crime, the Border, Inflation, & all else. Vote for Don Bolduc! |url=https://truthsocial.com/@realDonaldTrump/109261581904146889 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Carolina}} [[2022 United States Senate election in North Carolina|North Carolina]] |[[Ted Budd]]<ref>{{Cite web |last=Harrington |first=Liz |date=Jan 25, 2022 |title=NEW! President Donald J. Trump: "Ted Budd, who I endorsed many months ago for the U.S. Senate, is now leading the pack in North Carolina. He is the true America First fighter who stands strong for the Second Amendment, fights for our great Military and Law Enforcement, and... |url=https://x.com/realLizUSA/status/1485950430228135936}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|North Dakota}} [[2022 United States Senate election in North Dakota|North Dakota]] |''[[John Hoeven]]''<ref>{{Cite web |last=Harrington |first=Liz |date=Mar 18, 2022 |title=NEW! President Donald J. Trump announces his endorsement of Senator John Hoeven |url=https://x.com/realLizUSA/status/1504961111300444165}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Ohio}} [[2022 United States Senate election in Ohio|Ohio]] |[[JD Vance]]<ref>{{Cite web |last=Harrington |first=Liz |date=Apr 28, 2022 |title=ICYMI: "Exclusive: Trump-Endorsed J.D. Vance Takes Commanding Lead in New Poll" breitbart.com/politics/2022/04/28/exclusive-trump-endorsed-j-d-vance-takes-commanding-lead-in-new-poll/ |url=https://x.com/realLizUSA/status/1519793342766358528}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Oklahoma}} [[2022 United States Senate election in Oklahoma|Oklahoma]] |''[[James Lankford]]''<ref>{{Cite web |last=Trump |first=Donald |date=Sep 27, 2022 |title=Senator James Lankford ran a strong Campaign against highly credible opponents who fought hard but, ultimately, were unsuccessful. James was strongly committed to America First, and everything it stood for, and likewise strongly committed to me, as President. Sometimes we didn't exactly agree on everything, but we do now. He is a very good man with a fabulous wife and family, loves the great State of Oklahoma, and is working very hard on trying to Save our Country from the disaster that it is in. Interestingly, I won Oklahoma—77 of 77 Counties both times—so I have a serious obligation to do things right! James Lankford is Strong on the Border, Tough on Crime, and Very Smart on the Economy. He is fighting to Stop Inflation, Defend our under siege Second Amendment, and Restore American Energy Independence, just as we had it during the Trump Administration where we would soon be, in fact, Energy Dominant. Sadly, that went up in dust with the Biden Administration — but James will help us get it back. It is my great honor to give James Lankford my Complete and Total Endorsement! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Oklahoma}} [[2022 United States Senate special election in Oklahoma|Oklahoma (special)]] |[[Markwayne Mullin]]<ref>{{Cite web |last=Trump |first=Donald |date=Jul 17, 2022 |title=breitbart.com/politics/2022/07/16/exclusive-trump-endorsed-senate-candidate-rep-markwayne-mullin-red-wave-real-its-coming/ |url=https://truthsocial.com/@realDonaldTrump/108664329648361311 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |rowspan="2"|{{flagicon|Pennsylvania}} [[2022 United States Senate election in Pennsylvania|Pennsylvania]] |<s>[[Sean Parnell (spokesperson)|Sean Parnell]]</s> ''(withdrew candidacy)''<ref>{{Cite web |last=Harrington |first=Liz |date=Sep 1, 2021 |title=NEW! President Donald J. Trump announces endorsement of Sean Parnell for U.S. Senate |url=https://x.com/realLizUSA/status/1433160563346059268}}</ref><ref>{{Cite web |last=Parnell |first=Sean |date=Nov 22, 2021 |title=Statement from Sean Parnell |url=https://www.facebook.com/photo.php?fbid=448754716608737&id=100044226379595&set=a.407273740756835 |via=Facebook}}</ref> |{{Icon|no}} Withdrew |- |[[Mehmet Oz]]<ref>{{Cite web |last=Harrington |first=Liz |date=Apr 9, 2022 |title=NEW! President Donald J. Trump announces his endorsement of Dr. Oz |url=https://x.com/realLizUSA/status/1512933127878025221}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|South Carolina}} [[2022 United States Senate election in South Carolina|South Carolina]] |''[[Tim Scott]]''<ref>{{Cite web |last=Trump |first=Donald |date=Sep 27, 2022 |title=It is my great honor to give Senator Tim Scott of South Carolina my complete and total endorsement. He is both an outstanding senator and person who works tirelessly for the people of his great state, and the USA. Strong on the military, law enforcement, loves our vets, protects our Second Amendment and our borders. Tim will continue to do an OUTSTANDING job for our country! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Utah}} [[2022 United States Senate election in Utah|Utah]] |''[[Mike Lee]]''<ref>{{Cite web |last=Trump |first=Donald |date=Nov 2, 2022 |title=The Great People of Utah have a gem in Mike Lee. He will never let you down, whereas his opponent, McMuffin, will only let you down. Mike has long had my Complete and Total Endorsement, and even more strongly now! |url=https://truthsocial.com/@realDonaldTrump/109275109307282759 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Vermont}} [[2022 United States Senate election in Vermont|Vermont]] |Gerald Malloy<ref>{{Cite web |last=Trump |first=Donald |date=Nov 3, 2022 |title=Gerald Malloy is a Brave Veteran and American Patriot running to be the next U.S. Senator from the Great State of Vermont! Gerald will work very hard to Reduce Crime, Stop Inflation, Secure our Border, Protect our under siege Second Amendment, and Restore American Energy Independence, and even Dominance. His opponent, Radical Left Democrat Peter Welch, does not represent the values of the Great People of Vermont. Gerald Malloy has my Complete and Total Endorsement – WIN! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Wisconsin}} [[2022 United States Senate election in Wisconsin|Wisconsin]] |''[[Ron Johnson]]''<ref>{{Cite web |last=Trump |first=Donald |date=Aug 6, 2021 |title=Even though he has not yet announced that he is running, and I certainly hope he does, I am giving my Complete and Total Endorsement to Senator Ron Johnson of Wisconsin. He is brave, he is bold, and he loves our Country, our Military, and our Vets. Ron is very tough on the Border and Illegal Immigration, and never gives in to the Radical Left Democrats and their lunacy. Ron Johnson will continue to fight to Save America, and I strongly encourage him to run! |url=https://www.donaldjtrump.com/news/news |website=DonaldJTrump.com}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2022 House elections ==== {| class="wikitable sortable" !District !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Michigan}} [[Michigan's 3rd congressional district|MI-03]] |[[John Gibbs (government official)|John Gibbs]]<ref>{{Cite web |last=Dale |first=Daniel |title=Fact check: Trump-backed Michigan congressional candidate John Gibbs falsely claims 2020 election had 'mathematically impossible' anomalies |url=https://www.cnn.com/2022/06/30/politics/fact-check-john-gibbs-michigan-mathematically-impossible/index.html |access-date=2022-08-08 |publisher=CNN|date=30 June 2022 }}</ref> |August 2, 2022 |Challenger (G) |{{Icon|no}} Lost election |- |{{flagicon|Washington}} [[Washington's 3rd congressional district|WA-03]] |[[Joe Kent]]<ref>{{Cite news |last=Hounshell |first=Blake |date=2022-07-25 |title=A Trump-Backed Veteran Ran Hard to the Right, Only to Be Outflanked |language=en-US |work=The New York Times |url=https://www.nytimes.com/2022/07/25/us/politics/joe-kent-house-trump.html |access-date=2022-08-08 |issn=0362-4331}}</ref> |August 2, 2022 |Challenger (G) |{{Icon|no}} Lost election |- |{{flagicon|Wyoming}} [[Wyoming's at-large congressional district|WY-AL]] |[[Harriet Hageman]]<ref>{{Cite news |last=Goldmacher |first=Shane |date=2021-09-09 |title=Trump endorses a Cheney challenger, aiming to unseat a chief detractor. |language=en-US |work=The New York Times |url=https://www.nytimes.com/2021/09/09/us/politics/trump-liz-cheney-harriet-hageman.html |access-date=2022-08-08 |issn=0362-4331}}</ref> |August 16, 2022 |Challenger (G) |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New York}} [[New York's 10th congressional district|NY-10]] |[[Dan Goldman]] ''(Democrat)''<ref name="democrat-endorsements">{{Cite web |last=Vakil |first=Caroline |date=2022-08-17 |title=Trump gives backhanded endorsements to Democrats Dan Goldman, Carolyn Maloney in NY primaries |url=https://thehill.com/homenews/campaign/3605847-trump-gives-back-handed-endorsements-to-democrats-dan-goldman-carolyn-maloney-in-ny-primaries/ |access-date=2022-08-17 |website=The Hill |language=en-US}}</ref> |August 23, 2022 |Open seat |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New York}} [[New York's 12th congressional district|NY-12]] |''[[Carolyn Maloney]]'' ''(Democrat)''<ref name="democrat-endorsements"/> |August 23, 2022 |Challenger/Incumbent |{{Icon|no}} Lost primary |} ==== 2022 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Arizona}} [[2022 Arizona Attorney General election|Arizona]] |[[Arizona Attorney General|Attorney General]] |[[Abraham Hamadeh]]<ref>{{Cite web |last=Trump |first=Donald |date=Jun 14, 2022 |title=Endorsement of Abraham Hamadeh |url=https://www.donaldjtrump.com/news/news-mxajfuhsrg2137 |website=[[DonaldJTrump.com]]}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Arizona}} [[2022 Arizona Secretary of State election|Arizona]] |[[Secretary of State of Arizona|Secretary of State]] |[[Mark Finchem]]<ref>{{Cite web |last=Harrington |first=Liz |date=Sep 13, 2021 |title= NEW! President Donald J. Trump announces his endorsement of Mark Finchem for Arizona Secretary of State |url=https://x.com/realLizUSA/status/1437488757029081093}}</ref> |{{Icon|no}} Lost general |} ==== Other elections ==== * [[2022 Alaska's at-large congressional district special election]]: endorsed [[Sarah Palin]] (advanced to general election from nonpartisan blanket primary but lost general election).<ref>{{Cite web |date=April 3, 2022 |title=Trump endorses Palin in Alaska House special election |url=https://www.politico.com/news/2022/04/03/trump-endorses-palin-in-alaska-house-special-election-00022627 |access-date=April 3, 2022 |work=[[Politico]]}}</ref> * 2022 election to [[Arizona's 7th legislative district]]: endorsed [[Wendy Rogers (politician)|Wendy Rogers]] (won primary).<ref>{{cite web | url=https://www.azcentral.com/story/opinion/op-ed/laurieroberts/2021/11/30/wendy-rogers-and-anthony-kern-get-trump-seal-endorsement/8808827002/ | title=Trump backing Wendy Rogers and Anthony Kern makes them the future of the GOP (Doesn't it?) }}</ref> * 2022 election to [[Miami-Dade County's 6th District]]: endorsed [[Kevin Marino Cabrera]] (won primary and general).<ref>[https://www.miamiherald.com/news/politics-government/article261148442.html Donald Trump dives into Miami-Dade politics with a county commission endorsement]</ref> ==== 2023 Speaker of the House of Representatives elections ==== {| class="wikitable sortable" !Election !Candidate !Result |- |{{Flagicon|United States}} [[January 2023 Speaker of the United States House of Representatives election|January election]] |[[Kevin McCarthy]]<ref>{{Cite web |last=Trump |first=Donald |date=Jan 4, 2023 |title=Some really good conversations took place last night, and it's now time for all of our GREAT Republican House Members to VOTE FOR KEVIN, CLOSE THE DEAL, TAKE THE VICTORY, & WATCH CRAZY NANCY PELOSI FLY BACK HOME TO A VERY BROKEN CALIFORNIA,THE ONLY SPEAKER IN U.S. HISTORY TO HAVE LOST THE "HOUSE" TWICE! REPUBLICANS, DO NOT TURN A GREAT TRIUMPH INTO A GIANT & EMBARRASSING DEFEAT. IT'S TIME TO CELEBRATE, YOU DESERVE IT. Kevin McCarthy will do a good job, and maybe even a GREAT JOB - JUST WATCH! |url=https://truthsocial.com/@realDonaldTrump/109630978268932397 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |rowspan=2|{{Flagicon|United States}} [[October 2023 Speaker of the United States House of Representatives election|October election]] |[[Jim Jordan]]{{efn|Until the House Republican Conference unselected him.}}<ref>{{Cite web |last=Trump |first=Donald |date=Oct 6, 2023 |title=Congressman Jim Jordan has been a STAR long before making his very successful journey to Washington, D.C., representing Ohio's 4th Congressional District. Respected by all, he is now Chairman of the House Judiciary Committee. As President, I had the honor of presenting Jim with our Country's highest civilian award, The Presidential Medal of Freedom. So much is learned from sports, and Jim was a master! While attending Graham High School, he won State Championships all four years, a rarity, and compiled an amazing 156-1 record. At the University of Wisconsin-Madison, Jim became a two-time NCAA Division l Wrestling Champion. He won his 1985-86 NCAA Championship Matches in his weight class. Jim has a masters degree in Education from Ohio State University & a Law Degree from Capital University. He is STRONG on Crime, Borders, our Military/Vets, & 2nd Amendment. Jim, his wife, Polly, & family are outstanding - He will be a GREAT Speaker of the House, & has my Complete & Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/111186121976324259 |via=Truth Social}}</ref> |{{Icon|no}} Unselected by the [[House Republican Conference]] |- |[[Mike Johnson]]{{efn|After the House Republican Conference unselected Jim Jordan.}}<ref>{{Cite web |last=Trump |first=Donald |date=Oct 25, 2023 |title=Congratulations to Congressional Republicans! Yesterday was a big and very important day. It gave us a quick and easy way forward with 5 candidates who are beyond reproach, and represent the absolute best there is in the Republican Party. Even the Fake News Media is impressed with what took place yesterday and, more importantly, with the Candidates themselves. Congratulations to Reps. Byron Donalds (Florida), Charles J. "Chuck" Fleischmann (Tennessee), Mark Green (Tennessee), & Roger Williams (Texas), & the ultimate winner of yesterday's vote, by a significant margin, Mike Johnson (Louisiana). I am not going to make an Endorsement in this race, because I COULD NEVER GO AGAINST ANY OF THESE FINE AND VERY TALENTED MEN, all of whom have supported me, in both mind and spirit, from the very beginning of our GREAT 2016 Victory. In 2024, we will have an even bigger, & more important, WIN! My strong SUGGESTION is to go with the leading candidate, Mike Johnson, & GET IT DONE, FAST! LOVE, DJT |url=https://truthsocial.com/@realDonaldTrump/111295424273340966 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2023 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Kentucky}} [[2023 Kentucky gubernatorial election|Kentucky]] |[[Daniel Cameron (American politician)|Daniel Cameron]]<ref>{{Cite web |last=Cameron |first=Daniel |date=Jun 16, 2022 |title=Thank you President Trump! |url=https://x.com/DanielCameronKY/status/1537580069517938688}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Louisiana}} [[2023 Louisiana gubernatorial election|Louisiana]] |[[Jeff Landry]]<ref>{{Cite web |last=Trump |first=Donald |date=Aug 29, 2023 |title=Jeff Landry has my Complete and Total Endorsement for Governor of Louisiana. Now is the time for everyone to unite behind him to ensure he has a tremendous Victory! |url=https://truthsocial.com/@realDonaldTrump/110976057612222715 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Mississippi}} [[2023 Mississippi gubernatorial election|Mississippi]] |''[[Tate Reeves]]''<ref>{{Cite web |last=Trump |first=Donald |date=Nov 1, 2023 |title=To all my friends in Mississippi – you have a choice to make. Your great Governor, Tate Reeves, is under attack. The radical left maniacs who are attacking me are also after him… |url=https://truthsocial.com/@realDonaldTrump/111335994521658174 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2023 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Louisiana}} [[2023 Louisiana elections|Louisiana]] |[[Attorney general of Louisiana|Attorney General]] |[[Liz Murrill]]<ref name=":3">{{Cite web |last=Finn |first=James |date=2023-11-16 |title=See Donald Trump's picks for Louisiana attorney general, treasurer, secretary of state |url=https://www.nola.com/news/politics/national_politics/see-donald-trumps-endorsements-in-louisiana-statewide-races/article_fd435852-84ae-11ee-b44e-2b2bdffacfde.html |access-date=2023-12-10 |website=NOLA.com |language=en}}</ref> |October 14, 2023 |Open |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[2023 Louisiana elections|Louisiana]] |[[Treasurer of Louisiana|Treasurer]] |[[John Fleming (Louisiana politician)|John Fleming]]<ref name=":3" /> |October 14, 2023 |Open |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[2023 Louisiana elections|Louisiana]] |[[Secretary of State of Louisiana|Secretary of State]] |[[Nancy Landry]]<ref name=":3" /> |October 14, 2023 |Open |'''{{Icon|aa}}''' '''Elected''' |} ==== 2024 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Indiana}} [[2024 Indiana gubernatorial election|Indiana]] |[[Mike Braun]]<ref>{{Cite web |last=Trump |first=Donald |date=Nov 1, 2023 |title=Highly respected Senator Mike Braun is running for Governor of Indiana, a State I love and won by large margins in 2016 and 2020. In the Senate, Mike is working hard to Support our Law Enforcement, Secure our Borders, and Stop the Woke Fascist Mob trying to destroy our Country. Mike is an America First Conservative who knows how to Grow the Economy, Fight Inflation, and Champion "Hoosier" Values. I was proud to endorse Mike when he ran for the Senate in 2018, and I am proud to do so again — Mike Braun has my Complete and Total Endorsement to be the next Governor of the Great State of Indiana! |url=https://truthsocial.com/@realDonaldTrump/111337465637582727 |via=Truth Social}}</ref> | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Missouri}} [[2024 Missouri gubernatorial election|Missouri]] |[[Mike Kehoe]]<ref>{{Cite web |last=Trump |first=Donald |date=Jul 27, 2024 |title=I love the State of Missouri for every reason in the book, including the fact that it is "loaded up" with truly GREAT people. I also like Endorsing Candidates for Office if I think they're good, and usually there is a differentiation, usually a big one, where it is not that difficult to do. But Missouri has three great people running for Governor - Jay Ashcroft, Mike Kehoe, and Bill Eigel. All have had excellent careers, and have been with me from the beginning. They are MAGA and America First all the way! I can't hurt two of them by Endorsing one so, therefore, I'm going to Endorse, for Governor of the Great State of Missouri, Jay Ashcroft, Mike Kehoe, and Bill Eigel. Choose any one of them - You can't go wrong! |url=https://truthsocial.com/@realDonaldTrump/112861271255683848 |via=Truth Social}}</ref> | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|North Carolina}} [[2024 North Carolina gubernatorial election|North Carolina]] |[[Mark Robinson (American politician)|Mark Robinson]]<ref>{{Cite web |last=Trump |first=Donald |date=Jun 23, 2023 |title=THANK YOU LT. GOV. MARK ROBINSON! WE WILL NOT LET NORTH CAROLINA DOWN. MAGA!!! |url=https://truthsocial.com/@realDonaldTrump/110594579783535047 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Dakota}} [[2024 North Dakota gubernatorial election|North Dakota]] |[[Kelly Armstrong]]<ref>{{Cite web |last=Trump |first=Donald |date=May 30, 2024 |title=Congressman Kelly Armstrong is running for Governor of North Dakota, a State that I love, and WON BIG in 2016 and 2020. In Congress, Kelly strongly defended me through two SHAM Impeachments, and is 100% MAGA. As your next Governor, Kelly will work tirelessly to grow the Economy, stop Inflation, cut Taxes and Regulations, secure our Border, protect North Dakota from Federal Overreach, defend our always under siege Second Amendment, strengthen our Military/Vets, and put our Incredible Farmers, Ranchers, and Energy Producers FIRST. Kelly Armstrong has my Complete and Total Endorsement to be the next Governor of the Great State of North Dakota - HE WILL NOT LET YOU DOWN! |url=https://truthsocial.com/@realDonaldTrump/112531260144624029 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|West Virginia}} [[2024 West Virginia gubernatorial election|West Virginia]] |[[Patrick Morrisey]]<ref>{{Cite web |last=Trump |first=Donald |date=May 21, 2024 |title=Highly Respected Attorney General Patrick Morrisey ran against two very talented and popular opponents for Governor of West Virginia, a State I love and won by large margins in 2016 and 2020. Patrick has been a wonderful Attorney General, and will now be an incredible Governor who will fight tirelessly to stop Inflation, grow the Economy, restore Energy DOMINANCE, secure our Border, strengthen our Military/Vets, and protect and defend our always under siege Second Amendment. Now is the time for all Republicans to unite behind Patrick Morrisey to ensure he has a tremendous Victory in November! Patrick will work closely with me to enact America First Policies, and is a FANTASTIC person to replace my friend and future U.S. Senator, Jim Justice. Patrick Morrisey has my Complete and Total Endorsement - HE WILL NOT LET YOU DOWN! |url=https://truthsocial.com/@realDonaldTrump/112477080295803405 |via=Truth Social}}</ref> | '''{{Icon|aa}}''' '''Elected''' |} ==== 2024 lieutenant gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Indiana}} [[2024 Indiana gubernatorial election#Lieutenant governor selection|Indiana]] |[[Julie McGuire]]<ref>{{Cite web |last=Kelly |first=Niki |date=June 13, 2024 |title=Trump endorses GOP lieutenant governor candidate in Indiana |url=https://indianacapitalchronicle.com/briefs/trump-endorses-gop-lieutenant-governor-candidate-in-indiana/ |via=}}</ref> | '''{{Icon|no}}''' Lost convention |} ==== 2024 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Result |- |{{flagicon|Arizona}} [[2024 United States Senate election in Arizona|Arizona]] |[[Kari Lake]]<ref>{{Cite web |last=Trump |first=Donald |date=Jul 26, 2024 |title=Kari Lake will be an incredible Senator for the Great State of Arizona. She will fight tirelessly to Secure the Border, Stop Migrant Crime, End Inflation, Grow the Economy, Support our Great Military/Vets, and Strongly Defend our always under siege Second Amendment. Kari Lake is a spectacular woman, and has my Complete and Total Endorsement — She will not let you down! |url=https://truthsocial.com/@realDonaldTrump/112855095485231691 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Florida}} [[2024 United States Senate election in Florida|Florida]] |''[[Rick Scott]]''<ref>{{Cite web |last=Trump |first=Donald |date=Dec 5, 2023 |title=I am proud to give my Complete and Total Endorsement to U.S. Senator Rick Scott of Florida in his bid for Re-Election. I have known Rick for a long time, as both a businessman and great Governor of FLORIDA, and there are few like him! Strong on the Border, Crime, our Great Military/Vets, our Second Amendment, and the only person who has been willing to take on the very destructive Super RINO, Mitch McConnell. Everyone in Florida should help Senator Rick Scott have a big win next year! |url=https://truthsocial.com/@realDonaldTrump/111529649299840132 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Indiana}} [[2024 United States Senate election in Indiana|Indiana]] |[[Jim Banks]]<ref>{{Cite web |last=Trump |first=Donald |date=Feb 1, 2023 |title=Jim Banks is running for the United States Senate from the Great State of Indiana. I know Jim well, have seen him tested at the highest and most difficult levels, and WIN! Strong on the Border, Crime, our Military and our Vets, Jim will fight for low taxes and regulations, Sanity in Government, and our under siege 2nd Amendment. Jim Banks is respected by all, will never let you down, and has my Complete & Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/109789201422857786 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Maryland}} [[2024 United States Senate election in Maryland|Maryland]] |[[Larry Hogan]]<ref>{{Cite news |last=Cai |first=Sophia |date=Jun 13, 2024 |title=Trump endorses Larry Hogan in tight Maryland Senate race |url=https://www.axios.com/2024/06/13/trump-larry-hogan-endorsement-maryland-senate |website=Axios}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Michigan}} [[2024 United States Senate election in Michigan|Michigan]] |[[Mike Rogers (Michigan politician)|Mike Rogers]]<ref>{{Cite web |last=Trump |first=Donald |date=Mar 11, 2024 |title=Highly respected former Congressman Mike Rogers is running for the United States Senate from the Great State of Michigan. Mike has served his Country during a career loaded up with accolades and wins, from the Army to Congress, and now, hopefully, the U.S. Senate. Mike will work closely with me to enact our America First Policies. He will tirelessly fight to Secure the Border, Stop Inflation, Grow the Economy, Strengthen our Military / Veteran Support, and Protect and Defend our always under siege Second Amendment. Mike Rogers will be a Great and Powerful Senator for Michigan, and has my Complete and Total Endorsement. HE KNOWS HOW TO WIN! |url=https://truthsocial.com/@realDonaldTrump/112078629652415384 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Mississippi}} [[2024 United States Senate election in Mississippi|Mississippi]] |''[[Roger Wicker]]''<ref>{{Cite web |last=Trump |first=Donald |date=Feb 29, 2024 |title=Senator Roger Wicker is a fantastic Senator for the Great State of Mississippi. As the Ranking Member of the Senate Armed Services Committee, Roger is working hard to Strengthen our Military, Defend our Country, and Support our Veterans. Roger is a Champion of Conservative Values, who fights to Uphold the Constitution, and Protect our Second Amendment. I was honored to receive Roger's Endorsement last year, and Senator Roger Wicker has my Complete and Total Endorsement for Re-Election. Vote Trump and Wicker on March 12th! |url=https://truthsocial.com/@realDonaldTrump/112016533287782692 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Missouri}} [[2024 United States Senate election in Missouri|Missouri]] |''[[Josh Hawley]]''<ref>{{Cite web |last=Trump |first=Donald |date=May 26, 2024 |title=Senator Josh Hawley is a tremendous Senator for the Great State of Missouri. In 2018 I helped Josh Hawley win a highly competitive Senate race in Missouri, a state that I know and love. An America First Conservative and a True Fighter for our movement to Make America Great Again, Josh is working hard to Secure our Elections, Stop Illegal Immigration, Grow the Economy, Cut Taxes, Strengthen our Military, Support our Veterans, and Uphold the Rule of Law. Josh Hawley has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/112509298845267871 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[2024 United States Senate election in Montana|Montana]] |[[Tim Sheehy]]<ref>{{Cite web |last=Trump |first=Donald |date=Feb 9, 2024 |title=I LOVE MONTANA! Tim Sheehy is an American Hero and highly successful Businessman from the Great State of Montana. He is strongly supported by our incredible Chairman of the NRSC, Steve Daines, and many other patriotic Senators and Republicans who have endorsed our Campaign to, MAKE AMERICA GREAT AGAIN! I also respect Matt Rosendale, and was very happy to Endorse him in the past - and will Endorse him again in the future should he decide to change course and run for his Congressional Seat. But in this instance, Tim is the candidate who is currently best-positioned to DEFEAT Lazy Jon Tester, and Regain the Republican Majority in the United States Senate. Tim is a Political Outsider, Strong on the Border, the Military/Vets, and our constantly under siege Second Amendment. He will stand tall in the fight against the Radical Left Democrats, who are Destroying our Country. Also, he is far more likely to Defeat Lazy Jon. America First Patriot Tim Sheehy has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/111903231780270558 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nebraska}} [[2024 United States Senate election in Nebraska|Nebraska]] |''[[Deb Fischer]]''<ref>{{Cite web |last=Trump |first=Donald |date=Sep 9, 2024 |title=Senator Deb Fischer is doing a fantastic job in the United States Senate. Her Radical Left Opponent, Dan Osborn, would be absolutely TERRIBLE for the Great People of Nebraska. Dan is a "Bernie Sanders Democrat" who does not stand for Nebraska Values, and never will. He even supports Federal Benefits like Social Security for Illegal Aliens! This is a slap in the face to Nebraska Seniors. Deb Fischer, on the other hand, will always put NEBRASKA and AMERICA FIRST. As a key Member of the Senate Armed Services Committee, Deb is fighting to Protect our Country against the Marxists, Communists, and Lunatics on the Radical Left. Deb is working hard to Grow the Economy, Secure the Border, Stop Migrant Crime, Support our Great Military/Vets, Champion our Incredible Farmers and Ranchers, and Defend our always under siege Second Amendment. Deb Fischer has my Complete and Total Endorsement — SHE WILL NOT LET YOU DOWN! |url=https://truthsocial.com/@realDonaldTrump/113110575417000422 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nebraska}} [[2024 United States Senate election in Nebraska|Nebraska (special)]] |''[[Pete Ricketts]]''<ref>{{Cite web |last=Trump |first=Donald |date=Oct 11, 2024 |title=Senator Pete Ricketts is a Strong Advocate for the Great People of Nebraska, a State I love and won by large margins in 2016 and 2020! Pete is doing an outstanding job in the U.S. Senate, where he is fighting tirelessly to stop the disastrous Policies of Lyin' Kamala Harris and Crooked Joe Biden. Pete is a True Patriot, who is working hard to Create Jobs, Lower Inflation, Champion American Energy DOMINANCE, Uphold the Rule of Law, Secure our Border, Support our Amazing Farmers and Ranchers, and Defend our always under siege Second Amendment. Pete Ricketts has my Complete and Total Endorsement — HE WILL NOT LET YOU DOWN! |url=https://truthsocial.com/@realDonaldTrump/113291341023269855 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Nevada}} [[2024 United States Senate election in Nevada|Nevada]] |[[Sam Brown (military)|Sam Brown]]<ref>{{Cite web |last=Trump |first=Donald |date=Jun 9, 2024 |title=Sam Brown is a FEARLESS AMERICAN PATRIOT, a Purple Heart Recipient, who has proven he has the "PURE GRIT" and COURAGE to take on our Enemies, both Foreign and Domestic. Sam is now running for U.S. Senate in the Great State of Nevada, primarily because he knows that Crooked Joe Biden and the Radical Left are A THREAT TO DEMOCRACY. Our Country can no longer stand with this Corrupt and Incompetent "President" calling the shots. As your next Senator, Sam will fight tirelessly to secure our Border, end Migrant Crime, stop Inflation, grow our Economy, STRONGLY SUPPORT OUR GREAT MILITARY/VETS, protect our always under siege Second Amendment, and restore PEACE THROUGH STRENGTH… |url=https://truthsocial.com/@realDonaldTrump/112589851588761769 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|New Jersey}} [[2024 United States Senate election in New Jersey|New Jersey]] |Christine Serrano Glassner<ref>{{Cite tweet <!-- |last=Trump |first=Donald --> |user=christine4nj |number=1789444772819505516 |date=May 11, 2024 |title=I'm extremely proud to be endorsed by President Trump! We can and will flip New Jersey red. Together we will work to change New Jersey and America for the better! |url=https://x.com/christine4nj/status/1789444772819505516|via=Twitter}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|New York}} [[2024 United States Senate election in New York|New York]] |Mike Sapraicone<ref>{{Cite web |last=Trump |first=Donald |date=Mar 2, 2024 |title=Congratulations to Mike Sapraicone on running against one of the worst Senators in the U.S. Senate, Kirsten Gillibrand. All you have to do is go back and look at her failed Presidential run, an embarrassment to all New Yorkers, after which I assumed she would never be able to even think about running for Office again. People's memories, however, are short, and here we go! Mike is a strong and successful person, and I look forward to working with him to take New York State away from the people who have destroyed it with hundreds of thousands of Migrants flowing in, and ruining our Schools, Hospitals, Parks, and increasing Crime many fold. Good luck to Mike - He has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/112029505593758948 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|North Dakota}} [[2024 United States Senate election in North Dakota|North Dakota]] |''[[Kevin Cramer]]''<ref>{{Cite web |last=Trump |first=Donald |date=Mar 11, 2024 |title=Senator Kevin Cramer is doing a fantastic job representing the incredible people of North Dakota in the United States Senate. During my Administration, Kevin worked closely with me to create Space Force, which continues to Protect and Defend our Great Country. Kevin has been with me from the very beginning, helping advance our America First Agenda. In the Senate, he is working hard to Secure the Border, Grow the Economy, Cut your Taxes, Eliminate Needless Regulations, Support our Veterans, and Fight for our Constitutional Rights, including our under siege Second Amendment. Kevin Cramer has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/112078462360004556 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Ohio}} [[2024 United States Senate election in Ohio|Ohio]] |[[Bernie Moreno]]<ref>{{Cite web |last=Trump |first=Donald |date=Dec 19, 2023 |title=It's time for the entire Republican Party to UNITE around Bernie's campaign for Senate, so that we can have a BIG victory in what will be the most important Election in American History. Bernie is the Father of wonderful Emily, the wife of outstanding young Ohio Congressman, Max Miller. Bernie is Strong on the Border, Crime, Cutting Taxes, Election Integrity, the Military / Vets, and will always protect our under siege 2nd Amendment. Bernie Moreno will be an outstanding United States Senator, and has my Complete and Total Endorsement—He will never let you down! |url=https://truthsocial.com/@realDonaldTrump/111609405146073221 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Pennsylvania}} [[2024 United States Senate election in Pennsylvania|Pennsylvania]] |[[Dave McCormick]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 23, 2024 |title=Kamala Harris' sinking Campaign has become so TOXIC, that Democrat Senators in four different States are using me in their advertisements, and stating that they are with President Trump on Tariffs, and numerous other things. While it is a great compliment, it is not fair to those Republican Senate Candidates, Bernie Moreno, Dave McCormick, Eric Hovde, and Sam Brown, who are with me all the time. These Democrats have voted with Crooked Joe Biden almost 100% of the time. They only pretend to be on my side when Elections roll around. OHIO, PENNSYLVANIA, WISCONSIN, NEVADA: VOTE FOR BERNIE MORENO, DAVE MCCORMICK, ERIC HOVDE, AND SAM BROWN - THEY ARE THE ONES WHO ARE WITH US! |url=https://truthsocial.com/@realDonaldTrump/113358155534960871 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[2024 United States Senate election in Tennessee|Tennessee]] |''[[Marsha Blackburn]]''<ref>{{Cite web |last=Trump |first=Donald |date=May 26, 2024 |title=Senator Marsha Blackburn is doing a terrific job representing the incredible people of Tennessee in the United States Senate! Marsha has been with me from the very beginning, helping advance our America First Agenda. In the Senate, she is working hard to Secure the Border, Grow the Economy, Cut your Taxes, Eliminate Needless Regulations, Support our Veterans, and Fight for our Constitutional Rights, including our always under siege Second Amendment. Marsha Blackburn has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/112509274904589263 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[2024 United States Senate election in Texas|Texas]] |''[[Ted Cruz]]''<ref>{{Cite web |last=Trump |first=Donald |date=Oct 15, 2024 |title=While I have Endorsed Ted, on numerous occasions, verbally, because of the Importance of the Race, and Ted's Importance to the future of our Country, I thought the Endorsement should be memorialized in writing. Senator Ted Cruz is doing a tremendous job representing the Great People of Texas, a State I love and WON BIG in 2016 and 2020, and, based on the Polls, will win even bigger in November. To the people of Texas, I greatly appreciate your support, and, as you know, I HAVE NEVER LET YOU DOWN!… |url=https://truthsocial.com/@realDonaldTrump/113309551464797724 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Utah}} [[2024 United States Senate election in Utah|Utah]] |[[Trent Staggs]]<ref>{{Cite web |last=Trump |first=Donald |date=Apr 27, 2024 |title=Trent Staggs is 100% MAGA, and is running to fill The Mitt Romney, a Total Loser, Seat as the next Senator from the Great State of Utah! A Highly Successful Entrepreneur, who has served brilliantly as Mayor of Riverton for the past six years, Trent knows how to Create Jobs, Stop Inflation, Grow the Economy, and Secure the Border. As your next Senator, Trent will help us Unleash American Energy, Support our Military/Vets, and Protect our always under siege Second Amendment. Trent Staggs has my Complete and Total Endorsement - He will be a GREAT Senator, and never let you down! |url=https://truthsocial.com/@realDonaldTrump/112343373057495427 |via=Truth Social}}</ref> |{{Icon|no}} Lost primary |- |{{flagicon|Virginia}} [[2024 United States Senate election in Virginia|Virginia]] |[[Hung Cao]]<ref>{{Cite web |last=Trump |first=Donald |date=May 26, 2024 |title=Hung Cao is a highly respected retired Navy Captain running to represent the Great People of Virginia in the United States Senate. A Combat Veteran and Highly Decorated Special Operations Officer, Hung Cao will be a tireless fighter to stop Inflation, grow our Economy, secure our Border, strongly support our Incredible Military/Vets, and defend our always under siege Second Amendment. Hung Cao has my Complete and Total Endorsement - HE WILL NEVER LET YOU DOWN, AND WE WILL, AT THE SAME TIME, GET RID OF THE WORST PRESIDENT IN THE HISTORY OF OUR COUNTRY, CROOKED JOE BIDEN! |url=https://truthsocial.com/@realDonaldTrump/112510755568541501 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|West Virginia}} [[2024 United States Senate election in West Virginia|West Virginia]] |[[Jim Justice]]<ref>{{Cite web |last=Trump |first=Donald |date=Oct 18, 2024 |title=Big Jim Justice, the Governor of the Great State of West Virginia (I LOVE WEST VIRGINIA!), is BIG in every way, but especially in his wonderful HEART❤ ! Strong on the Border, our Great Military & Vets, CLEAN COAL & Energy Dominance, the Economy, Stopping Inflation, & Protecting our 2nd Amendment, Big Jim will be a Great UNITED STATES SENATOR, and has my Complete & Total Endorsement. HE WILL NEVER LET YOU DOWN!!! |url=https://truthsocial.com/@realDonaldTrump/111258179235782329 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Wisconsin}} [[2024 United States Senate election in Wisconsin|Wisconsin]] |Eric Hovde<ref>{{Cite web |last=Trump |first=Donald |date=Aug 11, 2024 |title=Eric Hovde is running strong for the U.S. Senate in Wisconsin. He has my Complete and Total Endorsement, and has, right from the beginning. Go Eric!!! |url=https://truthsocial.com/@realDonaldTrump/112943539377699454 |via=Truth Social}}</ref> |{{Icon|no}} Lost general |- |{{flagicon|Wyoming}} [[2024 United States Senate election in Wyoming|Wyoming]] |''[[John Barrasso]]''<ref>{{Cite web |last=Trump |first=Donald |date=May 26, 2024 |title=Senator John Barrasso is an incredible advocate for the great people of Wyoming. John works hard to stop the disastrous policies of Crooked Joe Biden and to secure our border. John is a True Patriot who fights to Create Jobs, Lower Inflation, Promote American Energy, Uphold the Rule of Law, and Support our amazing Farmers and Ranchers. John Barrasso has my Complete and Total Endorsement! |url=https://truthsocial.com/@realDonaldTrump/112509333535728345 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2024 House elections ==== {| class="wikitable sortable" !District !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Alabama}} [[Alabama's 3rd congressional district|AL-03]] |''[[Mike Rogers (Alabama politician)|Mike Rogers]]''<ref name=":2">{{Cite web |last=Cox |first=Bradley |title=Dale Strong receives Trump's endorsement — 'Dale was with us from the… |url=https://1819news.com/news/item/dale-strong-receives-trump-endorsement-dale-was-with-us-from-the-beginning |access-date=2023-11-30 |website=1819 News |language=en-US}}</ref> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alabama}} [[Alabama's 4th congressional district|AL-04]] |''[[Robert Aderholt]]''<ref name=":2" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}} Elected''' |- |{{flagicon|Alabama}} [[Alabama's 5th congressional district|AL-05]] |''[[Dale Strong]]''<ref name=":2" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Alabama}} [[Alabama's 6th congressional district|AL-06]] |''[[Gary Palmer (politician)|Gary Palmer]]''<ref name=":2" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|California}} [[California's 20th congressional district|CA-20]] |[[Vince Fong]]<ref>{{Cite web |date=2024-02-20 |title=Former President Donald Trump endorses Vince Fong for California's 20th District seat |url=https://abc30.com/vince-fong-california-20th-assembly-donald-trump-political-endorsement/14449484/ |access-date=2024-02-20 |publisher=ABC30 Fresno |language=en}}</ref> |March 5, 2024 |Open seat | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|North Carolina}} [[North Carolina's 5th congressional district|NC-05]] |''[[Virginia Foxx]]''<ref>{{Cite web |last=Ken |date=2024-02-01 |title=President Donald J. Trump Endorses Virginia Foxx in 2024 Primary Election |url=https://www.hcpress.com/front-page/president-donald-j-trump-endorses-virginia-foxx-in-2024-primary-election.html |access-date=2024-03-12 |website=High Country Press |language=en-US}}</ref> |March 5, 2024 |Incumbent |'''{{Icon|aa}} Elected''' |- |{{flagicon|North Carolina}} [[North Carolina's 6th congressional district|NC-06]] |[[Addison McDowell]]<ref>{{Cite web |date=2023-12-13 |title=Ex-President Trump endorses new candidate McDowell for central North Carolina congressional seat |url=https://apnews.com/article/north-carolina-congress-election-donald-trump-endorsement-b75aa28ecc72a3568fb3169036e184f8 |access-date=2023-12-14 |publisher=Associated Press |language=en}}</ref> |March 5, 2024 |Open seat | '''{{Icon|aa}} Elected''' |- |{{flagicon|North Carolina}} [[North Carolina's 14th congressional district|NC-14]] |[[Tim Moore (North Carolina politician)|Tim Moore]]<ref>{{Cite web |last=WRAL |date=2024-02-20 |title=Trump endorses Speaker Tim Moore in congressional bid |url=https://www.wral.com/story/trump-endorses-speaker-tim-moore-in-congressional-bid/21292764/ |access-date=2024-02-20 |publisher=WRAL |language=en}}</ref> |March 5, 2024 |Open seat | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[TX-03]] |''[[Keith Self]]''<ref name=":4">{{Cite web |last=Johnson |first=Brad |date=2024-02-12 |title=Here's a List of Donald Trump's 2024 Texas Endorsements |url=https://thetexan.news/elections/2024/here-s-a-list-of-donald-trump-s-2024-texas-endorsements/article_d62bcf9e-c773-11ee-a894-4b9583d1a835.html |access-date=2024-02-29 |website=The Texan |language=en}}</ref> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 4th congressional district|TX-04]] |''[[Pat Fallon]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 5th congressional district|TX-05]] |''[[Lance Gooden]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 11th congressional district|TX-11]] |''[[August Pfluger]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 13th congressional district|TX-13]] |''[[Ronny Jackson]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 14th congressional district|TX-14]] |''[[Randy Weber]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 15th congressional district|TX-15]] |''[[Monica De La Cruz]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 17th congressional district|TX-17]] |''[[Pete Sessions]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 19th congressional district|TX-19]] |''[[Jodey Arrington]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 22nd congressional district|TX-22]] |''[[Troy Nehls]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 24th congressional district|TX-24]] |''[[Beth Van Duyne]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 25th congressional district|TX-25]] |''[[Roger Williams (Texas politician)|Roger Williams]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 26th congressional district|TX-26]] |[[Brandon Gill]]<ref>{{cite news |author=Wolf, Stephen |date=December 4, 2023 |title=Daily Kos Elections Live Digest: 12/4 |work=[[Daily Kos]] |url=https://www.dailykos.com/stories/2023/12/4/2209144/-Daily-Kos-Elections-Live-Digest-12-4#update-1701728297000 |access-date=December 4, 2023 |quote=TX-26: Donald Trump has endorsed far-right media website founder Brandon Gill}}</ref> |March 5, 2024 |Open seat | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 31st congressional district|TX-31]] |''[[John Carter (Texas politician)|John Carter]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 34th congressional district|TX-34]] |[[Mayra Flores]]<ref name=":4" /> |March 5, 2024 |Challenger | {{Icon|no}} Lost election |- |{{flagicon|Texas}} [[Texas's 36th congressional district|TX-36]] |''[[Brian Babin]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Texas}} [[Texas's 38th congressional district|TX-38]] |''[[Wesley Hunt]]''<ref name=":4" /> |March 5, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Mississippi}} [[Mississippi's 4th congressional district|MS-04]] |''[[Mike Ezell]]''<ref>{{Cite web |date=2024-03-03 |title=Mike Ezell latest to pick up Trump endorsement with congressional primary looming - SuperTalk Mississippi |url=https://www.supertalk.fm/mike-ezell-latest-to-pick-up-trump-endorsement-with-congressional-primary-looming/ |access-date=2024-03-04 |language=en-US}}</ref> |March 12, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[Montana's 1st congressional district|MT-01]] |''[[Ryan Zinke]]''<ref>{{cite news |last1=Buffington |first1=Posie |title=Former Pres. Trump endorses Zinke for re-election in Montana's District 1 congressional race |url=https://www.montanarightnow.com/montana/former-pres-trump-endorses-zinke-for-re-election-in-montanas-district-1-congressional-race/article_19237e0a-e880-11ee-b72a-bb7f847d9024.html |access-date=March 22, 2024 |work=[[NonStop Local]] |date=March 22, 2024 |language=en}}</ref> |June 4, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Montana}} [[Montana's 2nd congressional district|MT-02]] |[[Troy Downing]]<ref>{{cite news |author=Gorman, Reese |date=April 12, 2024 |work=[[NBC|NBC Montana]] |url=https://nbcmontana.com/news/local/trump-endorses-troy-downing-for-montanas-2nd-congressional-district |access-date=June 3, 2024 |title=Trump endorses Downing for U.S. House race}}</ref> |June 4, 2024 |Open seat | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Maine}} [[Maine's 2nd congressional district|ME-02]] |[[Austin Theriault]]<ref>{{Cite web |last=Schilke |first=Rachel |date=2024-03-27 |title=Trump endorses former NASCAR driver in Maine contest to unseat Jared Golden - Washington Examiner |url=https://www.washingtonexaminer.com/news/campaigns/2942058/trump-endorses-former-nascar-driver-unseat-jared-golden/ |access-date=2024-03-28 |language=en-US}}</ref> |June 11, 2024 |Challenger |{{Icon|no}} Lost election |- |{{flagicon|South Carolina}} [[South Carolina's 1st congressional district|SC-01]] |''[[Nancy Mace]]''<ref>{{Cite web |last=ALAFRIZ |first=OLIVIA |date=2024-03-09 |title=Trump endorses South Carolina Republican Nancy Mace |url=https://www.politico.com/news/2024/03/09/trump-endorses-south-carolina-republican-nancy-mace-00146142 |website=Politico}}</ref> |June 11, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|South Carolina}} [[South Carolina's 4th congressional district|SC-04]] |''[[William Timmons (politician)|William Timmons]]''<ref>{{Cite web |date=2024-02-29 |title=SC4: William Timmons Endorsed By Donald Trump - FITSNews |url=https://www.fitsnews.com/2024/02/29/sc4-william-timmons-endorsed-by-donald-trump/ |access-date=2024-03-01 |language=en-US}}</ref> |June 11, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Virginia}} [[Virginia's 2nd congressional district|VA-02]] |''[[Jen Kiggans]]''<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112509236487249242 |access-date=2024-10-30 |via=Truth Social |language=en}}</ref> |June 18, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Colorado}} [[Colorado's 4th congressional district|CO-04]] |''[[Lauren Boebert]]''<ref>{{Cite web |last=Stewart |first=Robert |date=2024-03-03 |title=Trump endorses Lauren Boebert in contested GOP primary - Washington Examiner |url=https://www.washingtonexaminer.com/news/campaigns/2900221/trump-endorses-boebert-contested-gop-primary/ |access-date=2024-03-04 |language=en-US}}</ref> |June 25, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|New York}} [[New York's 4th congressional district|NY-04]] |''[[Anthony D'Esposito]]''<ref>{{Cite web |last=Herzlich |first=Taylor |date=2024-05-27 |title=Trump endorses Rep. D'Esposito in NY-04 re-election race - Featured |url=https://theisland360.com/featured/trump-endorses-rep-desposito-in-ny-04-re-election-race/ |access-date=2024-06-03 |website=The Island 360 |language=en-US}}</ref> |June 25, 2024 |Incumbent |{{Icon|no}} Lost election |- |{{flagicon|New York}} [[New York's 22nd congressional district|NY-22]] |''[[Brandon Williams (politician)|Brandon Williams]]''<ref>{{Cite web |last=Manore |first=Alexis |date=2024-05-28 |title=Donald Trump endorses Brandon Williams for Congress |url=https://www.romesentinel.com/news/donald-trump-brandon-williams-ny22/article_edd70908-1cf8-11ef-b12f-e3621b94289e.html |access-date=2024-05-30 |website=[[Rome Sentinel]] |language=en}}</ref> |June 25, 2024 |Incumbent |{{Icon|no}} Lost election |- |{{flagicon|New York}} [[New York's 24th congressional district|NY-24]] |''[[Claudia Tenney]]''<ref>{{Cite web |last=Smith |first=Stephen |date=2024-03-28 |title=Rep. Claudia Tenney receives endorsement of Donald J. Trump for re-election bid in 2024 |website=Newzjunky |url=https://www.newzjunky.com/rep-claudia-tenney-receives-endorsement-of-president-donald-j-trump-for-re-election-in-2024/ |access-date=2024-03-28 |language=en-US}}</ref> |June 25, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Arizona}} [[Arizona's 8th congressional district|AZ-08]] |[[Abraham Hamadeh]]<ref>{{Cite news |last=Alfred |first=Mark |date=2023-12-09 |title=Trump Turns on MAGA Sycophant Blake Masters |language=en |work=The Daily Beast |url=https://www.thedailybeast.com/donaldtrump-turns-on-maga-sycophant-blake-masters-with-abe-hamadeh-endorsement |access-date=2023-12-10}}</ref> |July 30, 2024 |Open seat | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[Tennessee's 5th congressional district|TN-05]] |''[[Andy Ogles]]''<ref>{{Cite web |last=Housler |first=Kaitlin |date=2023-05-12 |title=Donald Trump Endorses Tennessee U.S. Congressman Andy Ogles for Re-Election |url=https://tennesseestar.com/news/donald-trump-endorses-tennessee-u-s-congressman-andy-ogles-for-re-election/khousler/2023/05/12/ |access-date=2023-12-10 |website=Tennessee Star |language=en-US}}</ref> |August 1, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Tennessee}} [[Tennessee's 7th congressional district|TN-07]] |''[[Mark Green (Tennessee politician)|Mark Green]]''<ref>{{Cite news |last=Olmsted |first=Edith |date=2024-02-29 |title=House Republican Reverses Retirement After Trump Endorsement |url=https://www.thedailybeast.com/rep-mark-green-decides-not-to-retire-after-trump-promises-to-endorse-him |access-date=2024-03-01 |work=The Daily Beast |language=en}}</ref> |August 1, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- | rowspan="2" |{{flagicon|Alaska}} [[Alaska's at-large congressional district|AK-AL]] |[[Nancy Dahlstrom]]<ref>{{Cite web |last=Downing |first=Suzanne |date=2024-06-17 |title=Trump endorses Dahlstrom for Congress |url=https://mustreadalaska.com/trump-endorses-dahlstrom-for-congress/ |access-date=2024-11-25 |website=Must Read Alaska |language=en-US}}</ref> | rowspan="2" |August 20, 2024 | rowspan="2" |Challenger |{{Icon|no}} Withdrew |- |[[Nick Begich III|Nick Begich]]<ref>{{Cite web |last=Downing |first=Suzanne |date=2024-09-18 |title=Breaking: Donald Trump endorses Nick Begich for Congress |url=https://mustreadalaska.com/breaking-donald-trump-endorses-nick-begich-for-congress/ |access-date=2024-11-25 |website=Must Read Alaska |language=en-US}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 7th congressional district|FL-07]] |''[[Cory Mills]]''<ref>{{cite web |last1=Trump |first1=Donald |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112509310575961624 |via=Truth Social |access-date=28 May 2024}}</ref> |August 20, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 11th congressional district|FL-11]] |''[[Daniel Webster (Florida politician)|Daniel Webster]]''<ref>{{Cite web |last=Bakich |first=Jackson |date=2023-12-01 |title=Webster Lands Official Trump Seal of Endorsement over Sabatini |url=https://floridianpress.com/2023/12/webster-lands-official-trump-seal-of-endorsement-over-sabatini/ |archive-url=https://web.archive.org/web/20231204145918/https://floridianpress.com/2023/12/webster-lands-official-trump-seal-of-endorsement-over-sabatini/ |archive-date=2023-12-04 |access-date=2023-12-04 |website=The Floridian |language=en-US}}</ref> |August 20, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Florida}} [[Florida's 22nd congressional district|FL-22]] |Dan Franzese<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112911985701345199 |access-date=2024-11-21 |via=Truth Social |language=en}}</ref> |August 20, 2024 |Challenger |{{Icon|no}} Lost election |- |{{flagicon|Wyoming}} [[Wyoming's at-large congressional district|WY-AL]] |''[[Harriet Hageman]]''<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112509331814214912 |access-date=2024-11-22 |via=Truth Social |language=en}}</ref> |August 20, 2024 |Incumbent | '''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[Louisiana's 1st congressional district|LA-01]] |''[[Steve Scalise]]''<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112509339275728338 |access-date=2024-11-22 |via=Truth Social |language=en}}</ref> |November 5, 2024 |Incumbent |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[Louisiana's 3rd congressional district|LA-03]] |''[[Clay Higgins]]''<ref>{{Cite web |last=Ken |date=2024-02-01 |title=President Donald J. Trump Endorses Virginia Foxx in 2024 Primary Election |url=https://www.hcpress.com/front-page/president-donald-j-trump-endorses-virginia-foxx-in-2024-primary-election.html |access-date=2024-03-12 |website=High Country Press |language=en-US}}</ref> |November 5, 2024 |Incumbent |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[Louisiana's 4th congressional district|LA-04]] |''[[Mike Johnson]]''<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/112509341407109396 |access-date=2024-11-22 |via=Truth Social |language=en}}</ref> |November 5, 2024 |Incumbent |'''{{Icon|aa}}''' '''Elected''' |- |{{flagicon|Louisiana}} [[Louisiana's 5th congressional district|LA-05]] |''[[Julia Letlow]]''<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/111971849283205295 |access-date=2024-11-22 |via=Truth Social |language=en}}</ref> |November 5, 2024 |Incumbent |'''{{Icon|aa}}''' '''Elected''' |} ==== 2024 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|North Carolina}} [[2024 North Carolina Attorney General election|North Carolina]] | [[North Carolina Attorney General|Attorney General]] |[[Dan Bishop]]<ref>{{Cite web |last=WRAL |date=2024-03-02 |title=Donald Trump endorses Mark Robinson in bid for North Carolina governor |url=https://www.wral.com/story/trump-endorses-robinson-in-bid-for-nc-governor/21310079/ |access-date=2024-03-05 |publisher=WRAL |language=en}}</ref> |March 5, 2024 |Open seat |{{Icon|no}} Lost election |} ==== 2024 state legislative elections ==== {| class="wikitable sortable" !State !Office !Candidate !Result |- |{{flagicon|Texas}} [[Texas]] |Barry Wernick<ref name=":4" /> |Texas State Representative |{{Icon|no}} |- |{{flagicon|Texas}} [[Texas]] |[[Caroline Fairly]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |''[[John T. Smithee]]''<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Don McLaughlin]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |Stormy Bradley<ref name=":4" /> |Texas State Representative |{{Icon|no}} |- |{{flagicon|Texas}} [[Texas]] |Liz Case<ref name=":4" /> |Texas State Representative |{{Icon|no}} |- |{{flagicon|Texas}} [[Texas]] |[[Mike Olcott]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Helen Kerwin]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Hillary Hickland]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Wesley Virdell]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Alan Schoolcraft]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |''[[Gary Gates (politician)|Gary Gates]]''<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |David Covey<ref name=":4" /> |Texas State Representative |{{Icon|no}} |- |{{flagicon|Texas}} [[Texas]] |[[Janis Holt]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |''[[Steve Toth]]''<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Brent Money]]<ref name=":4" /> |Texas State Representative |'''{{Icon|aa}}''' |- |{{flagicon|Texas}} [[Texas]] |[[Brent Hagenbuch]]<ref name=":4" /> |Texas State Senator |'''{{Icon|aa}}''' |} ==== 2025 Speaker of the House of Representatives election ==== {| class="wikitable sortable" !Election !Candidate !Result |- |{{Flagicon|United States}} [[2025 Speaker of the United States House of Representatives election|2025]] |''[[Mike Johnson]]''<ref>{{Cite web |date=2024-12-30 |title=Trump endorses Mike Johnson to stay on as House Speaker despite government funding turmoil |url=https://apnews.com/article/trump-mike-johnson-house-speaker-gop-government-funding-8f4eef7f2b83d4c2d5db7fbce69f9368 |access-date=2025-01-02 |publisher=Associated Press |language=en}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} === Second term as president === ==== 2025 state judicial elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|Wisconsin}} [[2025 Wisconsin Supreme Court election|Wisconsin]] |[[Brad Schimel]]<ref>{{cite news |work=[[The Hill (newspaper)|The Hill]] |access-date=January 22, 2026 |author=Vakil, Caroline |url=https://thehill.com/homenews/state-watch/5208831-donald-trump-brad-schimel-wisconsin-supreme-court-race/ |date=March 22, 2025 |title=Trump endorses Schimel in high-stakes Wisconsin Supreme Court race}}</ref> |April 1, 2025 |Open |{{Icon|no}} Lost general |} ==== 2025 House special elections ==== {| class="wikitable" |+ !Election !Candidate !Result |- |{{Flagicon|Florida}}[[2025 Florida's 1st congressional district special election|FL-01]] |[[Jimmy Patronis]]<ref>{{Cite web |last1=Sangal |first1=Aditi |first2=Antoinette |last2=Radford |first3=Maureen |last3=Chowdhury |date=2024-11-25 |title=November 25, 2024 - Presidential transition news |publisher=CNN Politics |url=https://www.cnn.com/politics/live-news/trump-transition-news-11-25-24#cm3x87d7h000z3b6nbs3akecr |access-date=2025-02-04 |language=en}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{Flagicon|Florida}}[[2025 Florida's 6th congressional district special election|FL-06]] |[[Randy Fine]]<ref>{{Cite web |last=Gancarski |first=A.G. |date=November 23, 2024 |title=Donald Trump backs Randy Fine as replacement for Mike Waltz in CD 6 |url=https://floridapolitics.com/archives/709287-trump-fine-cd6/ |archive-url=https://web.archive.org/web/20241123213518/https://floridapolitics.com/archives/709287-trump-fine-cd6/ |archive-date=November 23, 2024 |access-date=February 4, 2025 |website=Florida Politics}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{Flagicon|Tennessee}}[[2025 Tennessee's 7th congressional district special election|TN-07]] |[[Matt Van Epps]]<ref>{{Cite web |last=Rau |first=Nate |date=2025-10-03 |title=On eve of election, Trump backs Matt Van Epps in District 7 race |url= https://www.axios.com/local/nashville/2025/10/03/on-eve-of-election-trump-backs-matt-van-epps-in-district-7-race |access-date=2025-10-03 |publisher=CNN |language=en}}</ref> |'''{{Icon|aa}}''' '''Elected''' |} ==== 2025 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|New Jersey}} [[2025 New Jersey gubernatorial election|New Jersey]] |[[Jack Ciattarelli]]<ref>{{Cite web |date=2025-05-13 |title=Trump endorses Jack Ciattarelli in New Jersey governor's race |url=https://www.nbcnews.com/politics/elections/trump-endorses-jack-ciattarelli-new-jersey-governors-race-rcna206404 |access-date=2025-05-15 |publisher=NBC News |language=en}}</ref> |June 10, 2025 |Open |{{Icon|no}} Lost general |- |{{flagicon|Virginia}} [[2025 Virginia gubernatorial election|Virginia]] |[[Winsome Earle-Sears]]<ref>{{Cite web |last=Lance |first=David |date=Oct 20, 2025 |title=Winsome Earle-Sears receives support from President Trump in Va. Gov. campaign |url=https://www.wavy.com/news/politics/virginia-governors-race/winsome-earle-sears-receives-endorsement-from-president-trump-in-va-gov-campaign/ }}</ref> |June 17, 2025 |Open |{{Icon|no}} Lost general |} ==== 2025 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Virginia}} [[2025 Virginia Attorney General election|Virginia]] | [[Attorney General of Virginia|Attorney General]] |''[[Jason Miyares]]''<ref>{{Cite web |access-date=2024-10-05 |title=Trump calls on Democratic attorney general nominee Jay Jones to drop out of race |url=https://thehill.com/homenews/campaign/5539522-trump-calls-for-jones-exit-virginia-ag-race/ |website=The Hill |language=en}}</ref> |June 28, 2025 |Incumbent |{{Icon|no}} Lost general |} ==== 2025 mayoral elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|New York City}} [[2025 New York City mayoral election|New York City]] |[[Andrew Cuomo]] (Fight and Deliver party)<ref>{{Cite news|url=https://www.nytimes.com/live/2025/11/03/nyregion/nyc-mayor-election-news/bfd49be5-e505-5a37-bb8e-629f35d8647a|title=Live Updates: Mayoral Candidates Make Urgent Appeals to N.Y.C. Voters in Race's Final Stretch|last=Gold|first=Michael|date=November 3, 2025|access-date=January 22, 2026|newspaper=[[The New York Times]]}}</ref> |June 24, 2025 |Challenger |{{Icon|no}} Lost general |- |{{flagicon|Miami}} [[2025 Miami mayoral election|Miami]] |[[Emilio T. Gonzalez]]<ref>{{Cite web|url=https://breakingthenews.net/Article/Trump-endorses-Emilio-Gonzales-for-Miami-mayor/65195195 |title=Trump endorses Emilio Gonzales for Miami mayor |date=November 16, 2025 |access-date=January 22, 2026}}</ref> |November 4, 2025 |Open |{{Icon|no}} Lost general |} ==== 2025 county executive elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|Nassau County, New York}} [[2025 Nassau County Executive election|Nassau County]] |''[[Bruce Blakeman]]''<ref>{{cite web |title=Trump endorsed his re-election, Bruce Blakeman: Thank you President! During my term, Nassau has become the safest county in the US |url=https://www.balkanweb.com/en/Trump-endorsed-his-re-election-Bruce-Blakeman--thank-you-President--during-my-term-Nassau-has-become-the-safest-county-in-the-US./#gsc.tab=0 |website=BW}}</ref> |November 4, 2025 |Incumbent |'''{{Icon|aa}}''' '''Elected''' |} ==== 2025-26 state legislative elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|Texas}} [[2025–26 Texas's 9th Senate district special election|TX SD-09]] |''[[Leigh Wambsganss]]''<ref>{{cite web |url=https://www.texastribune.org/2025/11/04/texas-senate-district-9-special-election-tarrant-county/ |title=Texas Senate District 9 special election pits Republicans against Democrat in Tarrant County |date=November 4, 2025 |access-date=November 5, 2025 |website=[[The Texas Tribune]]}}</ref> |November 4, 2025 |Open |{{Icon|no}} Lost runoff |} ==== 2026 House special elections ==== {| class="wikitable" |+ !Election !Candidate !Result |- |{{Flagicon|Georgia (U.S. state)}}[[2026 Georgia's 14th congressional district special election|GA-14]] |[[Clay Fuller]]<ref>{{cite web |last1=Brams |first1=Sophie |title=Trump endorses Clay Fuller to succeed Greene |url=https://thehill.com/homenews/campaign/5723741-trump-endorses-clay-fuller-to-succeed-greene/ |website=The Hill |access-date=5 February 2026 |date=4 February 2026}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |{{Flagicon|California}}[[2026 California's 1st congressional district special election|CA-01]] |[[James Gallagher (California politician)|James Gallagher]]<ref name="the-downballot.com">{{cite web|url=https://www.the-downballot.com/p/morning-digest-republicans-have-their|title=Morning Digest: Republicans have their first shot at a special election flip on Saturday|last1=Nir|last2=Singer|first1=David|first2=Jeff|date=February 6, 2026|access-date=February 6, 2026}}</ref> |'''{{Icon|aa}}''' '''Elected''' |- |} ==== 2026 gubernatorial elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Alabama}} [[2026 Alabama gubernatorial election|Alabama]] |[[Tommy Tuberville]]<ref>{{cite news |last1=Darrington |first1=Patrick |title=Trump officially endorses Sen. Tommy Tuberville to be Alabama's next governor |url=https://www.al.com/news/2026/01/trump-officially-endorses-sen-tommy-tuberville-to-be-alabamas-next-governor.html |access-date=January 22, 2026 |work=Alabama News |date=January 22, 2026 |language=en}}</ref> |May 19, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Arizona}} [[2026 Arizona gubernatorial election|Arizona]] |<s>[[Karrin Taylor Robson]]</s> ''(withdrew)''<ref>{{Cite web|url=https://www.thecentersquare.com/arizona/article_4867afd8-c093-11ef-9720-c72e70b03336.html|title=Trump endorses Robson in 2026 Arizona gubernatorial race|last=Arcand|first=Cameron|date=December 22, 2024|access-date=December 22, 2024|website=[[The Center Square]]}}</ref> |rowspan=2|July 21, 2026 |rowspan=2|Challenger |{{Icon|no}} Withdrew |- |[[Andy Biggs]] ''(co-endorsement with Robson)''<ref>{{Cite web |last=Govindarao |first=Sejal |date=2025-04-22 |title=Trump adds second endorsement of Andy Biggs for Arizona governor race |url=https://apnews.com/article/trump-endorsement-arizona-governor-596a7c7bc1129119b1c8e401bae987ad |access-date=2025-08-08 |publisher=Associated Press |language=en}}</ref> |TBA |- |{{flagicon|Arkansas}} [[2026 Arkansas gubernatorial election|Arkansas]] |''[[Sarah Huckabee Sanders]]''<ref>{{Cite web |date=2025-11-03 |title=Trump endorses dozens ahead of Tuesday elections — but doesn't name Earle-Sears |url=https://www.politico.com/news/2025/11/03/trump-endorses-republicans-earle-sears-00633218 |access-date=2025-11-26 |website=Politico |language=en}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|California}} [[2026 California gubernatorial election|California]] |[[Steve Hilton]]<ref>{{cite web |last1=Will |first1=Anthony |title=Trump Endorses Steve Hilton for California Governor, Slams Newsom's Leadership |url=https://www.ibtimes.com.au/trump-endorses-steve-hilton-california-governor-slams-newsoms-leadership-1865540 |website=International Business Times |access-date=6 April 2026 |language=en |date=6 April 2026}}</ref> |June 2, 2026 |Open Seat |{{Icon|aa}} Advanced to General |- |{{flagicon|Florida}} [[2026 Florida gubernatorial election|Florida]] |[[Byron Donalds]]<ref>{{cite news |last1=Dixon |first1=Matt |title=Trump backs Rep. Byron Donalds in his likely run for Florida governor in 2026 |url=https://www.nbcnews.com/politics/donald-trump/trump-backs-rep-byron-donalds-likely-run-florida-governor-2026-rcna192534 |access-date=February 20, 2025 |work=[[NBC News]] |date=February 20, 2025 |language=en}}</ref> |August 18, 2026 |Open Seat |TBA |- |{{flagicon|Georgia (U.S. state)}} [[2026 Georgia gubernatorial election|Georgia]] |[[Burt Jones]]<ref>{{Cite news |last=Bluestein |first=Greg |title=Trump endorses Burt Jones in Georgia governor's race |url=https://www.ajc.com/politics/2025/08/trump-endorses-burt-jones-in-georgia-governors-race/ |access-date=2025-08-12 |work=The Atlanta Journal-Constitution |language=English |issn=1539-7459}}</ref> |June 16, 2026 |Open Seat |{{Icon|no}} Lost Primary |- |{{flagicon|Idaho}} [[2026 Idaho gubernatorial election|Idaho]] |''[[Brad Little]]''<ref>{{cite news |title=Governor Little receives official endorsement from Trump |url=https://idahonews.com/news/local/governor-little-receives-official-endorsement-from-trump |access-date=June 11, 2025 |date=June 11, 2025 |language=en}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[2026 Iowa gubernatorial election|Iowa]] |[[Randy Feenstra]]<ref>{{cite web|last=Pfannenstiel|first=Brianne|date=May 29, 2026|title=Donald Trump endorses Randy Feenstra for governor in Iowa primary |url=https://www.desmoinesregister.com/story/news/politics/elections/2026/05/29/trump-endorses-feenstra-iowa-governor-primary/90316451007/?gnt-cfr=1&gca-cat=p&gca-uir=false&gca-epti=z116029p118550c118550u115129e110550v116029&gca-ft=7&gca-ds=sophi|website=[[The Des Moines Register]]|access-date=May 29, 2026}}</ref> |June 2, 2026 |Open Seat |{{Icon|no}} Lost Primary |- |{{flagicon|Kansas}} [[2026 Kansas gubernatorial election|Kansas]] |[[Ty Masterson]]<ref>{{cite web |last1=Carter |first1=Aja |title=President Trump, Sen. Marshall endorse Ty Masterson for Kansas Governor |url=https://www.wibw.com/2026/05/24/president-trump-endorses-ty-masterson-kansas-governor/ |website=WIBW |access-date=25 May 2026 |language=en |date=24 May 2026}}</ref> |August 4, 2026 |Open Seat |TBA |- |{{flagicon|Michigan}} [[2026 Michigan gubernatorial election|Alabama]] |[[John James (Michigan politician)|John James]]{{citation needed|date=June 2026}} |August 4, 2026 |Open Seat |TBA |- |{{flagicon|Nebraska}} [[2026 Nebraska gubernatorial election|Nebraska]] |''[[Jim Pillen]]''<ref>{{Cite web |last=Olberding |first=Matt |title=Trump endorses Pillen in his run for reelection |url=https://nebraskapublicmedia.org/en/news/news-articles/trump-endorses-pillen-in-his-run-for-reelection/ |access-date=2025-11-26 |publisher=Nebraska Public Media |language=en}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nevada}} [[2026 Nevada gubernatorial election|Nevada]] |''[[Joe Lombardo]]''<ref>{{cite web |last1=Robison |first1=Mark |title=President Trump endorses Lombardo in Nevada governor's race |url=https://www.rgj.com/story/news/politics/elections/2025/11/06/president-trump-endorses-lombardo-in-nevada-governors-race/87130472007/ |access-date=November 7, 2025 |work=[[Reno Gazette Journal]] |date=November 6, 2025}}</ref> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[2026 New York gubernatorial election|New York]] |[[Bruce Blakeman]]<ref>{{Cite web |date=2025-12-20 |title=Trump endorses in New York governor race the day after Stefanik drops out |url=https://www.politico.com/news/2025/12/20/trump-new-york-governor-endorsement-bruce-blakeman-00702013 |access-date=2025-12-26 |website=Politico |language=en}}</ref> |June 23, 2026 |Challenger |TBA |- |{{flagicon|Ohio}} [[2026 Ohio gubernatorial election|Ohio]] |[[Vivek Ramaswamy]]<ref>{{cite web |last1=Pelzer |first1=Jeremy |title=Vivek Ramaswamy launches 2026 Ohio governor campaign, picks up Trump endorsement |url=https://www.cleveland.com/news/2025/02/vivek-ramaswamy-launches-2026-ohio-governor-campaign-picks-up-trump-endorsement.html |website=[[The Plain Dealer]] |access-date=February 24, 2025|date=February 24, 2025}}</ref> |May 5, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Oklahoma}} [[2026 Oklahoma gubernatorial election|Oklahoma]] |[[Mike Mazzei]]<ref>{{cite news |last1=Hill |first1=April |title=President Donald Trump endorses and Oklahoma gubernatorial candidate |url=https://krmg.com/2026/05/29/president-donald-trump-endorses-and-oklahoma-gubernatorial-candidate/ |access-date=May 29, 2026 |work=[[KRMG-FM]] |date=May 29, 2025 |language=en}}</ref> |June 16, 2026 |Open Seat |{{Icon|aa}} Advanced to Runoff |- |rowspan=2|{{flagicon|Pennsylvania}} [[2026 Pennsylvania gubernatorial election|Pennsylvania]] |<s>[[Dan Meuser]]</s> ''(declined to run)''<ref>{{cite web|last=Samuels|first=Brett|url=https://thehill.com/homenews/administration/5326615-trump-says-he-would-back-gop-rep-meuser-for-pennsylvania-governor-bid/|title=Trump says he would back GOP Rep. Meuser for Pennsylvania governor bid|work=[[The Hill (newspaper)|The Hill]]|date=May 30, 2025|accessdate=June 4, 2025}}</ref><ref>{{cite news |last1=Toth |first1=Matthew |title='My focus needs to remain on doing my job': Rep. Meuser won't run for Pa governor in 2026 |url=https://www.ldnews.com/story/news/local/2025/07/09/congressman-dan-meuser-says-he-wont-run-for-pa-governor-in-2026/84516461007/ |access-date=July 9, 2025 |work=[[Lebanon Daily News]] |date=July 9, 2025}}</ref> |rowspan=2|May 19, 2026 |rowspan=2|Challenger |{{Icon|no}} Declined |- |[[Stacy Garrity]]<ref>{{cite web |title=Trump endorses Stacy Garrity in her bid to oust Gov. Josh Shapiro |url=https://www.post-gazette.com/news/politics-state/2026/01/27/stacy-garrity-donald-trump-pennsylvania-josh-shapiro/stories/202601270093 |website=Pittsburgh Post-Gazette |access-date=28 January 2026 |language=en}}</ref> |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|South Carolina}} [[2026 South Carolina gubernatorial election|South Carolina]] |[[Pamela Evette]]<ref>{{cite web |last1=Reynolds |first1=Nick |title=Friday night bombshell: Donald Trump endorses Pamela Evette for governor of South Carolina |url=https://www.postandcourier.com/politics/donald-trump-pamela-evette-endorsement-governor/article_821d67be-33be-46c4-b90c-5f78f8cd1653.html |website=[[The Post and Courier]] |access-date=May 29, 2026 |language=en |date=May 29, 2026}}</ref> |rowspan=2|June 9, 2026 |rowspan=2|Open Seat |{{Icon|no}} Lost Primary |- |[[Alan Wilson (politician)|Alan Wilson]] ''(co-endorsement with Evette in the Runoff)''{{citation needed|date=June 2026}} |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas gubernatorial election|Texas]] |''[[Greg Abbott]]''<ref>{{Cite web |last=Dey |first=Sneha |date=2025-11-12 |title=Donald Trump endorses Texas Gov. Greg Abbott for reelection |url=https://www.texastribune.org/2025/11/11/texas-governor-2026-elections-greg-abbott-donald-trump-endorsement/ |access-date=2025-11-26 |website=The Texas Tribune |language=en-US}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Wisconsin}} [[2026 Wisconsin gubernatorial election|Wisconsin]] |[[Tom Tiffany]]<ref>{{cite web |last1=Opoien |first1=Jessie |title=Donald Trump endorses Tom Tiffany in Wisconsin governor race |url=https://www.jsonline.com/story/news/politics/2026/01/27/donald-triump-endorses-tom-tiffany-in-wisconsin-governor-race/88388133007/ |website=Journal Sentinel |access-date=28 January 2026}}</ref> |August 11, 2026 |Open Seat |TBA |- |{{flagicon|Wyoming}} [[2026 Wyoming gubernatorial election|Wyoming]] |[[Megan Degenfelder]]<ref>{{Cite web |last=Zahn |first=Noah |date=2026-01-12 |title=Degenfelder announces bid for governor after Trump endorsement |url=https://www.wyomingnews.com/news/local_news/degenfelder-announces-bid-for-governor-after-trump-endorsement/article_f5ec3cdb-7271-4c54-b1b1-a9ee8e6b17fd.html |access-date=2026-01-21 |website=Wyoming News |language=en-US}}</ref> |August 18, 2026 |Open Seat |TBA |} ==== 2026 state executive elections ==== {| class="wikitable sortable" !State !Office !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Alabama}} [[2026 Alabama lieutenant gubernatorial election|Alabama]] |[[Lieutenant Governor of Alabama|Lieutenant Governor]] |[[John Wahl]]<ref>{{Cite web|url=https://1819news.com/news/item/trump-endorses-algop-chair-wahl-as-possible-candidate-for-lieutenant-governor|title=Trump endorses ALGOP chair Wahl as possible candidate for lieutenant governor|last=Taylor|first=Caleb|work=1819 News|date=January 22, 2026|access-date=January 22, 2026}}</ref> |June 16, 2026 |Open |{{Icon|aa}} Advanced to Runoff |- |{{flagicon|Florida}} [[2026 Florida Attorney General election|Florida]] |[[Attorney General of Florida|Attorney General]] |''[[James Uthmeier]]''<ref>{{Cite web |date=2025-10-08 |title=Trump backs DeSantis-allied Uthmeier for Florida attorney general |url=https://www.politico.com/news/2025/10/08/trump-uthmeier-desantis-florida-ag-00597957 |access-date=2025-10-08 |website=Politico |language=en}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[2026 Florida Chief Financial Officer election|Florida]] |[[Chief Financial Officer of Florida|Chief Financial Officer]] |<s>[[Joe Gruters]]</s> ''(Withdrew)''<ref>{{Cite web |last=Rohrer |first=Gray |date=2025-04-01 |title=Who will be Florida's next CFO? DeSantis faces key decision |url=https://www.tallahassee.com/story/news/local/state/2025/04/01/desantis-cfo-decision-patronis-gruters-ingoglia/82759721007/ |access-date=2025-07-04 |website=[[Tallahassee Democrat]]}}</ref><ref>{{cite web |last1=Russell |first1=Ty |title=RNC Chair Gruters to remain in Florida senate but bow out of CFO race |url=https://www.wfla.com/news/florida/rnc-chair-gruters-to-remain-in-florida-senate-but-bow-out-of-cfo-race/ |publisher=[[WFLA-TV]] |access-date=2 September 2025 |date=28 August 2025}}</ref> |August 18, 2026 |Challenger |TBA |- |{{flagicon|Florida}} [[2026 Florida Commissioner of Agriculture election|Florida]] |[[Florida Commissioner of Agriculture|Commissioner of Agriculture]] |''[[Wilton Simpson]]''<ref>{{Cite news |last=Leonard |first=Kimberly |date=October 23, 2025 |title=Simpson gets the pre-endorsement |url=https://www.politico.com/newsletters/florida-playbook/2025/10/23/simpson-gets-the-pre-endorsement-00619524 |work=[[Politico]] |access-date=October 24, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Idaho}} [[2026 Idaho lieutenant gubernatorial election|Idaho]] |[[Lieutenant Governor of Idaho|Lieutenant Governor]] |''[[Scott Bedke]]''<ref name="Nitzberg">{{Cite news |last=Nitzberg |first=Alex |date=April 14, 2026 |title=Trump endorses neighboring state lieutenant governors for re-election |url=https://www.foxnews.com/politics/trump-endorses-neighboring-state-lieutenant-governors-re-election |work=[[Fox News]] |access-date=April 14, 2026}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nebraska}} [[2026 Nebraska Attorney General election|Nebraska]] |[[Attorney General of Nebraska|Attorney General]] |''[[Mike Hilgers]]''<ref>{{Cite web |title=Trump endorses Mike Hilgers for Attorney General of Nebraska |url=https://truthsocial.com/@realDonaldTrump/posts/116382124929663354 |access-date=April 11, 2026 |via=Truth Social |language=en}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nevada}} [[2026 Nevada lieutenant gubernatorial election|Nevada]] |[[Lieutenant Governor of Nevada|Lieutenant Governor]] |''[[Stavros Anthony]]''<ref name="Nitzberg"/> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nevada}} [[2026 Nevada Attorney General election|Nevada]] |[[Attorney General of Nevada|Attorney General]] |[[Adriana Guzmán Fralick]]<ref>{{cite web |last1=Seeman |first1=Matthew |title=Trump endorses Nevada attorney general candidate in GOP primary race |url=https://news3lv.com/news/local/trump-endorses-republican-candidate-adriana-guzman-fralick-nevada-attorney-general-primary-election-politics-danny-tarkanian |website=KSNV |access-date=June 5, 2026 |language=en |date=June 3, 2026}}</ref> |June 9, 2026 |Open Seat |{{Icon|aa}} Won primary |- |{{flagicon|Oklahoma}} [[2026 Oklahoma lieutenant gubernatorial election|Oklahoma]] |[[Lieutenant Governor of Oklahoma|Lieutenant Governor]] |[[T. W. Shannon]]<ref>{{cite web |last1=Tortorello |first1=Rarchar |title=Trump Endorsement Reshapes Oklahoma Lieutenant Governor Primary |url=https://www.citynewsokc.com/business/trump-endorsement-reshapes-oklahoma-lieutenant-governor-primary/article_1eff80c7-8307-4eca-a9dd-f462b7338466.html |website=Oklahoma City Sentinel |access-date=25 March 2026 |language=en |date=24 March 2026}}</ref> |June 16, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[2026 South Carolina Commissioner of Agriculture election|South Carolina]] |[[South Carolina Department of Agriculture|Agriculture Commissioner]] |Cody Simpson<ref>{{cite web |last1=Adcox |first1=Seanna |title=McMaster and Trump endorse 3rd potential candidate for SC agriculture commissioner|url=https://scdailygazette.com/2026/02/05/mcmaster-and-trump-endorse-3rd-potential-candidate-for-agriculture-commissioner/ |website=SC Daily Gazette |access-date=4 April 2026 |date=5 February 2026}}</ref> |June 9, 2026 |Open Seat |{{Icon|aa}} Won primary |- |{{flagicon|Texas}} [[2026 Texas lieutenant gubernatorial election|Texas]] |[[Lieutenant Governor of Texas|Lieutenant Governor]] |''[[Dan Patrick (politician)|Dan Patrick]]''<ref>{{cite web|url=https://www.kvue.com/article/news/politics/texas-dan-patrick-reelection-lieutenant-governor/269-3337d337-9158-4e15-983d-737465f662ea|title=Texas Lt. Gov. Dan Patrick announces re-election bid|last1=Eubank|last2=Carolan|first1=Britney|first2=Sam|date=April 11, 2025|access-date=April 11, 2025|publisher=[[KVUE]]}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas Comptroller of Public Accounts election|Texas]] |[[Texas Comptroller of Public Accounts|Comptroller]] |[[Don Huffines]]<ref name="Huffines">{{cite web |last=Yu |first=Issac |date=February 27, 2026 |title=Trump endorses against Abbott's picks for Texas Ag Commissioner and Comptroller ahead of GOP primary |url=https://www.houstonchronicle.com/politics/election/2026/article/trump-sid-miller-don-huffines-abbott-21946633.php |publisher=[[Houston Chronicle]] |access-date=February 28, 2025}}</ref> |March 3, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas elections|Texas]] |[[Texas General Land Office|General Land Commissioner]] |''[[Dawn Buckingham]]''<ref name="Huffines"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas Commissioner of Agriculture election|Texas]] |[[Texas Department of Agriculture|Agriculture Commissioner]] |''[[Sid Miller (politician)|Sid Miller]]''<ref name="Huffines"/> |March 3, 2026 |Incumbent |{{Icon|no}} Lost primary |} ==== 2026 Senate elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Alabama}} [[2026 United States Senate election in Alabama|Alabama]] |[[Barry Moore (American politician)|Barry Moore]]<ref>{{Cite web |title=Who is Barry Moore? Trump's choice for Alabama's next US Senator; US President reveals key reasons behind his support for US Congressman|url=https://m.economictimes.com/us/news/who-is-barry-moore-trumps-choice-for-alabamas-next-us-senator-us-president-reveals-key-reasons-behind-his-support-for-us-congressman/articleshow/126639467.cms|access-date=2026-01-20 |language=en-US}}</ref> |June 16, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Alaska}} [[2026 United States Senate election in Alaska|Alaska]] |[[Dan Sullivan (U.S. senator)|''Dan Sullivan'']]<ref>{{Cite web |title=Trump endorses Alaska U.S. Sen. Dan Sullivan |url=https://www.adn.com/politics/2025/07/21/trump-endorses-alaska-us-sen-dan-sullivan/ |access-date=2025-09-13 |website=Anchorage Daily News}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Arkansas}} [[2026 United States Senate election in Arkansas|Arkansas]] |''[[Tom Cotton]]''<ref>{{Cite web |date=2025-07-09 |title=Trump endorses Senator Tom Cotton's re-election bid |url=https://www.thv11.com/article/news/local/trump-endorses-tom-cotton-re-election-as-senator/91-fe400e4e-8f5c-4ad8-aeb4-c57409b8d0ee |access-date=2025-09-13 |website=thv11.com |language=en-US}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Florida}} [[2026 United States Senate special election in Florida|Florida]] |''[[Ashley Moody]]''<ref>{{cite web|url=https://floridapolitics.com/archives/748780-donald-trump-endorses-ashley-moody-early/|title=Donald Trump endorses Ashley Moody's return to U.S. Senate|last=Gancarski|first=A.G.|date=July 25, 2025|access-date=September 15, 2025|website=[[Florida Politics]]}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Georgia (U.S. state)}} [[2026 United States Senate election in Georgia|Georgia]] |[[Mike Collins (politician)|Mike Collins]]{{citation needed|date=June 2026}} |May 19, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Idaho}} [[2026 United States Senate election in Idaho|Idaho]] |''[[Jim Risch]]''<ref>{{Cite web|last1=Ratliff|first1=Seth|title=President Trump endorses Senator Risch well ahead of mid-term elections|url=https://localnews8.com/news/top-stories/2025/03/20/president-trump-endorses-senator-risch-well-ahead-of-mid-term-elections/|date=March 20, 2025|access-date=September 13, 2025|publisher=[[KIFI-TV]]}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[2026 United States Senate election in Iowa|Iowa]] |[[Ashley Hinson]]<ref>{{Cite web |title=Trump endorses Rep. Ashley Hinson's campaign for Iowa's U.S. Senate seat |url=https://www.thegazette.com/campaigns-elections/trump-endorses-rep-ashley-hinsons-campaign-for-iowas-u-s-senate-seat/ |access-date=2025-09-07 |language=en-US}}</ref> |June 2, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Kansas}} [[2026 United States Senate election in Kansas|Kansas]] |''[[Roger Marshall]]''<ref name=":6">{{Cite web |date=2025-07-09 |title=Trump endorses Kansas politicians Roger Marshall, Derek Schmidt, Tracey Mann|url=https://www.cjonline.com/story/news/politics/elections/2025/07/22/donald-trump-endorses-kansas-gop-congressmen-for-reelection-in-2026/85307235007/?gnt-cfr=1&gca-cat=p&gca-uir=false&gca-epti=z118570p115750c115750e002000v118570&gca-ft=160&gca-ds=sophi&gnt-djm=1 |access-date=2025-09-13 |website=cjonline.com |language=en-US}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Kentucky}} [[2026 United States Senate election in Kentucky|Kentucky]] |[[Andy Barr]]<ref>{{cite news |title=Rep. Andy Barr gets coveted Trump endorsement in Kentucky Senate race to replace McConnell |url=https://apnews.com/article/mcconnell-trump-barr-kentucky-senate-22cff179110a64691947a79f13e00c22 |website=[[Associated Press]]|access-date=May 1, 2026 |language=en |date=May 1, 2026}}</ref> |May 19, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Louisiana}} [[2026 United States Senate election in Louisiana|Louisiana]] |[[Julia Letlow]]<ref>{{Cite news |date=January 18, 2026 |title=Trump Backs a Potential Primary Challenger to Bill Cassidy, a G.O.P. Senator |url=https://www.nytimes.com/2026/01/18/us/politics/trump-bill-cassidy-julia-letlow-primary-challenge-endorsement.html |access-date=January 18, 2025 |work=[[The New York Times]]}}</ref> |June 27, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Michigan}} [[2026 United States Senate election in Michigan|Michigan]] |[[Mike Rogers (Michigan politician)|Mike Rogers]]<ref>{{Cite news |last=Shelton |first=Shajaka |date=July 24, 2025 |title=Trump endorses Rogers for U.S. Senate |url=https://www.wlns.com/your-local-election-hq/trump-endorses-rogers-for-u-s-senate/ |access-date=September 13, 2025 |work=[[WLNS-TV|WLNS]]}}</ref> |August 4, 2026 |Open Seat |TBA |- |{{flagicon|Mississippi}} [[2026 United States Senate election in Mississippi|Mississippi]] |''[[Cindy Hyde-Smith]]''<ref>{{Cite web |date=2025-05-09 |title= Hyde-Smith draws GOP challenger as Democrats target her Mississippi U.S. Senate seat|url= https://magnoliatribune.com/2025/05/09/hyde-smith-draws-gop-challenger-as-democrats-target-her-mississippi-u-s-senate-seat/|access-date=2025-09-13 |website=Magnolia Tribune |language=en-US}}</ref> |March 10, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Montana}} [[2026 United States Senate election in Montana|Montana]] |''<s>[[Steve Daines]]</s>'' (withdrew)<ref>{{cite news |last1=Miller |first1=Blair |title=Daines gets Trump's endorsement as he readies 2026 Senate reelection bid |url=https://helenair.com/news/state-regional/government-politics/article_a8313a29-db4d-4506-957d-677f4882100e.html |access-date=September 13, 2025 |work=[[Independent Record]] |date=April 23, 2025 |language=en}}</ref> |rowspan=2|June 2, 2026 |Incumbent |{{Icon|no}} Withdrew |- |[[Kurt Alme]]<ref name=Bloomberg1>{{cite web |title=Trump Endorses Alme for Montana Senate as Daines Steps Aside |url=https://www.bloomberg.com/news/articles/2026-03-05/trump-endorses-alme-for-montana-senate-as-daines-steps-aside |website=Bloomberg |access-date=5 March 2026}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Nebraska}} [[2026 United States Senate election in Nebraska|Nebraska]] |''[[Pete Ricketts]]''<ref>{{cite web |last1=Salinas |first1=Juan |title= Nebraska's Dan Osborn statistically tied with U.S. Sen. Pete Ricketts in poll |url= https://nebraskaexaminer.com/2025/04/10/nebraskas-dan-osborn-statistically-tied-with-u-s-sen-pete-ricketts-in-poll/ |website=[[Nebraska Examiner]] |date=April 10, 2025 |access-date=September 13, 2025 }}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New Hampshire}} [[2026 United States Senate election in New Hampshire|New Hampshire]] |[[John E. Sununu]]<ref>{{cite web |last=Manchester |first=Julia |title=Trump backs John Sununu in New Hampshire Senate race |url=https://thehill.com/homenews/5717664-trump-endorses-sununu-nh-senate/ |website=The Hill |date=February 1, 2026 |access-date=February 1, 2026}}</ref> |September 8, 2026 |Open Seat |TBA |- |{{flagicon|North Carolina}} [[2026 United States Senate election in North Carolina|North Carolina]] |[[Michael Whatley]]<ref>{{Cite web |date=2025-07-24 |title=RNC chair Michael Whatley to run for Senate in North Carolina with Trump's support |url=https://www.politico.com/news/2025/07/24/whatley-senate-north-carolina-trump-00473419 |access-date=2025-07-29 |website=Politico}}</ref> |March 3, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[2026 United States Senate election in Ohio|Ohio]] |''[[Jon Husted]]''<ref>{{cite news |last1=Taylor |first1=Lydia |title=Trump endorses Husted for 2026 Senate race |url=https://spectrumnews1.com/oh/cincinnati/news/2025/04/09/trump-endorses-husted-for-2026-senate-race |access-date=September 13, 2025 |work=[[Spectrum News]] |date=April 9, 2025 |language=en}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Oklahoma}} [[2026 United States Senate election in Oklahoma|Oklahoma]] |''<s>[[Markwayne Mullin]]</s>'' (resigned to become [[United States Secretary of Homeland Security|DHS Secretary]])<ref>{{cite news |last1=Krehbiel |first1=Randy |title=Political notebook: Strong income tax receipts keep state revenue on track |url=https://tulsaworld.com/news/state-regional/government-politics/article_1e973cb9-33a2-46c9-bdf3-a9ffb024a44e.html |access-date=May 20, 2025 |work=Tulsa World |date=May 18, 2025 |language=en}}</ref> |rowspan=2|June 16, 2026 |Incumbent |{{Icon|no}} Resigned |- |[[Kevin Hern]]<ref>{{cite web |last1=Onstot |first1=Evan |title=Trump endorses Kevin Hern for Oklahoma Senate seat |url=https://www.koco.com/article/trump-endorses-kevin-hern-oklahoma-senate-seat/70740280 |website=KOCO |access-date=14 March 2026 |language=en |date=14 March 2026}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[2026 United States Senate election in South Carolina|South Carolina]] |''[[Lindsey Graham]]''<ref>{{cite news |work=[[WCIV]] |access-date=September 13, 2025 |author=Kayanja, Ian |title=President Trump endorses Lindsey Graham as senator eyes 2026 reelection bid |url=https://abcnews4.com/news/local/trump-endorses-sen-lindsey-graham-as-senator-eyes-2026-reelection-bid-donald-trump-lindsey-graham-reelection-wciv-abc-news-4-03-26-2025 |date=March 26, 2025}}</ref> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Dakota}} [[2026 United States Senate election in South Dakota|South Dakota]] |''[[Mike Rounds]]''<ref>{{Cite web |title=Rounds wins Trump endorsement after playing deal-making role in rescinding public media funds |url=https://southdakotasearchlight.com/briefs/rounds-wins-trump-endorsement-after-playing-deal-making-role-in-rescinding-public-media-funds/ |access-date=2025-09-10 |website=South Dakota Searchlight |language=en-US}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[2026 United States Senate election in Tennessee|Tennessee]] |''[[Bill Hagerty]]''<ref>{{Cite web |title=Trump endorses Bill Hagerty for Senate |url=https://truthsocial.com/@realDonaldTrump/posts/114231344319625636 |access-date=September 14, 2025 |via=Truth Social |language=en}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 United States Senate election in Texas|Texas]] |[[Ken Paxton]]<ref>{{cite web |last1=Goldmacher |first1=Shane |title=Trump Endorses Paxton in Final Week of G.O.P. Senate Runoff in Texas |url=https://www.nytimes.com/2026/05/19/us/politics/trump-paxton-endorsement-cornyn-texas-senate.html |website=The New York Times |access-date=May 19, 2026}}</ref> |May 26, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|West Virginia}} [[2026 United States Senate election in West Virginia|West Virginia]] |''[[Shelley Moore Capito]]''<ref>{{cite web |title=Trump endorses Capito | website=[[The Guardian.com]] |url=https://www.theguardian.com/us-news/live/2025/may/16/donald-trump-gulf-tax-bill-medicaid-us-politics-live-updates?CMP=share_btn_url&page=with%3Ablock-682756e28f0835109b839df2#block-682756e28f0835109b839df2 |date=May 15, 2025 |access-date=September 14, 2025}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Wyoming}} [[2026 United States Senate election in Wyoming|Wyoming]] |''<s>[[Cynthia Lummis]]</s>'' (declined to run)<ref>{{cite news |last1=Stingray |first1=River |title=Trump endorses Lummis for second term far ahead of 2026 election |url=https://buckrail.com/trump-endorses-lummis-for-second-term-far-ahead-of-2026-election/ |access-date=September 14, 2025 |work=Buckrail |date=March 27, 2025 |language=en}}</ref><ref>{{cite web |last=Mestas |first=Denise |date=December 19, 2025 |title=Lummis Announces Decision To Not Seek Re-Election in 2026 |url=https://www.wyomingnewsnow.tv/news/lummis-announces-decision-to-not-seek-re-election-in-2026/article_5c48a0b7-4d04-49cd-8ffd-9fc06138d339.html |access-date=January 23, 2026 |website=Wyoming News Now}}</ref> |rowspan=2|August 18, 2026 |Incumbent |{{Icon|no}} Declined |- |[[Harriet Hageman]]<ref>{{cite news |last1=Steinhauser |first1=Paul |title=Trump ally who ousted Cheney launches Senate bid keep GOP seat in Republican hands |url=https://www.foxnews.com/politics/scoop-trump-ally-harriet-hageman-who-ousted-cheney-launches-senate-bid-keep-gop-seat-republican-hands |work=[[Fox News]] |date=December 23, 2025 |language=en}}</ref> |Open Seat |TBA |} ==== 2026 House elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Primary result |- |{{flagicon|Alabama}} [[Alabama's 3rd congressional district|AL-03]] |[[Mike Rogers (Alabama politician)|''Mike Rogers'']]<ref name="Alabama">{{cite web |last1=Taylor |first1=Daniel |title='He will never let you down!' — Trump endorses Aderholt, Strong, Palmer, Rogers for reelection |url=https://1819news.com/news/item/he-will-never-let-you-down-trump-endorses-aderholt-strong-palmer-rogers-for-reelection |access-date=January 23, 2026 |work=[[1819 News]] |date=November 3, 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Alabama}} [[Alabama's 4th congressional district|AL-04]] |''[[Robert Aderholt]]''<ref name="Alabama"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Alabama}} [[Alabama's 5th congressional district|AL-05]] |''[[Dale Strong]]''<ref name="Alabama"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Alabama}} [[Alabama's 6th congressional district|AL-06]] |''[[Gary Palmer]]''<ref name="Alabama"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Alaska}} [[Alaska's at-large congressional district|AK-AL]] |[[Nick Begich III|''Nick Begich'']]<ref>{{cite news |last1=Brooks |first1=James |title=Trump backs Begich for reelection to Alaska's U.S. House seat in 2026 |url=https://alaskabeacon.com/briefs/trump-backs-begich-for-reelection-to-alaskas-u-s-house-seat-in-2026/ |access-date=September 14, 2025 |work=Alaska Beacon |date=May 8, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |rowspan=2|{{flagicon|Arizona}} [[Arizona's 1st congressional district|AZ-01]] |<s>[[Gina Swoboda]]</s> ''(withdrew)''<ref name=DualEndorsement/> |rowspan=2|July 21, 2026 |rowspan=2|Open Seat |{{Icon|no}} Withdrew |- |[[Jay Feely]] ''(co-endorsement with Swoboda)''<ref name="DualEndorsement">{{cite web |last1=Gersony |first1=Laura |title=Trump issues rare dual endorsement in Arizona swing district |url=https://www.azcentral.com/story/news/politics/arizona/2026/01/06/trump-issues-dual-endorsement-jay-feely-gina-swoboda-congress/87853100007/ |website=AZ Central |access-date=23 January 2026}}</ref> |TBA |- |{{flagicon|Arizona}} [[Arizona's 2nd congressional district|AZ-02]] |''[[Eli Crane]]''<ref>{{cite web |title=Trump's Endorsement of Eli Crane: Potential Boost for Energy Stocks and Sector Funds |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-eli-crane-potential-boost-for-energy-stocks-and-sector-funds#google_vignette |website=TipRanks Financial |access-date=23 January 2026 |language=en}}</ref> |July 21, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arizona}} [[Arizona's 5th congressional district|AZ-05]] |[[Mark Lamb (sheriff)|Mark Lamb]]<ref>{{cite news |title= President Trump Endorses Former Pinal County Sheriff Mark Lamb For Congress |url= https://azfreenews.com/2025/11/president-trump-endorses-former-pinal-county-sheriff-mark-lamb-for-congress/ |access-date= January 23, 2026 |work= |date= November 5, 2025 |language=en}}</ref> |July 21, 2026 |Open Seat |TBA |- |{{flagicon|Arizona}} [[Arizona's 6th congressional district|AZ-06]] |''[[Juan Ciscomani]]''<ref>{{cite news |last1=Nintzel |first1=Jim |title=Trump endorses Ciscomani; Az Dems have party problems|url= https://www.tucsonsentinel.com/local/report/042925_political_roundup/trump-endorses-ciscomani-az-dems-have-party-problems/ |work=Tucson Senteniel |date=April 29, 2025}}</ref> |July 21, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arizona}} [[Arizona's 8th congressional district|AZ-08]] |''[[Abraham Hamadeh]]''<ref>{{cite news |last1=Nitzberg |first1=Alex |title= Trump endorses House freshman for reelection less than six months into the lawmaker's congressional tenure |url= https://www.foxnews.com/politics/trump-endorses-house-freshman-reelection-less-than-six-months-lawmakers-congressional-tenure |work=[[Fox News]] |date=June 16, 2025}}</ref> |July 21, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arizona}} [[Arizona's 9th congressional district|AZ-09]] |''[[Paul Gosar]]''<ref>{{cite web |title=Trump's Endorsement of Gosar: Potential Boost for Energy Stocks and Sector Funds |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-gosar-potential-stock-market-impacts-on-energy-and-manufacturing-sectors#google_vignette |website=TipRanks Financial |access-date=23 January 2026 |language=en}}</ref> |July 21, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arkansas}} [[Arkansas's 1st congressional district|AR-01]] |''[[Rick Crawford (politician)|Rick Crawford]]''<ref name=Arkansaw>{{Cite web |title=- President Trump endorses Arkansas congressmen in reelection bids |url=https://www.5newsonline.com/article/news/local/president-trump-endorses-arkansas-congressmen-reelection-bids/527-e20394ee-aa92-4db0-b5f5-57080c02467b}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arkansas}} [[Arkansas's 2nd congressional district|AR-02]] |''[[French Hill (politician)|French Hill]]''<ref name=Arkansaw/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arkansas}} [[Arkansas's 3rd congressional district|AR-03]] |''[[Steve Womack]]''<ref name=Arkansaw/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Arkansas}} [[Arkansas's 4th congressional district|AR-04]] |''[[Bruce Westerman]]''<ref name=Arkansaw/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|California}} [[California's 5th congressional district|CA-05]] |''[[Tom McClintock]]''<ref name="Votehub Tracker"/> |June 2, 2026 |Incumbent |{{Icon|aa}} Advanced to General |- |{{flagicon|California}} [[California's 13th congressional district|CA-13]] |[[Kevin Lincoln (politician)|Kevin Lincoln]]<ref name=":0">{{Cite web |last=Manchester |first=Julia |date=December 25, 2025 |title=Trump wades into House races, putting endorsement force to the test |url=https://thehill.com/homenews/administration/5662512-trump-midterm-endorsements-impact/ |access-date=December 26, 2025 |website=The Hill}}</ref> |June 2, 2026 |Challenger |{{Icon|aa}} Advanced to General |- |{{flagicon|California}} [[California's 20th congressional district|CA-20]] |''[[Vince Fong]]''<ref>{{Cite web |title=Trump endorses Vince Fong for House of Representatives|url=https://truthsocial.com/@realDonaldTrump/posts/115375108797044323 |access-date=January 23, 2026 |via=Truth Social |language=en}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Advanced to General |- |{{flagicon|California}} [[California's 23rd congressional district|CA-23]] |''[[Jay Obernolte]]''<ref name="Votehub Tracker"/> |June 2, 2026 |Incumbent |{{Icon|aa}} Advanced to General |- |rowspan=2|{{flagicon|California}} [[California's 48th congressional district|CA-48]] |<s>''[[Darrell Issa]]''</s> (withdrew)<ref>{{cite web|url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-darrell-issa-potential-tailwinds-for-u-s-energy-defense-and-industrial-stocks|title=Trump's Endorsement of Darrell Issa: Potential Tailwinds for U.S. Energy, Defense, and Industrial Stocks|date=January 23, 2026|access-date=February 17, 2026}}</ref> |rowspan=2|June 2, 2026 |Incumbent |{{Icon|no}} Withdrew |- |[[Jim Desmond]]<ref name="ATEAPRIL"/> |Open Seat |{{Icon|aa}} Advanced to General |- |rowspan=2|{{flagicon|Colorado}} [[Colorado's 3rd congressional district|CO-03]] |''[[Jeff Hurd]]'' (re-endorsed)<ref>{{cite web |last1=Luning |first1=Ernest |title=Donald Trump endorses Republican Jeff Hurd's bid for reelection in Colorado's 3rd CD |url=https://www.coloradopolitics.com/2025/10/28/donald-trump-endorses-republican-jeff-hurds-bid-for-reelection-in-colorados-3rd-cd/ |access-date=November 8, 2025 |work=[[Colorado Politics]] |date=October 28, 2025}}</ref> |rowspan=2|June 30, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |<s>Hope Scheppelman</s> ''(withdrew)''<ref>{{cite web |last1=Brams |first1=Sophie |title=Trump pulls endorsement of Hurd over tariffs vote |url=https://thehill.com/homenews/campaign/5749448-hurd-loses-trump-backing/ |access-date=February 21, 2026 |work=[[The Hill (newspaper)|The Hill]] |date=February 21, 2026}}</ref> |Challenger |{{Icon|no}} Withdrew |- |{{flagicon|Colorado}} [[Colorado's 4th congressional district|CO-04]] |''[[Lauren Boebert]]''<ref>{{Cite web |last=Luning |first=Ernest |date=2025-07-24 |title=Donald Trump endorses Republican Lauren Boebert's 2026 reelection bid in Colorado's deep red 4th CD |url=https://www.coloradopolitics.com/elections/2026/donald-trump-endorses-republican-lauren-boeberts-2026-reelection-bid-in-colorados-deep-red-4th-cd/article_2c9c1325-536e-4ee6-93bc-cc1a2fdf2d96.html |access-date=2025-08-08 |website=Colorado Politics |language=en}}</ref> |June 30, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Colorado}} [[Colorado's 5th congressional district|CO-05]] |''[[Jeff Crank]]''<ref>{{Cite web |last=Luning |first=Ernest |date=2025-08-20 |title=Donald Trump endorses Colorado Republican Jeff Crank's bid for reelection |url=https://www.coloradopolitics.com/2025/08/20/donald-trump-endorses-colorado-republican-jeff-cranks-bid-for-reelection/ |access-date=2025-08-22 |website=Colorado Politics |language=en-US}}</ref> |June 30, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Colorado}} [[Colorado's 8th congressional district|CO-08]] |''[[Gabe Evans]]''<ref>{{cite news |last1=Luning |first1=Ernest |title=Donald Trump endorses Republican Gabe Evans in Colorado's tossup 8th Congressional District |url=https://www.coloradopolitics.com/elections/2026/donald-trump-endorses-republican-gabe-evans-in-colorados-tossup-8th-congressional-district/article_4b5aa753-3dd8-4910-b3d0-a1ca419d2919.html |access-date=September 14, 2025 |work=[[Colorado Politics]] |date=April 28, 2025 |language=en}}</ref> |June 30, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Florida}} [[Florida's 1st congressional district|FL-01]] |''[[Jimmy Patronis]]''<ref>{{cite web |title=Jimmy Patronis snags Donald Trump endorsement |url=https://floridapolitics.com/archives/762317-jimmy-patronis-snags-donald-trump-endorsement/ |website=Florida Politics |date=October 25, 2025 |access-date=October 26, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 2nd congressional district|FL-02]] |''<s>[[Neal Dunn]]</s>'' (declined to run)<ref>{{cite news |last1=Dixon |first1=Matt |title=Trump backs Rep. Anna Paulina Luna in her likely run for reelection in 2026 |url=https://www.politico.com/live-updates/2025/04/03/congress/trump-proxy-voting-support-00271110 |access-date=September 14, 2025 |work=[[NBC News]] |date=April 3, 2025 |language=en}}</ref> |August 18, 2026 |Incumbent |{{Icon|no}} Declined |- |{{flagicon|Florida}} [[Florida's 3rd congressional district|FL-03]] |''[[Kat Cammack]]''<ref>{{cite news |last1=Ogles |first1=Jacob |title=Kat Cammack secures valuable Donald Trump endorsement for third term |url=https://floridapolitics.com/archives/760947-kat-cammack-secures-valuable-donald-trump-endorsement-for-third-term/ |access-date=October 16, 2025 |work=[[Florida Politics]] |date=October 16, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 4th congressional district|FL-04]] |''[[Aaron Bean]]''<ref name="SevenMore">{{cite web |last1=Gancarski |first1=A. G. |title=Donald Trump endorses seven more Congressional incumbents in Florida |url=https://floridapolitics.com/archives/779269-donald-trump-endorses-seven-more-congressional-incumbents/ |website=Florida Politics |access-date=11 February 2026 |date=11 February 2026}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 5th congressional district|FL-05]] |''[[John Rutherford (Florida politician)|John Rutherford]]''<ref name="SevenMore"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 6th congressional district|FL-06]] |''[[Randy Fine]]''<ref>{{cite web |title=Donald Trump backs 'MAGA Warrior' Randy Fine ahead of contested primary in CD 6 |url=https://floridapolitics.com/archives/762299-donald-trump-backs-maga-warrior-randy-fine-ahead-of-contested-primary-in-cd-6/ |website=Florida Politics |date=October 25, 2025 |access-date=October 26, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 7th congressional district|FL-07]] |''[[Cory Mills]]''<ref name="SevenMore"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 8th congressional district|FL-08]] |''[[Mike Haridopolos]]''<ref>{{cite web |title=Donald Trump endorses 'America First Patriot' Mike Haridopolos for re-election |url=https://floridapolitics.com/archives/762300-donald-trump-endorses-mike-haridopolos-re-election/ |website=Florida Politics |date=October 25, 2025 |access-date=October 26, 2025 |quote=Haridopolos is actively campaigning for another term.}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 11th congressional district|FL-11]] |<s>''[[Daniel Webster (Florida politician)|Daniel Webster]]''</s> (withdrew)<ref name="SevenMore"/> |August 18, 2026 |Incumbent |{{Icon|no}} Withdrew |- |{{flagicon|Florida}} [[Florida's 12th congressional district|FL-12]] |''[[Gus Bilirakis]]''<ref name="Votehub Tracker"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 13th congressional district|FL-13]] |''[[Anna Paulina Luna]]''<ref>{{cite news |last1=Dixon |first1=Matt |title=Trump backs Rep. Anna Paulina Luna in her likely run for reelection in 2026 |url=https://www.politico.com/live-updates/2025/04/03/congress/trump-proxy-voting-support-00271110 |access-date=September 14, 2025 |work=[[NBC News]] |date=April 3, 2025 |language=en}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 15th congressional district|FL-15]] |''[[Laurel Lee]]''<ref name="Votehub Tracker"/> |August 18, 2026 |Incumbent |TBA |- |rowspan=2|{{flagicon|Florida}} [[Florida's 16th congressional district|FL-16]] |''<s>[[Vern Buchanan]]</s>'' (declined to run)<ref>{{cite web|url=https://www.politico.com/newsletters/florida-playbook/2026/01/28/another-retirement-more-jockeying-00751657|title=Another retirement, more jockeying|last1=Leonard|last2=Williams|first1=Kimberly|first2=Kylie|date=January 28, 2026|access-date=January 28, 2026|website=[[Politico]]}}</ref> |rowspan=2|August 18, 2026 |Incumbent |{{Icon|no}} Declined |- |Sydney Gruters<ref>{{Cite web |date=2026-03-24 |title=Trump urges Sydney Gruters to run in Florida race to replace Buchanan |url=https://www.politico.com/news/2026/03/24/trump-sydney-gruters-replace-vern-buchanan-00842378 |access-date=2026-03-24 |website=POLITICO |language=en}}</ref> |Open Seat |TBA |- |{{flagicon|Florida}} [[Florida's 17th congressional district|FL-17]] |''[[Greg Steube]]''<ref>{{cite web |title=Greg Steube secures another Donald Trump endorsement |url=https://floridapolitics.com/archives/762302-greg-steube-secures-another-donald-trump-endorsement/ |website=Florida Politics |date=October 25, 2025 |access-date=October 26, 2025}}</ref> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 18th congressional district|FL-18]] |''[[Scott Franklin (politician)|Scott Franklin]]''<ref name="Votehub Tracker"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 21st congressional district|FL-21]] |''[[Brian Mast]]''<ref name="SevenMore"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 26th congressional district|FL-26]] |''[[Mario Díaz-Balart]]''<ref name="Votehub Tracker"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 27th congressional district|FL-27]] |''[[Maria Elvira Salazar]]''<ref name="SevenMore"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Florida}} [[Florida's 28th congressional district|FL-28]] |''[[Carlos A. Giménez|Carlos Giménez]]''<ref name="SevenMore"/> |August 18, 2026 |Incumbent |TBA |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 1st congressional district|GA-01]] |Jim Kingston<ref name="ATEAPRIL"/> |May 19, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 3rd congressional district|GA-03]] |''[[Brian Jack]]''<ref>{{cite web|url=https://www.tipranks.com/news/catalyst/how-trumps-endorsement-of-brian-jack-could-nudge-agriculture-energy-and-defense-stocks |title=How Trump's Endorsement of Brian Jack Could Nudge Agriculture, Energy, and Defense Stocks |date=January 23, 2026|access-date=April 4, 2026}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 7th congressional district|GA-07]] |''[[Rich McCormick]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 8th congressional district|GA-08]] |''[[Austin Scott]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 9th congressional district|GA-09]] |''[[Andrew Clyde]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 10th congressional district|GA-10]] |[[Houston Gaines]]<ref name="ATEAPRIL"/> |May 19, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 11th congressional district|GA-11]] |''<s>[[Barry Loudermilk]]</s>'' (withdrew)<ref>{{Cite web |title=Trump endorses Barry Loudermilk for House |url= https://truthsocial.com/@realDonaldTrump/posts/114876638674610838 |access-date=September 14, 2025 |via=Truth Social |language=en}}</ref> |May 19, 2026 |Incumbent |{{Icon|no}} Withdrew |- |{{flagicon|Georgia (U.S. state)}} [[Georgia's 12th congressional district|GA-12]] |''[[Rick Allen (politician)|Rick Allen]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Georgia (U.S. state)}} [[Georgia's 14th congressional district|GA-14]] |''<s>[[Marjorie Taylor Greene]]</s>'' (endorsement rescinded,<br>resigned)<ref>{{cite web|url=https://www.reuters.com/world/us/trump-withdraws-support-marjorie-taylor-greene-2025-11-15/|title=Trump withdraws support for Marjorie Taylor Greene|date=November 14, 2025|access-date=November 14, 2025|publisher=[[Reuters]]}}</ref> |rowspan=2|May 19, 2026 |Incumbent |{{Icon|no}} Resigned |- |[[Clay Fuller]]<ref>{{Cite web |title=Trump endorses Clay Fuller for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/116596785594736554 |access-date=May 20, 2026 |via=Truth Social |language=en}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Idaho}} [[Idaho's 1st congressional district|ID-01]] |''[[Russ Fulcher]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Idaho}} [[Idaho's 2nd congressional district|ID-02]] |''[[Mike Simpson]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Illinois}} [[Illinois's 12th congressional district|IL-12]] |''[[Mike Bost]]''<ref>{{Cite web |title=Mike Bost launches re-election campaign with Trump's endorsement |url=https://newschannel20.com/news/local/mike-bost-launches-re-election-campaign-with-trumps-endorsement |date=May 9, 2025|access-date=September 15, 2025|publisher=[[WICS]]}}</ref> |March 17, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Illinois}} [[Illinois's 15th congressional district|IL-15]] |[[Mary Miller (politician)|''Mary Miller'']]<ref>{{Cite web |title=Trump endorses Mary Miller for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/115057223325978530 |access-date=September 15, 2025 |via=Truth Social |language=en}}</ref> |March 17, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Illinois}} [[Illinois's 16th congressional district|IL-16]] |''[[Darin LaHood]]''<ref name="Votehub Tracker"/> |March 17, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 2nd congressional district|IN-02]] |''[[Rudy Yakym]]''<ref name="Votehub Tracker"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 3rd congressional district|IN-03]] |''[[Marlin Stutzman]]''<ref name="Votehub Tracker"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 4th congressional district|IN-04]] |''[[Jim Baird (politician)|Jim Baird]]''<ref name="Firesoff">{{cite web |last1=Murphy |first1=Ryan |title=Trump endorses Spartz, other Indiana members of Congress for re-election. Here's who else |url=https://www.indystar.com/story/news/politics/2026/01/23/trump-indiana-congress-representatives-for-re-election-truth-social-spartz-baird-houchins-shreve/88326534007/ |website=The Indianapolis Star |access-date=24 January 2026}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 5th congressional district|IN-05]] |''[[Victoria Spartz]]''<ref name="Firesoff"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 6th congressional district|IN-06]] |''[[Jefferson Shreve]]''<ref name="Firesoff"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 8th congressional district|IN-08]] |''[[Mark Messmer]]''<ref>{{Cite web|last1=Langhorne|first1=Thomas B.|title=Messmer makes it official: He will seek re-election to Congress|url=https://www.courierpress.com/story/news/politics/2025/08/05/messmer-makes-it-official-he-will-seek-re-election-to-congress/85528535007/?gnt-cfr=1&gca-cat=p&gca-uir=true&gca-epti=z115130p000550c000550e004000v115130b0051xxd005165&gca-ft=178&gca-ds=sophi&gnt-djm=1|date=August 5, 2025|access-date=September 15, 2025|publisher=[[KIFI-TV]]}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[Indiana's 9th congressional district|IN-09]] |''[[Erin Houchin]]''<ref name="Firesoff"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[Iowa's 1st congressional district|IA-01]] |''[[Mariannette Miller-Meeks]]''<ref>{{Cite web |last=Opsahl |first=Robin |date=2025-11-03 |title=President Donald Trump endorses U.S. Rep. Mariannette Miller-Meeks |url=https://iowacapitaldispatch.com/2025/11/03/president-donald-trump-endorses-u-s-rep-mariannette-miller-meeks/ |access-date=2025-11-26 |website=Iowa Capital Dispatch |language=en-US}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[Iowa's 2nd congressional district|IA-02]] |[[Joe Mitchell (politician)|Joe Mitchell]]<ref>{{cite web |title=Trump endorsement reshapes Iowa's 2nd District race |url=https://www.thegazette.com/campaigns-elections/trump-speaker-mike-johnson-endorse-joe-mitchell-for-congress-as-iowa-gop-primary-field-narrows/ |website=The Gazette |access-date=28 January 2026}}</ref> |June 2, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[Iowa's 3rd congressional district|IA-03]] |''[[Zach Nunn]]''<ref name="TrumpBooker">{{cite news |title=Trump backs Iowa Congressman in 2026, Sen. Cory Booker endorses Dem running in same race |url=https://cbs2iowa.com/news/local/trump-backs-nunn-booker-endorses-konfrst-as-iowas-3rd-congressional-race-heats-up-ach-nunn-republican-jennifer-sarah-trone-garriott-president-donald-booker-us-senator-reprehensive-washington-dc-vote-2026-election-truth-social-twitter-x-congress-democrats |access-date=September 16, 2025 |work=[[KGAN]] |date=May 9, 2025 |language=en}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Iowa}} [[Iowa's 4th congressional district|IA-04]] |Chris McGowan<ref>{{cite news |last1=Pfannenstiel |first1=Brianne |title=Donald Trump endorses Chris McGowan in Iowa's 4th District primary |url=https://www.desmoinesregister.com/story/news/politics/elections/2026/02/05/donald-trump-endorses-chris-mcgowan-in-iowas-4th-district-primary/88519517007/ |access-date=February 5, 2026 |work=[[The Des Moines Register]] |date=February 5, 2026}}</ref> |June 2, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Kansas}} [[Kansas's 1st congressional district|KS-01]] |''[[Tracey Mann]]<ref name=":6" />'' |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Kansas}} [[Kansas's 2nd congressional district|KS-02]] |''[[Derek Schmidt]]<ref name=":6" />'' |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Kansas}} [[Kansas's 4th congressional district|KS-04]] |''[[Ron Estes]]''<ref>{{Cite web |title=Trump endorses Ron Estes for House |url= https://truthsocial.com/@realDonaldTrump/posts/115057228167480219 |access-date=September 20, 2025 |via=Truth Social |language=en}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Kentucky}} [[Kentucky's 1st congressional district|KY-01]] |''[[James Comer]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Kentucky}} [[Kentucky's 2nd congressional district|KY-02]] |''[[Brett Guthrie]]''<ref name="Votehub Tracker"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Kentucky}} [[Kentucky's 4th congressional district|KY-04]] |[[Ed Gallrein]]<ref>{{cite web |last1=Kashinsky |first1=Lisa |last2=Hill |first2=Meredith Lee |title=Trump endorses Massie challenger not yet in the primary race |url=https://www.politico.com/news/2025/10/17/massie-kentucky-trump-endorsement-00614778 |website=[[Politico]] |date=October 17, 2025 |access-date=October 18, 2025}}</ref> |May 19, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Kentucky}} [[Kentucky's 5th congressional district|KY-05]] |''[[Hal Rogers]]''<ref>{{cite web |last1=Mueller |first1=Caroline |title=Congressman Hal Rogers announces re-election bid |url=https://www.wymt.com/2025/11/07/congressman-hal-rogers-announces-re-election-bid/ |publisher=[[WYMT-TV]] |date=November 7, 2025 |access-date=November 19, 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Kentucky}} [[Kentucky's 6th congressional district|KY-06]] |[[Ralph Alvarado]]<ref>{{cite news |last=Horsley |first=McKenna |title= Trump causes political earthquake in KY, backing Barr, Alvarado in U.S. Senate, House races |url= https://kentuckylantern.com/2026/05/01/trump-causes-political-earthquake-in-ky-backing-barr-alvarado-in-u-s-senate-house-races/ |website=Kentucky Lantern |access-date=May 2, 2026 |language=en |date=May 1, 2026}}</ref> |May 19, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Louisiana}} [[Louisiana's 1st congressional district|LA-01]] |''[[Steve Scalise]]''<ref name="Firesoff"/> |July 15, 2026 |Incumbent |TBA |- |{{flagicon|Louisiana}} [[Louisiana's 3rd congressional district|LA-03]] |''[[Clay Higgins]]''<ref name="Votehub Tracker"/> |July 15, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Louisiana}} [[Louisiana's 4th congressional district|LA-04]] |''[[Mike Johnson]]''<ref name="Firesoff"/> |July 15, 2026 |Incumbent |TBA |- |{{flagicon|Louisiana}} [[Louisiana's 5th congressional district|LA-05]] |[[Blake Miguez]]<ref>{{cite web |last1=Hilburn |first1=Greg |title=Trump endorses Blake Miguez for Louisiana's 5th District, shaking up race |url=https://www.shreveporttimes.com/story/news/2026/02/04/trump-endorses-blake-miguez-for-louisianas-5th-congressional-district/88518646007/ |website=The Times |access-date=5 February 2026}}</ref> |July 15, 2026 |Open Seat |TBA |- |{{flagicon|Maine}} [[Maine's 2nd congressional district|ME-02]] |[[Paul LePage]]<ref>{{Cite web |date=2025-12-19 |title=Democratic candidate responds to Pres. Trump's endorsement of Paul LePage |url=https://wgme.com/news/local/democratic-candidate-responds-to-president-donald-trump-endorsement-of-paul-lepage-matt-dunlap-jared-golden-jordan-wood |access-date=2025-12-26 |publisher=WGME |language=en}}</ref> |June 9, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Michigan}} [[Michigan's 1st congressional district|MI-01]] |''[[Jack Bergman]]''<ref>{{cite web |last1=Sargent |first1=Bud |title=Bergman re-election endorsed by president |url=https://www.miningjournal.net/news/front-page-news/2025/11/bergman-re-election-endorsed-by-president/ |access-date=November 2, 2025 |work=[[The Mining Journal]] |date=November 1, 2025}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Michigan}} [[Michigan's 2nd congressional district|MI-02]] |''[[John Moolenaar]]''<ref name="Votehub Tracker"/> |August 4, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Michigan}} [[Michigan's 4th congressional district|MI-04]] |''[[Bill Huizenga]]''<ref>{{Cite web |last=Solis |first=Ben |date=2025-07-25 |title=Trump endorses Michigan's Rogers in U.S. Senate race, gives nod to Huizenga for backing out |url=https://michiganadvance.com/briefs/trump-endorses-michigans-rogers-in-u-s-senate-race-gives-nod-to-huizenga-for-backing-out/ |access-date=2025-09-20 |website=Michigan Advance |language=en-US}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Michigan}} [[Michigan's 5th congressional district|MI-05]] |''[[Tim Walberg]]''<ref>{{Cite web |title=Trump endorses Tim Walberg for congress |url=https://truthsocial.com/@realDonaldTrump/posts/114480047403137321 |access-date=September 22, 2025 |via=Truth Social |language=en}}</ref> |August 4, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Michigan}} [[Michigan's 7th congressional district|MI-07]] |''[[Tom Barrett (Michigan politician)|Tom Barrett]]''<ref>{{Cite web |title= President Trump endorses Congressman Tom Barrett for re-election |url=https://www.nrcc.org/2025/05/09/president-trump-endorses-congressman-tom-barrett-for-re-election/ |access-date=September 22, 2025 |publisher=[[NRCC]] |date=9 May 2025 |language=en}}</ref> |August 4, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Michigan}} [[Michigan's 9th congressional district|MI-09]] |''[[Lisa McClain]]''<ref name="Votehub Tracker"/> |August 4, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Minnesota}} [[Minnesota's 1st congressional district|MN-01]] |''[[Brad Finstad]]''<ref name="Minnesota">{{cite web |last1=Kramer |first1=Ethan |title=Trump endorses four Minnesota Republican House members for re-election in 2026 |url=https://www.valleynewslive.com/2025/11/04/trump-endorses-four-minnesota-republican-house-members-re-election-2026/ |website=Valley News |access-date=4 December 2025 |language=en |date=4 November 2025}}</ref> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Minnesota}} [[Minnesota's 6th congressional district|MN-06]] |''[[Tom Emmer]]''<ref name="Minnesota"/> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Minnesota}} [[Minnesota's 7th congressional district|MN-07]] |''[[Michelle Fischbach]]''<ref name="Minnesota"/> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Minnesota}} [[Minnesota's 8th congressional district|MN-08]] |''[[Pete Stauber]]''<ref name="Minnesota"/> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Mississippi}} [[Mississippi's 1st congressional district|MS-01]] |''[[Trent Kelly]]''<ref name="MS">{{Cite web |date=2025-11-03 |title= Trump endorses Congressman Kelly and Guest ahead of 2026 midterms|url= https://magnoliatribune.com/2025/11/03/trump-endorses-congressmen-kelly-and-guest-ahead-of-2026-midterms/|access-date=2026-02-22 |website=Magnolia Tribune |language=en-US}}</ref> |March 10, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Mississippi}} [[Mississippi's 3rd congressional district|MS-03]] |''[[Michael Guest (politician)|Michael Guest]]''<ref name="MS"/> |March 10, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Mississippi}} [[Mississippi's 4th congressional district|MS-04]] |''[[Mike Ezell]]''<ref>{{cite web |last1=Corder |first1=Frank |title=Trump endorses Ezell's midterm re-election bid |url=https://magnoliatribune.com/2025/10/27/trump-endorses-ezells-midterm-re-election-bid/ |access-date=October 28, 2025 |work=Magnolia Tribune |date=October 27, 2025}}</ref> |March 10, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Missouri}} [[Missouri's 2nd congressional district|MO-02]] |''[[Ann Wagner]]''<ref>{{Cite web |title=President Donald Trump Endorses Congresswoman Ann Wagner for Re-Election in Missouri's Second Congressional District: "She Will Not Let You Down" |url=https://themissouritimes.com/press-release-president-donald-trump-endorses-congresswoman-ann-wagner-for-re-election-in-missouris-second-congressional-district-she-will-not-let-you-down/ |access-date=September 29, 2025 |date=2025-07-22 |language=en}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Missouri}} [[Missouri's 3rd congressional district|MO-03]] |''[[Bob Onder]]''<ref name="Votehub Tracker"/> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Missouri}} [[Missouri's 4th congressional district|MO-04]] |''[[Mark Alford]]''<ref>{{Cite web |title=Trump endorses Mark Alford for Congress |url=https://truthsocial.com/@realDonaldTrump/posts/114231344319625636 |access-date=September 29, 2025 |via=Truth Social |language=en}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Missouri}} [[Missouri's 7th congressional district|MO-07]] |''[[Eric Burlison]]''<ref name="Votehub Tracker"/> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|Missouri}} [[Missouri's 8th congressional district|MO-08]] |''[[Jason Smith (American politician)|Jason Smith]]''<ref name="Votehub Tracker"/> |August 4, 2026 |Incumbent |TBA |- |rowspan=2|{{flagicon|Montana}} [[Montana's 1st congressional district|MT-01]] |''<s>[[Ryan Zinke]]</s>'' (declined to run)<ref>{{cite web |last1=Drew |first1=Micah |title=Trump endorses Reps. Zinke, Downing for re-election |url=https://missoulacurrent.com/trump-zinke-downing/ |access-date=November 7, 2025 |work=[[Daily Montanan]] |publisher=Missoula Current |date=November 6, 2025}}</ref> |rowspan=2|June 2, 2026 |Incumbent |{{Icon|no}} Declined |- |Aaron Flint<ref name=Trump1>{{cite web |last1=Eavis |first1=Victoria |title=Trump endorses Aaron Flint in Montana's western congressional primary race |url=https://helenair.com/news/state-regional/government-politics/elections/article_badcdd88-1fef-45d5-bce7-be6b7abed695.html |website=The Independent Record |access-date=3 March 2026 |language=en |date=3 March 2026}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Montana}} [[Montana's 2nd congressional district|MT-02]] |''[[Troy Downing]]''<ref name="BBB">{{cite news |last=Nitzberg |first=Alex |title= Trump endorses House Republican who failed to vote on the One Big Beautiful Bill Act |url= https://www.foxnews.com/politics/trump-endorses-house-republican-who-failed-vote-one-big-beautiful-bill-act.amp |work=[[Fox News]] |access-date=29 September 2025 |date=May 26, 2025}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nebraska}} [[Nebraska's 1st congressional district|NE-01]] |''[[Mike Flood (politician)|Mike Flood]]''<ref name="Nebraska">{{cite web |last1=Fischer |first1=Mark |title=President Donald Trump endorses two Nebraska congressmen for re-election |url=https://www.klkntv.com/president-donald-trump-endorses-two-nebraska-congressmen-for-re-election/ |access-date=November 6, 2025 |work=[[KLKN]] |date=November 3, 2025}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nebraska}} [[Nebraska's 2nd congressional district|NE-02]] |Brinker Harding<ref name="ATEAPRIL">{{cite web |last1=Whedon |first1=Ben |title=Trump makes string of endorsements in key House races |url=https://justthenews.com/politics-policy/trump-makes-string-endorsements-key-house-races |website=Just The News |access-date=2026-04-14 |language=en |date=April 14, 2026}}</ref> |May 12, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Nebraska}} [[Nebraska's 3rd congressional district|NE-03]] |''[[Adrian Smith (politician)|Adrian Smith]]''<ref name="Nebraska"/> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Nevada}} [[Nevada's 1st congressional district|NV-01]] |[[Carrie A. Buck|Carrie Buck]]<ref name ="Racker">{{cite web |last1=Racker |first1=Mini |title=Trump endorses GOP candidates in 2 swingy Nevada House seats |url=https://thenevadaindependent.com/article/trump-endorses-gop-candidates-in-2-swingy-nevada-house-seats |website=[[The Nevada Independent]] |date=April 14, 2026 |access-date=April 14, 2026}}</ref> |June 9, 2026 |Challenger |{{Icon|aa}} Won primary |- |rowspan=2|{{flagicon|Nevada}} [[Nevada's 2nd congressional district|NV-02]] |''<s>[[Mark Amodei]]</s>'' (withdrew)<ref>{{cite web |last1=Torres-Cortez |first1=Ricardo |title=Trump endorses re-election bids from Lombardo, Amodei |url=https://www.reviewjournal.com/news/politics-and-government/nevada/trump-endorses-re-election-bids-from-lombardo-amodei-3533963/ |access-date=November 7, 2025 |work=[[Las Vegas Review-Journal]] |date=November 6, 2025}}</ref> |rowspan=2|June 9, 2026 |Incumbent |{{Icon|no}} Withdrew |- |David Flippo<ref>{{cite web|last=Racker|first=Mini|date=May 29, 2026|title=President Trump endorses in Nevada's most competitive GOP primary race |url=https://thenevadaindependent.com/article/president-trump-endorses-in-nevadas-most-competitive-gop-primary-race|website=Nevada Independent|access-date=May 29, 2026}}</ref> |Open Seat |{{Icon|aa}} Won primary |- |{{flagicon|Nevada}} [[Nevada's 3rd congressional district|NV-03]] |[[Martin O'Donnell]]<ref name ="Racker"/> |June 9, 2026 |Challenger |{{Icon|aa}} Won primary |- |{{flagicon|New Jersey}} [[New Jersey's 2nd congressional district|NJ-02]] |''[[Jeff Van Drew]]''<ref>{{cite web|url=https://www.washingtonexaminer.com/news/campaigns/congressional/4460164/trump-endorsement-tracker-gop-2026-election-primaries/|title=Trump endorsement tracker: Here's who the president has picked in GOP midterm election primaries|last=Carter|first=Claire|date=February 17, 2026|access-date=March 31, 2026|website=[[Washington Examiner]]}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New Jersey}} [[New Jersey's 4th congressional district|NJ-04]] |''[[Chris Smith (New Jersey politician)|Chris Smith]]''<ref>{{cite news |last1=Fox |first1=Joey |title=Brick Republican will challenge Chris Smith in NJ-4 GOP primary |url=https://newjerseyglobe.com/congress/brick-republican-will-challenge-chris-smith-in-nj-4-gop-primary/ |website=New Jersey Globe |access-date=January 21, 2026 |date=January 20, 2026}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New Jersey}} [[New Jersey's 7th congressional district|NJ-07]] |''[[Thomas Kean Jr.]]''<ref>{{cite news |last=Fox |first=Joey |title= In a first, Trump gives Tom Kean Jr. his 'complete and total endorsement' |url= https://newjerseyglobe.com/congress/in-a-first-trump-gives-tom-kean-jr-his-complete-and-total-endorsement/ |work=New Jersey Globe |access-date=29 September 2025 |date=May 8, 2025}}</ref> |June 2, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New Mexico}} [[New Mexico's 2nd congressional district|NM-02]] |Greg Cunningham<ref>{{Cite web |title=President Trump Endorses Greg Cunningham for Congress |url=https://www.nrcc.org/2026/04/14/%F0%9F%9A%A8-president-trump-endorses-greg-cunningham-for-congress/ |access-date=April 14, 2026 |publisher=[[NRCC]] |date=14 April 2025 |language=en}}</ref> |June 2, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 1st congressional district|NY-01]] |''[[Nick LaLota]]''<ref name="Votehub Tracker"/> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 2nd congressional district|NY-02]] |''[[Andrew Garbarino]]<ref name="BBB" />'' |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 3rd congressional district|NY-03]] |[[Mike LiPetri]]<ref name="the-downballot.com"/> |June 23, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 17th congressional district|NY-17]] |''[[Mike Lawler]]''<ref>{{Cite web |last=McKenna |first=Chris |title=Trump sends signal on NY governor race by backing Lawler for House re-election instead |url=https://www.lohud.com/story/news/politics/2025/05/07/ny-17-president-trump-backs-mike-lawler-for-house-reelection-not-for-ny-governor/83491582007/ |access-date=September 29, 2025 |website=The Journal News |language=en-US}}</ref> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 19th congressional district|NY-19]] |[[Peter Oberacker]]<ref>{{cite web |title=Trump, Johnson Endorse Oberacker for Congress |url=https://www.allotsego.com/trump-johnson-endorse-oberacker-for-congress/ |website=All Otsego |access-date=5 February 2026 |language=en |date=5 February 2026}}</ref> |June 23, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 21st congressional district|NY-21]] |Anthony Constantino<ref>{{cite news |last=Parsnow |first=Luke |title=Trump endorses Anthony Constantino in NY-21 race, bucking GOP party elders' choice |url=https://spectrumlocalnews.com/nys/central-ny/politics/2026/04/21/trump-backs-anthony-constantino-in-ny-21-race |access-date=April 21, 2026 |date=April 21, 2026}}</ref> |June 23, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 23rd congressional district|NY-23]] |''[[Nick Langworthy]]''<ref>{{#invoke:cite|news||last= Larson |first= Greg |date=October 25, 2025 |title= Langworthy Receives Trump's Endorsement for Re-Election in 2026 |url= https://www.chautauquatoday.com/news/details.cfm?id=365824 |access-date= January 24, 2026 |work=Chautauqua Today}}</ref> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|New York}} [[New York's 24th congressional district|NY-24]] |''[[Claudia Tenney]]''<ref name="Votehub Tracker"/> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 1st congressional district|NC-01]] |[[Laurie Buckhout]]<ref>{{Cite web |title=President Trump Endorses Laurie Buckhout for Congress |url=https://www.nrcc.org/2026/03/12/%F0%9F%9A%A8-president-trump-endorses-laurie-buckhout-for-congress/ |access-date=March 12, 2026 |publisher=[[NRCC]] |date=12 March 2026 |language=en}}</ref> |March 3, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 3rd congressional district|NC-03]] |''[[Greg Murphy (politician)|Greg Murphy]]''<ref name="Votehub Tracker">{{cite web|url=https://votehub.com/2026-endorsements|title=2026 Endorsement Tracker|access-date=January 27, 2026}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 5th congressional district|NC-05]] |''[[Virginia Foxx]]''<ref>{{Cite web |last=Smith |first=Rebecca |title=Rep. Virginia Foxx announces run for reelection in 2026 in North Carolina's 5th Congressional District |url=https://www.wxii12.com/article/rep-virginia-foxx-announces-run-reelection-2026/64736881 |access-date=October 1, 2025 |website=The Journal News |date=11 May 2025 |language=en-US}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 6th congressional district|NC-06]] |''[[Addison McDowell]]''<ref name="Votehub Tracker"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 7th congressional district|NC-07]] |''[[David Rouzer]]''<ref name="Votehub Tracker"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 8th congressional district|NC-08]] |''[[Mark Harris (North Carolina politician)|Mark Harris]]''<ref>{{Cite web |title=Trump's Endorsement of Mark Harris: Potential Boost for Energy Stocks |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-mark-harris-potential-boost-for-energy-stocks |access-date=October 4, 2025 |website=TipRanks |language=en-US}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 9th congressional district|NC-09]] |''[[Richard Hudson (American politician)|Richard Hudson]]''<ref name="Votehub Tracker"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 10th congressional district|NC-10]] |''[[Pat Harrigan]]''<ref>{{Cite web |title= Trump's Endorsement of Pat Harrigan: Potential Boost for Energy and Industrial Stocks |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-pat-harrigan-potential-boost-for-energy-and-industrial-stocks#google_vignette |access-date=October 4, 2025 |website=TipRanks |language=en-US}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 11th congressional district|NC-11]] |''[[Chuck Edwards]]''<ref>{{cite web |last1=Hensley |first1=Dean |title=Republican Congressman Chuck Edwards gets President Trump's endorsement on social media |url=https://wlos.com/news/local/republican-congressman-chuck-edwards-gets-trumps-endorsement-on-social-media-president-donald-j-truth-x-henderson-buncombe-polk-rutherford-county-democratic-opposition-twitter |access-date=November 30, 2025 |work=[[WLOS]] |date=October 27, 2025}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 13th congressional district|NC-13]] |''[[Brad Knott]]''<ref name="Votehub Tracker"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[North Carolina's 14th congressional district|NC-14]] |''[[Tim Moore (North Carolina politician)|Tim Moore]]''<ref name="Votehub Tracker"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Dakota}} [[North Dakota's at-large congressional district|ND-AL]] |''[[Julie Fedorchak]]''<ref>{{Cite web |last=Port |first=Rob |date=2025-08-19 |title=Port: Trump drops early endorsement of Fedorchak's reelection |url=https://www.inforum.com/opinion/columns/port-trump-drops-early-endorsement-of-fedorchaks-reelection |access-date=2025-08-22 |website=InForum |language=en}}</ref> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 1st congressional district|OH-01]] |Eric Conroy<ref name="Votehub Tracker"/> |May 5, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 2nd congressional district|OH-02]] |''[[David Taylor (Ohio politician)|David Taylor]]''<ref>{{Cite web |title=Trump endorses David Taylor for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/115057224448370906 |access-date=October 5, 2025 |via=Truth Social |language=en}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 4th congressional district|OH-04]] |''[[Jim Jordan]]''<ref name="JTN">{{cite web |last1=Whedon |first1=Ben |title=Trump endorses 27 Republicans for reelection 2026 |url=https://justthenews.com/politics-policy/trump-endorses-27-republicans-reelection-2026 |website=Just The News |date=November 3, 2025 |access-date=December 29, 2025}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 5th congressional district|OH-05]] |''[[Bob Latta]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 6th congressional district|OH-06]] |''[[Michael Rulli]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 7th congressional district|OH-07]] |''[[Max Miller (politician)|Max Miller]]''<ref>{{Cite web |title=Trump's Endorsement of Max Miller: Potential Boost for Energy and Defense Stocks |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-max-miller-potential-boost-for-energy-and-defense-stocks |access-date=October 5, 2025 |website=TipRanks |language=en-US}}</ref> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 8th congressional district|OH-08]] |''[[Warren Davidson]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 9th congressional district|OH-09]] |[[Derek Merrin]]<ref>{{cite web |last1=Jackson |first1=Tom |title=Trump endorses Merrin for Congress |url=https://sanduskyregister.com/news/996166/trump-endorses-merrin-for-congress/ |website=Sandusky Register |access-date=May 23, 2026 |language=en |date=May 22, 2026}}</ref> |May 5, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 10th congressional district|OH-10]] |''[[Mike Turner]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 12th congressional district|OH-12]] |''[[Troy Balderson]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 14th congressional district|OH-14]] |''[[David Joyce (politician)|David Joyce]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Ohio}} [[Ohio's 15th congressional district|OH-15]] |''[[Mike Carey (politician)|Mike Carey]]''<ref name="JTN"/> |May 5, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |rowspan=3|{{flagicon|Oklahoma}} [[Oklahoma's 1st congressional district|OK-01]] |<s>''[[Kevin Hern]]''</s> (withdrew to run for the [[2026 United States Senate election in Oklahoma|senate]])<ref>{{Cite web |title=Trump's Endorsement of Kevin Hern: Potential Impacts on Key U.S. Stocks and Sectors |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-kevin-hern-potential-impacts-on-key-u-s-stocks-and-sectors |access-date=October 5, 2025 |website=TipRanks |language=en-US}}</ref> |rowspan=3|June 16, 2026 |Incumbent |{{Icon|no}} Withdrew |- |<s>''Jackson Lahmeyer''</s> (endorsement rescinded)<ref>{{cite web|url=https://www.oklahoman.com/story/news/politics/elections/2026/05/07/oklahoma-elections-2026-trump-endorses-jackson-lahmeyer-ok-house-district-1/89983141007/|title=Donald Trump endorses Jackson Lahmeyer in key Oklahoma primary race|last=Gladden|first=Alex|date=May 7, 2026|access-date=May 7, 2026|website=[[The Oklahoman]]}}</ref> |Open Seat |{{Icon|no}} Withdrew before Runoff |- |Mark Tedford<ref>{{cite web |last1=Wagner |first1=Bayliss |title=Trump Rescinds Endorsement of Right-Wing Pastor After Texting Scandal |url=https://www.nytimes.com/2026/06/17/us/politics/trump-lahmeyer-house-texting-scandal-tedford.html |website=The New York Times |access-date=June 19, 2026 |date=June 17, 2026}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Oklahoma}} [[Oklahoma's 2nd congressional district|OK-02]] |''[[Josh Brecheen]]''<ref name="Votehub Tracker"/> |June 16, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Oklahoma}} [[Oklahoma's 3rd congressional district|OK-03]] |[[Frank Lucas (Oklahoma politician)|''Frank Lucas'']]<ref>{{Cite web |title=Trump endorses Frank Lucas for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/115057223325978530 |access-date=October 25, 2025 |via=Truth Social |language=en}}</ref> |June 16, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Oklahoma}} [[Oklahoma's 4th congressional district|OK-04]] |''[[Tom Cole]]''<ref name="Votehub Tracker"/> |June 16, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Oklahoma}} [[Oklahoma's 5th congressional district|OK-05]] |''[[Stephanie Bice]]''<ref>{{Cite web |title=Trump endorses Stephanie Bice for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/114876634662612316|access-date=October 25, 2025 |via=Truth Social |language=en}}</ref> |June 16, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Oregon}} [[Oregon's 2nd congressional district|OR-02]] |''[[Cliff Bentz]]''<ref>{{cite web |last1=Thorson |first1=Berit |title=Oregon Rep. Bentz prepares for reelection campaign |url=https://eastoregonian.com/2025/11/25/oregon-rep-bentz-prepares-for-reelection-campaign/ |website=East Oregonian |access-date=26 November 2025 |language=en |date=26 November 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 7th congressional district|PA-07]] |''[[Ryan Mackenzie]]''<ref name="TrumpBresnahan"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 8th congressional district|PA-08]] |''[[Rob Bresnahan]]''<ref name="TrumpBresnahan">{{cite news |last1=Delfino |first1=Jessica |title=Bresnahan endorsed by Trump after Social Security 'concerns' letter |url=https://www.thetimes-tribune.com/2025/05/09/bresnahan-endorsed-by-trump-after-concerns-letter/ |access-date=November 2, 2025 |work=[[The Scranton Times-Tribune]] |date=May 9, 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 9th congressional district|PA-09]] |''[[Dan Meuser]]''<ref name="Pennsylvania">{{cite news |last1=Roth |first1=Fallon |title=A year ahead of 2026 midterms, Trump backs Scott Perry, Rob Bresnahan, and other Pennsylvania Republicans |url=https://www.inquirer.com/politics/pennsylvania/trump-pennsylvania-2026-midterm-endorsements-20251103.html |access-date=December 31, 2025 |work=The Philadelphia Inquirer |date=November 3, 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 10th congressional district|PA-10]] |''[[Scott Perry]]''<ref>{{cite news |last1=Walters |first1=Mark |title=Could we see Janelle Stelson take on Rep. Scott Perry again in 2026? |url=https://www.yorkdispatch.com/story/news/politics/elections/2025/03/28/could-we-see-janelle-stelson-take-on-rep-scott-perry-in-2026/82707531007/ |access-date=November 2, 2025 |work=[[The York Dispatch]] |date=March 28, 2025}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 11th congressional district|PA-11]] |''[[Lloyd Smucker]]''<ref name="Pennsylvania"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 13th congressional district|PA-13]] |''[[John Joyce (American politician)|John Joyce]]''<ref>{{Cite web |title=Joyce announces bid for re-election |url=https://www.lewistownsentinel.com/news/local-news/2025/09/joyce-announces-bid-for-re-election/ |access-date=2025-12-29 |website=lewistownsentinel.com |language=en-US}}</ref> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 14th congressional district|PA-14]] |''[[Guy Reschenthaler]]''<ref name="BBB" /> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 15th congressional district|PA-15]] |''[[Glenn Thompson (politician)|Glenn Thompson]]''<ref name="Pennsylvania"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Pennsylvania}} [[Pennsylvania's 16th congressional district|PA-16]] |''[[Mike Kelly (Pennsylvania politician)|Mike Kelly]]''<ref name="Pennsylvania"/> |May 19, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[South Carolina's 2nd congressional district|SC-02]] |''[[Joe Wilson]]''<ref name="Votehub Tracker"/> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[South Carolina's 3rd congressional district|SC-03]] |''[[Sheri Biggs]]''<ref>{{Cite web |title=Trump's Endorsement of Sheri Biggs: Potential Impacts on Key U.S. Stocks and Sectors |url= https://www.tipranks.com/news/catalyst/trumps-endorsement-of-sheri-biggs-potential-boost-for-energy-and-defense-stocks-2#google_vignette |access-date=December 29, 2025 |website=TipRanks |language=en-US}}</ref> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[South Carolina's 4th congressional district|SC-04]] |''[[William Timmons]]''<ref name="Votehub Tracker"/> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Carolina}} [[South Carolina's 7th congressional district|SC-07]] |''[[Russell Fry]]''<ref name="Votehub Tracker"/> |June 9, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|South Dakota}} [[South Dakota's at-large congressional district|SD-AL]] |[[Marty Jackley]]<ref>{{Cite web |last=Dakota War College |date=March 12, 2026 |title=Trump endorses Marty Jackley for Congress |url=https://dakotawarcollege.com/trump-endorses-marty-jackley-for-congress/ |access-date=March 12, 2026 |website=Dakota War College}}</ref> |June 2, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[Tennessee's 1st congressional district|TN-01]] |''[[Diana Harshbarger]]''<ref>{{cite web |last1=Lee |first1=Murry |title=Trump endorses Diana Harshbarger for re-election |url=https://www.wjhl.com/news/your-local-election-hq/trump-endorses-diana-harshbarger-for-re-election/ |access-date=December 18, 2025 |work=[[WJHL]] |date=November 4, 2025}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[Tennessee's 2nd congressional district|TN-02]] |''[[Tim Burchett]]''<ref>{{cite web |last1=Craik |first1=David |title=Trump's Endorsement of Burchett: A Potential Boost for Energy Stocks and ETFs |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-burchett-a-potential-boost-for-energy-stocks-and-etfs |website=TipRanks Premium |date=November 3, 2025 |access-date=November 3, 2025}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[Tennessee's 3rd congressional district|TN-03]] |''[[Chuck Fleischmann]]''<ref>{{#invoke:cite|news |last1=Gilliland |first1=Lew |title=Trump endorses Fleischmann for reelection in 2026 |url=https://www.timesfreepress.com/news/2025/nov/03/trump-endorses-fleischmann-for-reelection-in-2026/ |access-date=November 7, 2025 |work=[[Chattanooga Times Free Press]] |date=November 3, 2025}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[Tennessee's 4th congressional district|TN-04]] |''[[Scott DesJarlais]]''<ref>{{cite web |author=<!-- not stated --> |title=Trump's Endorsement of DesJarlais: Potential Boost for Industrial and Energy ETFs |url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-desjarlais-potential-boost-for-industrial-and-energy-etfs |website=TipRanks |date=November 3, 2025 |access-date=April 6, 2025}}</ref> |August 6, 2026 |Incumbent |TBA |- |{{flagicon|Tennessee}} [[Tennessee's 5th congressional district|TN-05]] |''[[Andy Ogles]]''<ref>{{cite web |last1=Rau |first1=Nate |title=President Trump endorses TN Rep. Andy Ogles |url=https://www.axios.com/local/nashville/2025/10/27/president-trump-endorses-rep-andy-ogles |website=Axios |access-date=6 January 2026 |language=en |date=27 October 2025}}</ref> |August 6, 2026 |Incumbent |TBA |- |{{flagicon|Tennessee}} [[Tennessee's 7th congressional district|TN-07]] |''[[Matt Van Epps]]''<ref>{{cite web |last1= |first1=|title=Trump endorses Matt Van Epps for re-election |url=https://trumpstruth.org/statuses/34261 |access-date=December 18, 2025 |date=December 18, 2025}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Tennessee}} [[Tennessee's 8th congressional district|TN-08]] |''[[David Kustoff]]''<ref>{{cite web |author=<!-- not stated --> |date=November 4, 2025|title=David Kustoff announces re-election campaign for U.S. Congress |url=https://www.actionnews5.com/2025/11/04/david-kustoff-announces-re-election-campaign-us-congress/# |location=[[Memphis, Tennessee]] |publisher=[[WMC-TV]] |access-date=April 6, 2026}}</ref> |August 6, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 1st congressional district|TX-01]] |''[[Nathaniel Moran]]''<ref>{{cite web |last1=Garcia |first1=Michael |title=Trump endorses East Texas Rep. Moran for reelection in 2026 |url=https://www.ketk.com/news/your-local-election-hq/trump-endorses-east-texas-rep-moran-for-reelection-in-2026/ |publisher=KETK |access-date=December 5, 2025}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 3rd congressional district|TX-03]] |''[[Keith Self]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 4th congressional district|TX-04]] |''[[Pat Fallon]]''<ref name="Holds Out">{{cite web|url=https://www.washingtonexaminer.com/news/campaigns/congressional/4364124/trump-holds-out-key-texas-senate-endorsement/|title=Trump holds out on giving Cornyn key Texas Senate endorsement|last=Green|first=Lauren|date=December 30, 2025|access-date=January 3, 2026|website=[[Washington Examiner]]}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 5th congressional district|TX-05]] |''[[Lance Gooden]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 6th congressional district|TX-06]] |''[[Jake Ellzey]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 8th congressional district|TX-08]] |Jessica Steinmann<ref name="2/17 Downballot">{{cite web|url=https://www.the-downballot.com/p/morning-digest-2-live-crews-luther|title=Morning Digest: 2 Live Crew's Luther Campbell challenges Democratic congresswoman in South Florida|last1=Singer|last2=Nir|first1=Jeff|first2=David|date=February 17, 2026|access-date=February 17, 2026}}</ref> |March 3, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 9th congressional district|TX-09]] |[[Alex Mealer]]<ref name="2/17 Downballot"/> |May 26, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 10th congressional district|TX-10]] |Chris Gober<ref>{{cite web |last1=McCaig |first1=Mark |title=Trump's Latest Endorsements Include Three Texas Candidates |url=https://www.thetexasvoice.com/trumps-latest-endorsements-include-three-texas-candidates/ |website=The Texas Voice |access-date=January 3, 2026 |date=December 19, 2025}}</ref> |March 3, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 11th congressional district|TX-11]] |''[[August Pfluger]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 12th congressional district|TX-12]] |''[[Craig Goldman]]''<ref name="Holds Out"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 13th congressional district|TX-13]] |''[[Ronny Jackson]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 14th congressional district|TX-14]] |''[[Randy Weber]]''<ref name="Holds Out"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 15th congressional district|TX-15]] |''[[Monica De La Cruz]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 17th congressional district|TX-17]] |''[[Pete Sessions]]''<ref name="Holds Out"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 19th congressional district|TX-19]] |''<s>[[Jodey Arrington]]</s>'' (withdrew)<ref>{{cite web |last1=Kinnard |first1=Meg |last2=Sweedler |first2=Maya |title=Tracking the retirement announcements of members of Congress |url=https://apnews.com/article/house-retirements-midterms-f638d386d4d1342e3a9671642dd883f6 |publisher=Associated Press |access-date=December 9, 2025 |language=en |date=December 8, 2025}}</ref> |March 3, 2026 |Incumbent |{{Icon|no}} Withdrew |- |{{flagicon|Texas}} [[Texas's 21st congressional district|TX-21]] |[[Mark Teixeira]]<ref>{{cite web|url=https://www.nj.com/yankees/2026/02/trump-hails-ex-yankees-slugger-as-total-winner-in-endoresment-for-the-house.html|title=Trump hails ex-Yankees slugger as 'TOTAL WINNER' in endoresment for the House|last=Gómez|first=Manny|date=February 5, 2026|access-date=February 5, 2026|website=[[NJ.com]]}}</ref> |March 3, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Texas}} [[Texas's 22nd congressional district|TX-22]] |''<s>[[Troy Nehls]]</s>'' (declined to run)<ref name="JTN"/> |rowspan=2|March 3, 2026 |Incumbent |{{Icon|no}} Declined |- |Trever Nehls<ref>{{cite web|url=https://thehill.com/homenews/campaign/5634396-nehls-retiring-twin-brother/|title=Trump endorses retiring Troy Nehls's identical twin for his House seat|last=Suter|first=Tara|date=December 4, 2025|access-date=December 4, 2025|website=[[The Hill (newspaper)|The Hill]]}}</ref> |Open Seat |{{Icon|aa}} Won Primary |- |rowspan=2|{{flagicon|Texas}} [[Texas's 23rd congressional district|TX-23]] |<s>''[[Tony Gonzales]]''</s> (withdrew before Runoff, resigned)<ref>{{cite web |last1=Esquivel |first1=Erika |title=Trump endorses Congressman Tony Gonzales for re-election in Texas |url=https://kfoxtv.com/news/local/trump-endorses-congressman-tony-gonzales-for-re-election-in-texas |access-date=December 18, 2025 |work=[[KFOX-TV]] |date=December 18, 2025}}</ref> |March 3, 2026 |Incumbent |{{Icon|no}} Resigned |- |[[Brandon Herrera]]<ref>{{cite web |last1=Davis |first1=Sarah |title=Trump backs Herrera for Texas House seat after Gonzales drops bid |url=https://thehill.com/homenews/house/5780189-trump-endorses-brandon-herrera/ |work=[[The Hill (newspaper)|The Hill]] |date=March 11, 2026}}</ref> |May 26, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 24th congressional district|TX-24]] |''[[Beth Van Duyne]]''<ref name="Holds Out"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 25th congressional district|TX-25]] |''[[Roger Williams (Texas politician)|Roger Williams]]''<ref name="Holds Out"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 26th congressional district|TX-26]] |''[[Brandon Gill]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 27th congressional district|TX-27]] |''[[Michael Cloud]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 28th congressional district|TX-28]] |Tano Tijerina<ref>{{cite web |last1=Coronell Uribe |first1=Raquel |title= Trump endorses candidate running against a lawmaker he pardoned |url= https://www.nbcnews.com/politics/2026-election/trump-endorses-tano-tijerina-running-against-democrat-henry-cuellar-rcna252686 |publisher=[[NBC News]] |access-date=January 6, 2026 |date=January 6, 2026}}</ref> |March 3, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 31st congressional district|TX-31]] |''[[John Carter (Texas politician)|John Carter]]''<ref>{{cite web |last1=Bahr |first1=Joseph |title=John Carter gets President Trump's endorsement|url=https://kdhnews.com/centerforpolitics/john-carter-gets-president-trump-s-endorsement/article_58701a72-5905-42e4-8a0d-b6494ba3ac9a.html/ |access-date=December 5, 2025 |work= KHD New |date=December 5, 2025}}</ref> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 32nd congressional district|TX-32]] |Jace Yarbrough<ref name="the-downballot.com"/> |March 3, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 34th congressional district|TX-34]] |Eric Flores<ref name=":0" /> |March 3, 2026 |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 35th congressional district|TX-35]] |Carlos De La Cruz<ref name="2/17 Downballot"/> |May 26, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 36th congressional district|TX-36]] |''[[Brian Babin]]''<ref name="JTN"/> |March 3, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[Texas's 38th congressional district|TX-38]] |Jon Bonck<ref name="2/17 Downballot"/> |May 26, 2026 |Open Seat |{{Icon|aa}} Won Primary |- |{{flagicon|Utah}} [[Utah's 2nd congressional district|UT-02]] |''[[Blake Moore]]''<ref name="Votehub Tracker"/> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Utah}} [[Utah's 3rd congressional district|UT-03]] |''[[Celeste Maloy]]''<ref name="Votehub Tracker"/> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Utah}} [[Utah's 4th congressional district|UT-04]] |''[[Mike Kennedy]]''<ref name="Votehub Tracker"/> |June 23, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Virginia}} [[Virginia's 1st congressional district|VA-01]] |''[[Rob Wittman]]''<ref name="Virginia2026">{{Cite web |last=Carter |first=Claire |title=Trump endorsement tracker: Here's who the president has picked in GOP midterm election primaries |url=https://www.washingtonexaminer.com/news/campaigns/congressional/4460164/trump-endorsement-tracker-gop-2026-election-primaries/ |website=Washington Examiner |date=February 17, 2026 |access-date=February 20, 2026}}</ref> |June 16, 2026 |Incumbent |TBA |- |{{flagicon|Virginia}} [[Virginia's 2nd congressional district|VA-02]] |''[[Jen Kiggans]]''<ref>{{cite news |last1=Delfino |first1=Jessica |title=Bresnahan endorsed by Trump after Social Security 'concerns' letter |url=https://www.thetimes-tribune.com/2025/05/09/bresnahan-endorsed-by-trump-after-concerns-letter/ |access-date=January 21, 2026 |work=[[The Scranton Times-Tribune]] |date=May 9, 2025}}</ref> |June 16, 2026 |Incumbent |TBA |- |{{flagicon|Virginia}} [[Virginia's 5th congressional district|VA-05]] |''[[John McGuire (Virginia politician)|John McGuire]]''<ref>{{Cite web |title=Trump endorses John McGuire for House of Representatives|url= https://truthsocial.com/@realDonaldTrump/posts/114231401205332854 |access-date=January 22, 2025 |via=Truth Social |language=en}}</ref> |June 16, 2026 |Incumbent |TBA |- |{{flagicon|Virginia}} [[Virginia's 6th congressional district|VA-06]] |''[[Ben Cline]]''<ref name="Virginia2026"/> |June 16, 2026 |Incumbent |TBA |- |{{flagicon|Virginia}} [[Virginia's 9th congressional district|VA-09]] |''[[Morgan Griffith]]''<ref name="Virginia2026"/> |June 16, 2026 |Incumbent |TBA |- |{{flagicon|Washington}} [[Washington's 3rd congressional district|WA-03]] |[[John Braun]]<ref>{{Cite web |title=President Trump Endorses John Braun for Congress |date=April 14, 2026 |url=https://www.nrcc.org/2026/04/14/%F0%9F%9A%A8-president-trump-endorses-john-braun-for-congress/ |work=[[NRCC]]}}</ref> |August 4, 2026 |Challenger |TBA |- |{{flagicon|Washington}} [[Washington's 4th congressional district|WA-04]] |Amanda McKinney<ref>{{Cite web |last=Nir |first=David |last2=Singer |first2=Jeff |title=Morning Digest: Here's how Republican Rep. Doug LaMalfa's seat will be filled |url=https://www.the-downballot.com/p/morning-digest-heres-how-republican |access-date=2026-01-07 |website=The Downballot |language=en}}</ref> |August 4, 2026 |Open Seat |TBA |- |{{flagicon|Washington}} [[Washington's 5th congressional district|WA-05]] |''[[Michael Baumgartner]]''<ref>{{Cite web|url=https://www.tipranks.com/news/catalyst/trumps-endorsement-of-baumgartner-potential-stock-market-impacts|title=Trump's Endorsement of Baumgartner: Potential Stock Market Impacts - TipRanks.com|website=TipRanks Financial}}</ref> |August 4, 2026 |Incumbent |TBA |- |{{flagicon|West Virginia}} [[West Virginia's 1st congressional district|WV-01]] |''[[Carol Miller (politician)|Carol Miller]]''<ref>{{Cite web |last=Leith |first=Micah |date=2025-08-19 |title=Miller officially launches re-election campaign, touts Trump endorsement |url=https://woay.com/miller-officially-launches-re-election-campaign-touts-trump-endorsement/,%20https://woay.com/miller-officially-launches-re-election-campaign-touts-trump-endorsement/ |access-date=2025-08-22 |language=en-US}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|West Virginia}} [[West Virginia's 2nd congressional district|WV-02]] |''[[Riley Moore]]''<ref>{{Cite web |title=Congressman Riley Moore files for re-election in West Virginia |url=https://www.wtrf.com/top-stories/congressman-riley-moore-files-for-re-election-in-west-virginia/ |access-date=2026-01-22 |language=en-US}}</ref> |May 12, 2026 |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Wisconsin}} [[Wisconsin's 1st congressional district|WI-01]] |''[[Bryan Steil]]''<ref name="BBB" /> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Wisconsin}} [[Wisconsin's 3rd congressional district|WI-03]] |''[[Derrick Van Orden]]''<ref>{{cite web |title=Van Orden campaign: President Donald Trump endorses Congressman Van Orden for re-election |url=https://www.wispolitics.com/2025/van-orden-campaign-president-donald-trump-endorses-congressman-van-orden-for-re-election/ |website=WisPolitics |access-date=17 November 2025 |date=29 April 2025}}</ref> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Wisconsin}} [[Wisconsin's 5th congressional district|WI-05]] |''[[Scott Fitzgerald (politician)|Scott Fitzgerald]]''<ref name="Votehub Tracker"/> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Wisconsin}} [[Wisconsin's 6th congressional district|WI-06]] |''[[Glenn Grothman]]''<ref name="Votehub Tracker"/> |August 11, 2026 |Incumbent |TBA |- |{{flagicon|Wisconsin}} [[Wisconsin's 7th congressional district|WI-07]] |Michael Alfonso<ref>{{cite web |last1=Styf |first1=Jon |title=Trump endorses Tiffany for Wisconsin governor, Alfonso for Congress |url=https://www.thecentersquare.com/wisconsin/article_4f76c73f-aae1-4fd9-b595-21af41afd309.html |website=The Center Square |access-date=28 January 2026 |language=en |date=27 January 2026}}</ref> |August 11, 2026 |Open Seat |TBA |- |{{flagicon|Wisconsin}} [[Wisconsin's 8th congressional district|WI-08]] |''[[Tony Wied]]''<ref>{{cite web |title=Wied campaign: President Donald J. Trump gives Congressman Tony Wied his "Complete and Total Endorsement” for re-election in 2026 |url=https://www.wispolitics.com/2025/wied-campaign-president-donald-j-trump-gives-congressman-tony-wied-his-complete-and-total-endorsement-for-re-election-in-2026/ |website=WisPolitics |access-date=17 November 2025 |date=3 November 2025}}</ref> |August 11, 2026 |Incumbent |TBA |} ==== 2026 state legislative special elections ==== {| class="wikitable sortable" !State !Candidate !Primary date !Seat status !Result |- |{{flagicon|Florida}} [[2026 Florida House of Representatives election|FL HD-87]] |Jon Maples<ref>{{cite web |last=Washington |first=Wayne |url=https://www.palmbeachpost.com/story/news/politics/elections/2026/01/14/maples-gregory-emerge-from-primaries-to-square-off-district-87-race/88177845007/?gnt-cfr=1&gca-cat=p&gca-uir=false&gca-epti=z116438p117250c117250e009450v116438&gca-ft=242&gca-ds=sophi&gnt-djm=1 |title=Maples, Gregory win District 87 primaries, move to special election |date=January 14, 2026 |access-date=March 4, 2026 |website=[[The Palm Beach Post]]}}</ref> |January 14, 2026 |Open |{{Icon|no}} Lost general |} ==== 2026 state legislative elections ==== {| class="wikitable sortable" !State !Candidate !Office !Seat status !Primary result |- |{{flagicon|Florida}} [[2026 Florida Senate election|Florida]] |[[Rick Roth]]<ref name="Virginia2026"/> |Florida State Senator |Open Seat |TBD |- |{{flagicon|Florida}} [[2026 Florida Senate election|Florida]] |''[[Ileana Garcia]]''<ref name="Virginia2026"/> |Florida State Senator |Incumbent |TBD |- |{{flagicon|Florida}} [[2026 Florida Senate election|Florida]] |''[[Ana Maria Rodriguez (politician)|Ana Maria Rodriguez]]''<ref name="Virginia2026"/> |Florida State Senator |Incumbent |TBD |- |{{flagicon|Florida}} [[2026 Florida House of Representatives election|Florida]] |''[[Meg Weinberger]]''<ref>{{cite web |last=Kopylov |first=Frank |title=Trump endorses 'MAGA Meg' Weinberger for reelection to Florida House |url=https://flvoicenews.com/trump-endorses-maga-meg-weinberger-for-reelection-to-florida-house/|work=Florida's Voice |date=May 6, 2026}}</ref> |Florida State Representative |Incumbent |TBD |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Trevor De Vries<ref name=TrumpHill>{{cite web |last=Vakil|first=Caroline|title=Trump announces slate of Indiana endorsements ahead of May primary |url=https://thehill.com/homenews/campaign/5820541-trump-endorses-indiana-republicans/|work=[[The Hill (newspaper)|The Hill]] |date=April 7, 2026}}</ref> |Indiana State Senator |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Brian Schmutzler<ref name ="TrumpHill"/> |Indiana State Senator |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Tyler Johnson (politician)|Tyler Johnson]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Liz Brown (politician)|Liz Brown]]''<ref name=ISSE>{{cite web |last=Davis |first=Tom |title=Trump endorses Sen. Liz Brown, other Republicans who supported Indiana redistricting |url=https://indianacapitalchronicle.com/briefs/trump-endorses-sen-liz-brown-other-republicans-who-supported-indiana-redistricting/|work=[[States Newsroom|Indiana Capital Chronicle]] |date=March 24, 2026}}</ref> |Indiana State Senator |Incumbent |TBD |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Blake Fiechter<ref>{{cite web |last=Rowley |first=Dick |title=President Trump endorses Bluffton councilman for Indiana State Senate race |url=https://www.wane.com/news/your-local-election-hq/president-trump-endorses-bluffton-councilman-for-indiana-state-senate-race/|work=[[WANE-TV]] |date=January 22, 2026}}</ref> |Indiana State Senator |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Tracey Powell<ref>{{cite web |last=Knox|first=Brady|title=Trump backs challenger to Indiana state senator who voted against redistricting|url=https://www.washingtonexaminer.com/news/campaigns/state/4434813/trump-endorsement-indiana-state-senator-redistricting/|work=[[Washington Examiner]] |date=January 26, 2026}}</ref> |Indiana State Senator |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Ron Alting]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Paula Copenhaver <ref name=ISS_Hill>{{cite web |last=Vakil |first=Caroline |title=Trump endorses challengers to Indiana Republicans who opposed redistricting|url=https://thehill.com/homenews/campaign/5710240-indiana-gop-senators-redistricting-trump/|work=[[The Hill (newspaper)|The Hill]] |date=January 28, 2026}}</ref> |Indiana State Senator |Challenger |TBD |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Mike Gaskill]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Scott Alexander (Indiana politician)|Scott Alexander]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Jeff Raatz]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |Brenda Wilson<ref>{{cite web |last=Hanson |first=Austin |title=President Trump endorses candidate running against Indiana senator who voted no on redistricting|url=https://fox59.com/news/president-trump-endorses-candidate-running-against-indiana-senator-who-voted-no-on-redistricting/|work=[[WXIN|Fox 59]] |date=January 27, 2026}}</ref> |Indiana State Senator |Challenger |{{Icon|no}} Lost primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |[[Jeff Ellington]]<ref name=ISS_Hill/> |Indiana State Senator |Open seat |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |[[Michelle Davis (politician)|Michelle Davis]]<ref>{{cite web |last=Davies |first=Tom |title=Trump posts endorsement of Republican challenger to Indiana redistricting foe |url=https://indianacapitalchronicle.com/briefs/trump-posts-endorsement-of-republican-challenger-to-indiana-redistricting-foe/|work=[[States Newsroom|Indiana Capital Chronicle]] |date=January 26, 2026}}</ref> |Indiana State Senator |Challenger |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Randy Maxwell]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Chris Garten]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Gary Byrne (politician)|Gary Byrne]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Daryl Schmitt]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana Senate election|Indiana]] |''[[Jim Tomes]]''<ref name=ISSE/> |Indiana State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Jim Pressel]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Craig Snow]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Jeff Thompson (Indiana politician)|Jeff Thompson]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Heath VanNatter]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Beau Baird]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Bruce Borders]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|no}} Lost primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Bob Heaton]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Tony Isa]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Ben Smaltz]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Indiana}} [[2026 Indiana House of Representatives election|Indiana]] |''[[Martin Carbaugh]]''<ref name ="TrumpHill"/> |Indiana State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|North Carolina}} [[2026 North Carolina Senate election|North Carolina]] |''[[Phil Berger (politician)|Phil Berger]]''<ref>{{Cite web |last=Battaglia |first=Danielle |date=December 15, 2025 |title=Trump makes endorsement in Berger-Page race. How much does it matter? |url=https://www.newsobserver.com/news/politics-government/article313622632.html |access-date=December 16, 2025 |website=[[Raleigh News & Observer]]}}</ref> |North Carolina State Senator |Incumbent |{{Icon|no}} Lost primary |- |{{flagicon|Tennessee}} [[2026 Tennessee House of Representatives election|Tennessee]] |Kenny Cody<ref>{{Cite web |last=Wakerell-Cruz |first=Roberto |date=May 21, 2026 |title=BREAKING: President Trump endorses Human Events' Kenny Cody for Tennessee House — 'MAGA Warrior' |url=https://thepostmillennial.com/breaking-president-trump-endorses-human-events-kenny-cody-for-tennessee-house-maga-warrior |access-date=May 24, 2026 |website=[[The Post Millennial]]}}</ref> |Tennessee State Representative |Open Seat |TBA |- |{{flagicon|Texas}} [[2026 Texas Senate election|Texas]] |''[[Kevin Sparks]]''<ref>{{Cite web |last=Cuviello |first=Michael |title=Texas Senator Kevin Sparks launches reelection bid with Trump endorsement |url=https://www.amarillo.com/story/news/2025/08/21/sen-kevin-sparks-seeks-reelection-to-texas-senate-with-trump-backing/85745327007/ |access-date=2025-08-22 |website=Amarillo Globe-News |language=en-US}}</ref> |Texas State Senator |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas Senate election|Texas]] |[[David Cook (Texas politician)|David Cook]]<ref>{{Cite web |last=Witherspoon |first=Tommy |date=2025-08-19 |title=Hewitt attorney Jon Ker drops out of state senate race after Trump endorses opponent |url=https://www.kwtx.com/2025/08/19/hewitt-attorney-jon-ker-drops-out-state-senate-race-after-trump-endorses-opponent/ |access-date=2025-08-22 |publisher=KWTX |language=en}}</ref> |Texas State Senator |Open seat |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Brian Harrison (Texas politician)|Brian Harrison]]''<ref>{{Cite web |date=2025-09-09 |title=Harrison announces for reelection to Texas house with "complete and total endorsement" from President Trump |url=https://www.waxahachiesun.com/news/local/harrison-announces-for-reelection-to-texas-house-with-complete-and-total-endorsement-from-president-trump/article_0b82c501-61bd-4c79-b719-f895cc0c092c.html |access-date=2025-09-10 |website=Waxahachie Sun |language=en}}</ref> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Angelia Orr]]''<ref name="Virginia2026"/> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Jeff Leach (politician)|Jeff Leach]]''<ref>{{Cite web|date=July 24, 2025 |title=Jeff Leach launches re-election campaign for Texas House seat|url= https://princetonherald.com/2025/07/24/jeff-leach-launches-re-election-campaign-for-texas-house-seat/ |access-date= 2026-02-12}}</ref> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Tom Craddick]]''<ref>{{cite web|last=Price|first=Tamlyn|url=https://www.firstalert7.com/2025/07/10/president-trump-endorses-state-rep-tom-craddick-re-election-texas-house/|title=President Trump endorses State Rep. Tom Craddick for re-election to Texas House|publisher=FirstAlert7 CBS|date=July 10, 2025|access-date=August 21, 2025}}</ref> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Dustin Burrows]]''<ref>{{Cite web |date=2025-07-10 |title=U.S. President Trump endorses Texas House Speaker Rep. Burrows of Lubbock for re-election |url=https://www.lubbockonline.com/story/news/politics/government/2025/07/10/u-s-president-donald-trump-backs-texas-house-speaker-rep-dustin-burrows-of-lubbock-for-re-election/84527740007/ |access-date=2025-11-22 |website=Lubbock Avalanche-Journal |language=en}}</ref> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |- |{{flagicon|Texas}} [[2026 Texas House of Representatives election|Texas]] |''[[Candy Noble]]''<ref name="Virginia2026"/> |Texas State Representative |Incumbent |{{Icon|aa}} Won Primary |} ==International== ===Argentina=== ==== 2027 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Argentina}} [[President of Argentina]] |[[Javier Milei]]<BR>([[La Libertad Avanza]])<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/115254544745193117 |access-date=2025-09-23 |via=Truth Social}}</ref> |[[2027 Argentine general election|TBA]] |} ===Armenia=== ==== 2026 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Armenia}} [[Prime Minister of Armenia]] |[[Nikol Pashinyan]]<br>([[Civil Contract (Armenia)|Civil Contract]])<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/116648998520896910 |access-date=2026-05-28 |via=Truth Social}}</ref> |'''{{Icon|aa}}''' '''[[2026 Armenian parliamentary election|Elected prime minister]]''' |} ===Brazil=== ==== 2022 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Brazil}} [[President of Brazil]] |[[Jair Bolsonaro]]<br>([[Liberal Party (Brazil, 2006)|Liberal Party]])<ref>{{Cite web|url=https://www.businessinsider.com/trump-endorses-bolsonaro-brazilian-president-9-criminal-charges-recommended-2021-10|title=Trump lauds 'great friend' Jair Bolsonaro, as the Brazilian president has 9 criminal charges recommended against him|website=[[Business Insider]]}}</ref><ref>{{Cite web| last1=Oshin | first1=Olafimihan |url=https://thehill.com/policy/international/americas/578626-trump-issues-endorsement-for-bolsonaro/|title=Trump issues endorsement for Bolsonaro| work=The Hill |date=26 October 2021}}</ref> |{{Icon|no}} Lost [[2022 Brazilian general election|election]] |} === Colombia === ==== 2026 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Colombia}} [[President of Colombia]] |[[Abelardo de la Espriella]]<br>([[Defenders of the Homeland (Colombia)|Defenders of the Homeland]])<ref>{{Cite news |last=Correal |first=Annie |date=2026-06-03 |title=Trump Endorses Abelardo De La Espriella, Right-Wing Presidential Candidate in Colombia |url=https://www.nytimes.com/2026/06/02/world/americas/trump-endorses-colombia-de-la-espriella.html |access-date=2026-06-03 |work=The New York Times |language=en-US |issn=0362-4331}}</ref> |'''{{Icon|aa}}''' '''[[2026 Colombian presidential election|Elected President]]''' |} === Honduras === ==== 2025 ==== {| class="wikitable" |+ !Position !Candidate !Results |- |{{Flag icon|Honduras}} [[President of Honduras]] |[[Nasry Asfura]]<br>([[National Party of Honduras|National Party]])<ref>{{Cite web |last=Andrada |first=Trisha Kae |date=2025-11-29 |title=Trump Says He Will Pardon Honduran Ex-President Juan Orlando Hernández and Backs Tito Asfura Ahead of Election |url=https://www.ibtimes.co.uk/trump-says-he-will-pardon-honduran-ex-president-juan-orlando-hernandez-backs-tito-asfura-ahead-1758898 |access-date=2025-12-02 |website=International Business Times UK |language=en}}</ref> |'''{{Icon|aa}}''' '''[[2025 Honduran general election|Elected president]]''' |} ===Hungary=== ==== 2022 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Hungary}} [[Prime Minister of Hungary]] |[[Viktor Orbán]]<BR>([[Fidesz]])<ref>{{Cite web|url=https://www.politico.com/news/2022/01/03/trump-endorses-viktor-orban-hungary-526383|title=Trump endorses Hungary's Orbán for reelection|website=[[Politico]]| date=January 3, 2022 }}</ref><ref>{{Cite news|url=https://www.nytimes.com/2022/01/03/us/politics/trump-endorses-viktor-orban-hungary.html|title=Trump Endorses Viktor Orban, Hungary's Far-Right Prime Minister|newspaper=The New York Times|date=3 January 2022|last1=Goldmacher|first1=Shane}}</ref> |'''{{Icon|aa}}''' [[Fidesz]] won the [[2022 Hungarian general election|election]] with a [[supermajority]] of seats and '''Orbán remained Prime Minister''' |} ==== 2026 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Hungary}} [[Prime Minister of Hungary]] |[[Viktor Orbán]]<BR>([[Fidesz]]) <ref>{{Cite web |title=Europe's right-wing elite (and Netanyahu) endorse Orbán in Hungary election race|url=https://www.politico.eu/article/europe-right-wing-elite-netanyahu-endorse-orban-hungary-election/|website=Politico Europe |access-date=2026-01-23|language=en}}</ref> |{{Icon|no}} Lost [[2026 Hungarian parliamentary election|election]] |} ===Iraq=== ==== 2026 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Iraq}} [[Prime Minister of Iraq]] |[[Ali al-Zaidi]]<br>([[Coordination Framework]])<ref>{{Cite web|url=https://www.wsj.com/world/middle-east/the-u-s-tied-his-bank-to-iran-proxies-now-hes-trumps-choice-to-run-iraq-ea6117ae?eafs_enabled=false|title=The U.S. Tied His Bank to Iran Proxies. Now He’s Trump’s Choice to Run Iraq.|website=[[Wall Street Journal]]|date=May 10, 2026}}</ref> |'''{{Icon|aa}}''' The office is selected by Iraq's parliamentary process rather than by direct popular election following the aftermath of the [[2025 Iraqi parliamentary election]]. |} ===Israel=== ==== 2013 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Israel}} [[Prime Minister of Israel]] |[[Benjamin Netanyahu]]<br>([[Likud Yisrael Beiteinu]])<ref>{{Cite web|url=https://www.timesofisrael.com/donald-trump-endorses-netanyahu-for-pm/|title=Donald Trump endorses Netanyahu for PM|website=[[The Times of Israel]]|date=January 15, 2013 }}</ref> |'''{{Icon|aa}}''' [[Likud Yisrael Beiteinu]] won a plurality of seats in the [[2013 Israeli legislative election|election]] and formed a [[coalition government]] alongside other parties, with '''Netanyahu chosen as Prime Minister''' |} ==== 2019 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Israel}} [[Prime Minister of Israel]] |[[Benjamin Netanyahu]]<br>([[Likud]])<ref>{{Cite news|url=https://www.haaretz.com/israel-news/elections/trump-endorses-netanyahu-campaign-billboard-featuring-himself-1.6910695|archive-url=https://web.archive.org/web/20190205154900/https://www.haaretz.com/israel-news/elections/trump-endorses-netanyahu-campaign-billboard-featuring-himself-1.6910695|url-status=dead|archive-date=February 5, 2019|title=Trump Takes to Instagram to Endorse Netanyahu Campaign Billboard – Featuring Himself|newspaper=Haaretz}}</ref> |{{Icon|aa}}/{{Icon|no}} [[Likud]] won a [[plurality (voting)|plurality]] of seats, but no party obtained an outright [[majority]], resulting in an [[hung Parliament]] and in the calling of a [[snap election]], which was held in [[September 2019 Israeli legislative election|September 2019]]; Netanyahu remained in office as [[caretaker government|caretaker]] Prime Minister |} === Italy === ==== 2022 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Italy}} [[Prime Minister of Italy]] | [[Giuseppe Conte]]<br>([[Five Star Movement]])<ref>{{Cite web|url=https://www.ilmessaggero.it/politica/trump_conte_elezioni_endorsement_repubblicani_cinque_stelle-6911423.html|title=Donald Trump tifa per Conte: "Come sta andando il mio ragazzo Giuseppe". Ecco cosa c'è dietro l'endorsement|date=September 6, 2022 }}</ref><ref>{{cite news|url=https://www.repubblica.it/esteri/2022/09/05/news/trump_conte_salvini_elezioni_italia-364337667/|title=A cena con Trump, che ignora Salvini e fa un endorsement per Conte: 'Come sta andando il mio Giuseppe?'|work=La Repubblica|language=it|date=5 September 2022|access-date=26 September 2022}}</ref> |'''{{Icon|no}}''' The Five Star Movement won a minority of seats in the [[2022 Italian general election|election]] and became part of the [[parliamentary opposition|opposition]] |} ===Japan=== ==== 2026 ==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Japan}} [[Prime Minister of Japan]] |[[Sanae Takaichi]]<BR>([[Liberal Democratic Party (Japan)|Liberal Democratic Party]])<ref>{{Cite web |title=Donald J. Trump (@realDonaldTrump) |url=https://truthsocial.com/@realDonaldTrump/posts/116019257556623305 |access-date=2026-02-05 |via=Truth Social}}</ref> |'''{{icon|aa}} [[2026 Japanese general election|Elected]]''' |} ===Poland=== ====2025==== {| class="wikitable sortable" !Position !Candidate !Results |- |{{flagicon|Poland}} [[President of Poland]] | [[Karol Nawrocki]]<br>([[Law and Justice]])<ref>{{cite news|url=https://www.reuters.com/business/media-telecom/trump-meets-polish-nationalist-candidate-ahead-presidential-election-2025-05-02/|title= Trump meets Polish nationalist candidate ahead of presidential election |date=2025-05-02|access-date=2025-05-02|work=[[Reuters]]}}</ref> | '''{{icon|aa}} [[2025 Polish presidential election|Elected]]''' |} ===UK=== ==== 2016 ==== {| class="wikitable sortable" !Referendum !Option !Results |- |{{flagicon|United Kingdom}} [[2016 United Kingdom European Union membership referendum|United Kingdom European Union membership referendum]] |[[Brexit|"Leave the European Union"]]<ref>{{Cite web|url=https://www.theguardian.com/us-news/2016/may/05/donald-trump-brexit-uk-leaving-european-union|title=Donald Trump backs Brexit, saying UK would be 'better off' without EU|website=[[The Guardian]]|date=5 May 2016}}</ref> |'''{{Icon|aa}}''' '''Won''' |} ==== 2019 ==== {| class="wikitable" |+ !Election !Position !Candidate !Result |- |{{Flag icon|United Kingdom}} [[2019 Conservative Party leadership election]] |[[Leader of the Conservative Party (UK)|Leader of the Conservative Party]] |[[Boris Johnson]]<ref>{{Cite news |last=Rawlinson |first=Kevin |date=2019-07-19 |title=Donald Trump offers his backing to Boris Johnson to become PM |url=https://www.theguardian.com/us-news/2019/jul/19/donald-trump-offers-his-backing-to-boris-johnson-to-become-pm |access-date=2025-12-02 |work=The Guardian |language=en-GB |issn=0261-3077}}</ref> |'''{{icon|aa}} [[2019 Conservative Party leadership election|Elected]]''' |- |{{Flag icon|United Kingdom}} [[2019 United Kingdom general election]] |[[Prime Minister of the United Kingdom]] |Boris Johnson<ref>{{Cite AV media |url=https://www.the-independent.com/tv/news/trump-endorses-boris-election-politics-interference-b2635534.html |title=Donald Trump endorses Boris Johnson in 2019 general election, resurfaced clip shows |date=2024-10-25 |language=en |access-date=2025-12-02 |via=The Independent}}</ref> ([[Conservative Party (UK)|Conservative Party]]) |'''{{icon|aa}} [[2019 United Kingdom general election|Elected]] with an outright majority''' |} ==Ukaboni== {{Reflist|30em}} ==Mazu ghakulongosora== {{Notelist}} ==Malo ghakuwalo== * {{Ballotpedia|Endorsements_by_Donald_Trump|Vyakukhozgera vya Donald Trump}} *[https://www.donaldjtrump.com/news Chigaŵa cha nkhani pa DonaldJTrump.com] {{Donald Trump}} {{DEFAULTSORT:Vyakukhozgera vya Donald Trump}} [[Category:Uteŵeti wa ndyali wa Donald Trump]] [[Category:Vyakukhozgera vya ndyali|Trump, Donald]] [[Category:Maŵanaŵaniro gha ndyali gha ŵapurezidenti ŵa United States|Trump, Donald]] [[Category:Trumpism]] 5fxvrbd11alomw0zkkwlwn4cik9vyz4 Mbumba ya Trump 0 47778 116808 2026-07-16T10:29:59Z Tumbuka Arch 6863 Created page with "{{Short description|Banja la ku America la bizinesi na ndale}} {{pp-vandalism|small=yes}} {{Use American English|date=August 2023}} {{Use mdy dates|date=August 2023}} {{Infobox family | name = Banja la Trump | image = {{multiple image |align=center |direction=horizontal |border=infobox |image1=Frederick Trump (cropped).jpg |width1=92 |caption1=[[Frederick Trump]] |image2=Fred Trump in the 1980s (cropped2) (b).jpg |width2=92 |caption2=[[Fred Trump]] |image3=Donald Trump i..." 116808 wikitext text/x-wiki {{Short description|Banja la ku America la bizinesi na ndale}} {{pp-vandalism|small=yes}} {{Use American English|date=August 2023}} {{Use mdy dates|date=August 2023}} {{Infobox family | name = Banja la Trump | image = {{multiple image |align=center |direction=horizontal |border=infobox |image1=Frederick Trump (cropped).jpg |width1=92 |caption1=[[Frederick Trump]] |image2=Fred Trump in the 1980s (cropped2) (b).jpg |width2=92 |caption2=[[Fred Trump]] |image3=Donald Trump in the Oval Office, June 2017 (cropped) (b).jpg |width3=96 |caption3=[[Donald Trump]] | total_width = }} | founder = Frederick Trump | origin = [[Kallstadt]], Germany | region = [[Msumba wa New York]] na [[Palm Beach, Florida]], U.S. | members = {{Collapsible list|[[Frederick Trump|Frederick]]|[[Fred Trump|Fred]]|[[Maryanne Trump Barry|Maryanne]]|[[Fred Trump Jr.|Fred Jr.]]|[[Fred Trump III|Fred III]]|[[Mary L. Trump|Mary]]|[[Donald Trump|Donald]]|[[Donald Trump Jr.|Donald Jr.]]|[[Kai Trump|Kai]]|[[Ivanka Trump|Ivanka]]|[[Eric Trump|Eric]]|[[Tiffany Trump|Tiffany]]|[[Barron Trump|Barron]]|[[Robert Trump|Robert]]|[[John G. Trump|John]]}} | connectedmembers = [[Elizabeth Christ Trump]][[Mary Anne MacLeod Trump|Mary Anne Trump]][[John W. Walter]][[Melania Trump]][[Jared Kushner]][[Lara Trump]][[Michael Boulos]] | otherfamilies = [[Fuko la MacLeod]][[Banja la Kushner]] | current head = Donald Trump | titles = {{Collapsible list | [[Pulezidenti wa United States]] ([[Ulongozgi wakwamba wa Donald Trump|wa 45]] & [[Ulongozgi wachiŵiri wa Donald Trump|wa 47]]) | [[Mama wakwamba wa United States]] | [[Ofesi ya White House|Mulongozgi wa Ofesi ya Economic Initiatives and Entrepreneurship]] | [[Mulongozgi wa Pulezidenti wa United States#Mndandanda wa alangizi ŵa pulezidenti|Mulongozgi wa Pulezidenti]] | [[Mweruzgi wa boma la United States]] (wa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey|Khoti la Chigaŵa la New Jersey]] na [[Khoti la United States la Apilo la Dera Lachitatu|Khoti la Apilo la Dera Lachitatu]]) | [[Udindo wa mweruzgi mukuru|Mweruzgi mukuru]] wa Khoti la United States la Apilo la Dera Lachitatu | [[Republican National Committee|Wachiŵiri Mulongozgi wa Republican National Committee]] }} }} {{Donald Trump series|expanded=Life and business}} '''Banja la Trump''' ni banja lakumanyikwa chomene la ku America ilo lili na usambazi ukuru. Munthu uyo wakumanyikwa chomene mu banja ili ni [[Donald Trump]], mutu wa banja, uyo wakaŵa pulezidenti wa 45 ndipo sono ni pulezidenti wa 47 wa [[Pulezidenti wa United States]] (2017–2021, 2025–sono). Ŵa Trump mba [[Ŵa Germany|Ŵa German]].{{cite web |url=https://www.scottishroots.com/people/donald.php |title=Scottish Roots – Donald Trump |website=Scottish Roots |access-date=January 29, 2018 |archive-url=https://web.archive.org/web/20180126235639/https://www.scottishroots.com/people/donald.php |archive-date=January 26, 2018 |url-status=live }} Mbakuchita bizinesi, vyakusanguluska, ndale, na vya malo na nyumba. Ŵanthu ŵanyake ŵakumanyikwa mu banja ili ni awiske ŵa Donald Trump [[Fred Trump]], na sekuru ŵake [[Frederick Trump]]. == Banja lapafupi == === Mutu wa banja === ==== Donald Trump ==== {{Main|Donald Trump}} === Wives === ==== Ivana Trump ==== {{Main|Ivana Trump}} Ivana Marie Trump ({{née| Zelníčková}}), muwoli wakwamba wa Donald Trump, wakababikira pa February 20, 1949, mu [[Zlín]], [[Czechoslovakia]] (sono [[Czech Republic]]). Wakaŵa wakuwoneska mafashoni na mwanakazi wa bizinesi uyo wakaŵa nzika ya ku United States mu 1988.{{cite news|agency=Associated Press|url=https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&pg=5053,3823442|title=Ivana Trump becomes U.S. citizen|date=May 27, 1988|access-date=August 21, 2015|archive-url=https://web.archive.org/web/20190418083356/https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&sjid=YmYFAAAAIBAJ&pg=5053,3823442|archive-date=April 18, 2019|url-status=live}} Ŵakaŵa pa nthengwa kufuma mu 1977 m'paka 1990.{{cite news|url=https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|title=Trumps Get Divorce; Next, Who Gets What?|work=[[The New York Times]]|date=December 12, 1990|access-date=March 5, 2023|archive-date=May 8, 2019|archive-url=https://web.archive.org/web/20190508224859/https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|url-status=live}} Ivana wakafwa mu 2022 chifukwa cha [[Vikuluzikulu vya kuvulala chifukwa cha kugongana mwankhongono|vikuluzikulu vya kuvulala chifukwa cha kugongana mwankhongono]] pa [[Chifuŵa|chigaŵa cha thupi]] pamanyuma pakuti wawa pa masitepu pa nyumba yake ku [[Upper East Side]] ya [[Manhattan]].{{cite web|author=Adela Suliman and Shayna Jacobs|url=https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/|date=July 16, 2022|title=Ivana Trump died of 'blunt impact injuries,' medical examiner says|newspaper=Washington Post}}{{cite web |title=Ivana Trump died of blunt force injuries to her torso, medical examiner says |url=https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |newspaper=[[The Guardian]] |access-date=July 16, 2022 |last=Vargas |first=Ramon Antonio |language=en |date=July 15, 2022 |archive-date=July 15, 2022 |archive-url=https://web.archive.org/web/20220715234735/https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |url-status=live }} Ivana wakaŵa mukuru wa [[Trump Organization]] kwa vyaka vinkhondi na viŵiri,{{cite web|last=McCauley|first=Dana|date=April 29, 2016|title=This is the woman who made Donald Trump a household name|url=https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|access-date=August 25, 2020|website=NewsComAu|language=en|archive-date=November 4, 2018|archive-url=https://web.archive.org/web/20181104211237/https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|url-status=live}} kusazgapo udindo wa vice president mukuru wa kapangidwe ka mukati mwa nyumba.{{Cite magazine|last=Shnayerson|first=Michael|author-link=Michael Shnayerson|date=January 2, 1988|title=Inside Ivana's Role in Donald Trump's Empire|url=https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|access-date=August 23, 2020|magazine=[[Vanity Fair (magazine)|Vanity Fair]]|archive-date=December 29, 2020|archive-url=https://web.archive.org/web/20201229002006/https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|url-status=live}}{{cite news|last=Bender|first=Marylin|date=August 7, 1983|title=The Empire and Ego of Donald Trump|url=https://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|access-date=October 31, 2016|work=The New York Times|archive-date=June 16, 2016|archive-url=https://web.archive.org/web/20160616130053/http://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|url-status=live}} Wakalongozga kapangidwe ka mukati mwa [[Trump Tower]] uko kukamanyikwa na malibwe gha pink marble. Ivana wakimikika kuŵa CEO{{cite web|last=Burleigh|first=Nina|author-link=Nina Burleigh|date=February 1, 2017|title=What Melania, Ivanka, Ivana, Marla tell us about the role of women in Trump's world|url=https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|access-date=August 24, 2020|website=Newsweek|language=en|archive-date=January 10, 2021|archive-url=https://web.archive.org/web/20210110022312/https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|url-status=live}}{{cite web|last=Ellison|first=Sarah|author-link=Sarah Ellison|title=IVANKA'S APPRENTICE {{!}} Vanity Fair {{!}} February 2017|url=https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|access-date=January 12, 2021|website=Vanity Fair {{!}} The Complete Archive|language=en-US|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114052422/https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|url-status=live}} kweniso pulezidenti wa [[Trump Castle Hotel and Casino]] mu [[Atlantic City, New Jersey|Atlantic City]], ndipo pamanyuma wakaŵa mulembi mukuru wa [[Plaza Hotel]] mu Manhattan.{{cite web |url=https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |title=10 Juiciest Secrets of the Plaza Hotel – Donald Trump's Ownership of the Plaza |publisher=Townandcountrymag.com |date=June 7, 2019 |access-date=July 14, 2022 |archive-date=December 22, 2021 |archive-url=https://web.archive.org/web/20211222171036/https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |url-status=live }} ==== Marla Maples ==== {{main|Marla Maples}} Marla Ann Maples, muwoli wachiŵiri wa Donald Trump, wakababikira pa October 27, 1963, mu [[Cohutta, Georgia]], U.S. Wakaŵa mulembi wa mafilimu, munthu wakumanyikwa pa kanema wa pa TV, wakuwoneska mafashoni, wakwimba sumu ndiposo wakulongozga mapulogalamu. Ŵakanjira nthengwa mu December 1993, myezi yiŵiri pamanyuma pa kubabika kwa mwana wawo mwanakazi [[Tiffany Trump|Tiffany]], ŵakapatukana mu 1997 ndipo ŵakaparana mu 1999.{{cite magazine|url=http://www.vanityfair.com/magazine/2015/07/donald-ivana-trump-divorce-prenup-marie-brenner |title=After The Gold Rush|date=September 1, 1990|access-date=September 1, 2016|magazine=Vanity Fair}}{{cite news|url=https://www.nytimes.com/1993/12/21/nyregion/vows-it-s-a-wedding-blitz-for-trump-and-maples.html|title=It's a Wedding Blitz for Trump and Maples|date=December 21, 1993|newspaper=[[The New York Times]]}} ==== Melania Trump ==== {{Main|Melania Trump}} Melania Trump ({{née|Knauss}}), muwoli wachitatu ndiposo wa sono wa Donald Trump, wakababikira pa April 26, 1970, mu [[Novo Mesto]], [[Socialist Federal Republic of Yugoslavia|Yugoslavia]] (sono [[Slovenia]]). Wakaŵa na ntchito yitali ya kuwoneska mafashoni ndipo ni mama wakwamba wachiŵiri wa ku United States wakubabikira ku charu chinyake, wakwamba wakaŵa [[Louisa Adams]].{{cite news |url=http://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |title=The Model American |newspaper=[[The New Yorker]] |date=May 9, 2016 |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20180726045037/https://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |archive-date=July 26, 2018 |url-status=live }} Ŵakanjira nthengwa mu 2005. Melania wakaŵa nzika ya ku United States pa July 28, 2006.{{Cite news |date=2018-08-09 |title=Melania Trump's Slovenian parents become US citizens |language=en-GB |work=BBC News |url=https://www.bbc.com/news/world-us-canada-45137752 |access-date=2022-07-07 |archive-date=July 7, 2022 |archive-url=https://web.archive.org/web/20220707012758/https://www.bbc.com/news/world-us-canada-45137752 |url-status=live }} Wakasamukira nyengo yeneyiyo yayi ku [[White House]] apo mfumu wake yikazgoka pulezidenti, kweni wakakhala ku [[Trump Tower]] pamoza na mwana wawo [[Barron Trump]] m'pakaumaliro wa chaka cha masambiro cha 2016–2017.{{cite news |url=https://www.nytimes.com/2016/11/21/us/politics/melania-trump-barron-trump-donald-trump-new-york-white-house.html |title=Melania and Barron Trump Won't Immediately Move to White House |newspaper=The New York Times |date=November 20, 2016 |access-date=November 21, 2016 |first=Maggie |last=Haberman |author-link=Maggie Haberman |archive-url=https://web.archive.org/web/20161124083943/http://www.nytimes.com/2016/11/21/us/politics/melania-trump-barron-trump-donald-trump-new-york-white-house.html?_r=0 |archive-date=November 24, 2016 |url-status=live }} Melania na mwana wake ŵakasamukira ku White House pa June 11, 2017. === Ŵana === {{See also|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump]]|l1=Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald Trump na Marla Maples|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald Trump na Marla Maples]]|l2=#Donald Trump na Marla Maples|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Melania Trump|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Melania Trump]]|l3=#Donald na Melania Trump}} Trump wali na ŵana ŵankhondi kufuma ku nthengwa zitatu: [[Donald Trump Jr.|Don{{spaces}}Jr.]], [[Ivanka Trump|Ivanka]], na [[Eric Trump]] na [[Ivana Trump]]; [[Tiffany Trump]] na [[Marla Maples]]; kweniso [[Barron Trump|Barron]] na [[Melania Trump]]. ==== Nthengwa yakwamba ==== {{Main|Donald Trump Jr.|Ivanka Trump|Eric Trump}} Donald Jr., Ivanka, na Eric mbaŵana ŵatatu ŵalara chomene ŵa Trump, kufuma ku nthengwa yake yakwamba na [[Ivana Trump]].{{cite news |url=https://www.nbcnews.com/politics/ivana-trump-ex-wife-donald-trump-dead-73-rcna38310 |title=Ivana Trump, Donald Trump's first wife, dead at 73 |date=July 14, 2022 |work=NBC News |first=Dareh |last=Gregorian |access-date=July 15, 2022 |archive-date=July 21, 2022 |archive-url=https://web.archive.org/web/20220721051437/https://www.nbcnews.com/politics/ivana-trump-ex-wife-donald-trump-dead-73-rcna38310 |url-status=live }} Pambere visola vindachitike, waliyose wa ŵabali aŵa wakaŵa na udindo wa vice president mukuru pa [[Trump Organization]]. Pa nyengo ya kampeni, ŵakimilira awiske pa mapulogalamu gha nkhani gha charu chose. Pamanyuma pakuti Trump watonda pa visola, wose ŵatatu ŵakasankhika ku [[Gulu la kusinthana kwa ulamuliro wa pulezidenti|gulu la kusinthana kwa ulamuliro wa pulezidenti]].{{cite news |url=https://edition.cnn.com/2016/07/21/politics/donald-trump-children-republican-convention/ |title=Donald Trump's kids might have saved the convention |newspaper=[[CNN]] |date=July 22, 2016 |access-date=November 12, 2016 |archive-url=https://web.archive.org/web/20180401003657/https://edition.cnn.com/2016/07/21/politics/donald-trump-children-republican-convention/ |archive-date=April 1, 2018 |url-status=live }} Pamanyuma pa kukhazikiskika mu udindo, Donald{{spaces}}Jr. na Eric ŵakapokera ulongozgi wa bizinesi ya mbumba ya malo na nyumba. Ivanka wakasamukira ku [[Washington, D.C.]], pamoza na mfumu wake [[Jared Kushner]], uyo wakimikika kuŵa [[Mulongozgi Mukuru wa Pulezidenti wa United States|mulongozgi mukuru wa White House]].{{cite news |url=https://abcnews.go.com/Politics/trumps-eldest-children-handling-white-house-transition/story?id=44897926 |title=How Trump's Eldest Children Have Been Handling the White House Transition |work=[[ABC News (United States)|ABC News]] |first1=Lauren |last1=Effron |first2=John |last2=Santucci |date=January 19, 2017 |access-date=January 20, 2017 |archive-url=https://web.archive.org/web/20170120032718/http://abcnews.go.com/Politics/trumps-eldest-children-handling-white-house-transition/story?id=44897926 |archive-date=January 20, 2017 |url-status=live }} ==== Nthengwa yachiŵiri ==== {{Main|Tiffany Trump}} Tiffany Ariana Trump (wakababika pa October 13, 1993) ni mwana yekha wa Donald Trump na [[Marla Maples]]. Mu 2016, wakachitako pachoko waka pa kampeni ya awiske chifukwa wakasambiranga [[Sociology|sociology]] na [[Urban studies|masambiro gha misumba]] pa [[Yunivesite ya Pennsylvania]].{{cite news |url=https://www.bbc.com/news/world-us-canada-37924617 |title=US election: Trump children – who is the new first family? |newspaper=[[BBC News]] |date=November 9, 2016 |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20161110002337/http://www.bbc.com/news/world-us-canada-37924617 |archive-date=November 10, 2016 |url-status=live }} Pati pajumpha kanyengo kachoko waka kufuma apo wakamalizgira masambiro ghake, wakayowoya mazgu ghakukhozgera awiske pa [[Msonkhano Wapachaka wa Republican wa 2016|Msonkhano Wapachaka wa Republican wa 2016]] apo wakaŵa na vyaka 22.{{cite news |url=http://www.vogue.com/13459828/tiffany-trump-republican-national-convention/ |title=Who Is Donald's Lesser-Known Daughter, Tiffany Trump? |newspaper=[[Vogue (magazine)|Vogue]] |date=July 20, 2016 |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20161108053933/http://www.vogue.com/13459828/tiffany-trump-republican-national-convention |archive-date=November 8, 2016 |url-status=live }} Wakapokera digiri ya [[Doctor of Jurisprudence|J.D.]] kufuma ku [[Georgetown University Law Center]] mu [[Washington, D.C.]], mu May 2020.{{cite news|last1=Chockrek|first1=Ella|title=Tiffany Trump Celebrates Her Law School Graduation in Summery Tank Top + Worn-In White Loafers|url=https://www.yahoo.com/lifestyle/tiffany-trump-celebrates-her-law-161325310.html|access-date=May 18, 2020|work=Footwear News|date=May 17, 2020|archive-url=https://web.archive.org/web/20200518072914/https://www.yahoo.com/lifestyle/tiffany-trump-celebrates-her-law-161325310.html|archive-date=May 18, 2020|url-status=live}} ==== Nthengwa yachitatu ==== {{main|Barron Trump}} [[File:Barron Trump at Donald Trump's second inauguration (2).jpg|thumb|upright=0.6|Barron Trump mu 2025]] Barron William Trump (wakababika pa March 20, 2006){{Cite web| title = Get to know Barron Trump, the president-elect's 5th child| author = Alison Fox| work = am New York| date = November 21, 2016| access-date = December 15, 2016 |url=http://www.amny.com/news/elections/barron-trump-get-to-know-donald-trump-s-fifth-child-1.12615409| archive-url = https://web.archive.org/web/20170114224701/http://www.amny.com/news/elections/barron-trump-get-to-know-donald-trump-s-fifth-child-1.12615409| archive-date = January 14, 2017| url-status = dead}} ni mwana muchoko chomene wa Trump ndiposo mwana wake yekha na [[Melania Trump]]. Mu May 2006, Barron waka[[Ubapatizo|batizika]] ku tchalitchi la [[Tchalitchi la Episcopal (United States)|Episcopal]] la [[Bethesda-by-the-Sea]] ku Palm Beach, Florida.{{cite news|url=https://www.washingtonpost.com/news/acts-of-faith/wp/2017/05/25/melania-trump-is-catholic-she-confirms-after-vatican-visit/|title=Melania Trump is Catholic, she confirms after Vatican visit|last=Bailey|first=Sarah Pulliam|date=May 25, 2017|newspaper=[[The Washington Post]]|language=en|access-date=May 26, 2017|quote=He and the first lady were married in 2005 in an Episcopal church in Palm Beach, Fla., where their son Barron Trump was later baptized. |archive-url=https://web.archive.org/web/20190527080424/https://www.washingtonpost.com/news/acts-of-faith/wp/2017/05/25/melania-trump-is-catholic-she-confirms-after-vatican-visit/|archive-date=May 27, 2019|url-status=live}}{{cite web|url=http://www.palmbeachpost.com/news/national-govt--politics/melania-trump-mother-day-interview-unconditional-love/C0t4D61mTaT9DJjqnidnYN/|title=Melania Trump Mother's Day interview: 'It's unconditional love'|last=Murphy|first=Stephanie|date=May 9, 2017|work=[[Palm Beach Daily News]]|language=en|access-date=May 26, 2017|quote=Donald and Melania Trump leave The Episcopal Church of Bethesda-by-the-Sea after the baptism of 8-month-old Barron William Trump on December 8, 2006.|archive-url=https://web.archive.org/web/20170517222450/http://www.palmbeachpost.com/news/national-govt--politics/melania-trump-mother-day-interview-unconditional-love/C0t4D61mTaT9DJjqnidnYN/|archive-date=May 17, 2017|url-status=live}} Wakasambira pa [[Columbia Grammar & Preparatory School]] mu [[Manhattan]] na [[Oxbridge Academy (Florida)|Oxbridge Academy]] mu [[West Palm Beach, Florida]]. Sono wakusambira pa [[Leonard N. Stern School of Business]] ya [[Yunivesite ya New York]] mu [[Manhattan]].{{cite news |last1=Christenson |first1=Josh |title=Barron Trump loves NYU classes, is 'thriving' in college, mom Melania says |url=https://nypost.com/2024/10/08/us-news/barron-trump-loves-nyu-classes-is-thriving-in-college-mom-melania-says/ |access-date=6 December 2024 |work=New York Post |publisher=News Corp |date=8 October 2024}} Padera pa [[Chingelezi|Chingelezi]], Barron wakuyowoya makora [[Chislovenia]].{{cite news |url=https://www.bustle.com/articles/199560-does-barron-trump-speak-slovenian-the-new-first-boy-has-great-language-skills |title=Does Barron Trump Speak Slovenian? The New First Boy Has Great Language Skills |date=December 12, 2016 |website=[[Bustle (magazine)|Bustle]] |first=Noor |last=Al-Sibi |access-date=June 16, 2020 |archive-url=https://web.archive.org/web/20200701005647/https://www.bustle.com/articles/199560-does-barron-trump-speak-slovenian-the-new-first-boy-has-great-language-skills |archive-date=July 1, 2020 |url-status=live }} Trump wakaŵa munthu wambura kunjilirapo mu ndale pa nyengo ya maulamuliro gha awiske, kweni wakakopa chidwi cha vyakupharazga nkhani nangauli Melania wakayezgayezga kulekeska mwana wake kulekana na ndale. Pamanyuma pakuti nyengo yakwamba ya ulamuliro wa awiske yamara, wakasamukira ku Florida ndipo wakamalizga masambiro mu May 2024 pa [[Oxbridge Academy]] mu [[West Palm Beach]]. Trump wakachemeka kuŵa mulembi mukuru wa Florida pa [[Msonkhano Wapachaka wa Republican wa 2024]],{{cite web | last1=Demissie | first1=Hannah | last2=Ibssa | first2=Lalee | last3=Kim | first3=Soo Rin | title=Barron Trump picked to serve as a Florida delegate at Republican National Convention | website=ABC News | date=2024-05-09 | url=https://abcnews.go.com/Politics/barron-trump-picked-serve-florida-delegate-republican-national/story?id=110049809 | access-date=2025-10-18}} kweni wakakana. === Ŵazukuru === Trump wali na ŵazukuru 11. Mwana wake [[Donald Trump Jr.]] na muwoli wake wakale [[Vanessa Trump|Vanessa]] ŵali na ŵana ŵankhondi, mukuru wawo ni [[Kai Trump|Kai]]; mwana wake mwanakazi [[Ivanka Trump]] na mfumu wake [[Jared Kushner]] ŵali na ŵana ŵatatu; mwana wake [[Eric Trump]] na muwoli wake [[Lara Trump|Lara]] ŵali na ŵana ŵaŵiri;{{cite news |last=Kim |first=Leena |url=https://www.townandcountrymag.com/society/politics/a33760237/donald-trump-family-tree/ |title=Donald Trump's Family Tree: A Guide to His Parents, Children, and Siblings |work=[[Town & Country (magazine)|Town & Country]] |date=August 26, 2020 |access-date=May 7, 2022 |archive-date=May 7, 2022 |archive-url=https://web.archive.org/web/20220507213204/https://www.townandcountrymag.com/society/politics/a33760237/donald-trump-family-tree/ |url-status=live }} ndipo mwana wake mwanakazi [[Tiffany Trump]] na mfumu wake [[Michael Boulos]] ŵali na mwana yumoza.{{Cite web |title=Tiffany Trump Welcomes First Baby with Husband Michael Boulos and Reveals His Name |url=https://people.com/tiffany-trump-welcomes-first-baby-with-husband-michael-boulos-11710666 |access-date=2025-05-15 |website=People.com |language=en}} == Uthenga wa mphapu == [[File:Kallstadt Hauptstrasse.jpg|thumb|left|[[Kallstadt]], Germany, uko banja la Trump likwambira]] Kuyana na mulembi wa mbiri [[Gwenda Blair]], banja ili likafuma kwa loya wakwendakwenda zina lake Hanns Drumpf, uyo wakakhazikika mu [[Kallstadt]], msumba uchoko mu [[Electoral Palatinate]] wa [[Holy Roman Empire]], mu 1608, ndipo ŵana ŵake ŵakasintha zina la mbumba kufuma ku Drumpf kuya ku Trump pa nyengo ya [[Nkhondo ya Vyaka Makhumi Ghatatu]] (1618–1648).{{cite book | last = Blair | first = Gwenda | author-link = Gwenda Blair | title = The Trumps: Three Generations of Builders and a Presidential Candidate | publisher = Simon & Schuster | edition = 1st | date = 2001 | page = [https://archive.org/details/trumps00gwen/page/26 26] | url = https://archive.org/details/trumps00gwen/page/26 | isbn = 9780743210799 }} Zina la Trump likusangika mu mabuku gha Kallstadt kwambira m'ma 1700.Verein für Computergenealogie: [https://gedbas.genealogy.net/person/ancestors/1178251533 Vorfahren von Friederich "Fritz" Trump]. {{Webarchive|url=https://web.archive.org/web/20170803131244/https://gedbas.genealogy.net/person/ancestors/1178251533 |date=August 3, 2017 }} Mupharazgi wa nkhani Kate Connolly, wakati waluta ku Kallstadt, wakasanga mitundu yakupambanapambana ya kalembero ka zina la mbumba mu mabuku gha msumba, kusazgapo Drumb, Tromb, Tromp, Trum, Trumpff, na Dromb.{{cite news|title=Kallstadt, Germany: on the trail of 'the Donald' in the Trump ancestral home|url=https://www.theguardian.com/us-news/2016/jan/29/kallstadt-germany-on-the-trail-of-the-donald-in-the-trump-ancestral-home|author=Kate Connolly|newspaper=The Guardian|date=January 29, 2016|access-date=August 25, 2021|archive-date=January 10, 2021|archive-url=https://web.archive.org/web/20210110102934/https://www.theguardian.com/us-news/2016/jan/29/kallstadt-germany-on-the-trail-of-the-donald-in-the-trump-ancestral-home|url-status=live}} Johannes Trump, wakababikira mu msumba wapafupi wa [[Bobenheim am Berg]] mu 1789, wakaŵa mulimi wa mpheska mu Kallstadt kwambira m'ma 1830, apo malo agha ghakaŵa chigaŵa cha [[Ufumu wa Bavaria]], uko muzukuru wake [[Frederick Trump|Friedrich Trump]], sekuru ŵa Donald Trump, wakababikira mu 1869. Ŵanandi mwa mphapu zake nawo ŵakaŵa [[Ŵalimi ŵa mpheska|ŵalimi ŵa mpheska]] mu Kallstadt, yimoza mwa misumba yinandi ya chigaŵa chakumanyikwa cha kulima mpheska cha [[Palatinate (chigaŵa)|Palatinate]] (''Pfalz''). Mudumbu wa Johannes Trump, Charlotte Louisa, wakatora Johann Georg Heinz. Ŵakaŵa ŵasekuru ŵa [[Henry J. Heinz]] (1844–1919), uyo wakambiska kampani ya [[Heinz]].{{cite magazine|last=McGrane|first=Sally|url=https://www.newyorker.com/culture/culture-desk/the-ancestral-german-home-of-the-trumps|title=The Ancestral German Home of the Trumps|magazine=[[The New Yorker]]|date=April 29, 2016|access-date=May 5, 2022|archive-date=May 10, 2017|archive-url=https://web.archive.org/web/20170510152314/http://www.newyorker.com/culture/culture-desk/the-ancestral-german-home-of-the-trumps|url-status=live}} Mphapu iyi ya Chijeremani yikabiskika kwa nyengo yitali na awiske ŵa Donald Trump, [[Fred Trump]], awo ŵakakulira mu malo agho ŵanthu ŵakayowoyanga Chijeremani m'paka apo ŵakaŵa na vyaka 10;Blair, ''The Trumps'', p. 115. pamanyuma pa [[Nkhondo Yachiŵiri ya pa Charu Chose]] m'paka m'ma 1980, ŵakaphaliranga ŵanthu kuti ŵakaŵa ŵa mphapu ya ku Sweden.{{cite news |last=Rozhon |first=Tracie |date=June 26, 1999 |title=Fred C. Trump, Postwar Master Builder of Housing for Middle Class, Dies at 93 |url=https://www.nytimes.com/1999/06/26/nyregion/fred-c-trump-postwar-master-builder-of-housing-for-middle-class-dies-at-93.html |newspaper=The New York Times |access-date=March 17, 2017 |archive-url=https://web.archive.org/web/20191104041711/https://www.nytimes.com/1999/06/26/nyregion/fred-c-trump-postwar-master-builder-of-housing-for-middle-class-dies-at-93.html |archive-date=November 4, 2019 |url-status=live }} Donald Trump nayo wakawerezgapo fundo iyi mu ''The Art of the Deal'' (1987), kweni pamanyuma wakati wakunyadira mphapu yake ya Chijeremani, ndipo wakaŵa [[Grand marshal|grand marshal]] wa [[German-American Steuben Parade]] wa 1999 mu [[Msumba wa New York]]. Banja la Trump ku Germany likaŵa la [[Lutheranism|Lutheran]].The small town of Kallstadt has only one religious building, the Central Lutheran church. See [[Kallstadt]] for more information.{{cite book|title=[[The Trumps: Three Generations That Built an Empire]]|date=2000|publisher=Simon and Schuster|isbn=978-0743210799|pages=[https://archive.org/details/trumps00gwen/page/28 28–29]|author1=Gwenda Blair|author-link=Gwenda Blair}} Apapi ŵa Donald Trump ŵakasopanga ku [[First Presbyterian Church in Jamaica, Queens]], uko Trump waka[[Confirmation|khwaskika mu chisimikizgo]] mu 1959.{{cite news |last=Barron |first=James |url=https://www.nytimes.com/2016/09/06/nyregion/donald-trump-marble-collegiate-church-norman-vincent-peale.html |title=Overlooked Influences on Donald Trump: A Famous Minister and His Church |work=[[The New York Times]] |author-link=James Barron (journalist) |date=September 5, 2016 |access-date=May 8, 2022 |archive-date=October 17, 2016 |archive-url=https://web.archive.org/web/20161017124234/http://www.nytimes.com/2016/09/06/nyregion/donald-trump-marble-collegiate-church-norman-vincent-peale.html |url-status=live }} === Mndandanda === {{Tree list}} [[File:Trumpoathofoffice2025.jpg|thumb|Kufuma kumazere kuya kumalyero: [[Barron Trump]], [[Donald Trump Jr.]], [[Eric Trump]], [[Ivanka Trump]], [[Tiffany Trump]], na [[Kai Trump]] (''kumanyuma kwa Tiffany'') pa [[Kukhazikiskika kwa Donald Trump mu 2025|kukhazikiskika kwa Donald Trump mu 2025]].]] {{Tree list/final branch}} Johann Paul Trump (1727–1792), wakatora Maria Elisabetha Setzer ** Charlotte Louisa Trump (1789–1833), wakatora Johann Georg Heinz *** John Henry Heinz (1811–1891), wakasamukira ku United States mu 1840, wakatora Anna Margaretha Schmidt (1822–1899), uyo nayo wakasamukira ku United States mu 1840{{cite book |url= https://books.google.com/books?id=PxqCy0R-VzAC |title= H.J. Heinz: A Biography |first= Quentin R. |last= Skrabec |publisher= McFarland & Company |year= 2009 |isbn= 978-0-7864-4178-5 |pages= 28–29}} **** [[Henry J. Heinz|Henry John Heinz]] (1844–1919), wakambiska kampani ya [[Heinz]]{{cite book |url= https://books.google.com/books?id=PxqCy0R-VzAC |title= H.J. Heinz: A Biography |first= Quentin R. |last= Skrabec |publisher= McFarland & Company |year= 2009 |isbn= 978-0-7864-4178-5 |page= 28}} ***** Howard Heinz (1877–1941) ****** [[Jack Heinz|Henry John "Jack" Heinz II]] (1908–1987), CEO wa [[Heinz|H. J. Heinz Company]], wakatora ndipo wakaparana na Joan Diehl (1911–1999) ******* [[John Heinz|Henry John Heinz III]], [[Mubali wa Congress ya United States|Mubali wa Congress]] ndipo pamanyuma [[Mndandanda wa ŵaseneta ŵa United States kufuma ku Pennsylvania|Seneta wa United States kufuma ku Pennsylvania]] (1938–1991), wakatora [[Teresa Heinz|Teresa Simões-Ferreira]] (wakababika mu 1938), uyo pamanyuma wakatoraso [[John Kerry]] ******** [[André Heinz]] (wakababika mu 1969) ******** [[Christopher Heinz]] (wakababika mu 1973) ** {{Tree list/final branch}} Johannes Trump (1789–1835), wakatora Susanna Maria Bechtloff *** Johannes Trump Jr. (1829–1877), wakatora Katharina Kober (1836–1922){{cite book | last = Blair | first = Gwenda | author-link = Gwenda Blair | title = The Trumps: Three Generations of Builders and a Presidential Candidate | publisher = Simon & Schuster | edition = 1st | date = 2001 | page = [https://archive.org/details/trumps00gwen/page/27 27] | url = https://archive.org/details/trumps00gwen/page/27 | isbn = 9780743210799 }} **** [[Friedrich Trump]] (1869–1918), wakumeta sisi, mulembi wa malo ghakurya na mahotelo, wakasamukira ku United States mu 1885/1905, ndipo wakatora [[Elizabeth Christ Trump|Elisabeth Christ]] (1880–1966), uyo nayo wakasamukira ku United States mu 1902/1905. ***** Elizabeth (Elisabeth) Trump (1904–1961), wakatora William Otto Walter ****** William Trump Walter (1931–2020) ****** [[John Whitney Walter]] (1934–2018), wakumanyikwa kuti ni "mulembi wa mbiri ya banja la Trump", meya wa nambara 14 wa [[Flower Hill, New York]], ndipo pamanyuma wakaŵa mulembi wa mbiri ya msumba uwu,[https://www.nytimes.com/2016/08/22/us/politics/for-donald-trumps-family-an-immigrants-tale-with-2-beginnings.html For Donald Trump's Family, an Immigrant's Tale With 2 Beginnings] {{Webarchive|url=https://web.archive.org/web/20180815192005/https://www.nytimes.com/2016/08/22/us/politics/for-donald-trumps-family-an-immigrants-tale-with-2-beginnings.html |date=August 15, 2018 }}, ''The New York Times'' wakatora Joan Smith{{cite web|url=https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|title=John Walter, Flower Hill mayor and cousin of the president, dies|date=January 10, 2018|publisher=The Island Now|access-date=November 23, 2020|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052147/https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|url-status=live}}{{cite web|url=https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html|title=Obituary of John Walter – Fairchild and Sons Funeral Chapel Inc.|website=fairchildsons.com|access-date=August 15, 2020|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052150/https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html|url-status=live}} ******* Christine Walter ******* Nancy Walter ******* {{Tree list/final branch}} Cindy Walter ***** [[Fred Trump|Frederick Christ "Fred" Trump]] (1905–1999), wakuzenga na kusambaza malo na nyumba, wakatora [[Mary Anne MacLeod Trump|Mary MacLeod]] (1912–2000), uyo wakasamukira ku United States kufuma ku [[Scotland]] mu 1930. ****** [[Maryanne Trump Barry|Maryanne Trump]] (1937–2023), mweruzgi wa boma, wakatora ndipo wakaparana na David Desmond; pamanyuma wakatora John Barry ******* David William Desmond, wakatora Lisa Aitken ****** [[Fred Trump Jr.|Frederick Crist "Freddy" Trump Jr.]] (1938–1981), wakwendeska ndege wa [[Trans World Airlines|TWA]],{{Cite news |first=Gerber |last=Drew |date=August 3, 2016 |url=http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |title=Trump's Brother Rebelled Against Their Authoritarian Father By Joining a Jewish Frat |newspaper=[[The Forward]] |access-date=January 23, 2017 |archive-date=January 20, 2017 |archive-url=https://web.archive.org/web/20170120165856/http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |url-status=live }} wakatora ndipo wakaparana na Linda Clapp ******* [[Fred Trump III|Frederick Crist "Fritz" Trump III]] (wakababika mu 1962), wakatora Lisa Beth Lorant{{cite news|url=https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|title=F. C. Trump 3d, Realty Manager, Weds Ms. Lorant|date=September 17, 1989|website=The New York Times|access-date=May 7, 2022|archive-date=March 15, 2018|archive-url=https://web.archive.org/web/20180315005336/https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|url-status=live}}{{cite web|url=http://www.stamfordadvocate.com/news/article/Trump-family-gives-back-to-agency-that-helps-4590816.php|title=Trump family gives back to agency that helps developmental disabled|date=June 10, 2013|access-date=May 7, 2022|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052157/https://www.stamfordadvocate.com/news/article/Trump-family-gives-back-to-agency-that-helps-4590816.php|url-status=live}} ******** Cristopher Trump ******** Andrea Trump ******** William Trump ******* [[Mary Lea Trump]] (wakababika mu 1965), wakusambira vya maghanoghano gha ŵanthu, mulembi, wakatora ndipo wakaparana na Dina Nowak ******** {{Tree list/final branch}} Avary Trump{{cite news |last1=Phelps |first1=Rob |title=Mary L. Trump on her life as an openly gay member of the First Family |url=https://bostonspiritmagazine.com/2020/11/mary-l-trump-on-her-life-as-an-openly-gay-member-of-the-first-family/ |access-date=July 14, 2022 |publisher=Boston Spirit Magazine |date=November 16, 2020 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714234334/https://bostonspiritmagazine.com/2020/11/mary-l-trump-on-her-life-as-an-openly-gay-member-of-the-first-family/ |url-status=live }} ****** Elizabeth Joan Trump (wakababika mu 1942), wakatora James Walter Grau ****** '''[[Donald Trump|Donald John Trump]]''' (wakababika mu 1946), wakuzenga na kusambaza malo na nyumba, pulezidenti wa 45 na wa 47 wa United States, wakatora ndipo wakaparana na [[Ivana Trump|Ivana Zelníčková]] (1949–2022); wakatora ndipo wakaparana na [[Marla Maples]]; wakatora [[Melania Trump|Melania Knauss]] ******* [[Donald Trump Jr.|Donald John Trump Jr.]] (wakababika mu 1977; wa nthengwa yakwamba), wakatora ndipo wakaparana na [[Vanessa Haydon]]; wakatora [[Bettina Anderson]] ******** [[Kai Trump|Kai Madison Trump]] (wakababika mu 2007; wa nthengwa yakwamba) ******** Donald John Trump III (wakababika mu 2009; wa nthengwa yakwamba) ******** Tristan Milos Trump (wakababika mu 2011; wa nthengwa yakwamba) ******** Spencer Frederick Trump (wakababika mu 2012; wa nthengwa yakwamba) ******** Chloe Sophia Trump (wakababika mu 2014; wa nthengwa yakwamba) ******* [[Ivanka Trump|Ivana Marie "Ivanka" Trump]] (wakababika mu 1981; wa nthengwa yakwamba), wakatora [[Jared Kushner]] ******** Arabella Rose Kushner (wakababika mu 2011) ******** Joseph Frederick Kushner (wakababika mu 2013) ******** Theodore James Kushner (wakababika mu 2016) ******* [[Eric Trump|Eric Frederick Trump]] (wakababika mu 1984; wa nthengwa yakwamba), wakatora [[Lara Yunaska]] ******** Eric Luke Trump (wakababika mu 2017) ******** Carolina Dorothy Trump (wakababika mu 2019) ******* [[Tiffany Trump|Tiffany Ariana Trump]] (wakababika mu 1993; wa nthengwa yachiŵiri), wakatora [[Michael Boulos]] ******** Alexander Trump Boulos (wakababika mu 2025) ******* {{Tree list/final branch}} [[Barron Trump|Barron William Trump]] (wakababika mu 2006; wa nthengwa yachitatu) ****** {{Tree list/final branch}} [[Robert Trump|Robert Stewart Trump]] (1948–2020),{{Cite news|last=Phillips|first=Morgan|date=August 14, 2020|title=Robert Trump, brother of President Trump, dead at 71|url=https://www.foxnews.com/politics/robert-trump-dead|access-date=August 15, 2020|agency=Fox News|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}} wakatora ndipo wakaparana na [[Blaine Trump|Blaine Beard]];{{cite news|url=https://www.nytimes.com/2016/10/20/fashion/michael-kors-anna-wintour-gods-love-we-deliver-gala.html|title=Michael Kors, Anna Wintour, Kate Hudson and Blaine Trump at God's Love We Deliver Gala|date=October 18, 2016|newspaper=The New York Times|access-date=May 7, 2022|archive-date=March 15, 2018|archive-url=https://web.archive.org/web/20180315005439/https://www.nytimes.com/2016/10/20/fashion/michael-kors-anna-wintour-gods-love-we-deliver-gala.html|url-status=live |last1=Bernstein |first1=Jacob }} pamanyuma wakatora Ann Marie Pallan ***** [[John G. Trump|John George Trump]] (1907–1985), wakatora Elora Gordon Sauerbrun (1913–1983) ****** John Gordon Trump (1938–2012) ****** Christine Elora Trump Philp (1942–2021) ****** {{Tree list/final branch}} Karen Elizabeth Trump Ingraham (wakababika mu 1949) {{Tree list/end}} {{Trump family tree}} == Ŵapapi == === Fred Trump === {{Main|Fred Trump}} [[File:Fred Trump in the 1980s (cropped2) (b).jpg|thumb|upright|[[Fred Trump]] mu 1986]] Wiske wa Donald Trump, Fred Trump (1905–1999), wakababikira mu New York, wakaŵa munthu wakuzenga na kusambaza malo na nyumba wakuchita makora chomene mu [[Msumba wa New York]].{{cite news |date=August 9, 2000 |title=Mary MacLeod Trump Philanthropist, 88 |url=https://www.nytimes.com/2000/08/09/nyregion/mary-macleod-trump-philanthropist-88.html |newspaper=[[The New York Times]] |type=Obituary |access-date=May 12, 2016 |archive-url=https://web.archive.org/web/20190323085602/https://www.nytimes.com/2000/08/09/nyregion/mary-macleod-trump-philanthropist-88.html |archive-date=March 23, 2019 |url-status=live }} Pakugwiliskira ntchito chiharo chawo, Fred Trump na anyina Elizabeth ŵakambiska kampani ya E. Trump & Son mu 1927.{{cite news|date=April 16, 1927|title=New concerns function with Queens capital|page=16|newspaper=The Daily Star|quote=E. Trump & Son Company, Inc., of Jamaica, has been formed with $50,000 capital to deal in realty.}} Kampani iyi yikakura ndipo yikazenga na kulaŵilira nyumba za mbumba yimoza mu [[Queens]], nyumba za ŵasilikari na maapartment gha munda gha ŵantchito ŵa [[Nkhondo ya pa Nyanja ya United States|U.S. Navy]] kufupi na malo ghakuru ghakuzengera ngalaŵa mumphepete mwa nyanja ya kumafumiro gha dazi, kweniso maapartment ghakujumpha 27,000 mu [[Msumba wa New York]].{{cite news|last=Rozhon|first=Tracie|date=June 26, 1999|title=Fred C. Trump, Postwar Master Builder of Housing for Middle Class, Dies at 93|language=en|newspaper=[[The New York Times]]|url=https://www.nytimes.com/1999/06/26/nyregion/fred-c-trump-postwar-master-builder-of-housing-for-middle-class-dies-at-93.html|access-date=January 29, 2017|archive-date=November 4, 2019|archive-url=https://web.archive.org/web/20191104041711/https://www.nytimes.com/1999/06/26/nyregion/fred-c-trump-postwar-master-builder-of-housing-for-middle-class-dies-at-93.html|url-status=live}} Trump wakafufuzika na komiti ya [[Seneti ya United States]] chifukwa cha [[Kupenja phindu mwakujumphizga mu bizinesi|kupenja phindu mwakujumphizga]] mu 1954,{{cite news|last=Moyer|first=Justin William|date=January 22, 2016|title=The Unbelievable Story of Why Woody Guthrie Hated Donald Trump's Dad|language=en|newspaper=[[The Washington Post]]|url=https://www.washingtonpost.com/news/morning-mix/wp/2016/01/22/the-unbelievable-story-of-why-woody-guthrie-hated-donald-trumps-racist-dad/|access-date=January 29, 2017|archive-date=January 28, 2017|archive-url=https://web.archive.org/web/20170128004312/https://www.washingtonpost.com/news/morning-mix/wp/2016/01/22/the-unbelievable-story-of-why-woody-guthrie-hated-donald-trumps-racist-dad/|url-status=live}} ndipo so na [[Boma la New York]] mu 1966.{{sfn|Blair|2015|pages=213–216}} Donald Trump wakaŵa pulezidenti wa bizinesi ya malo na nyumba ya wiske wake mu 1971, ndipo wakayizunura zina lakuti Trump Organization pafupifupi mu 1973.{{Cite book|last1=Trump|first1=Donald J.|url=https://books.google.com/books?id=Ye6e_VxM00kC&pg=PA105|title=Trump: The Art of the Deal|last2=Schwartz|first2=Tony|publisher=Random House|year=2009|isbn=978-0-307-57533-3|location=New York|pages=105|language=en|orig-year=1987|access-date=January 14, 2021|archive-date=February 1, 2017|archive-url=https://web.archive.org/web/20170201011949/https://books.google.com/books?id=Ye6e_VxM00kC&pg=PA105|url-status=live}} Chaka chenechicho, Donald na wiske ŵakapelekeka ku khoti na [[Dipatimenti ya Malango ya United States, Chigaŵa cha Wanangwa wa Ŵanthu|Chigaŵa cha Wanangwa wa Ŵanthu cha Dipatimenti ya Malango ya U.S.]] chifukwa cha kuswa [[Dango la Nyumba Zakwenelera kwa Wose]].{{cite news|last1=Kranish|first1=Michael|last2=O'Harrow|first2=Robert Jr.|date=January 23, 2016|title=Inside the Government's Racial Bias Case Against Donald Trump's Company, and How He Fought It|language=en|newspaper=[[The Washington Post]]|url=https://www.washingtonpost.com/politics/inside-the-governments-racial-bias-case-against-donald-trumps-company-and-how-he-fought-it/2016/01/23/fb90163e-bfbe-11e5-bcda-62a36b394160_story.html|access-date=January 29, 2017|archive-date=July 29, 2016|archive-url=https://web.archive.org/web/20160729171242/https://www.washingtonpost.com/politics/inside-the-governments-racial-bias-case-against-donald-trumps-company-and-how-he-fought-it/2016/01/23/fb90163e-bfbe-11e5-bcda-62a36b394160_story.html|url-status=live}} Pakati pa m'ma 1970, Donald wakapokera ngongoli kufuma kwa wiske wake zakujumpha $14{{spaces}} miliyoni (pamanyuma Donald wakati zikaŵa $1{{spaces}} miliyoni pera).{{cite news|last1=Berzon|first1=Alexandra|last2=Rubin|first2=Richard|date=September 23, 2016|title=Trump's Father Helped GOP Candidate With Numerous Loans|language=en|newspaper=[[The Wall Street Journal]]|location=New York|url=https://www.wsj.com/articles/trumps-father-helped-gop-candidate-with-numerous-loans-1474656573|access-date=January 29, 2017|archive-date=August 28, 2019|archive-url=https://web.archive.org/web/20190828054816/https://www.wsj.com/articles/trumps-father-helped-gop-candidate-with-numerous-loans-1474656573|url-status=live}} Donald wakateŵetera nga ni mulaŵiliri mukuru na pulezidenti wa Trump Organization mpaka wakati waŵa [[Pulezidenti wa United States|Pulezidenti wa U.S.]].{{cite web|title=Trump Organization Next Generation: Donald Jr Ivanka Eric Trump Hotel Collection Real Estate Casinos Golf Clubs Restaurants Merchandise Corporation Company Publications|url=http://www.trump.com/the-next-generation/|url-status=live|archive-url=https://web.archive.org/web/20181227025749/https://www.trump.com/the-next-generation/|archive-date=December 27, 2018|access-date=May 14, 2016}} === Mary Anne MacLeod Trump === {{Main|Mary Anne MacLeod Trump}} {{further|MacLeod}} Wakababika nga ni Mary Anne MacLeod (1912–2000) ku [[Tong, Lewis|Tong]], mizi uchoko kufupi na [[Stornoway]], mu [[Vigaŵa vya kumanjiliro gha dazi vya Scotland|Western Isles]] vya Scotland. Wakaŵa mwana wa mulovi Malcolm MacLeod na Mary MacLeod ({{née|Smith}}). Wakati waŵa na vyaka 17, wakasamukira ku United States na madola 50 pera ({{Inflation|index=US|value=50|start_year=1929|fmt=eq}}), ndipo wakakhala na mudumbu wake pambere wandambe ntchito ya [[Muteŵeti wa pa nyumba|muteŵeti wa pa nyumba]] mu New York.{{cite magazine |title=Donald Trump's Immigrant Mother |first=Mary |last=Pilon |author-link=Mary Pilon |date=June 24, 2016 |magazine=[[The New Yorker]] |url=http://www.newyorker.com/news/news-desk/donald-trumps-immigrant-mother |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20190518071756/https://www.newyorker.com/news/news-desk/donald-trumps-immigrant-mother |archive-date=May 18, 2019 |url-status=live }}{{Cite news|last=Hannan|first=Martin|date=May 20, 2016|title=The mysterious Mary Trump|work=[[The National (Scotland)|The National]]|url=http://www.thenational.scot/news/14903149.The_mysterious_Mary_Trump__The_full_untold_story_of_how_a_young_Scotswoman_escaped_to_New_York_and_raised_a_US_presidential_candidate/|access-date=August 9, 2020|archive-date=October 2, 2018|archive-url=https://web.archive.org/web/20181002202527/http://www.thenational.scot/news/14903149.The_mysterious_Mary_Trump__The_full_untold_story_of_how_a_young_Scotswoman_escaped_to_New_York_and_raised_a_US_presidential_candidate/|url-status=live}} Mary na Fred Trump ŵakakumana mu New York ndipo ŵakatorana mu 1936, na kukhazikika pamoza mu [[Queens]]. Mary wakaŵa mwanarume wa United States mu 1942.{{cite magazine |title=The Ancestral German Home of the Trumps |first=Sally |last=McGrane |date=April 29, 2016 |magazine=[[The New Yorker]] |url=http://www.newyorker.com/culture/culture-desk/the-ancestral-german-home-of-the-trumps |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20170201021428/http://www.newyorker.com/culture/culture-desk/the-ancestral-german-home-of-the-trumps |archive-date=February 1, 2017 |url-status=live }} Apo Donald Trump wakaluta ku Scotland mu Juni 2008, wakati, "Nkhujipulika kuti nili wa ku Scotland."{{cite news |url=https://www.theguardian.com/world/2008/jun/09/donaldtrump.scotland |title='I feel Scottish,' says Donald Trump on flying visit to mother's cottage |date=June 9, 2008 |access-date=July 24, 2016 |first=Severin |last=Carrell |work=The Guardian |archive-url=https://web.archive.org/web/20160730032309/https://www.theguardian.com/world/2008/jun/09/donaldtrump.scotland |archive-date=July 30, 2016 |url-status=live }}{{cite news |url=http://www.cnn.com/2015/08/24/politics/donald-trump-immigrant-wives/ |title=Donald Trump's immigrant wives |date=August 24, 2015 |access-date=September 3, 2015 |first=Chris |last=Frates |work=CNN|archive-url=https://web.archive.org/web/20150831062423/http://www.cnn.com/2015/08/24/politics/donald-trump-immigrant-wives/ |archive-date=August 31, 2015 |url-status=live }} == Ŵasekuru == === Frederick Trump === {{Main|Frederick Trump}} Mu 1885, sekuru ŵa Donald Trump, Friedrich Trump, ŵakasamuka kufuma ku Kallstadt, Palatinate (pa nyengo iyo chikaŵa chigaŵa cha [[Ufumu wa Bavaria]]) kuluta ku United States apo wakaŵa na vyaka 16. Wakasintha zina lake ku Chingelezi kuŵa ''Frederick'' mu 1892 apo wakaŵa mwanarume wa United States.{{cite news |last=Blair |first=Gwenda |author-link=Gwenda Blair |date=August 24, 2015 |title=The Man Who Made Trump Who He Is |url=https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647/ |newspaper=[[Politico]] |access-date=July 24, 2016 |archive-url=https://web.archive.org/web/20190428214907/https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647 |archive-date=April 28, 2019 |url-status=live |ref=none }} Pa nyengo ya [[Kudumbuka kwa golide kwa Klondike]], wakasanga usambazi mwa kujura malo ghakurya na hotelo ku [[Bennett, British Columbia|Bennett]] ndipo pamanyuma ku [[Whitehorse, Yukon|Whitehorse]], uko wakateŵeteranga [[Ŵakupenja golide|ŵakupenja golide]] awo ŵakalutanga ku chigaŵa ichi. Mulembi munyake wa mbiri wakalemba kuti bizinesi iyi yikaŵaso na nyumba ya uhule, ivyo Donald Trump wakati "mbutesi kwambura unenesko".{{cite web |url=https://www.bloomberg.com/features/2016-trump-family-fortune/ |title=Trump's Family Fortune Originated in a Canadian Gold-Rush Brothel |website=Bloomberg |date=October 26, 2016 |access-date=January 12, 2018 |first=Natalie Obiko |last=Pearson |archive-url=https://web.archive.org/web/20171227230616/https://www.bloomberg.com/features/2016-trump-family-fortune/ |archive-date=December 27, 2017 |url-status=live }} Wakati wawelera ku Kallstadt mu 1901, Frederick wakatemwa Elisabeth Christ. Ŵakatorana mu 1902 ndipo ŵakaweleraso ku United States. Kweni Elisabeth wakakhumbanga kwawo, ntheura ŵakawelera ku Germany. Ndipouli, boma likamukanizga Frederick kukhazikika kwenekuko ndipo likamuchimbizga mu Germany mu 1905 chifukwa chakuti wakateŵetera yayi usilikari uwo ukaŵa wakukhumbikwa ndipo wakaphalira yayi boma apo wakafumanga mu 1885. Kupempha kwake kukakanika.{{cite news |url=https://www.theguardian.com/us-news/2016/nov/21/trump-grandfather-friedrich-banished-germany-historian-royal-decree |title=Historian finds German decree banishing Trump's grandfather |date=November 21, 2016 |work=The Guardian |first=Kate |last=Connolly |access-date=February 21, 2022 |archive-date=July 31, 2020 |archive-url=https://web.archive.org/web/20200731230351/https://www.theguardian.com/us-news/2016/nov/21/trump-grandfather-friedrich-banished-germany-historian-royal-decree |url-status=live }} Wakafwa mu chigaŵa chakwamba cha nthenda ya [[Nthenda ya chimfine ya ku Spain]] mu 1918. Wakati wafwa, usambazi wake ukapokelereka na muwoli wake na mwana wake. === Elizabeth Christ Trump === {{Main|Elizabeth Christ Trump}} Donald Trump's grandmother, Elizabeth Christ Trump, was born in 1880 and died on June 6, 1966. She married Frederick Trump in 1902 and moved to the United States with him. Like her husband, she was a native of Kallstadt, born as the daughter of Philipp and Marie Christ. Philipp Christ was descended from Johannes Christ of [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump was a descendant of organ builder [[Johann Michael Hartung]] through her paternal grandmother Sabina Christ.<ref>{{cite web|url=https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS: Vorfahren von Frederick Christ TRUMP|access-date=November 10, 2016|archive-url=https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November 4, 2016|url-status=dead}}</ref> == Siblings == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) was Donald Trump's eldest sister. She was a senior [[United States federal judge|federal judge]] on the [[United States Court of Appeals for the Third Circuit|Third Circuit Court of Appeals]],<ref>{{cite news|url=https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's sister weighs in on Supreme Court pick|last=Goldmacher|first=Shane|date=January 25, 2017|work=[[Politico]]|access-date=August 16, 2017|archive-url=https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August 16, 2017|url-status=live}}</ref> became inactive in 2017 after her brother took office, and retired in 2019.<ref>{{cite news |url=https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |title=Trump's sister retires, negating judicial ethics complaints |work=[[Associated Press]] |first1=Larry |last1=Neumeister |first2=Maryclaire |last2=Dale |date=April 11, 2019 |access-date=May 26, 2019 |archive-url=https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |archive-date=May 26, 2019 |url-status=live }}</ref> === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}<ref name=":0">{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}}</ref> was Donald Trump's older brother. On September 26, 1981,<ref name=":0" /> at the age of 42, he died from a heart attack.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (born 1942) is an older sister of Donald Trump.<ref>{{cite news|title=Meet the Trumps: The family tree of Donald Trump|newspaper=MSN News|date=May 8, 2018|url=https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May 29, 2018|url-status=dead}}</ref> In 1989, she married film producer James Grau.<ref name=jamesgrau>{{cite news|title=Elizabeth Trump weds James Grau|newspaper=[[The New York Times]]|date=March 27, 1989|url=https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May 29, 2018|url-status=live|issn=0362-4331}}</ref> She worked as an administrative assistant for [[Chase Manhattan Bank]],<ref name=jamesgrau /> before retiring to Florida.<ref>{{cite news|title=Trump sister sells oceanfront Westhampton Beach home for $3.8M|newspaper=[[Newsday]]|location=Melville, New York City|first=Michael|last=Gavin|date=June 23, 2017|url=https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May 29, 2018|url-status=live}}</ref> As of 2026, she is the only living sibling of Donald Trump.<ref>{{cite news |url=https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |title=Maryanne Trump Barry, the former president's older sister and a retired federal judge, dies at 86 |date=November 13, 2023 |work=ABC News |agency=Associated Press |first1=MaryClaire |last1=Dale |first2=Karen |last2=Matthews |access-date=November 14, 2023 |archive-date=November 14, 2023 |archive-url=https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |url-status=live }}</ref> === Robert Trump === {{Main|Robert Trump}} Donald Trump gogo wawo, Elizabeth Christ Trump, wakababika mu 1880 ndipo wakafwa pa Juni 6, 1966. Wakatorana na Frederick Trump mu 1902 ndipo wakasamukira nayo ku United States. Nga ni mfumu wake, nayo wakaŵa wakwawo ku Kallstadt, ndipo wakababika nga ni mwana wa Philipp na Marie Christ. Philipp Christ wakaŵa mphapu ya Johannes Christ wa ku [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump wakaŵa mphapu ya munthu wakazenganga maorgani, [[Johann Michael Hartung]], kwizira mwa gogo wawo wa kwa awiske, Sabina Christ.<ref>{{cite web|url=[https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS](https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS): Vorfahren von Frederick Christ TRUMP|access-date=November 10, 2016|archive-url=[https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November](https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November) 4, 2016|url-status=dead}}</ref> == Abali na ŵadumbu == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) wakaŵa mudumbu mukuru wa Donald Trump. Wakaŵa [[mulongi wa khoti la boma la United States|mulongi mukuru wa khoti la boma]] pa [[Khoti la United States la Madandawuro la Dera Lachitatu]],<ref>{{cite news|url=[https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's](https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's) sister weighs in on Supreme Court pick|last=Goldmacher|first=Shane|date=January 25, 2017|work=[[Politico]]|access-date=August 16, 2017|archive-url=[https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August](https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August) 16, 2017|url-status=live}}</ref> wakaleka kugwira ntchito mu 2017 pamanyuma pakuti mudumbu wake wakaŵa pulezidenti, ndipo wakapumura ntchito mu 2019.<ref>{{cite news |url=[https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a](https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a) |title=Trump's sister retires, negating judicial ethics complaints |work=[[Associated Press]] |first1=Larry |last1=Neumeister |first2=Maryclaire |last2=Dale |date=April 11, 2019 |access-date=May 26, 2019 |archive-url=[https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a](https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a) |archive-date=May 26, 2019 |url-status=live }}</ref> === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}<ref name=":0">{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}}</ref> wakaŵa mukuru wa Donald Trump. Pa Seputembala 26, 1981,<ref name=":0" /> wali na vyaka 42, wakafwa chifukwa cha matenda gha mtima.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (wakababika mu 1942) ni mudumbu mukuru wa Donald Trump.<ref>{{cite news|title=Meet the Trumps: The family tree of Donald Trump|newspaper=MSN News|date=May 8, 2018|url=[https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May](https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May](https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May) 29, 2018|url-status=dead}}</ref> Mu 1989, wakatorana na James Grau, uyo wakapanganga mafilimu.<ref name=jamesgrau>{{cite news|title=Elizabeth Trump weds James Grau|newspaper=[[The New York Times]]|date=March 27, 1989|url=[https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May](https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May](https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May) 29, 2018|url-status=live|issn=0362-4331}}</ref> Wakagwirapo ntchito nga ni mulembi wa ofesi ku [[Chase Manhattan Bank]],<ref name=jamesgrau /> pambere wandapumure na kusamukira ku Florida.<ref>{{cite news|title=Trump sister sells oceanfront Westhampton Beach home for $3.8M|newspaper=[[Newsday]]|location=Melville, New York City|first=Michael|last=Gavin|date=June 23, 2017|url=[https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May](https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May](https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May) 29, 2018|url-status=live}}</ref> Kufika mu 2026, ndiyo yekha mudumbu wa Donald Trump uyo wachali wamoyo.<ref>{{cite news |url=[https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529](https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529) |title=Maryanne Trump Barry, the former president's older sister and a retired federal judge, dies at 86 |date=November 13, 2023 |work=ABC News |agency=Associated Press |first1=MaryClaire |last1=Dale |first2=Karen |last2=Matthews |access-date=November 14, 2023 |archive-date=November 14, 2023 |archive-url=[https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529](https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529) |url-status=live }}</ref> === Robert Trump === {{Main|Robert Trump}} Robert Stewart Trump (1948–2020) wakaŵa munung'una wa Donald Trump.<ref>{{cite news|last1=Chabba|first1=Seerat|title=Who Are Donald Trump's Siblings?|url=[https://www.yahoo.com/news/donald-trump-siblings-121333034.html|access-date=March](https://www.yahoo.com/news/donald-trump-siblings-121333034.html|access-date=March) 23, 2016|work=[[International Business Times]]|agency=[[Yahoo News]]|date=November 15, 2016|archive-url=[https://web.archive.org/web/20170324000111/https://www.yahoo.com/news/donald-trump-siblings-121333034.html|archive-date=March](https://web.archive.org/web/20170324000111/https://www.yahoo.com/news/donald-trump-siblings-121333034.html|archive-date=March) 24, 2017|url-status=live}}</ref> Wakaŵa mulongozgi wa bizinesi uyo wakalaŵiliranga Trump Management Inc, iyo yikalaŵiliranga nyumba na malo gha Trump Organization kuwaro kwa Manhattan.{{sfn|Blair|2015|p=454}} Robert Trump wakatorana na [[Blaine Trump|Blaine Beard]] mu 1980.<ref>{{cite news|date=October 28, 1987|title=The Winning Ways of Blaine Trump|work=[[The New York Times]]|url=[https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live|access-date=February](https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live|access-date=February) 11, 2017|archive-url=[https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|archive-date=January](https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|archive-date=January) 27, 2017}}</ref> Ŵakapatukana mu 2009 pamanyuma pakuti Robert wasiya muwoli wake chifukwa cha wantchito wa Trump Organization, Ann Marie Pallan. Wakatorana na Pallan kukwambilira kwa 2020.<ref>{{cite news |url=[https://www.thetimes.com/uk/article/robert-trump-obituary-f9qz0sx7t](https://www.thetimes.com/uk/article/robert-trump-obituary-f9qz0sx7t) |title=Robert Trump obituary |date=August 17, 2020 |newspaper=[[The Times]] |access-date=May 27, 2023 |archive-date=May 27, 2023 |archive-url=[https://web.archive.org/web/20230527211948/https://www.thetimes.co.uk/article/robert-trump-obituary-f9qz0sx7t](https://web.archive.org/web/20230527211948/https://www.thetimes.co.uk/article/robert-trump-obituary-f9qz0sx7t) |url-status=live }}</ref> Robert wakafwa pa Ogasiti 15, 2020, wali na vyaka 71.<ref>{{Cite news|date=August 16, 2020|title=Robert Trump: brother of president Donald Trump dies aged 71|language=en-GB|work=[[The Guardian]]|url=[https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|access-date=August](https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|access-date=August) 16, 2020|archive-date=January 14, 2021|archive-url=[https://web.archive.org/web/20210114215845/https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|url-status=live}}](https://web.archive.org/web/20210114215845/https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|url-status=live}})</ref><ref>{{Cite web|last=Phillips|first=Morgan|date=August 14, 2020|title=Robert Trump, brother of President Trump, dead at 71|url=[https://www.foxnews.com/politics/robert-trump-dead|access-date=August](https://www.foxnews.com/politics/robert-trump-dead|access-date=August) 16, 2020|website=[[Fox News]]|language=en-US|archive-date=January 14, 2021|archive-url=[https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}}](https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}})</ref> Kuyana na ''The New York Times'', wakaŵa na [[kukha magazi mu ubongo|kukha magazi mu ubongo]] pamanyuma pa kuwa sonosono apa.<ref>{{Cite news|last=Karni|first=Annie|author-link=Annie Karni|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|language=en-US|work=[[The New York Times]]|url=[https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August](https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August) 16, 2020|archive-date=August 16, 2020|archive-url=[https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|url-status=live}}](https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|url-status=live}})</ref> == Ŵabali ŵanyake == === John G. Trump === {{Main|John G. Trump}} John George Trump (1907–1985), dada munyake wa Donald Trump kwa awiske, wakaŵa enjiniya wa magetsi, msambiri wa sayansi, kweniso munthu wakapanganga vinthu viphya. Wakambiska mtundu wa [[chithandizo cha radiation]] wakuzingilira, ndipo pamoza na [[Robert J. Van de Graaff]], wakapanga yimoza mwa makina ghakwambilira gha [[X-ray generator|kupangira ma X-ray]] agho ghakaŵa na miliyoni yimoza ya ma volti. Wakapokera [[National Medal of Science]] kufuma kwa Pulezidenti [[Ronald Reagan]], ndipo wakaŵa yumoza wa ŵa [[National Academy of Engineering]]. === John W. Walter === {{Main|John W. Walter}} Donald Trump wa munyake wa mwanakazi wa sekuru ŵake, Elizabeth Christ Trump, wakababika mu 1880 ndipo wakafwa pa Juni 6, 1966. Wakatorana na Frederick Trump mu 1902 ndipo wakaluta nayo ku United States. Nga ni mfumu wake, nayo wakababikira ku Kallstadt, ndipo wakaŵa mwana wa Philipp na Marie Christ. Philipp Christ wakafuma mu mphapu ya Johannes Christ wa [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump wakaŵa mphapu ya mupangi wa maorgani [[Johann Michael Hartung]] kwizira mwa gogomukuru wake wa upande wa awiske, Sabina Christ.{{cite web|url=https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS: Vorfahren von Frederick Christ TRUMP|access-date=November 10, 2016|archive-url=https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November 4, 2016|url-status=dead}} == Abali na azilumbu == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) wakaŵa mudumbu mukuru wa Donald Trump. Wakaŵa [[mulongi wa khoti la boma la United States|mulongi mukuru wa khoti la boma]] pa [[Khoti la Apilu la United States la Dera Lachitatu]].{{cite news|url=https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's sister weighs in on Supreme Court pick|last=Goldmacher|first=Shane|date=January 25, 2017|work=[[Politico]]|access-date=August 16, 2017|archive-url=https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August 16, 2017|url-status=live}} Wakaleka kugwira ntchito mu 2017 pamanyuma pakuti mudumbu wake wakamba uteŵeti wake nga ni purezidenti, ndipo wakapumura ntchito mu 2019.{{cite news |url=https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |title=Trump's sister retires, negating judicial ethics complaints |work=[[Associated Press]] |first1=Larry |last1=Neumeister |first2=Maryclaire |last2=Dale |date=April 11, 2019 |access-date=May 26, 2019 |archive-url=https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |archive-date=May 26, 2019 |url-status=live }} === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}} wakaŵa mukuru wa Donald Trump. Pa Seputembala 26, 1981, wali na vyaka 42, wakafwa chifukwa cha nthenda ya mtima.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (wakababika mu 1942) ni mudumbu mukuru wa Donald Trump.{{cite news|title=Meet the Trumps: The family tree of Donald Trump|newspaper=MSN News|date=May 8, 2018|url=https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May 29, 2018|url-status=dead}} Mu 1989, wakatorana na mupangi wa mafilimu James Grau.{{cite news|title=Elizabeth Trump weds James Grau|newspaper=[[The New York Times]]|date=March 27, 1989|url=https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May 29, 2018|url-status=live|issn=0362-4331}} Wakagwiranga ntchito nga ni mulembi wa ofesi pa [[Chase Manhattan Bank]], pambere wandapumure na kukhala ku Florida.{{cite news|title=Trump sister sells oceanfront Westhampton Beach home for $3.8M|newspaper=[[Newsday]]|location=Melville, New York City|first=Michael|last=Gavin|date=June 23, 2017|url=https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May 29, 2018|url-status=live}} Kufika mu 2026, ndiyo yekha mubali wa Donald Trump uyo wachali wamoyo.{{cite news |url=https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |title=Maryanne Trump Barry, the former president's older sister and a retired federal judge, dies at 86 |date=November 13, 2023 |work=ABC News |agency=Associated Press |first1=MaryClaire |last1=Dale |first2=Karen |last2=Matthews |access-date=November 14, 2023 |archive-date=November 14, 2023 |archive-url=https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |url-status=live }} === Robert Trump === {{Main|Robert Trump}} Robert Stewart Trump (1948–2020) wakaŵa mudumbu muchoko wa Donald Trump.{{cite news|last1=Chabba|first1=Seerat|title=Who Are Donald Trump's Siblings?|url=https://www.yahoo.com/news/donald-trump-siblings-121333034.html|access-date=March 23, 2016|work=[[International Business Times]]|agency=[[Yahoo News]]|date=November 15, 2016|archive-url=https://web.archive.org/web/20170324000111/https://www.yahoo.com/news/donald-trump-siblings-121333034.html|archive-date=March 24, 2017|url-status=live}} Wakaŵa mulongozgi wa bizinesi uyo wakalongozganga Trump Management Inc, kampani iyo yikalaŵiliranga katundu wa nyumba wa Trump Organization kuwaro kwa Manhattan. Wakaŵaso mmoza wa ŵa ndalama mu SHiRT LLC, yimoza mwa makampani ghaŵiri agho ghakaŵa na CertiPathx ya ku Virginia, iyo yikapokera mgwirizano wa boma wa madola 33 miliyoni mu 2019.{{cite news |url=https://www.washingtonpost.com/politics/company-with-ties-to-trumps-brother-robert-awarded-33-million-government-contract/2019/10/26/f67164d2-f688-11e9-829d-87b12c2f85dd_story.html |title=Company with ties to Trump's brother Robert awarded $33 million government contract |newspaper=The Washington Post |date=October 26, 2019 |first=Joshua |last=Partlow |access-date=December 14, 2019 |archive-url=https://web.archive.org/web/20191211155417/https://www.washingtonpost.com/politics/company-with-ties-to-trumps-brother-robert-awarded-33-million-government-contract/2019/10/26/f67164d2-f688-11e9-829d-87b12c2f85dd_story.html |archive-date=December 11, 2019 |url-status=live }} Robert Trump wakatorana na [[Blaine Trump|Blaine Beard]] mu 1980.{{cite news|date=October 28, 1987|title=The Winning Ways of Blaine Trump|work=[[The New York Times]]|url=https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live|access-date=February 11, 2017|archive-url=https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|archive-date=January 27, 2017}} Ŵakapatukana mu 2009 pamanyuma pakuti wakaleka muwoli wake chifukwa cha wantchito wa Trump Organization Ann Marie Pallan. Wakatorana na Pallan kukwambilira kwa 2020.{{cite news |url=https://www.thetimes.com/uk/article/robert-trump-obituary-f9qz0sx7t |title=Robert Trump obituary |date=August 17, 2020 |newspaper=[[The Times]] |access-date=May 27, 2023 |archive-date=May 27, 2023 |archive-url=https://web.archive.org/web/20230527211948/https://www.thetimes.co.uk/article/robert-trump-obituary-f9qz0sx7t |url-status=live }} Robert wakafwa pa Ogasiti 15, 2020, wali na vyaka 71.{{Cite news|date=August 16, 2020|title=Robert Trump: brother of president Donald Trump dies aged 71|language=en-GB|work=[[The Guardian]]|url=https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|access-date=August 16, 2020|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114215845/https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|url-status=live}}{{Cite web|last=Phillips|first=Morgan|date=August 14, 2020|title=Robert Trump, brother of President Trump, dead at 71|url=https://www.foxnews.com/politics/robert-trump-dead|access-date=August 16, 2020|website=[[Fox News]]|language=en-US|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}} Kuyana na ''The New York Times'', wakaŵa na [[intracerebral hemorrhage|kutuluka ndopa mu ubongo]] pamanyuma pa kuwa sonosono apa.{{Cite news|last=Karni|first=Annie|author-link=Annie Karni|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|language=en-US|work=[[The New York Times]]|url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August 16, 2020|archive-date=August 16, 2020|archive-url=https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|url-status=live}} == Ŵabali ŵanyake == === John G. Trump === {{Main|John G. Trump}} Sekuru wa Donald Trump wa upande wa awiske, John George Trump (1907–1985), wakaŵa mainjiniya wa magetsi, mupangi wa vinthu, ndiposo wasayansi wa fiziki uyo wakapangiska [[radiation therapy]] yakuzungulira, ndipo pamoza na [[Robert J. Van de Graaff]], wakapanga yimoza mwa makina ghakwamba gha [[X-ray generator|kupangira ma X-ray]] gha miliyoni yimoza ya volts. Wakapokera [[National Medal of Science]] kufuma kwa Purezidenti [[Ronald Reagan]] ndipo wakaŵa membala wa [[National Academy of Engineering]]. === John W. Walter === {{Main|John W. Walter}} John W. Walter (1934–2018), uyo wakaŵa muzukuru wa Donald Trump, wakaŵa mwana wa Elizabeth Trump (mudumbu wa Fred Trump) na William Walter.{{cite web |title=In Memory of John Whitney Walter |url=https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html |access-date=August 14, 2020 |archive-date=January 28, 2020 |archive-url=https://web.archive.org/web/20200128052150/https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html |url-status=live }}{{cite web |last=Blair |first=Gwenda |author-link=Gwenda Blair |url=https://www.politico.com/magazine/story/2018/10/07/trump-new-york-times-tax-evasion-221082/ |title=Did the Trump Family Historian Drop a Dime to ''The New York Times''? |work=[[Politico]] |date=October 17, 2018 |access-date=August 14, 2020 |archive-date=January 14, 2021 |archive-url=https://web.archive.org/web/20210114215847/https://www.politico.com/magazine/story/2018/10/07/trump-new-york-times-tax-evasion-221082 |url-status=live }} Wakagwira ntchito ku Trump Organization kwa umoyo wake unandi ndipo wakaŵa vice president mukuru wa Trump Management, Inc.{{sfn|Trump|2020|pp=193–94}}{{cite web |title=Celebrating 85 years |url=https://www.fnbli.com/ContentDocumentHandler.ashx?DocumentId=20259 |work=The First National Bank of Long Island |access-date=August 14, 2020 |page=19 |archive-date=January 14, 2021 |archive-url=https://web.archive.org/web/20210114215848/https://www.fnbli.com/ContentDocumentHandler.ashx?DocumentId=20259 |url-status=live }}{{cite news |last=Horowitz |first=Jason |url=https://www.nytimes.com/2016/08/13/us/politics/fred-donald-trump-father.html |title=Fred Trump Taught His Son the Essentials of Showboating Self-Promotion |newspaper=[[The New York Times]] |date=August 12, 2016 |access-date=August 14, 2020 |archive-date=January 14, 2021 |archive-url=https://web.archive.org/web/20210114215817/https://www.nytimes.com/2016/08/13/us/politics/fred-donald-trump-father.html |url-status=live }} Wakaŵaso na umwini wa All County Building Supply & Maintenance Corp pamoza na Donald Trump, Maryanne Trump Barry, Elizabeth Trump Grau, na Robert Trump.{{cite news |url=https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html |title=Trump Engaged in Suspect Tax Schemes as He Reaped Riches From His Father |work=[[The New York Times]] |last1=Barstow |first1=David |author1-link=David Barstow |last2=Craig |first2=Susanne |author2-link=Susanne Craig |last3=Buettner |first3=Russ |author3-link=Russ Buettner |date=October 2, 2018 |access-date=August 14, 2020 |archive-date=November 18, 2019 |archive-url=https://web.archive.org/web/20191118093054/https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html |url-status=live }} Walter wakaŵaso meya wa [[Flower Hill, New York]] kufuma mu 1988 m'paka 1996, ndipo wakaŵa mulembi wa mdauko wa tawuni iyi kufuma mu 1996 m'paka nyifwa yake mu 2018.{{Cite web|last=Torrance|first=Luke|date=January 10, 2018|title=John Walter, Flower Hill mayor and cousin of the president, dies – News|url=https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|access-date=November 23, 2020|website=The Island Now|language=en-US|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052147/https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|url-status=live}}{{Cite web|date=Spring 2018|title=Village Letter – Spring 2018|url=http://villageflowerhill.org/wp-content/uploads/2018/08/Spring-18.pdf|access-date=September 17, 2020|website=Village of Flower Hill|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114215754/http://villageflowerhill.org/wp-content/uploads/2018/08/Spring-18.pdf|url-status=live}} === Mary L. Trump === {{Main|Mary L. Trump}} Mary L. Trump, muzukuru wa Donald Trump, ni [[clinical psychology|dokotala wa sayansi ya maghanoghano]], munthu wa bizinesi, ndiposo mulembi. Wamanyikwa chifukwa cha kususka Donald Trump ndipo wakalemba buku lakukhwaskana nayo na mbumba yake lakuti ''[[Too Much and Never Enough]]'' (2020). === Fred Trump III === {{Main|Fred Trump III}} Fred Trump III, muzukuru wa Donald Trump, ni munthu wa bizinesi, mulembi, ndiposo mulwani wa wanthu ŵakukhala na ulwari. Wakamususka Donald Trump mu [[memoir]] yake ya 2024 ndipo walutilira kumususka kufuma apo buku ili likafumira. == Chidule cha mbumba == {| class="wikitable sortable" !Kubabika !Nyifwa !Chithuzithuzi !Zina !Ubale na Donald Trump !Ufumu !Udindo !Nchito !{{Reference column heading}} |- |1869 |1918 |[[File:Elisabeth Christ & Friedrich Trump (cropped).jpg|frameless|100px]] |[[Frederick Trump]] |Sekuru wa awisi wa Donald Trump |Mujeremani | |Wakumeta sisi, mwenecho wa malo ghakurughirako vyakurya na hotelo, kweniso mwenecho wa nyumba ya uhule |<ref name="brothel">{{cite web |last1=Panetta |first1=Alexander |date=September 19, 2015 |title=Donald Trump's grandfather ran Canadian brothel during gold rush |url=http://www.cbc.ca/news/canada/trump-canada-yukon-1.3235254 |access-date=December 10, 2015 |website=[[CBC News]] |archive-date=April 27, 2019 |archive-url=https://web.archive.org/web/20190427112759/https://www.cbc.ca/news/canada/trump-canada-yukon-1.3235254 |url-status=live }}</ref><ref name="WhoHeIs">{{cite web |last=Blair |first=Gwenda |date=August 24, 2015 |title=The Man Who Made Trump Who He Is |url=https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647/ |access-date=March 11, 2016 |publisher=[[Politico]] |ref=none |archive-date=April 28, 2019 |archive-url=https://web.archive.org/web/20190428214907/https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647 |url-status=live }}</ref> |- |1880 |1966 |[[File:Elisabeth_Christ.jpg|frameless|100px]] |[[Elizabeth Christ Trump]] |Sekuru mwanakazi wa awisi wa Donald Trump |Mujeremani-Muamerika | |Wamalonda wa bizinesi ya malo |<ref>{{cite news |date=August 3, 1918 |title=Real Estate News |page=16 |work=The Brooklyn Daily Eagle |url=https://www.newspapers.com/image/55626090/?terms=%22e%20trump%22&match=1 |access-date=March 1, 2023 |archive-date=August 14, 2021 |archive-url=https://web.archive.org/web/20210814041345/https://www.newspapers.com/image/55626090/?terms=%22e%20trump%22&match=1 |url-status=live }}</ref><ref>{{cite news |date=November 22, 1918 |title=Real Estate Field |page=18 |work=The New York Times |url=https://www.newspapers.com/image/26761488/?terms=%22e%20trump%22&match=1 |access-date=March 1, 2023 |archive-date=August 14, 2021 |archive-url=https://web.archive.org/web/20210814041337/https://www.newspapers.com/image/26761488/?terms=%22e%20trump%22&match=1 |url-status=live }}</ref> |- |1905 |1999 |[[File:Fred Trump in the 1980s (3x4 cropped).jpg|frameless|100px]] |[[Fred Trump]] |Awiske Donald Trump |Muamerika | |Mupangiska wa malo na wamalonda |{{Sfn|Blair|2015|pp=90, 94–5}} |- |1907 |1985 |[[File:John G Trump portrait c1955 cropped.png|frameless|100px]] |[[John G. Trump]] |Dada wa awiske Donald Trump |Muamerika | |Injiniya wa vya magetsi, msambiri, na wasayansi wa fiziki |<ref name="NAP2">{{cite book |url=http://www.nap.edu/openbook.php?record_id=1384&page=333 |title=John George Trump &#124; Memorial Tributes: National Academy of Engineering, Volume 3 &#124; The National Academies Press |publisher=Nap.edu |year=1989 |isbn=978-0-309-03939-0 |doi=10.17226/1384 |access-date=2016-12-24 |archive-date=September 10, 2015 |archive-url=https://web.archive.org/web/20150910075219/http://www.nap.edu/openbook.php?record_id=1384&page=333 |url-status=live }}</ref> |- |1912 |2000 | |[[Mary Anne MacLeod Trump]] |Anyina a Donald Trump |Muskotilandi-Muamerika | |Wantchito wa pa nyumba |<ref name="kruse">{{cite news |last=Kruse |first=Michael |date=November 4, 2017 |title=The Mystery of Mary Trump |work=[[Politico Magazine]] |url=https://www.politico.com/magazine/story/2017/11/03/mary-macleod-trump-donald-trump-mother-biography-mom-immigrant-scotland-215779/ |access-date=November 4, 2017 |archive-date=April 20, 2019 |archive-url=https://web.archive.org/web/20190420055351/https://www.politico.com/magazine/story/2017/11/03/mary-macleod-trump-donald-trump-mother-biography-mom-immigrant-scotland-215779 |url-status=live }}</ref> |- |1934 |2018 | |[[John W. Walter]] |Mubali wakwamba wa Donald Trump |Muamerika |Meya wa nambara 14 wa [[Flower Hill, New York|Flower Hill]] |Mulembi wa mdauko, injiniya, wamalonda, mulembi, na wandale |<ref name="obituary" /><ref name=":02" /> |- |1937 |2023 |[[File:Maryanne_Trump_Barry.png|frameless|100px]] |[[Maryanne Trump Barry]] |Mudumbu wa Donald Trump |Muamerika |Mweruzgi wa [[United States Court of Appeals for the Third Circuit|Khoti la Apilu la Third Circuit]] |Loya, mweruzgi |<ref name="Blair_2000">{{cite book |last=Blair |first=Gwenda |url=https://archive.org/details/trumps00gwen/page/592 |title=The Trumps: Three Generations of Builders and a President |publisher=[[Simon & Schuster]] |year=2001 |isbn=978-0743210799 |location=New York City |pages=[https://archive.org/details/trumps00gwen/page/592 592] |orig-year=2000}}</ref> |- |1938 |1981 |[[File:Fred_Trump_Jr._1966_(cropped).jpg|frameless|100px]] |[[Fred Trump Jr.]] |Mubali mukuru wa Donald Trump |Muamerika | |Wakwendeska ndege |<ref>{{cite news |last1=Kordes |first1=John |date=March 29, 2018 |title=The Kordes Korner |work=Garden City News |location=Garden City, NY |url=https://www.gcnews.com/articles/the-kordes-korner-55/ |access-date=March 1, 2023 |archive-date=January 12, 2023 |archive-url=https://web.archive.org/web/20230112172254/https://www.gcnews.com/articles/the-kordes-korner-55/ |url-status=live }}</ref> |- |1946 |– |[[File:Official Presidential Portrait of President Donald J. Trump (2025) (cropped)(2).jpg|frameless|100px]] |[[Donald Trump]] |Iyomwene |Muamerika |Purezidenti wa nambara 45 na 47 wa [[Purezidenti wa United States]] |Wandale, munthu wa pa mawayilesi, na wamalonda |<ref>{{cite news |title=Certificate of Birth |publisher=[[New York City Department of Health and Mental Hygiene|Department of Health]] – City of New York – Bureau of Records and Statistics |url=https://abcnews.go.com/US/page?id=13248168 |access-date=October 23, 2018 |archive-url=https://web.archive.org/web/20160512232306/https://abcnews.go.com/US/page?id=13248168 |archive-date=May 12, 2016 |via=[[ABC News (United States)|ABC News]]}}</ref><ref>{{cite news |title=Certificate of Birth: Donald John Trump |publisher=[[Jamaica Hospital Medical Center]] |url=https://www.foxnews.com/projects/pdf/20110328125536753.pdf |access-date=October 23, 2018 |archive-date=April 9, 2011 |archive-url=https://web.archive.org/web/20110409070650/https://www.foxnews.com/projects/pdf/20110328125536753.pdf |url-status=live }}</ref> |- |1948 |2020 | |[[Robert Trump]] |Mubali wa Donald Trump |Muamerika | |Wamalonda |<ref name="NYT">{{Cite news |last=Karni |first=Annie |date=August 15, 2020 |title=Robert S. Trump, the President's Younger Brother, Dies at 71 |language=en-US |work=The New York Times |url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html |access-date=August 16, 2020 |issn=0362-4331 |archive-date=August 16, 2020 |archive-url=https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html |url-status=live }}</ref> |- |1949 |2022 |[[File:Ivana Trump cropped retouched.jpg|frameless|100px]] |[[Ivana Trump]] |Muwoli wakwamba wa Donald Trump |Muchiki na Muamerika | |Wamalonda |<ref>{{cite web |author=Adela Suliman and Shayna Jacobs |date=July 16, 2022 |title=Ivana Trump died of 'blunt impact injuries,' medical examiner says |url=https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |newspaper=Washington Post |access-date=March 1, 2023 |archive-date=July 16, 2022 |archive-url=https://web.archive.org/web/20220716160620/https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |url-status=live }}</ref> |- |1962 |– | |[[Fred Trump III]] |Mupwa wa Donald Trump |Muamerika | |Wamalonda, mulembi, na wakuvikilira wanthu ŵakulemala |<ref>{{cite news |url=https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|title=F. C. Trump 3d, Realty Manager, Weds Ms. Lorant |date=September 17, 1989|website=The New York Times|access-date=May 7, 2022 |archive-date=March 15, 2018 |archive-url=https://web.archive.org/web/20180315005336/https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html |url-status=live}}</ref> |- |1963 |– |[[File:Marla_Maples_LF_crop_(cropped).jpg|frameless|100px]] |[[Marla Maples]] |Muwoli wachiŵiri wa Donald Trump |Muamerika | |Woseŵera mafilimu, munthu wa pa wayilesi ya kanema, modeli, muvwiri, na mupharazgi |<ref>{{cite web |editor=David L. Beckwith |title=Marla Ann Maples b. 27 Oct 1963 Georgia |url=https://www.smokykin.com/tng/getperson.php?personID=I179444&tree=Smokykin |access-date=December 1, 2016 |work=Smoky Mountain Ancestral Quest |archive-date=June 12, 2018 |archive-url=https://web.archive.org/web/20180612140317/https://www.smokykin.com/tng/getperson.php?personID=I179444&tree=Smokykin |url-status=live }}</ref> |- |1965 |– |[[File:Mary L. Trump (3x4 cropped).jpg|left|frameless|100px]] |[[Mary L. Trump]] |Muzukuru mwanakazi wa Donald Trump |Muamerika | |Wakumanya vya maghanoghano na mulembi |<ref>{{cite magazine |last=Carlson |first=Adam |date=June 15, 2020 |title=What to Know About Donald Trump's Niece Mary, Who Fought Him in Court & Is Writing a Tell-All |url=https://people.com/politics/what-to-know-about-donald-trump-niece-mary-trump/ |url-status=live |magazine=[[People (magazine)|People]] |location=United States |archive-url=https://web.archive.org/web/20200704013654/https://people.com/politics/what-to-know-about-donald-trump-niece-mary-trump/ |archive-date=July 4, 2020 |access-date=July 4, 2020}}</ref> |- |1970 |– |[[File:Melania Trump’s Official White House Portrait (2025) (much further cropped).jpg|frameless|100px]] |[[Melania Trump]] |Muwoli wachitatu wa Donald Trump |Musloveni na Muamerika |[[First Lady of the United States|Dona Wakwamba wa United States]] |Modeli na wamalonda |<ref name="CollinsModel">{{cite news |last=Collins |first=Lauren |date=May 9, 2016 |title=The Model American: Melania Trump is the exception to her husband's nativist politics |magazine=The New Yorker |url=http://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |url-status=live |access-date=May 3, 2016 |archive-url=https://web.archive.org/web/20181119152650/https://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |archive-date=November 19, 2018}}</ref> |- |1977 |– |[[File:Donald_Trump,_Jr._(51770696331)_(cropped).jpg|frameless|100px]] |[[Donald Trump Jr.]] |Mwana wa Donald Trump na Ivana |Muamerika | |Wakovwira vya ndale, wamalonda, mulembi na wakale wakupharazga pa wayilesi ya kanema |<ref name="gq">{{cite news |last=Ioffe |first=Julia |date=June 20, 2018 |title=The Real Story of Donald Trump Jr. |work=[[GQ (magazine)|GQ]] |url=https://www.gq.com/story/real-story-of-donald-trump-jr |url-status=live |access-date=June 21, 2018 |archive-url=https://web.archive.org/web/20180621141307/https://www.gq.com/story/real-story-of-donald-trump-jr |archive-date=June 21, 2018}}</ref> |- |1981 |– |[[File:Ivanka_Trump_official_portrait_(cropped_2).jpg|frameless|100px]] |[[Ivanka Trump]] |Mwana mwanakazi wa Donald Trump na Ivana |Muamerika |[[Senior Advisor to the President of the United States|Mulongozgi wa Purezidenti]] |Wamalonda na wakale wantchito wa ndale |<ref>{{Cite web |date=March 8, 2017 |title=From rich kid to first daughter: The fabulous life of Ivanka Trump |url=https://www.independent.co.uk/news/people/from-rich-kid-to-first-daughter-the-fabulous-life-of-ivanka-trump-a7618966.html |access-date=January 26, 2022 |website=The Independent |language=en |archive-date=January 26, 2022 |archive-url=https://web.archive.org/web/20220126190924/https://www.independent.co.uk/news/people/from-rich-kid-to-first-daughter-the-fabulous-life-of-ivanka-trump-a7618966.html |url-status=live }}</ref> |- |1984 |– |[[File:Eric_Trump_by_Gage_Skidmore.jpg|frameless|100px]] |[[Eric Trump]] |Mwana wa Donald Trump na Ivana |Muamerika | |Wamalonda, wakovwira vya ŵanthu na wakale wakupharazga pa wayilesi ya kanema ya ''reality'' |- |1993 |– |[[File:Tiffany_Trump_RNC_2016_cropped.jpg|frameless|100px]] |[[Tiffany Trump]] |Mwana mwanakazi wa Donald Trump na Marla Maples |Muamerika | |Mulongozgi wakovwira pa kafukufuku wa malango |<ref>{{Cite web |last=Struyk |first=Ryan |date=April 11, 2016 |title=Trump Kids Eric and Ivanka Miss Deadline to Vote in NY GOP Primary |url=https://abcnews.go.com/Politics/donald-trumps-kids-eric-ivanka-miss-deadline-vote/story?id=38303943 |url-status=live |archive-url=https://web.archive.org/web/20171012105540/http://abcnews.go.com/Politics/donald-trumps-kids-eric-ivanka-miss-deadline-vote/story?id=38303943 |archive-date=October 12, 2017 |access-date=October 11, 2017 |publisher=[[ABC News (United States)|ABC News]]}}</ref> |- |2006 |– |[[File:Barron Trump at Donald Trump's second inauguration (2).jpg|frameless|100px]] |[[Barron Trump]] |Mwana wa Donald Trump na Melania |Muamerika | |Msambiri wa pa yunivesite |<ref name="peopleCM">{{cite magazine |last1=Chamlee |first1=Virginia |date=August 20, 2021 |first2=Linda |last2=Marx |title=Barron Trump Enrolls in Private School in Palm Beach After Family Leaves White House |url=https://people.com/politics/barron-trump-enrolls-in-palm-beach-private-school/ |magazine=[[People (magazine)|People]] |access-date=February 18, 2022 |language=en |archive-date=February 16, 2022 |archive-url=https://web.archive.org/web/20220216155331/https://people.com/politics/barron-trump-enrolls-in-palm-beach-private-school/ |url-status=live }}</ref> |} == Heraldry == [[Joseph E. Davies]], mfumu wachitatu wa [[Marjorie Merriweather Post]] ndiposo wakaŵa nthumwi yakale ya United States wa mphapu ya [[Wales|Welsh]], wakapika chimanyikwiro cha mbumba (coat of arms), icho chikaŵa na [[motto]] yakuti ''Integritas'', na [[King of Arms#Kings of Arms for England, Wales and Northern Ireland|British heraldic authority]] pa [[College of Arms]], mu 1939. Davies wakaŵavya ŵana ŵanalume ŵakuhara, ndipo wakati wafwa, mwana wake mukuru mwanakazi Eleanor Tydings wakaŵa [[heraldic heiress]]. Pamanyuma pake, kuyana na mwambo wa [[Anglosphere]] wa [[male primogeniture]], chimanyikwiro chakuhalira icho Tydings wakapokera chikafuma kwa mwana wake, [[Joseph Tydings|Senator Joseph Tydings]], ndipo pamanyuma pake chikapita ku mwana wake wakwamba mwanalume wakubabika mwakwenelera, nga mbahaliri ŵa chimanyikwiro icho, muyirayira. Donald Trump wakagura malo gha ku Florida gha [[Mar-a-Lago]] mu 1985. Malo agha ghakazengeka na Merriweather Post, uyo wakalongoranga chomene chimanyikwiro cha mbumba cha mfumu wake wakufwa pa malo agha. Wakati wagura malo agha, Trump wakamba kugwiliskira ntchito chimanyikwiro cha mbumba cha Davies nga ntchake. Vimanyikwiro ivi vikugwiliskirika ntchito pa [[Trump National Golf Club (disambiguation)|malo gha gofu gha Trump]] ndiposo pa malo ghanyake ghanandi gha [[Trump Organization]] mu United States yose. Pamanyuma pake Trump wakambaso kugwiliskira ntchito mtundu wakusintha pachoko wa chimanyikwiro cha Davies, uwo nawo ukalembeskeka na Trump ku ofesi ya United States ya ma patent na ma trademark.{{Infobox COA wide|image=File:Coat of Arms of Trump (Davies).svg|escutcheon=Argent ermined Or, two Chevronels couped between three demi-Lions, all Or.|crest=A Cubit Arm erected Argent, enfiling a Mascle and holding a Spear point upward, all Or.|name=Donald Trump|armiger=Donald Trump (1946–)|symbolism=|year_adopted=1985}} Mu 2008, Trump wakayezga kukhazikiska logo ya ku America pa [[Trump International Golf Links, Scotland|Trump International Golf Links]] yake yiphya mu [[Balmedie]], Scotland, kweni wakachenjezgeka na [[Lord Lyon King of Arms]], uyo ni mukuru chomene pa nkhani za [[Scottish heraldry]], kuti dango la Nyumba ya Malango ya Scotland la mu 1672 likukanizga ŵanthu kugwiliskira ntchito vimanyikwiro vya mbumba vyambura kulembeskeka. Mu Janyuwale 2012, pati pajumpha nyengo yichoko waka kufuma apo malo gha gofu ghakajulikiranga, Trump wakavumbura chimanyikwiro chiphya cha mbumba icho chikapika ku "The Trump International Golf Club Scotland Ltd" na Lord Lyon mu 2011. Sarah Malone, muteŵeti mukuru wakulongozga wa "The Trump International Golf Links, Scotland", wakati: "chimanyikwiro cha mbumba ichi chikuphatikizapo vimanyikwiro vyakuwoneka ivyo vikulongora vigaŵa vyakupambanapambana vya mphapu ya mbumba ya Trump [...], Lion Rampant (pa crest) wakuyimira Scotland ndipo nyenyezi zikuyimira America. Ma chevronels ghatatu ghakuyimira kuchanya, mchenga wa mapiri gha m'mphepete mwa nyanja, na nyanja—ivyo ni vigaŵa vikuru vya malo agha. Mphungu ya mitu yiŵiri yikuyimira mphapu ziŵiri na mtundu wa Trump (wa ku Scotland na wa ku Germany). Mphungu iyi yikukora mipira ya gofu, yakuyimira zina likuru la maseŵero gha gofu, ndipo [[motto]] yakuti ''Numquam Concedere'' ni Chilatini chakung'anamura kuti 'Kuleka yayi'—ivyo ni fundo ya umoyo wa Trump." Kwambira mu 2014, Trump wakamba kugwiliskiraso ntchito logo yeneyiyi pa [[Trump International Golf Links and Hotel Ireland|Trump International Golf Links, Ireland]], malo gha gofu agho wakazenga pamanyuma pa kugura [[Doonbeg]] Golf Club.{{Infobox COA wide|image=File:Coat of Arms of Trump International Golf Club.svg|escutcheon=Party per chevron: Azure two Mullets Argent; Vert a double headed Eagle of the second, wings displayed and inverted, armed and langued Gules, holding in its talons two Globes of the second; overall three chevronels Or.|crest=A demi-Lion rampant Gules, armed and langued Azure, holding in the paws a Pennon Or flowing to the sinister.|name=the Trump International Golf Links|armiger=Trump International Golf Links (2012–)|symbolism=|year_granted=2011|motto="Numquam concedere" (Chilatini chakung'anamura kuti "Kuleka yayi").}} ==Wonaniso== * [[Mbumba ya Barack Obama]], uyo wakalongozga Donald Trump pa udindo wa purezidenti mu nyengo yake yakwamba (2009–2017) * [[Mbumba ya Joe Biden]], uyo wakalondezgapo Donald Trump pa nyengo yake yakwamba ndipo wakamulongozga pambere wandawelere pa nyengo yake yachiŵiri (2021–2025) * [[Mbumba ya JD Vance]], waŵiri wa purezidenti wa Donald Trump pa nyengo yake yachiŵiri == Maukaboni == === Maukaboni gha m'malemba === {{Reflist|30em}} === Mabuku ghakugwiliskirika ntchito === <!--Chigaŵa ichi ntcha mabuku pera agho ghakuzunulika mu maukaboni gha pasi pa peji la nkhani iyi ya Wikipedia.--> {{Refbegin|30em}} * {{cite book|last=Blair|first=Gwenda|title=The Trumps: Three Generations of Builders and a Presidential Candidate|url=https://books.google.com/books?id=uJifCgAAQBAJ|author-link=Gwenda Blair|year=2015|orig-year=2000|publisher=[[Simon & Schuster]]|isbn=978-1-5011-3936-9|location=New York|language=en|access-date=April 8, 2017|archive-date=April 18, 2019|archive-url=https://web.archive.org/web/20190418082225/https://books.google.com/books?id=uJifCgAAQBAJ|url-status=live}} * {{cite book |title=Too Much and Never Enough |last=Trump |first=Mary L. |author-link=Mary L. Trump |publisher=[[Simon & Schuster]] |year=2020 |isbn=978-1-982141-46-2 |location=New York |oclc=1164093746 }} {{refend}} {{Trump family|state=expanded}} {{Donald Trump}} {{United States presidential family political lines}} {{DEFAULTSORT:Trump family}} [[Category:Trump family|*]] [[Category:Mbumba za ku America za mphapu ya ku Scotland]] [[Category:Mbumba za bizinesi za United States]] [[Category:Mbumba zakwamba za United States]] [[Category|Mbiri ya ŵa ku America ŵa mphapu ya ku Germany]] [[Category:Mbumba kuyana na munthu]] iksf2f2nij7em96zp9d57dmsgoj7h64 116835 116808 2026-07-16T10:35:56Z Tumbuka Arch 6863 /* John W. Walter */ 116835 wikitext text/x-wiki {{Short description|Banja la ku America la bizinesi na ndale}} {{pp-vandalism|small=yes}} {{Use American English|date=August 2023}} {{Use mdy dates|date=August 2023}} {{Infobox family | name = Banja la Trump | image = {{multiple image |align=center |direction=horizontal |border=infobox |image1=Frederick Trump (cropped).jpg |width1=92 |caption1=[[Frederick Trump]] |image2=Fred Trump in the 1980s (cropped2) (b).jpg |width2=92 |caption2=[[Fred Trump]] |image3=Donald Trump in the Oval Office, June 2017 (cropped) (b).jpg |width3=96 |caption3=[[Donald Trump]] | total_width = }} | founder = Frederick Trump | origin = [[Kallstadt]], Germany | region = [[Msumba wa New York]] na [[Palm Beach, Florida]], U.S. | members = {{Collapsible list|[[Frederick Trump|Frederick]]|[[Fred Trump|Fred]]|[[Maryanne Trump Barry|Maryanne]]|[[Fred Trump Jr.|Fred Jr.]]|[[Fred Trump III|Fred III]]|[[Mary L. Trump|Mary]]|[[Donald Trump|Donald]]|[[Donald Trump Jr.|Donald Jr.]]|[[Kai Trump|Kai]]|[[Ivanka Trump|Ivanka]]|[[Eric Trump|Eric]]|[[Tiffany Trump|Tiffany]]|[[Barron Trump|Barron]]|[[Robert Trump|Robert]]|[[John G. Trump|John]]}} | connectedmembers = [[Elizabeth Christ Trump]][[Mary Anne MacLeod Trump|Mary Anne Trump]][[John W. Walter]][[Melania Trump]][[Jared Kushner]][[Lara Trump]][[Michael Boulos]] | otherfamilies = [[Fuko la MacLeod]][[Banja la Kushner]] | current head = Donald Trump | titles = {{Collapsible list | [[Pulezidenti wa United States]] ([[Ulongozgi wakwamba wa Donald Trump|wa 45]] & [[Ulongozgi wachiŵiri wa Donald Trump|wa 47]]) | [[Mama wakwamba wa United States]] | [[Ofesi ya White House|Mulongozgi wa Ofesi ya Economic Initiatives and Entrepreneurship]] | [[Mulongozgi wa Pulezidenti wa United States#Mndandanda wa alangizi ŵa pulezidenti|Mulongozgi wa Pulezidenti]] | [[Mweruzgi wa boma la United States]] (wa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey|Khoti la Chigaŵa la New Jersey]] na [[Khoti la United States la Apilo la Dera Lachitatu|Khoti la Apilo la Dera Lachitatu]]) | [[Udindo wa mweruzgi mukuru|Mweruzgi mukuru]] wa Khoti la United States la Apilo la Dera Lachitatu | [[Republican National Committee|Wachiŵiri Mulongozgi wa Republican National Committee]] }} }} {{Donald Trump series|expanded=Life and business}} '''Banja la Trump''' ni banja lakumanyikwa chomene la ku America ilo lili na usambazi ukuru. Munthu uyo wakumanyikwa chomene mu banja ili ni [[Donald Trump]], mutu wa banja, uyo wakaŵa pulezidenti wa 45 ndipo sono ni pulezidenti wa 47 wa [[Pulezidenti wa United States]] (2017–2021, 2025–sono). Ŵa Trump mba [[Ŵa Germany|Ŵa German]].{{cite web |url=https://www.scottishroots.com/people/donald.php |title=Scottish Roots – Donald Trump |website=Scottish Roots |access-date=January 29, 2018 |archive-url=https://web.archive.org/web/20180126235639/https://www.scottishroots.com/people/donald.php |archive-date=January 26, 2018 |url-status=live }} Mbakuchita bizinesi, vyakusanguluska, ndale, na vya malo na nyumba. Ŵanthu ŵanyake ŵakumanyikwa mu banja ili ni awiske ŵa Donald Trump [[Fred Trump]], na sekuru ŵake [[Frederick Trump]]. == Banja lapafupi == === Mutu wa banja === ==== Donald Trump ==== {{Main|Donald Trump}} === Wives === ==== Ivana Trump ==== {{Main|Ivana Trump}} Ivana Marie Trump ({{née| Zelníčková}}), muwoli wakwamba wa Donald Trump, wakababikira pa February 20, 1949, mu [[Zlín]], [[Czechoslovakia]] (sono [[Czech Republic]]). Wakaŵa wakuwoneska mafashoni na mwanakazi wa bizinesi uyo wakaŵa nzika ya ku United States mu 1988. Ŵakaŵa pa nthengwa kufuma mu 1977 m'paka 1990. Ivana wakafwa mu 2022 chifukwa cha [[Vikuluzikulu vya kuvulala chifukwa cha kugongana mwankhongono|vikuluzikulu vya kuvulala chifukwa cha kugongana mwankhongono]] pa [[Chifuŵa|chigaŵa cha thupi]] pamanyuma pakuti wawa pa masitepu pa nyumba yake ku [[Upper East Side]] ya [[Manhattan]]. Ivana wakaŵa mukuru wa [[Trump Organization]] kwa vyaka vinkhondi na viŵiri, kusazgapo udindo wa vice president mukuru wa kapangidwe ka mukati mwa nyumba. Wakalongozga kapangidwe ka mukati mwa [[Trump Tower]] uko kukamanyikwa na malibwe gha pink marble. Ivana wakimikika kuŵa CEO kweniso pulezidenti wa [[Trump Castle Hotel and Casino]] mu [[Atlantic City, New Jersey|Atlantic City]], ndipo pamanyuma wakaŵa mulembi mukuru wa [[Plaza Hotel]] mu Manhattan. ==== Marla Maples ==== {{main|Marla Maples}} Marla Ann Maples, muwoli wachiŵiri wa Donald Trump, wakababikira pa October 27, 1963, mu [[Cohutta, Georgia]], U.S. Wakaŵa mulembi wa mafilimu, munthu wakumanyikwa pa kanema wa pa TV, wakuwoneska mafashoni, wakwimba sumu ndiposo wakulongozga mapulogalamu. Ŵakanjira nthengwa mu December 1993, myezi yiŵiri pamanyuma pa kubabika kwa mwana wawo mwanakazi [[Tiffany Trump|Tiffany]], ŵakapatukana mu 1997 ndipo ŵakaparana mu 1999.{{cite magazine|url=http://www.vanityfair.com/magazine/2015/07/donald-ivana-trump-divorce-prenup-marie-brenner |title=After The Gold Rush|date=September 1, 1990|access-date=September 1, 2016|magazine=Vanity Fair}}{{cite news|url=https://www.nytimes.com/1993/12/21/nyregion/vows-it-s-a-wedding-blitz-for-trump-and-maples.html|title=It's a Wedding Blitz for Trump and Maples|date=December 21, 1993|newspaper=[[The New York Times]]}} ==== Melania Trump ==== {{Main|Melania Trump}} Melania Trump ({{née|Knauss}}), muwoli wachitatu ndiposo wa sono wa Donald Trump, wakababikira pa April 26, 1970, mu [[Novo Mesto]], [[Socialist Federal Republic of Yugoslavia|Yugoslavia]] (sono [[Slovenia]]). Wakaŵa na ntchito yitali ya kuwoneska mafashoni ndipo ni mama wakwamba wachiŵiri wa ku United States wakubabikira ku charu chinyake, wakwamba wakaŵa [[Louisa Adams]].{{cite news |url=http://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |title=The Model American |newspaper=[[The New Yorker]] |date=May 9, 2016 |access-date=November 10, 2016 |archive-url=https://web.archive.org/web/20180726045037/https://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |archive-date=July 26, 2018 |url-status=live }} Ŵakanjira nthengwa mu 2005. Melania wakaŵa nzika ya ku United States pa July 28, 2006.{{Cite news |date=2018-08-09 |title=Melania Trump's Slovenian parents become US citizens |language=en-GB |work=BBC News |url=https://www.bbc.com/news/world-us-canada-45137752 |access-date=2022-07-07 |archive-date=July 7, 2022 |archive-url=https://web.archive.org/web/20220707012758/https://www.bbc.com/news/world-us-canada-45137752 |url-status=live }} Wakasamukira nyengo yeneyiyo yayi ku [[White House]] apo mfumu wake yikazgoka pulezidenti, kweni wakakhala ku [[Trump Tower]] pamoza na mwana wawo [[Barron Trump]] m'pakaumaliro wa chaka cha masambiro cha 2016–2017.{{cite news |url=https://www.nytimes.com/2016/11/21/us/politics/melania-trump-barron-trump-donald-trump-new-york-white-house.html |title=Melania and Barron Trump Won't Immediately Move to White House |newspaper=The New York Times |date=November 20, 2016 |access-date=November 21, 2016 |first=Maggie |last=Haberman |author-link=Maggie Haberman |archive-url=https://web.archive.org/web/20161124083943/http://www.nytimes.com/2016/11/21/us/politics/melania-trump-barron-trump-donald-trump-new-york-white-house.html?_r=0 |archive-date=November 24, 2016 |url-status=live }} Melania na mwana wake ŵakasamukira ku White House pa June 11, 2017. === Ŵana === {{See also|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump]]|l1=Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Ivana Trump|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald Trump na Marla Maples|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald Trump na Marla Maples]]|l2=#Donald Trump na Marla Maples|[[Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Melania Trump|Mndandanda wa ŵana ŵa mapulezidenti ŵa United States#Donald na Melania Trump]]|l3=#Donald na Melania Trump}} Trump wali na ŵana ŵankhondi kufuma ku nthengwa zitatu: [[Donald Trump Jr.|Don{{spaces}}Jr.]], [[Ivanka Trump|Ivanka]], na [[Eric Trump]] na [[Ivana Trump]]; [[Tiffany Trump]] na [[Marla Maples]]; kweniso [[Barron Trump|Barron]] na [[Melania Trump]]. ==== Nthengwa yakwamba ==== {{Main|Donald Trump Jr.|Ivanka Trump|Eric Trump}} Donald Jr., Ivanka, na Eric mbaŵana ŵatatu ŵalara chomene ŵa Trump, kufuma ku nthengwa yake yakwamba na [[Ivana Trump]]. Pambere visola vindachitike, waliyose wa ŵabali aŵa wakaŵa na udindo wa vice president mukuru pa [[Trump Organization]]. Pa nyengo ya kampeni, ŵakimilira awiske pa mapulogalamu gha nkhani gha charu chose. Pamanyuma pakuti Trump watonda pa visola, wose ŵatatu ŵakasankhika ku [[gulu la kusinthana kwa ulamuliro wa pulezidenti]]. Pamanyuma pa kukhazikiskika mu udindo, Donald{{spaces}}Jr. na Eric ŵakapokera ulongozgi wa bizinesi ya mbumba ya malo na nyumba. Ivanka wakasamukira ku [[Washington, D.C.]], pamoza na mfumu wake [[Jared Kushner]], uyo wakimikika kuŵa [[Mulongozgi Mukuru wa Pulezidenti wa United States|mulongozgi mukuru wa White House]]. ==== Nthengwa yachiŵiri ==== {{Main|Tiffany Trump}} Tiffany Ariana Trump (wakababika pa October 13, 1993) ni mwana yekha wa Donald Trump na [[Marla Maples]]. Mu 2016, wakachitako pachoko waka pa kampeni ya awiske chifukwa wakasambiranga [[Sociology|sociology]] na [[Urban studies|masambiro gha misumba]] pa [[Yunivesite ya Pennsylvania]]. Pati pajumpha kanyengo kachoko waka kufuma apo wakamalizgira masambiro ghake, wakayowoya mazgu ghakukhozgera awiske pa [[Msonkhano Wapachaka wa Republican wa 2016|Msonkhano Wapachaka wa Republican wa 2016]] apo wakaŵa na vyaka 22. Wakapokera digiri ya [[Doctor of Jurisprudence|J.D.]] kufuma ku [[Georgetown University Law Center]] mu [[Washington, D.C.]], mu May 2020. ==== Nthengwa yachitatu ==== {{main|Barron Trump}} [[File:Barron Trump at Donald Trump's second inauguration (2).jpg|thumb|upright=0.6|Barron Trump mu 2025]] Barron William Trump (wakababika pa March 20, 2006) ni mwana muchoko chomene wa Trump ndiposo mwana wake yekha na [[Melania Trump]]. Mu May 2006, Barron waka[[Ubapatizo|batizika]] ku tchalitchi la [[Tchalitchi la Episcopal (United States)|Episcopal]] la [[Bethesda-by-the-Sea]] ku Palm Beach, Florida. Wakasambira pa [[Columbia Grammar & Preparatory School]] mu [[Manhattan]] na [[Oxbridge Academy (Florida)|Oxbridge Academy]] mu [[West Palm Beach, Florida]]. Sono wakusambira pa [[Leonard N. Stern School of Business]] ya [[Yunivesite ya New York]] mu [[Manhattan]]. Padera pa [[Chingelezi|Chingelezi]], Barron wakuyowoya makora [[Chislovenia]]. Trump wakaŵa munthu wambura kunjilirapo mu ndale pa nyengo ya maulamuliro gha awiske, kweni wakakopa chidwi cha vyakupharazga nkhani nangauli Melania wakayezgayezga kulekeska mwana wake kulekana na ndale. Pamanyuma pakuti nyengo yakwamba ya ulamuliro wa awiske yamara, wakasamukira ku Florida ndipo wakamalizga masambiro mu May 2024 pa [[Oxbridge Academy]] mu [[West Palm Beach]]. Trump wakachemeka kuŵa mulembi mukuru wa Florida pa [[Msonkhano Wapachaka wa Republican wa 2024]], kweni wakakana. === Ŵazukuru === Trump wali na ŵazukuru 11. Mwana wake [[Donald Trump Jr.]] na muwoli wake wakale [[Vanessa Trump|Vanessa]] ŵali na ŵana ŵankhondi, mukuru wawo ni [[Kai Trump|Kai]]; mwana wake mwanakazi [[Ivanka Trump]] na mfumu wake [[Jared Kushner]] ŵali na ŵana ŵatatu; mwana wake [[Eric Trump]] na muwoli wake [[Lara Trump|Lara]] ŵali na ŵana ŵaŵiri; ndipo mwana wake mwanakazi [[Tiffany Trump]] na mfumu wake [[Michael Boulos]] ŵali na mwana yumoza. == Uthenga wa mphapu == [[File:Kallstadt Hauptstrasse.jpg|thumb|left|[[Kallstadt]], Germany, uko banja la Trump likwambira]] Kuyana na mulembi wa mbiri [[Gwenda Blair]], banja ili likafuma kwa loya wakwendakwenda zina lake Hanns Drumpf, uyo wakakhazikika mu [[Kallstadt]], msumba uchoko mu [[Electoral Palatinate]] wa [[Holy Roman Empire]], mu 1608, ndipo ŵana ŵake ŵakasintha zina la mbumba kufuma ku Drumpf kuya ku Trump pa nyengo ya [[Nkhondo ya Vyaka Makhumi Ghatatu]] (1618–1648). Zina la Trump likusangika mu mabuku gha Kallstadt kwambira m'ma 1700. Mupharazgi wa nkhani Kate Connolly, wakati waluta ku Kallstadt, wakasanga mitundu yakupambanapambana ya kalembero ka zina la mbumba mu mabuku gha msumba, kusazgapo Drumb, Tromb, Tromp, Trum, Trumpff, na Dromb. Johannes Trump, wakababikira mu msumba wapafupi wa [[Bobenheim am Berg]] mu 1789, wakaŵa mulimi wa mpheska mu Kallstadt kwambira m'ma 1830, apo malo agha ghakaŵa chigaŵa cha [[Ufumu wa Bavaria]], uko muzukuru wake [[Frederick Trump|Friedrich Trump]], sekuru ŵa Donald Trump, wakababikira mu 1869. Ŵanandi mwa mphapu zake nawo ŵakaŵa [[Ŵalimi ŵa mpheska|ŵalimi ŵa mpheska]] mu Kallstadt, yimoza mwa misumba yinandi ya chigaŵa chakumanyikwa cha kulima mpheska cha [[Palatinate (chigaŵa)|Palatinate]] (''Pfalz''). Mudumbu wa Johannes Trump, Charlotte Louisa, wakatora Johann Georg Heinz. Ŵakaŵa ŵasekuru ŵa [[Henry J. Heinz]] (1844–1919), uyo wakambiska kampani ya [[Heinz]]. Mphapu iyi ya Chijeremani yikabiskika kwa nyengo yitali na awiske ŵa Donald Trump, [[Fred Trump]], awo ŵakakulira mu malo agho ŵanthu ŵakayowoyanga Chijeremani m'paka apo ŵakaŵa na vyaka 10;Blair, ''The Trumps'', p. 115. pamanyuma pa [[Nkhondo Yachiŵiri ya pa Charu Chose]] m'paka m'ma 1980, ŵakaphaliranga ŵanthu kuti ŵakaŵa ŵa mphapu ya ku Sweden. Donald Trump nayo wakawerezgapo fundo iyi mu ''The Art of the Deal'' (1987), kweni pamanyuma wakati wakunyadira mphapu yake ya Chijeremani, ndipo wakaŵa [[Grand marshal|grand marshal]] wa [[German-American Steuben Parade]] wa 1999 mu [[Msumba wa New York]]. Banja la Trump ku Germany likaŵa la [[Lutheranism|Lutheran]].The small town of Kallstadt has only one religious building, the Central Lutheran church. See [[Kallstadt]] for more information. Apapi ŵa Donald Trump ŵakasopanga ku [[First Presbyterian Church in Jamaica, Queens]], uko Trump waka[[Confirmation|khwaskika mu chisimikizgo]] mu 1959. === Mndandanda === {{Tree list}} [[File:Trumpoathofoffice2025.jpg|thumb|Kufuma kumazere kuya kumalyero: [[Barron Trump]], [[Donald Trump Jr.]], [[Eric Trump]], [[Ivanka Trump]], [[Tiffany Trump]], na [[Kai Trump]] (''kumanyuma kwa Tiffany'') pa [[Kukhazikiskika kwa Donald Trump mu 2025|kukhazikiskika kwa Donald Trump mu 2025]].]] {{Tree list/final branch}} Johann Paul Trump (1727–1792), wakatora Maria Elisabetha Setzer ** Charlotte Louisa Trump (1789–1833), wakatora Johann Georg Heinz *** John Henry Heinz (1811–1891), wakasamukira ku United States mu 1840, wakatora Anna Margaretha Schmidt (1822–1899), uyo nayo wakasamukira ku United States mu 1840{{cite book |url= https://books.google.com/books?id=PxqCy0R-VzAC |title= H.J. Heinz: A Biography |first= Quentin R. |last= Skrabec |publisher= McFarland & Company |year= 2009 |isbn= 978-0-7864-4178-5 |pages= 28–29}} **** [[Henry J. Heinz|Henry John Heinz]] (1844–1919), wakambiska kampani ya [[Heinz]]{{cite book |url= https://books.google.com/books?id=PxqCy0R-VzAC |title= H.J. Heinz: A Biography |first= Quentin R. |last= Skrabec |publisher= McFarland & Company |year= 2009 |isbn= 978-0-7864-4178-5 |page= 28}} ***** Howard Heinz (1877–1941) ****** [[Jack Heinz|Henry John "Jack" Heinz II]] (1908–1987), CEO wa [[Heinz|H. J. Heinz Company]], wakatora ndipo wakaparana na Joan Diehl (1911–1999) ******* [[John Heinz|Henry John Heinz III]], [[Mubali wa Congress ya United States|Mubali wa Congress]] ndipo pamanyuma [[Mndandanda wa ŵaseneta ŵa United States kufuma ku Pennsylvania|Seneta wa United States kufuma ku Pennsylvania]] (1938–1991), wakatora [[Teresa Heinz|Teresa Simões-Ferreira]] (wakababika mu 1938), uyo pamanyuma wakatoraso [[John Kerry]] ******** [[André Heinz]] (wakababika mu 1969) ******** [[Christopher Heinz]] (wakababika mu 1973) ** {{Tree list/final branch}} Johannes Trump (1789–1835), wakatora Susanna Maria Bechtloff *** Johannes Trump Jr. (1829–1877), wakatora Katharina Kober (1836–1922){{cite book | last = Blair | first = Gwenda | author-link = Gwenda Blair | title = The Trumps: Three Generations of Builders and a Presidential Candidate | publisher = Simon & Schuster | edition = 1st | date = 2001 | page = [https://archive.org/details/trumps00gwen/page/27 27] | url = https://archive.org/details/trumps00gwen/page/27 | isbn = 9780743210799 }} **** [[Friedrich Trump]] (1869–1918), wakumeta sisi, mulembi wa malo ghakurya na mahotelo, wakasamukira ku United States mu 1885/1905, ndipo wakatora [[Elizabeth Christ Trump|Elisabeth Christ]] (1880–1966), uyo nayo wakasamukira ku United States mu 1902/1905. ***** Elizabeth (Elisabeth) Trump (1904–1961), wakatora William Otto Walter ****** William Trump Walter (1931–2020) ****** [[John Whitney Walter]] (1934–2018), wakumanyikwa kuti ni "mulembi wa mbiri ya banja la Trump", meya wa nambara 14 wa [[Flower Hill, New York]], ndipo pamanyuma wakaŵa mulembi wa mbiri ya msumba uwu,[https://www.nytimes.com/2016/08/22/us/politics/for-donald-trumps-family-an-immigrants-tale-with-2-beginnings.html For Donald Trump's Family, an Immigrant's Tale With 2 Beginnings] {{Webarchive|url=https://web.archive.org/web/20180815192005/https://www.nytimes.com/2016/08/22/us/politics/for-donald-trumps-family-an-immigrants-tale-with-2-beginnings.html |date=August 15, 2018 }}, ''The New York Times'' wakatora Joan Smith{{cite web|url=https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|title=John Walter, Flower Hill mayor and cousin of the president, dies|date=January 10, 2018|publisher=The Island Now|access-date=November 23, 2020|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052147/https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|url-status=live}}{{cite web|url=https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html|title=Obituary of John Walter – Fairchild and Sons Funeral Chapel Inc.|website=fairchildsons.com|access-date=August 15, 2020|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052150/https://fairchildsons.com/tribute/details/1766/John-Walter/obituary.html|url-status=live}} ******* Christine Walter ******* Nancy Walter ******* {{Tree list/final branch}} Cindy Walter ***** [[Fred Trump|Frederick Christ "Fred" Trump]] (1905–1999), wakuzenga na kusambaza malo na nyumba, wakatora [[Mary Anne MacLeod Trump|Mary MacLeod]] (1912–2000), uyo wakasamukira ku United States kufuma ku [[Scotland]] mu 1930. ****** [[Maryanne Trump Barry|Maryanne Trump]] (1937–2023), mweruzgi wa boma, wakatora ndipo wakaparana na David Desmond; pamanyuma wakatora John Barry ******* David William Desmond, wakatora Lisa Aitken ****** [[Fred Trump Jr.|Frederick Crist "Freddy" Trump Jr.]] (1938–1981), wakwendeska ndege wa [[Trans World Airlines|TWA]],{{Cite news |first=Gerber |last=Drew |date=August 3, 2016 |url=http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |title=Trump's Brother Rebelled Against Their Authoritarian Father By Joining a Jewish Frat |newspaper=[[The Forward]] |access-date=January 23, 2017 |archive-date=January 20, 2017 |archive-url=https://web.archive.org/web/20170120165856/http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |url-status=live }} wakatora ndipo wakaparana na Linda Clapp ******* [[Fred Trump III|Frederick Crist "Fritz" Trump III]] (wakababika mu 1962), wakatora Lisa Beth Lorant{{cite news|url=https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|title=F. C. Trump 3d, Realty Manager, Weds Ms. Lorant|date=September 17, 1989|website=The New York Times|access-date=May 7, 2022|archive-date=March 15, 2018|archive-url=https://web.archive.org/web/20180315005336/https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|url-status=live}}{{cite web|url=http://www.stamfordadvocate.com/news/article/Trump-family-gives-back-to-agency-that-helps-4590816.php|title=Trump family gives back to agency that helps developmental disabled|date=June 10, 2013|access-date=May 7, 2022|archive-date=January 28, 2020|archive-url=https://web.archive.org/web/20200128052157/https://www.stamfordadvocate.com/news/article/Trump-family-gives-back-to-agency-that-helps-4590816.php|url-status=live}} ******** Cristopher Trump ******** Andrea Trump ******** William Trump ******* [[Mary Lea Trump]] (wakababika mu 1965), wakusambira vya maghanoghano gha ŵanthu, mulembi, wakatora ndipo wakaparana na Dina Nowak ******** {{Tree list/final branch}} Avary Trump{{cite news |last1=Phelps |first1=Rob |title=Mary L. Trump on her life as an openly gay member of the First Family |url=https://bostonspiritmagazine.com/2020/11/mary-l-trump-on-her-life-as-an-openly-gay-member-of-the-first-family/ |access-date=July 14, 2022 |publisher=Boston Spirit Magazine |date=November 16, 2020 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714234334/https://bostonspiritmagazine.com/2020/11/mary-l-trump-on-her-life-as-an-openly-gay-member-of-the-first-family/ |url-status=live }} ****** Elizabeth Joan Trump (wakababika mu 1942), wakatora James Walter Grau ****** '''[[Donald Trump|Donald John Trump]]''' (wakababika mu 1946), wakuzenga na kusambaza malo na nyumba, pulezidenti wa 45 na wa 47 wa United States, wakatora ndipo wakaparana na [[Ivana Trump|Ivana Zelníčková]] (1949–2022); wakatora ndipo wakaparana na [[Marla Maples]]; wakatora [[Melania Trump|Melania Knauss]] ******* [[Donald Trump Jr.|Donald John Trump Jr.]] (wakababika mu 1977; wa nthengwa yakwamba), wakatora ndipo wakaparana na [[Vanessa Haydon]]; wakatora [[Bettina Anderson]] ******** [[Kai Trump|Kai Madison Trump]] (wakababika mu 2007; wa nthengwa yakwamba) ******** Donald John Trump III (wakababika mu 2009; wa nthengwa yakwamba) ******** Tristan Milos Trump (wakababika mu 2011; wa nthengwa yakwamba) ******** Spencer Frederick Trump (wakababika mu 2012; wa nthengwa yakwamba) ******** Chloe Sophia Trump (wakababika mu 2014; wa nthengwa yakwamba) ******* [[Ivanka Trump|Ivana Marie "Ivanka" Trump]] (wakababika mu 1981; wa nthengwa yakwamba), wakatora [[Jared Kushner]] ******** Arabella Rose Kushner (wakababika mu 2011) ******** Joseph Frederick Kushner (wakababika mu 2013) ******** Theodore James Kushner (wakababika mu 2016) ******* [[Eric Trump|Eric Frederick Trump]] (wakababika mu 1984; wa nthengwa yakwamba), wakatora [[Lara Yunaska]] ******** Eric Luke Trump (wakababika mu 2017) ******** Carolina Dorothy Trump (wakababika mu 2019) ******* [[Tiffany Trump|Tiffany Ariana Trump]] (wakababika mu 1993; wa nthengwa yachiŵiri), wakatora [[Michael Boulos]] ******** Alexander Trump Boulos (wakababika mu 2025) ******* {{Tree list/final branch}} [[Barron Trump|Barron William Trump]] (wakababika mu 2006; wa nthengwa yachitatu) ****** {{Tree list/final branch}} [[Robert Trump|Robert Stewart Trump]] (1948–2020),{{Cite news|last=Phillips|first=Morgan|date=August 14, 2020|title=Robert Trump, brother of President Trump, dead at 71|url=https://www.foxnews.com/politics/robert-trump-dead|access-date=August 15, 2020|agency=Fox News|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}} wakatora ndipo wakaparana na [[Blaine Trump|Blaine Beard]];{{cite news|url=https://www.nytimes.com/2016/10/20/fashion/michael-kors-anna-wintour-gods-love-we-deliver-gala.html|title=Michael Kors, Anna Wintour, Kate Hudson and Blaine Trump at God's Love We Deliver Gala|date=October 18, 2016|newspaper=The New York Times|access-date=May 7, 2022|archive-date=March 15, 2018|archive-url=https://web.archive.org/web/20180315005439/https://www.nytimes.com/2016/10/20/fashion/michael-kors-anna-wintour-gods-love-we-deliver-gala.html|url-status=live |last1=Bernstein |first1=Jacob }} pamanyuma wakatora Ann Marie Pallan ***** [[John G. Trump|John George Trump]] (1907–1985), wakatora Elora Gordon Sauerbrun (1913–1983) ****** John Gordon Trump (1938–2012) ****** Christine Elora Trump Philp (1942–2021) ****** {{Tree list/final branch}} Karen Elizabeth Trump Ingraham (wakababika mu 1949) {{Tree list/end}} {{Trump family tree}} == Ŵapapi == === Fred Trump === {{Main|Fred Trump}} [[File:Fred Trump in the 1980s (cropped2) (b).jpg|thumb|upright|[[Fred Trump]] mu 1986]] Wiske wa Donald Trump, Fred Trump (1905–1999), wakababikira mu New York, wakaŵa munthu wakuzenga na kusambaza malo na nyumba wakuchita makora chomene mu [[Msumba wa New York]]. Pakugwiliskira ntchito chiharo chawo, Fred Trump na anyina Elizabeth ŵakambiska kampani ya E. Trump & Son mu 1927.{{cite news|date=April 16, 1927|title=New concerns function with Queens capital|page=16|newspaper=The Daily Star|quote=E. Trump & Son Company, Inc., of Jamaica, has been formed with $50,000 capital to deal in realty.}} Kampani iyi yikakura ndipo yikazenga na kulaŵilira nyumba za mbumba yimoza mu [[Queens]], nyumba za ŵasilikari na maapartment gha munda gha ŵantchito ŵa [[Nkhondo ya pa Nyanja ya United States|U.S. Navy]] kufupi na malo ghakuru ghakuzengera ngalaŵa mumphepete mwa nyanja ya kumafumiro gha dazi, kweniso maapartment ghakujumpha 27,000 mu [[Msumba wa New York]]. Trump wakafufuzika na komiti ya [[Seneti ya United States]] chifukwa cha [[Kupenja phindu mwakujumphizga mu bizinesi|kupenja phindu mwakujumphizga]] mu 1954, ndipo so na [[Boma la New York]] mu 1966.{{sfn|Blair|2015|pages=213–216}} Donald Trump wakaŵa pulezidenti wa bizinesi ya malo na nyumba ya wiske wake mu 1971, ndipo wakayizunura zina lakuti Trump Organization pafupifupi mu 1973. Chaka chenechicho, Donald na wiske ŵakapelekeka ku khoti na [[Dipatimenti ya Malango ya United States, Chigaŵa cha Wanangwa wa Ŵanthu|Chigaŵa cha Wanangwa wa Ŵanthu cha Dipatimenti ya Malango ya U.S.]] chifukwa cha kuswa [[Dango la Nyumba Zakwenelera kwa Wose]]. Pakati pa m'ma 1970, Donald wakapokera ngongoli kufuma kwa wiske wake zakujumpha $14{{spaces}} miliyoni (pamanyuma Donald wakati zikaŵa $1{{spaces}} miliyoni pera). Donald wakateŵetera nga ni mulaŵiliri mukuru na pulezidenti wa Trump Organization mpaka wakati waŵa [[Pulezidenti wa United States|Pulezidenti wa U.S.]]. === Mary Anne MacLeod Trump === {{Main|Mary Anne MacLeod Trump}} {{further|MacLeod}} Wakababika nga ni Mary Anne MacLeod (1912–2000) ku [[Tong, Lewis|Tong]], mizi uchoko kufupi na [[Stornoway]], mu [[Vigaŵa vya kumanjiliro gha dazi vya Scotland|Western Isles]] vya Scotland. Wakaŵa mwana wa mulovi Malcolm MacLeod na Mary MacLeod ({{née|Smith}}). Wakati waŵa na vyaka 17, wakasamukira ku United States na madola 50 pera ({{Inflation|index=US|value=50|start_year=1929|fmt=eq}}), ndipo wakakhala na mudumbu wake pambere wandambe ntchito ya [[Muteŵeti wa pa nyumba|muteŵeti wa pa nyumba]] mu New York. Mary na Fred Trump ŵakakumana mu New York ndipo ŵakatorana mu 1936, na kukhazikika pamoza mu [[Queens]]. Mary wakaŵa mwanarume wa United States mu 1942. Apo Donald Trump wakaluta ku Scotland mu Juni 2008, wakati, "Nkhujipulika kuti nili wa ku Scotland." == Ŵasekuru == === Frederick Trump === {{Main|Frederick Trump}} Mu 1885, sekuru ŵa Donald Trump, Friedrich Trump, ŵakasamuka kufuma ku Kallstadt, Palatinate (pa nyengo iyo chikaŵa chigaŵa cha [[Ufumu wa Bavaria]]) kuluta ku United States apo wakaŵa na vyaka 16. Wakasintha zina lake ku Chingelezi kuŵa ''Frederick'' mu 1892 apo wakaŵa mwanarume wa United States. Pa nyengo ya [[Kudumbuka kwa golide kwa Klondike]], wakasanga usambazi mwa kujura malo ghakurya na hotelo ku [[Bennett, British Columbia|Bennett]] ndipo pamanyuma ku [[Whitehorse, Yukon|Whitehorse]], uko wakateŵeteranga [[Ŵakupenja golide|ŵakupenja golide]] awo ŵakalutanga ku chigaŵa ichi. Mulembi munyake wa mbiri wakalemba kuti bizinesi iyi yikaŵaso na nyumba ya uhule, ivyo Donald Trump wakati "mbutesi kwambura unenesko". Wakati wawelera ku Kallstadt mu 1901, Frederick wakatemwa Elisabeth Christ. Ŵakatorana mu 1902 ndipo ŵakaweleraso ku United States. Kweni Elisabeth wakakhumbanga kwawo, ntheura ŵakawelera ku Germany. Ndipouli, boma likamukanizga Frederick kukhazikika kwenekuko ndipo likamuchimbizga mu Germany mu 1905 chifukwa chakuti wakateŵetera yayi usilikari uwo ukaŵa wakukhumbikwa ndipo wakaphalira yayi boma apo wakafumanga mu 1885. Kupempha kwake kukakanika. Wakafwa mu chigaŵa chakwamba cha nthenda ya [[Nthenda ya chimfine ya ku Spain]] mu 1918. Wakati wafwa, usambazi wake ukapokelereka na muwoli wake na mwana wake. === Elizabeth Christ Trump === {{Main|Elizabeth Christ Trump}} Donald Trump's grandmother, Elizabeth Christ Trump, was born in 1880 and died on June 6, 1966. She married Frederick Trump in 1902 and moved to the United States with him. Like her husband, she was a native of Kallstadt, born as the daughter of Philipp and Marie Christ. Philipp Christ was descended from Johannes Christ of [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump was a descendant of organ builder [[Johann Michael Hartung]] through her paternal grandmother Sabina Christ.<ref>{{cite web|url=https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS: Vorfahren von Frederick Christ TRUMP|access-date=November 10, 2016|archive-url=https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November 4, 2016|url-status=dead}}</ref> == Siblings == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) was Donald Trump's eldest sister. She was a senior [[United States federal judge|federal judge]] on the [[United States Court of Appeals for the Third Circuit|Third Circuit Court of Appeals]],<ref>{{cite news|url=https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's sister weighs in on Supreme Court pick|last=Goldmacher|first=Shane|date=January 25, 2017|work=[[Politico]]|access-date=August 16, 2017|archive-url=https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August 16, 2017|url-status=live}}</ref> became inactive in 2017 after her brother took office, and retired in 2019.<ref>{{cite news |url=https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |title=Trump's sister retires, negating judicial ethics complaints |work=[[Associated Press]] |first1=Larry |last1=Neumeister |first2=Maryclaire |last2=Dale |date=April 11, 2019 |access-date=May 26, 2019 |archive-url=https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a |archive-date=May 26, 2019 |url-status=live }}</ref> === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}<ref name=":0">{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}}</ref> was Donald Trump's older brother. On September 26, 1981,<ref name=":0" /> at the age of 42, he died from a heart attack.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (born 1942) is an older sister of Donald Trump.<ref>{{cite news|title=Meet the Trumps: The family tree of Donald Trump|newspaper=MSN News|date=May 8, 2018|url=https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May 29, 2018|url-status=dead}}</ref> In 1989, she married film producer James Grau.<ref name=jamesgrau>{{cite news|title=Elizabeth Trump weds James Grau|newspaper=[[The New York Times]]|date=March 27, 1989|url=https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May 29, 2018|url-status=live|issn=0362-4331}}</ref> She worked as an administrative assistant for [[Chase Manhattan Bank]],<ref name=jamesgrau /> before retiring to Florida.<ref>{{cite news|title=Trump sister sells oceanfront Westhampton Beach home for $3.8M|newspaper=[[Newsday]]|location=Melville, New York City|first=Michael|last=Gavin|date=June 23, 2017|url=https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May 28, 2018|archive-url=https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May 29, 2018|url-status=live}}</ref> As of 2026, she is the only living sibling of Donald Trump.<ref>{{cite news |url=https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |title=Maryanne Trump Barry, the former president's older sister and a retired federal judge, dies at 86 |date=November 13, 2023 |work=ABC News |agency=Associated Press |first1=MaryClaire |last1=Dale |first2=Karen |last2=Matthews |access-date=November 14, 2023 |archive-date=November 14, 2023 |archive-url=https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529 |url-status=live }}</ref> === Robert Trump === {{Main|Robert Trump}} Donald Trump gogo wawo, Elizabeth Christ Trump, wakababika mu 1880 ndipo wakafwa pa Juni 6, 1966. Wakatorana na Frederick Trump mu 1902 ndipo wakasamukira nayo ku United States. Nga ni mfumu wake, nayo wakaŵa wakwawo ku Kallstadt, ndipo wakababika nga ni mwana wa Philipp na Marie Christ. Philipp Christ wakaŵa mphapu ya Johannes Christ wa ku [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump wakaŵa mphapu ya munthu wakazenganga maorgani, [[Johann Michael Hartung]], kwizira mwa gogo wawo wa kwa awiske, Sabina Christ.<ref>{{cite web|url=[https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS](https://gedbas.genealogy.net/person/ancestors/1178251526|title=GEDBAS): Vorfahren von Frederick Christ TRUMP|access-date=November 10, 2016|archive-url=[https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November](https://web.archive.org/web/20161104075957/https://gedbas.genealogy.net/person/ancestors/1178251526|archive-date=November) 4, 2016|url-status=dead}}</ref> == Abali na ŵadumbu == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) wakaŵa mudumbu mukuru wa Donald Trump. Wakaŵa [[mulongi wa khoti la boma la United States|mulongi mukuru wa khoti la boma]] pa [[Khoti la United States la Madandawuro la Dera Lachitatu]],<ref>{{cite news|url=[https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's](https://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|title=Trump's) sister weighs in on Supreme Court pick|last=Goldmacher|first=Shane|date=January 25, 2017|work=[[Politico]]|access-date=August 16, 2017|archive-url=[https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August](https://web.archive.org/web/20170816194016/http://www.politico.com/story/2017/01/trump-supreme-court-pick-234202|archive-date=August) 16, 2017|url-status=live}}</ref> wakaleka kugwira ntchito mu 2017 pamanyuma pakuti mudumbu wake wakaŵa pulezidenti, ndipo wakapumura ntchito mu 2019.<ref>{{cite news |url=[https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a](https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a) |title=Trump's sister retires, negating judicial ethics complaints |work=[[Associated Press]] |first1=Larry |last1=Neumeister |first2=Maryclaire |last2=Dale |date=April 11, 2019 |access-date=May 26, 2019 |archive-url=[https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a](https://web.archive.org/web/20190526105259/https://www.apnews.com/872fc6adeaca4bd8a2875b23c3f3782a) |archive-date=May 26, 2019 |url-status=live }}</ref> === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}<ref name=":0">{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}}</ref> wakaŵa mukuru wa Donald Trump. Pa Seputembala 26, 1981,<ref name=":0" /> wali na vyaka 42, wakafwa chifukwa cha matenda gha mtima.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (wakababika mu 1942) ni mudumbu mukuru wa Donald Trump.<ref>{{cite news|title=Meet the Trumps: The family tree of Donald Trump|newspaper=MSN News|date=May 8, 2018|url=[https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May](https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May](https://web.archive.org/web/20180529054348/https://www.msn.com/en-us/news/photos/meet-the-trumps-the-family-tree-of-president-elect-donald-trump/ss-AAkkfXe#image=15|archive-date=May) 29, 2018|url-status=dead}}</ref> Mu 1989, wakatorana na James Grau, uyo wakapanganga mafilimu.<ref name=jamesgrau>{{cite news|title=Elizabeth Trump weds James Grau|newspaper=[[The New York Times]]|date=March 27, 1989|url=[https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May](https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May](https://web.archive.org/web/20180529054327/https://www.nytimes.com/1989/03/27/style/elizabeth-trump-weds-james-grau.html|archive-date=May) 29, 2018|url-status=live|issn=0362-4331}}</ref> Wakagwirapo ntchito nga ni mulembi wa ofesi ku [[Chase Manhattan Bank]],<ref name=jamesgrau /> pambere wandapumure na kusamukira ku Florida.<ref>{{cite news|title=Trump sister sells oceanfront Westhampton Beach home for $3.8M|newspaper=[[Newsday]]|location=Melville, New York City|first=Michael|last=Gavin|date=June 23, 2017|url=[https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May](https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-m14488|access-date=May) 28, 2018|archive-url=[https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May](https://web.archive.org/web/20180529130104/https://www.newsday.com/classifieds/real-estate/trump-sister-sells-oceanfront-westhampton-beach-home-for-3-8m-1.13759122|archive-date=May) 29, 2018|url-status=live}}</ref> Kufika mu 2026, ndiyo yekha mudumbu wa Donald Trump uyo wachali wamoyo.<ref>{{cite news |url=[https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529](https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529) |title=Maryanne Trump Barry, the former president's older sister and a retired federal judge, dies at 86 |date=November 13, 2023 |work=ABC News |agency=Associated Press |first1=MaryClaire |last1=Dale |first2=Karen |last2=Matthews |access-date=November 14, 2023 |archive-date=November 14, 2023 |archive-url=[https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529](https://web.archive.org/web/20231114021041/https://abcnews.go.com/US/wireStory/maryanne-trump-barry-former-presidents-older-sister-retired-104856529) |url-status=live }}</ref> === Robert Trump === {{Main|Robert Trump}} Robert Stewart Trump (1948–2020) wakaŵa munung'una wa Donald Trump.<ref>{{cite news|last1=Chabba|first1=Seerat|title=Who Are Donald Trump's Siblings?|url=[https://www.yahoo.com/news/donald-trump-siblings-121333034.html|access-date=March](https://www.yahoo.com/news/donald-trump-siblings-121333034.html|access-date=March) 23, 2016|work=[[International Business Times]]|agency=[[Yahoo News]]|date=November 15, 2016|archive-url=[https://web.archive.org/web/20170324000111/https://www.yahoo.com/news/donald-trump-siblings-121333034.html|archive-date=March](https://web.archive.org/web/20170324000111/https://www.yahoo.com/news/donald-trump-siblings-121333034.html|archive-date=March) 24, 2017|url-status=live}}</ref> Wakaŵa mulongozgi wa bizinesi uyo wakalaŵiliranga Trump Management Inc, iyo yikalaŵiliranga nyumba na malo gha Trump Organization kuwaro kwa Manhattan.{{sfn|Blair|2015|p=454}} Robert Trump wakatorana na [[Blaine Trump|Blaine Beard]] mu 1980.<ref>{{cite news|date=October 28, 1987|title=The Winning Ways of Blaine Trump|work=[[The New York Times]]|url=[https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live|access-date=February](https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live|access-date=February) 11, 2017|archive-url=[https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|archive-date=January](https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|archive-date=January) 27, 2017}}</ref> Ŵakapatukana mu 2009 pamanyuma pakuti Robert wasiya muwoli wake chifukwa cha wantchito wa Trump Organization, Ann Marie Pallan. Wakatorana na Pallan kukwambilira kwa 2020.<ref>{{cite news |url=[https://www.thetimes.com/uk/article/robert-trump-obituary-f9qz0sx7t](https://www.thetimes.com/uk/article/robert-trump-obituary-f9qz0sx7t) |title=Robert Trump obituary |date=August 17, 2020 |newspaper=[[The Times]] |access-date=May 27, 2023 |archive-date=May 27, 2023 |archive-url=[https://web.archive.org/web/20230527211948/https://www.thetimes.co.uk/article/robert-trump-obituary-f9qz0sx7t](https://web.archive.org/web/20230527211948/https://www.thetimes.co.uk/article/robert-trump-obituary-f9qz0sx7t) |url-status=live }}</ref> Robert wakafwa pa Ogasiti 15, 2020, wali na vyaka 71.<ref>{{Cite news|date=August 16, 2020|title=Robert Trump: brother of president Donald Trump dies aged 71|language=en-GB|work=[[The Guardian]]|url=[https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|access-date=August](https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|access-date=August) 16, 2020|archive-date=January 14, 2021|archive-url=[https://web.archive.org/web/20210114215845/https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|url-status=live}}](https://web.archive.org/web/20210114215845/https://www.theguardian.com/us-news/2020/aug/16/robert-trump-brother-of-president-donald-trump-dies-aged-71|url-status=live}})</ref><ref>{{Cite web|last=Phillips|first=Morgan|date=August 14, 2020|title=Robert Trump, brother of President Trump, dead at 71|url=[https://www.foxnews.com/politics/robert-trump-dead|access-date=August](https://www.foxnews.com/politics/robert-trump-dead|access-date=August) 16, 2020|website=[[Fox News]]|language=en-US|archive-date=January 14, 2021|archive-url=[https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}}](https://web.archive.org/web/20210114215857/https://www.foxnews.com/politics/robert-trump-dead|url-status=live}})</ref> Kuyana na ''The New York Times'', wakaŵa na [[kukha magazi mu ubongo|kukha magazi mu ubongo]] pamanyuma pa kuwa sonosono apa.<ref>{{Cite news|last=Karni|first=Annie|author-link=Annie Karni|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|language=en-US|work=[[The New York Times]]|url=[https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August](https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August) 16, 2020|archive-date=August 16, 2020|archive-url=[https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|url-status=live}}](https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|url-status=live}})</ref> == Ŵabali ŵanyake == === John G. Trump === {{Main|John G. Trump}} John George Trump (1907–1985), dada munyake wa Donald Trump kwa awiske, wakaŵa enjiniya wa magetsi, msambiri wa sayansi, kweniso munthu wakapanganga vinthu viphya. Wakambiska mtundu wa [[chithandizo cha radiation]] wakuzingilira, ndipo pamoza na [[Robert J. Van de Graaff]], wakapanga yimoza mwa makina ghakwambilira gha [[X-ray generator|kupangira ma X-ray]] agho ghakaŵa na miliyoni yimoza ya ma volti. Wakapokera [[National Medal of Science]] kufuma kwa Pulezidenti [[Ronald Reagan]], ndipo wakaŵa yumoza wa ŵa [[National Academy of Engineering]]. === John W. Walter === {{Main|John W. Walter}} Donald Trump wa munyake wa mwanakazi wa sekuru ŵake, Elizabeth Christ Trump, wakababika mu 1880 ndipo wakafwa pa Juni 6, 1966. Wakatorana na Frederick Trump mu 1902 ndipo wakaluta nayo ku United States. Nga ni mfumu wake, nayo wakababikira ku Kallstadt, ndipo wakaŵa mwana wa Philipp na Marie Christ. Philipp Christ wakafuma mu mphapu ya Johannes Christ wa [[Flörsheim]], [[Hesse]]. Elizabeth Christ Trump wakaŵa mphapu ya mupangi wa maorgani [[Johann Michael Hartung]] kwizira mwa gogomukuru wake wa upande wa awiske, Sabina Christ. == Abali na azilumbu == === Maryanne Trump Barry === {{Main|Maryanne Trump Barry}} Maryanne Trump Barry (1937–2023) wakaŵa mudumbu mukuru wa Donald Trump. Wakaŵa [[mulongi wa khoti la boma la United States|mulongi mukuru wa khoti la boma]] pa [[Khoti la Apilu la United States la Dera Lachitatu]]. Wakaleka kugwira ntchito mu 2017 pamanyuma pakuti mudumbu wake wakamba uteŵeti wake nga ni purezidenti, ndipo wakapumura ntchito mu 2019. === Fred Trump Jr. === {{Main|Fred Trump Jr.}} Frederick "Freddy" Crist Trump{{spaces}}Jr. (1938–1981){{Sfn|Trump|2020|p=31}}{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}} wakaŵa mukuru wa Donald Trump. Pa Seputembala 26, 1981, wali na vyaka 42, wakafwa chifukwa cha nthenda ya mtima.{{sfn|Blair|2015|p=320}} === Elizabeth Trump Grau === Elizabeth Joan Trump Grau (wakababika mu 1942) ni mudumbu mukuru wa Donald Trump. Mu 1989, wakatorana na mupangi wa mafilimu James Grau. Wakagwiranga ntchito nga ni mulembi wa ofesi pa [[Chase Manhattan Bank]], pambere wandapumure na kukhala ku Florida. Kufika mu 2026, ndiyo yekha mubali wa Donald Trump uyo wachali wamoyo. === Robert Trump === {{Main|Robert Trump}} Robert Stewart Trump (1948–2020) wakaŵa mudumbu muchoko wa Donald Trump. Wakaŵa mulongozgi wa bizinesi uyo wakalongozganga Trump Management Inc, kampani iyo yikalaŵiliranga katundu wa nyumba wa Trump Organization kuwaro kwa Manhattan. Wakaŵaso mmoza wa ŵa ndalama mu SHiRT LLC, yimoza mwa makampani ghaŵiri agho ghakaŵa na CertiPathx ya ku Virginia, iyo yikapokera mgwirizano wa boma wa madola 33 miliyoni mu 2019. Robert Trump wakatorana na [[Blaine Trump|Blaine Beard]] mu 1980. Ŵakapatukana mu 2009 pamanyuma pakuti wakaleka muwoli wake chifukwa cha wantchito wa Trump Organization Ann Marie Pallan. Wakatorana na Pallan kukwambilira kwa 2020. Robert wakafwa pa Ogasiti 15, 2020, wali na vyaka 71. Kuyana na ''The New York Times'', wakaŵa na [[intracerebral hemorrhage|kutuluka ndopa mu ubongo]] pamanyuma pa kuwa sonosono apa. == Ŵabali ŵanyake == === John G. Trump === {{Main|John G. Trump}} Sekuru wa Donald Trump wa upande wa awiske, John George Trump (1907–1985), wakaŵa mainjiniya wa magetsi, mupangi wa vinthu, ndiposo wasayansi wa fiziki uyo wakapangiska [[radiation therapy]] yakuzungulira, ndipo pamoza na [[Robert J. Van de Graaff]], wakapanga yimoza mwa makina ghakwamba gha [[X-ray generator|kupangira ma X-ray]] gha miliyoni yimoza ya volts. Wakapokera [[National Medal of Science]] kufuma kwa Purezidenti [[Ronald Reagan]] ndipo wakaŵa membala wa [[National Academy of Engineering]]. === John W. Walter === {{Main|John W. Walter}} John W. Walter (1934–2018), uyo wakaŵa muzukuru wa Donald Trump, wakaŵa mwana wa Elizabeth Trump (mudumbu wa Fred Trump) na William Walter. Wakagwira ntchito ku Trump Organization kwa umoyo wake unandi ndipo wakaŵa vice president mukuru wa Trump Management, Inc.{{sfn|Trump|2020|pp=193–94}} Wakaŵaso na umwini wa All County Building Supply & Maintenance Corp pamoza na Donald Trump, Maryanne Trump Barry, Elizabeth Trump Grau, na Robert Trump. Walter wakaŵaso meya wa [[Flower Hill, New York]] kufuma mu 1988 m'paka 1996, ndipo wakaŵa mulembi wa mdauko wa tawuni iyi kufuma mu 1996 m'paka nyifwa yake mu 2018. === Mary L. Trump === {{Main|Mary L. Trump}} Mary L. Trump, muzukuru wa Donald Trump, ni [[clinical psychology|dokotala wa sayansi ya maghanoghano]], munthu wa bizinesi, ndiposo mulembi. Wamanyikwa chifukwa cha kususka Donald Trump ndipo wakalemba buku lakukhwaskana nayo na mbumba yake lakuti ''[[Too Much and Never Enough]]'' (2020). === Fred Trump III === {{Main|Fred Trump III}} Fred Trump III, muzukuru wa Donald Trump, ni munthu wa bizinesi, mulembi, ndiposo mulwani wa wanthu ŵakukhala na ulwari. Wakamususka Donald Trump mu [[memoir]] yake ya 2024 ndipo walutilira kumususka kufuma apo buku ili likafumira. == Chidule cha mbumba == {| class="wikitable sortable" !Kubabika !Nyifwa !Chithuzithuzi !Zina !Ubale na Donald Trump !Ufumu !Udindo !Nchito !{{Reference column heading}} |- |1869 |1918 |[[File:Elisabeth Christ & Friedrich Trump (cropped).jpg|frameless|100px]] |[[Frederick Trump]] |Sekuru wa awisi wa Donald Trump |Mujeremani | |Wakumeta sisi, mwenecho wa malo ghakurughirako vyakurya na hotelo, kweniso mwenecho wa nyumba ya uhule |<ref name="brothel">{{cite web |last1=Panetta |first1=Alexander |date=September 19, 2015 |title=Donald Trump's grandfather ran Canadian brothel during gold rush |url=http://www.cbc.ca/news/canada/trump-canada-yukon-1.3235254 |access-date=December 10, 2015 |website=[[CBC News]] |archive-date=April 27, 2019 |archive-url=https://web.archive.org/web/20190427112759/https://www.cbc.ca/news/canada/trump-canada-yukon-1.3235254 |url-status=live }}</ref><ref name="WhoHeIs">{{cite web |last=Blair |first=Gwenda |date=August 24, 2015 |title=The Man Who Made Trump Who He Is |url=https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647/ |access-date=March 11, 2016 |publisher=[[Politico]] |ref=none |archive-date=April 28, 2019 |archive-url=https://web.archive.org/web/20190428214907/https://www.politico.com/magazine/story/2015/08/the-man-who-made-trump-who-he-is-121647 |url-status=live }}</ref> |- |1880 |1966 |[[File:Elisabeth_Christ.jpg|frameless|100px]] |[[Elizabeth Christ Trump]] |Sekuru mwanakazi wa awisi wa Donald Trump |Mujeremani-Muamerika | |Wamalonda wa bizinesi ya malo |<ref>{{cite news |date=August 3, 1918 |title=Real Estate News |page=16 |work=The Brooklyn Daily Eagle |url=https://www.newspapers.com/image/55626090/?terms=%22e%20trump%22&match=1 |access-date=March 1, 2023 |archive-date=August 14, 2021 |archive-url=https://web.archive.org/web/20210814041345/https://www.newspapers.com/image/55626090/?terms=%22e%20trump%22&match=1 |url-status=live }}</ref><ref>{{cite news |date=November 22, 1918 |title=Real Estate Field |page=18 |work=The New York Times |url=https://www.newspapers.com/image/26761488/?terms=%22e%20trump%22&match=1 |access-date=March 1, 2023 |archive-date=August 14, 2021 |archive-url=https://web.archive.org/web/20210814041337/https://www.newspapers.com/image/26761488/?terms=%22e%20trump%22&match=1 |url-status=live }}</ref> |- |1905 |1999 |[[File:Fred Trump in the 1980s (3x4 cropped).jpg|frameless|100px]] |[[Fred Trump]] |Awiske Donald Trump |Muamerika | |Mupangiska wa malo na wamalonda |{{Sfn|Blair|2015|pp=90, 94–5}} |- |1907 |1985 |[[File:John G Trump portrait c1955 cropped.png|frameless|100px]] |[[John G. Trump]] |Dada wa awiske Donald Trump |Muamerika | |Injiniya wa vya magetsi, msambiri, na wasayansi wa fiziki |<ref name="NAP2">{{cite book |url=http://www.nap.edu/openbook.php?record_id=1384&page=333 |title=John George Trump &#124; Memorial Tributes: National Academy of Engineering, Volume 3 &#124; The National Academies Press |publisher=Nap.edu |year=1989 |isbn=978-0-309-03939-0 |doi=10.17226/1384 |access-date=2016-12-24 |archive-date=September 10, 2015 |archive-url=https://web.archive.org/web/20150910075219/http://www.nap.edu/openbook.php?record_id=1384&page=333 |url-status=live }}</ref> |- |1912 |2000 | |[[Mary Anne MacLeod Trump]] |Anyina a Donald Trump |Muskotilandi-Muamerika | |Wantchito wa pa nyumba |<ref name="kruse">{{cite news |last=Kruse |first=Michael |date=November 4, 2017 |title=The Mystery of Mary Trump |work=[[Politico Magazine]] |url=https://www.politico.com/magazine/story/2017/11/03/mary-macleod-trump-donald-trump-mother-biography-mom-immigrant-scotland-215779/ |access-date=November 4, 2017 |archive-date=April 20, 2019 |archive-url=https://web.archive.org/web/20190420055351/https://www.politico.com/magazine/story/2017/11/03/mary-macleod-trump-donald-trump-mother-biography-mom-immigrant-scotland-215779 |url-status=live }}</ref> |- |1934 |2018 | |[[John W. Walter]] |Mubali wakwamba wa Donald Trump |Muamerika |Meya wa nambara 14 wa [[Flower Hill, New York|Flower Hill]] |Mulembi wa mdauko, injiniya, wamalonda, mulembi, na wandale |<ref name="obituary" /><ref name=":02" /> |- |1937 |2023 |[[File:Maryanne_Trump_Barry.png|frameless|100px]] |[[Maryanne Trump Barry]] |Mudumbu wa Donald Trump |Muamerika |Mweruzgi wa [[United States Court of Appeals for the Third Circuit|Khoti la Apilu la Third Circuit]] |Loya, mweruzgi |<ref name="Blair_2000">{{cite book |last=Blair |first=Gwenda |url=https://archive.org/details/trumps00gwen/page/592 |title=The Trumps: Three Generations of Builders and a President |publisher=[[Simon & Schuster]] |year=2001 |isbn=978-0743210799 |location=New York City |pages=[https://archive.org/details/trumps00gwen/page/592 592] |orig-year=2000}}</ref> |- |1938 |1981 |[[File:Fred_Trump_Jr._1966_(cropped).jpg|frameless|100px]] |[[Fred Trump Jr.]] |Mubali mukuru wa Donald Trump |Muamerika | |Wakwendeska ndege |<ref>{{cite news |last1=Kordes |first1=John |date=March 29, 2018 |title=The Kordes Korner |work=Garden City News |location=Garden City, NY |url=https://www.gcnews.com/articles/the-kordes-korner-55/ |access-date=March 1, 2023 |archive-date=January 12, 2023 |archive-url=https://web.archive.org/web/20230112172254/https://www.gcnews.com/articles/the-kordes-korner-55/ |url-status=live }}</ref> |- |1946 |– |[[File:Official Presidential Portrait of President Donald J. Trump (2025) (cropped)(2).jpg|frameless|100px]] |[[Donald Trump]] |Iyomwene |Muamerika |Purezidenti wa nambara 45 na 47 wa [[Purezidenti wa United States]] |Wandale, munthu wa pa mawayilesi, na wamalonda |<ref>{{cite news |title=Certificate of Birth |publisher=[[New York City Department of Health and Mental Hygiene|Department of Health]] – City of New York – Bureau of Records and Statistics |url=https://abcnews.go.com/US/page?id=13248168 |access-date=October 23, 2018 |archive-url=https://web.archive.org/web/20160512232306/https://abcnews.go.com/US/page?id=13248168 |archive-date=May 12, 2016 |via=[[ABC News (United States)|ABC News]]}}</ref><ref>{{cite news |title=Certificate of Birth: Donald John Trump |publisher=[[Jamaica Hospital Medical Center]] |url=https://www.foxnews.com/projects/pdf/20110328125536753.pdf |access-date=October 23, 2018 |archive-date=April 9, 2011 |archive-url=https://web.archive.org/web/20110409070650/https://www.foxnews.com/projects/pdf/20110328125536753.pdf |url-status=live }}</ref> |- |1948 |2020 | |[[Robert Trump]] |Mubali wa Donald Trump |Muamerika | |Wamalonda |<ref name="NYT">{{Cite news |last=Karni |first=Annie |date=August 15, 2020 |title=Robert S. Trump, the President's Younger Brother, Dies at 71 |language=en-US |work=The New York Times |url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html |access-date=August 16, 2020 |issn=0362-4331 |archive-date=August 16, 2020 |archive-url=https://web.archive.org/web/20200816024006/https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html |url-status=live }}</ref> |- |1949 |2022 |[[File:Ivana Trump cropped retouched.jpg|frameless|100px]] |[[Ivana Trump]] |Muwoli wakwamba wa Donald Trump |Muchiki na Muamerika | |Wamalonda |<ref>{{cite web |author=Adela Suliman and Shayna Jacobs |date=July 16, 2022 |title=Ivana Trump died of 'blunt impact injuries,' medical examiner says |url=https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |newspaper=Washington Post |access-date=March 1, 2023 |archive-date=July 16, 2022 |archive-url=https://web.archive.org/web/20220716160620/https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |url-status=live }}</ref> |- |1962 |– | |[[Fred Trump III]] |Mupwa wa Donald Trump |Muamerika | |Wamalonda, mulembi, na wakuvikilira wanthu ŵakulemala |<ref>{{cite news |url=https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html|title=F. C. Trump 3d, Realty Manager, Weds Ms. Lorant |date=September 17, 1989|website=The New York Times|access-date=May 7, 2022 |archive-date=March 15, 2018 |archive-url=https://web.archive.org/web/20180315005336/https://www.nytimes.com/1989/09/17/style/f-c-trump-3d-realty-manager-weds-ms-lorant.html |url-status=live}}</ref> |- |1963 |– |[[File:Marla_Maples_LF_crop_(cropped).jpg|frameless|100px]] |[[Marla Maples]] |Muwoli wachiŵiri wa Donald Trump |Muamerika | |Woseŵera mafilimu, munthu wa pa wayilesi ya kanema, modeli, muvwiri, na mupharazgi |<ref>{{cite web |editor=David L. Beckwith |title=Marla Ann Maples b. 27 Oct 1963 Georgia |url=https://www.smokykin.com/tng/getperson.php?personID=I179444&tree=Smokykin |access-date=December 1, 2016 |work=Smoky Mountain Ancestral Quest |archive-date=June 12, 2018 |archive-url=https://web.archive.org/web/20180612140317/https://www.smokykin.com/tng/getperson.php?personID=I179444&tree=Smokykin |url-status=live }}</ref> |- |1965 |– |[[File:Mary L. Trump (3x4 cropped).jpg|left|frameless|100px]] |[[Mary L. Trump]] |Muzukuru mwanakazi wa Donald Trump |Muamerika | |Wakumanya vya maghanoghano na mulembi |<ref>{{cite magazine |last=Carlson |first=Adam |date=June 15, 2020 |title=What to Know About Donald Trump's Niece Mary, Who Fought Him in Court & Is Writing a Tell-All |url=https://people.com/politics/what-to-know-about-donald-trump-niece-mary-trump/ |url-status=live |magazine=[[People (magazine)|People]] |location=United States |archive-url=https://web.archive.org/web/20200704013654/https://people.com/politics/what-to-know-about-donald-trump-niece-mary-trump/ |archive-date=July 4, 2020 |access-date=July 4, 2020}}</ref> |- |1970 |– |[[File:Melania Trump’s Official White House Portrait (2025) (much further cropped).jpg|frameless|100px]] |[[Melania Trump]] |Muwoli wachitatu wa Donald Trump |Musloveni na Muamerika |[[First Lady of the United States|Dona Wakwamba wa United States]] |Modeli na wamalonda |<ref name="CollinsModel">{{cite news |last=Collins |first=Lauren |date=May 9, 2016 |title=The Model American: Melania Trump is the exception to her husband's nativist politics |magazine=The New Yorker |url=http://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |url-status=live |access-date=May 3, 2016 |archive-url=https://web.archive.org/web/20181119152650/https://www.newyorker.com/magazine/2016/05/09/who-is-melania-trump |archive-date=November 19, 2018}}</ref> |- |1977 |– |[[File:Donald_Trump,_Jr._(51770696331)_(cropped).jpg|frameless|100px]] |[[Donald Trump Jr.]] |Mwana wa Donald Trump na Ivana |Muamerika | |Wakovwira vya ndale, wamalonda, mulembi na wakale wakupharazga pa wayilesi ya kanema |<ref name="gq">{{cite news |last=Ioffe |first=Julia |date=June 20, 2018 |title=The Real Story of Donald Trump Jr. |work=[[GQ (magazine)|GQ]] |url=https://www.gq.com/story/real-story-of-donald-trump-jr |url-status=live |access-date=June 21, 2018 |archive-url=https://web.archive.org/web/20180621141307/https://www.gq.com/story/real-story-of-donald-trump-jr |archive-date=June 21, 2018}}</ref> |- |1981 |– |[[File:Ivanka_Trump_official_portrait_(cropped_2).jpg|frameless|100px]] |[[Ivanka Trump]] |Mwana mwanakazi wa Donald Trump na Ivana |Muamerika |[[Senior Advisor to the President of the United States|Mulongozgi wa Purezidenti]] |Wamalonda na wakale wantchito wa ndale |<ref>{{Cite web |date=March 8, 2017 |title=From rich kid to first daughter: The fabulous life of Ivanka Trump |url=https://www.independent.co.uk/news/people/from-rich-kid-to-first-daughter-the-fabulous-life-of-ivanka-trump-a7618966.html |access-date=January 26, 2022 |website=The Independent |language=en |archive-date=January 26, 2022 |archive-url=https://web.archive.org/web/20220126190924/https://www.independent.co.uk/news/people/from-rich-kid-to-first-daughter-the-fabulous-life-of-ivanka-trump-a7618966.html |url-status=live }}</ref> |- |1984 |– |[[File:Eric_Trump_by_Gage_Skidmore.jpg|frameless|100px]] |[[Eric Trump]] |Mwana wa Donald Trump na Ivana |Muamerika | |Wamalonda, wakovwira vya ŵanthu na wakale wakupharazga pa wayilesi ya kanema ya ''reality'' |- |1993 |– |[[File:Tiffany_Trump_RNC_2016_cropped.jpg|frameless|100px]] |[[Tiffany Trump]] |Mwana mwanakazi wa Donald Trump na Marla Maples |Muamerika | |Mulongozgi wakovwira pa kafukufuku wa malango |<ref>{{Cite web |last=Struyk |first=Ryan |date=April 11, 2016 |title=Trump Kids Eric and Ivanka Miss Deadline to Vote in NY GOP Primary |url=https://abcnews.go.com/Politics/donald-trumps-kids-eric-ivanka-miss-deadline-vote/story?id=38303943 |url-status=live |archive-url=https://web.archive.org/web/20171012105540/http://abcnews.go.com/Politics/donald-trumps-kids-eric-ivanka-miss-deadline-vote/story?id=38303943 |archive-date=October 12, 2017 |access-date=October 11, 2017 |publisher=[[ABC News (United States)|ABC News]]}}</ref> |- |2006 |– |[[File:Barron Trump at Donald Trump's second inauguration (2).jpg|frameless|100px]] |[[Barron Trump]] |Mwana wa Donald Trump na Melania |Muamerika | |Msambiri wa pa yunivesite |<ref name="peopleCM">{{cite magazine |last1=Chamlee |first1=Virginia |date=August 20, 2021 |first2=Linda |last2=Marx |title=Barron Trump Enrolls in Private School in Palm Beach After Family Leaves White House |url=https://people.com/politics/barron-trump-enrolls-in-palm-beach-private-school/ |magazine=[[People (magazine)|People]] |access-date=February 18, 2022 |language=en |archive-date=February 16, 2022 |archive-url=https://web.archive.org/web/20220216155331/https://people.com/politics/barron-trump-enrolls-in-palm-beach-private-school/ |url-status=live }}</ref> |} == Heraldry == [[Joseph E. Davies]], mfumu wachitatu wa [[Marjorie Merriweather Post]] ndiposo wakaŵa nthumwi yakale ya United States wa mphapu ya [[Wales|Welsh]], wakapika chimanyikwiro cha mbumba (coat of arms), icho chikaŵa na [[motto]] yakuti ''Integritas'', na [[King of Arms#Kings of Arms for England, Wales and Northern Ireland|British heraldic authority]] pa [[College of Arms]], mu 1939. Davies wakaŵavya ŵana ŵanalume ŵakuhara, ndipo wakati wafwa, mwana wake mukuru mwanakazi Eleanor Tydings wakaŵa [[heraldic heiress]]. Pamanyuma pake, kuyana na mwambo wa [[Anglosphere]] wa [[male primogeniture]], chimanyikwiro chakuhalira icho Tydings wakapokera chikafuma kwa mwana wake, [[Joseph Tydings|Senator Joseph Tydings]], ndipo pamanyuma pake chikapita ku mwana wake wakwamba mwanalume wakubabika mwakwenelera, nga mbahaliri ŵa chimanyikwiro icho, muyirayira. Donald Trump wakagura malo gha ku Florida gha [[Mar-a-Lago]] mu 1985. Malo agha ghakazengeka na Merriweather Post, uyo wakalongoranga chomene chimanyikwiro cha mbumba cha mfumu wake wakufwa pa malo agha. Wakati wagura malo agha, Trump wakamba kugwiliskira ntchito chimanyikwiro cha mbumba cha Davies nga ntchake. Vimanyikwiro ivi vikugwiliskirika ntchito pa [[Trump National Golf Club (disambiguation)|malo gha gofu gha Trump]] ndiposo pa malo ghanyake ghanandi gha [[Trump Organization]] mu United States yose. Pamanyuma pake Trump wakambaso kugwiliskira ntchito mtundu wakusintha pachoko wa chimanyikwiro cha Davies, uwo nawo ukalembeskeka na Trump ku ofesi ya United States ya ma patent na ma trademark.{{Infobox COA wide|image=File:Coat of Arms of Trump (Davies).svg|escutcheon=Argent ermined Or, two Chevronels couped between three demi-Lions, all Or.|crest=A Cubit Arm erected Argent, enfiling a Mascle and holding a Spear point upward, all Or.|name=Donald Trump|armiger=Donald Trump (1946–)|symbolism=|year_adopted=1985}} Mu 2008, Trump wakayezga kukhazikiska logo ya ku America pa [[Trump International Golf Links, Scotland|Trump International Golf Links]] yake yiphya mu [[Balmedie]], Scotland, kweni wakachenjezgeka na [[Lord Lyon King of Arms]], uyo ni mukuru chomene pa nkhani za [[Scottish heraldry]], kuti dango la Nyumba ya Malango ya Scotland la mu 1672 likukanizga ŵanthu kugwiliskira ntchito vimanyikwiro vya mbumba vyambura kulembeskeka. Mu Janyuwale 2012, pati pajumpha nyengo yichoko waka kufuma apo malo gha gofu ghakajulikiranga, Trump wakavumbura chimanyikwiro chiphya cha mbumba icho chikapika ku "The Trump International Golf Club Scotland Ltd" na Lord Lyon mu 2011. Sarah Malone, muteŵeti mukuru wakulongozga wa "The Trump International Golf Links, Scotland", wakati: "chimanyikwiro cha mbumba ichi chikuphatikizapo vimanyikwiro vyakuwoneka ivyo vikulongora vigaŵa vyakupambanapambana vya mphapu ya mbumba ya Trump [...], Lion Rampant (pa crest) wakuyimira Scotland ndipo nyenyezi zikuyimira America. Ma chevronels ghatatu ghakuyimira kuchanya, mchenga wa mapiri gha m'mphepete mwa nyanja, na nyanja—ivyo ni vigaŵa vikuru vya malo agha. Mphungu ya mitu yiŵiri yikuyimira mphapu ziŵiri na mtundu wa Trump (wa ku Scotland na wa ku Germany). Mphungu iyi yikukora mipira ya gofu, yakuyimira zina likuru la maseŵero gha gofu, ndipo [[motto]] yakuti ''Numquam Concedere'' ni Chilatini chakung'anamura kuti 'Kuleka yayi'—ivyo ni fundo ya umoyo wa Trump." Kwambira mu 2014, Trump wakamba kugwiliskiraso ntchito logo yeneyiyi pa [[Trump International Golf Links and Hotel Ireland|Trump International Golf Links, Ireland]], malo gha gofu agho wakazenga pamanyuma pa kugura [[Doonbeg]] Golf Club.{{Infobox COA wide|image=File:Coat of Arms of Trump International Golf Club.svg|escutcheon=Party per chevron: Azure two Mullets Argent; Vert a double headed Eagle of the second, wings displayed and inverted, armed and langued Gules, holding in its talons two Globes of the second; overall three chevronels Or.|crest=A demi-Lion rampant Gules, armed and langued Azure, holding in the paws a Pennon Or flowing to the sinister.|name=the Trump International Golf Links|armiger=Trump International Golf Links (2012–)|symbolism=|year_granted=2011|motto="Numquam concedere" (Chilatini chakung'anamura kuti "Kuleka yayi").}} ==Wonaniso== * [[Mbumba ya Barack Obama]], uyo wakalongozga Donald Trump pa udindo wa purezidenti mu nyengo yake yakwamba (2009–2017) * [[Mbumba ya Joe Biden]], uyo wakalondezgapo Donald Trump pa nyengo yake yakwamba ndipo wakamulongozga pambere wandawelere pa nyengo yake yachiŵiri (2021–2025) * [[Mbumba ya JD Vance]], waŵiri wa purezidenti wa Donald Trump pa nyengo yake yachiŵiri == Maukaboni == === Maukaboni gha m'malemba === {{Reflist|30em}} === Mabuku ghakugwiliskirika ntchito === <!--Chigaŵa ichi ntcha mabuku pera agho ghakuzunulika mu maukaboni gha pasi pa peji la nkhani iyi ya Wikipedia.--> {{Refbegin|30em}} * {{cite book|last=Blair|first=Gwenda|title=The Trumps: Three Generations of Builders and a Presidential Candidate|url=https://books.google.com/books?id=uJifCgAAQBAJ|author-link=Gwenda Blair|year=2015|orig-year=2000|publisher=[[Simon & Schuster]]|isbn=978-1-5011-3936-9|location=New York|language=en|access-date=April 8, 2017|archive-date=April 18, 2019|archive-url=https://web.archive.org/web/20190418082225/https://books.google.com/books?id=uJifCgAAQBAJ|url-status=live}} * {{cite book |title=Too Much and Never Enough |last=Trump |first=Mary L. |author-link=Mary L. Trump |publisher=[[Simon & Schuster]] |year=2020 |isbn=978-1-982141-46-2 |location=New York |oclc=1164093746 }} {{refend}} {{Trump family|state=expanded}} {{Donald Trump}} {{United States presidential family political lines}} {{DEFAULTSORT:Trump family}} [[Category:Trump family|*]] [[Category:Mbumba za ku America za mphapu ya ku Scotland]] [[Category:Mbumba za bizinesi za United States]] [[Category:Mbumba zakwamba za United States]] [[Category|Mbiri ya ŵa ku America ŵa mphapu ya ku Germany]] [[Category:Mbumba kuyana na munthu]] lp8h0nlq73jz0oko7j34iodgxfnf6m2 Template:Trump family tree 10 47779 116809 2025-10-23T05:44:04Z en>ফারদিন 0 Reverted 1 edit by [[Special:Contributions/2603:6011:22F0:7F50:30F5:6307:4EC0:733B|2603:6011:22F0:7F50:30F5:6307:4EC0:733B]] ([[User talk:2603:6011:22F0:7F50:30F5:6307:4EC0:733B|talk]]) to last revision by PrimeBOT 116809 wikitext text/x-wiki {{chart top| Select family tree of the Trump family |template_name= Trump family tree |width={{{width|100%}}}|collapsed={{{collapsed|<includeonly>yes</includeonly>}}}}} <div class="center"> {{tree chart/start|summary=Select family tree of the [[Trump family]].}} {{tree chart| | | | | | | | | | | | | | | | | | | | | | |FCT|y|MMT|FCT = [[Fred Trump]]<br><small>1905–1999</small>|MMT = [[Mary Anne MacLeod]]<br><small>1912–2000</small> |boxstyle_FCT = background-color:lightblue; |boxstyle_MMT = background-color:pink; }} {{tree chart| |,|-|-|-|v|-|-|-|v|-|-|-|v|-|-|-|-|-|-|-|-|-|-|-|(|F|~|~|~|~|~|~|~|~|~|~|~|~|y|~|7| }} {{tree chart|MAT| |FT2| |EZT| |ROT| |MAM|y|~|~|~|~|DJT|y|IMZ| | | | | | | | |!|MKT|DJT = '''[[Donald Trump]]'''<br><small>1946–present</small>|IMZ = [[Ivana Trump|Ivana Zelníčková]]<br><small>1949–2022</small>|MAM = [[Marla Maples]]<br><small>1963–present</small>|MKT = [[Melania Trump|Melanija Knavs]]<br><small>1970–present</small>|MAT = [[Maryanne Trump Barry|Maryanne Trump]]<br><small>1937–2023</small>|FT2 = [[Fred Trump Jr.]]<br><small>1938–1981</small>|EZT = Elizabeth Trump<br><small>1942–present</small>|ROT = [[Robert Trump]]<br><small>1948–2020</small> |boxstyle_DJT = background-color:lightblue; |boxstyle_IMZ = background-color:pink; |boxstyle_MAM = background-color:pink; |boxstyle_MKT = background-color:pink; |boxstyle_MAT = background-color:pink; |boxstyle_FT2 = background-color:lightblue; |boxstyle_EZT = background-color:pink; |boxstyle_ROT = background-color:lightblue; }} {{tree chart| | | | | | | | | | | | | | | |,|-|-|-|'| | | |,|-|-|-|^|-|-|-|v|-|-|-|.| | | |`|-|-|-|.| }} {{tree chart| | | | | | | | | | | |MAB|y|TAT| |VKH|y|DT2| |JCK|y|IMT| |EFT|y|LLY| |BWT| |DT2 = [[Donald Trump Jr.]]<br><small>1977–present</small>|IMT = [[Ivanka Trump]]<br><small>1981–present</small>|EFT = [[Eric Trump]]<br><small>1984–present</small>|JCK = [[Jared Kushner]]<br><small>1981–present</small>|VKH = [[Vanessa Trump|Vanessa Haydon]]<br><small>1977–present</small>|LLY = [[Lara Trump|Lara Yunaska]]<br><small>1982–present</small>|MAB = [[Michael Boulos]]<br><small>1997–present</small>||TAT = [[Tiffany Trump]]<br><small>1993–present</small>|BWT = [[Barron Trump]]<br><small>2006–present</small> |boxstyle_DT2 = background-color:lightblue; |boxstyle_IMT = background-color:pink; |boxstyle_EFT = background-color:lightblue; |boxstyle_JCK = background-color:lightblue; |boxstyle_VKH = background-color:pink; |boxstyle_LLY = background-color:pink; |boxstyle_MAB = background-color:lightblue; |boxstyle_TAT = background-color:pink; |boxstyle_BWT = background-color:lightblue; }} {{tree chart/end}} </div> |- |style="text-align:left;"|'''Notes:''' {{notelist-lg}}<!--- use either {{Efn-lg}} and/or <ref group=lower-greek /> To fill this notelist --> {{chart bottom}}<noinclude> [[Category:Donald Trump-related templates |Family tree]] [[Category:Family tree templates]] </noinclude> lwh5g2wgrurlh8q8uwx1at0pyurhpzd 116810 116809 2026-07-16T10:31:03Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Trump_family_tree]] 116809 wikitext text/x-wiki {{chart top| Select family tree of the Trump family |template_name= Trump family tree |width={{{width|100%}}}|collapsed={{{collapsed|<includeonly>yes</includeonly>}}}}} <div class="center"> {{tree chart/start|summary=Select family tree of the [[Trump family]].}} {{tree chart| | | | | | | | | | | | | | | | | | | | | | |FCT|y|MMT|FCT = [[Fred Trump]]<br><small>1905–1999</small>|MMT = [[Mary Anne MacLeod]]<br><small>1912–2000</small> |boxstyle_FCT = background-color:lightblue; |boxstyle_MMT = background-color:pink; }} {{tree chart| |,|-|-|-|v|-|-|-|v|-|-|-|v|-|-|-|-|-|-|-|-|-|-|-|(|F|~|~|~|~|~|~|~|~|~|~|~|~|y|~|7| }} {{tree chart|MAT| |FT2| |EZT| |ROT| |MAM|y|~|~|~|~|DJT|y|IMZ| | | | | | | | |!|MKT|DJT = '''[[Donald Trump]]'''<br><small>1946–present</small>|IMZ = [[Ivana Trump|Ivana Zelníčková]]<br><small>1949–2022</small>|MAM = [[Marla Maples]]<br><small>1963–present</small>|MKT = [[Melania Trump|Melanija Knavs]]<br><small>1970–present</small>|MAT = [[Maryanne Trump Barry|Maryanne Trump]]<br><small>1937–2023</small>|FT2 = [[Fred Trump Jr.]]<br><small>1938–1981</small>|EZT = Elizabeth Trump<br><small>1942–present</small>|ROT = [[Robert Trump]]<br><small>1948–2020</small> |boxstyle_DJT = background-color:lightblue; |boxstyle_IMZ = background-color:pink; |boxstyle_MAM = background-color:pink; |boxstyle_MKT = background-color:pink; |boxstyle_MAT = background-color:pink; |boxstyle_FT2 = background-color:lightblue; |boxstyle_EZT = background-color:pink; |boxstyle_ROT = background-color:lightblue; }} {{tree chart| | | | | | | | | | | | | | | |,|-|-|-|'| | | |,|-|-|-|^|-|-|-|v|-|-|-|.| | | |`|-|-|-|.| }} {{tree chart| | | | | | | | | | | |MAB|y|TAT| |VKH|y|DT2| |JCK|y|IMT| |EFT|y|LLY| |BWT| |DT2 = [[Donald Trump Jr.]]<br><small>1977–present</small>|IMT = [[Ivanka Trump]]<br><small>1981–present</small>|EFT = [[Eric Trump]]<br><small>1984–present</small>|JCK = [[Jared Kushner]]<br><small>1981–present</small>|VKH = [[Vanessa Trump|Vanessa Haydon]]<br><small>1977–present</small>|LLY = [[Lara Trump|Lara Yunaska]]<br><small>1982–present</small>|MAB = [[Michael Boulos]]<br><small>1997–present</small>||TAT = [[Tiffany Trump]]<br><small>1993–present</small>|BWT = [[Barron Trump]]<br><small>2006–present</small> |boxstyle_DT2 = background-color:lightblue; |boxstyle_IMT = background-color:pink; |boxstyle_EFT = background-color:lightblue; |boxstyle_JCK = background-color:lightblue; |boxstyle_VKH = background-color:pink; |boxstyle_LLY = background-color:pink; |boxstyle_MAB = background-color:lightblue; |boxstyle_TAT = background-color:pink; |boxstyle_BWT = background-color:lightblue; }} {{tree chart/end}} </div> |- |style="text-align:left;"|'''Notes:''' {{notelist-lg}}<!--- use either {{Efn-lg}} and/or <ref group=lower-greek /> To fill this notelist --> {{chart bottom}}<noinclude> [[Category:Donald Trump-related templates |Family tree]] [[Category:Family tree templates]] </noinclude> lwh5g2wgrurlh8q8uwx1at0pyurhpzd Template:Trump family 10 47780 116829 2026-06-18T16:53:03Z en>~2026-35591-57 0 Undid revision [[Special:Diff/1341784651|1341784651]] by [[Special:Contributions/SNUGGUMS|SNUGGUMS]] ([[User talk:SNUGGUMS|talk]]) The template is not "current family members of Donald Trump" 116829 wikitext text/x-wiki {{Navbox | name = Trump family | title = [[Trump family|Family]] of [[Donald Trump]] | bodyclass = hlist | state = collapsed |group1= Spouses |list1 = * [[Ivana Trump]] (first wife) * [[Marla Maples]] (second wife) * [[Melania Trump]] (third wife) |group2=Children |list2 = * [[Donald Trump Jr.]] (son) * [[Ivanka Trump]] (daughter) * [[Eric Trump]] (son) * [[Tiffany Trump]] (daughter) * [[Barron Trump]] (son) |group3 = Grandchildren |list3 = * [[Kai Trump]] (granddaughter) |group4 = Parents |list4 = * [[Fred Trump]] (father) * [[Mary Anne MacLeod Trump]] (mother) |group5 = Siblings |list5 = * [[Maryanne Trump Barry]] (sister) * [[Fred Trump Jr.]] (brother) * [[Robert Trump]] (brother) |group6 = Grandparents |list6 = * [[Frederick Trump]] (grandfather) * [[Elizabeth Christ Trump]] (grandmother) |group7 = In-laws |list7 = * [[Vanessa Trump]] (ex-daughter-in-law) * [[Jared Kushner]] (son-in-law) * [[Lara Trump]] (daughter-in-law) * [[Michael Boulos]] (son-in-law) * [[Bettina Anderson]] (daughter-in-law) * [[Amalija Knavs]] (mother-in-law) * [[Blaine Trump]] (ex-sister-in-law) |group8 = Others |list8 = * [[John G. Trump]] (uncle) * [[Mary L. Trump]] (niece) * [[Fred Trump III]] (nephew) * [[John W. Walter]] (cousin) }}<noinclude> {{documentation | Template:Donald_Trump/doc}} {{Navbox documentation}} [[Category:United States family navigational boxes]] [[Category:Donald Trump-related templates|Family]] </noinclude> 5ctn3pr0s5feg8pmq4ag7mnm0scnj8q 116830 116829 2026-07-16T10:32:21Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Trump_family]] 116829 wikitext text/x-wiki {{Navbox | name = Trump family | title = [[Trump family|Family]] of [[Donald Trump]] | bodyclass = hlist | state = collapsed |group1= Spouses |list1 = * [[Ivana Trump]] (first wife) * [[Marla Maples]] (second wife) * [[Melania Trump]] (third wife) |group2=Children |list2 = * [[Donald Trump Jr.]] (son) * [[Ivanka Trump]] (daughter) * [[Eric Trump]] (son) * [[Tiffany Trump]] (daughter) * [[Barron Trump]] (son) |group3 = Grandchildren |list3 = * [[Kai Trump]] (granddaughter) |group4 = Parents |list4 = * [[Fred Trump]] (father) * [[Mary Anne MacLeod Trump]] (mother) |group5 = Siblings |list5 = * [[Maryanne Trump Barry]] (sister) * [[Fred Trump Jr.]] (brother) * [[Robert Trump]] (brother) |group6 = Grandparents |list6 = * [[Frederick Trump]] (grandfather) * [[Elizabeth Christ Trump]] (grandmother) |group7 = In-laws |list7 = * [[Vanessa Trump]] (ex-daughter-in-law) * [[Jared Kushner]] (son-in-law) * [[Lara Trump]] (daughter-in-law) * [[Michael Boulos]] (son-in-law) * [[Bettina Anderson]] (daughter-in-law) * [[Amalija Knavs]] (mother-in-law) * [[Blaine Trump]] (ex-sister-in-law) |group8 = Others |list8 = * [[John G. Trump]] (uncle) * [[Mary L. Trump]] (niece) * [[Fred Trump III]] (nephew) * [[John W. Walter]] (cousin) }}<noinclude> {{documentation | Template:Donald_Trump/doc}} {{Navbox documentation}} [[Category:United States family navigational boxes]] [[Category:Donald Trump-related templates|Family]] </noinclude> 5ctn3pr0s5feg8pmq4ag7mnm0scnj8q Template:Trump 10 47781 116831 2016-11-24T05:23:56Z en>Plastikspork 0 Merged 116831 wikitext text/x-wiki #REDIRECT [[Template:Trump businesses]] r04cbuu2nhaltjm0iba1q10ql5phkgo 116832 116831 2026-07-16T10:32:28Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Trump]] 116831 wikitext text/x-wiki #REDIRECT [[Template:Trump businesses]] r04cbuu2nhaltjm0iba1q10ql5phkgo Template:United States presidential family political lines 10 47782 116833 2025-11-29T13:29:07Z en>Killuminator 0 Undid revision [[Special:Diff/1320353670|1320353670]] by [[Special:Contributions/Cockfightermaster1969|Cockfightermaster1969]] ([[User talk:Cockfightermaster1969|talk]]) 116833 wikitext text/x-wiki {{Navbox | name = United States presidential family political lines | title = [[United States]] [[First family of the United States|presidential families]] | state = {{{state|autocollapse}}} | bodyclass = hlist |group1 = First families |list1 = * [[Washington family|Washington]] * [[Family of Martin Van Buren|Van Buren]] * [[Lincoln family|Lincoln]] * [[Family of Dwight D. Eisenhower|Eisenhower]] * [[Family of Lyndon B. Johnson|Johnson]] * [[Clinton family|Clinton]] * [[Family of Barack Obama|Obama]] * [[Trump family|Trump]] |group2 = [[List of United States political families|Political families]] |list2 = * [[Adams political family|Adams]] * [[Harrison family of Virginia|Harrison]] * [[Taft family|Taft]] * [[Roosevelt family|Roosevelt]] * [[Bush family|Bush]] * [[Kennedy family|Kennedy]] * [[Family of Joe Biden|Biden]] |group3 = Related |list3 = * [[Ancestral background of presidents of the United States]] * [[United States presidential pets|Presidential pets]] }}<noinclude> {{collapsible option}} [[Category:First families of the United States|τ]] [[Category:United States family navigational boxes|Political families]] [[Category:President of the United States navigational boxes|Family political lines]] </noinclude> oplt3k1yn7yw39mq8mtwjkn4iojis0l 116834 116833 2026-07-16T10:32:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:United_States_presidential_family_political_lines]] 116833 wikitext text/x-wiki {{Navbox | name = United States presidential family political lines | title = [[United States]] [[First family of the United States|presidential families]] | state = {{{state|autocollapse}}} | bodyclass = hlist |group1 = First families |list1 = * [[Washington family|Washington]] * [[Family of Martin Van Buren|Van Buren]] * [[Lincoln family|Lincoln]] * [[Family of Dwight D. Eisenhower|Eisenhower]] * [[Family of Lyndon B. Johnson|Johnson]] * [[Clinton family|Clinton]] * [[Family of Barack Obama|Obama]] * [[Trump family|Trump]] |group2 = [[List of United States political families|Political families]] |list2 = * [[Adams political family|Adams]] * [[Harrison family of Virginia|Harrison]] * [[Taft family|Taft]] * [[Roosevelt family|Roosevelt]] * [[Bush family|Bush]] * [[Kennedy family|Kennedy]] * [[Family of Joe Biden|Biden]] |group3 = Related |list3 = * [[Ancestral background of presidents of the United States]] * [[United States presidential pets|Presidential pets]] }}<noinclude> {{collapsible option}} [[Category:First families of the United States|τ]] [[Category:United States family navigational boxes|Political families]] [[Category:President of the United States navigational boxes|Family political lines]] </noinclude> oplt3k1yn7yw39mq8mtwjkn4iojis0l Template:Nee 10 47783 116836 2023-05-10T21:11:49Z en>FlightTime 0 Update lnk trgts per [[WP:BRINT]] 116836 wikitext text/x-wiki <span title="Name at birth">[[Birth name#Maiden and married names|née]]{{#if:{{{1|}}}|&nbsp;{{trim|{{{1|}}}}}}}</span><noinclude> {{documentation}} </noinclude> hb80dul63t5xpd86yi6lp7zq9791y70 116837 116836 2026-07-16T10:36:26Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Nee]] 116836 wikitext text/x-wiki <span title="Name at birth">[[Birth name#Maiden and married names|née]]{{#if:{{{1|}}}|&nbsp;{{trim|{{{1|}}}}}}}</span><noinclude> {{documentation}} </noinclude> hb80dul63t5xpd86yi6lp7zq9791y70 Template:Nee/doc 10 47784 116852 2026-05-08T13:48:27Z en>W.andrea 0 /* TemplateData */ fix description: not a link to the name 116852 wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} This template is for use as a shortcut to indicate female former names (such as a birth, or maiden, name no longer used) appearing in articles. It inserts the word "née" linked to {{slink|Birth name#Maiden and married names}}. It additionally takes a single optional parameter, the birth name, which will be preceded by a non-breaking space. {{Tlx|ne}} may be used for males. This may be used for any change of name, whether due to marriage or not, and may be followed by the full birth name, or by the birth surname only, when only the surname has changed. There is a properly spelled redirect to this template at {{tl|née}}, but this template without the "é" character may be easier to type (depending on the keyboard layout used). Example: {{demo inline|<nowiki>{{nee|Name}}</nowiki>}} ==TemplateData== {{templatedata header}} <templatedata> { "params": { "1": { "label": "Former name", "description": "The former family name (or full name, if the given name has also changed)", "type": "string", "suggested": true } }, "description": "Indicates a female former name with the word \"née\" (including an explanatory link)." } </templatedata> ==See also== *{{tl|ne}} for male former names * [[Wikipedia:Manual of Style/Biography#Changed names|MOS:MULTIPLENAMES]] <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Typing-aid templates]] }}</includeonly> htlf57ll8ffl52fvbxefvv90v8u3ny8 116853 116852 2026-07-16T10:36:28Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Nee/doc]] 116852 wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} This template is for use as a shortcut to indicate female former names (such as a birth, or maiden, name no longer used) appearing in articles. It inserts the word "née" linked to {{slink|Birth name#Maiden and married names}}. It additionally takes a single optional parameter, the birth name, which will be preceded by a non-breaking space. {{Tlx|ne}} may be used for males. This may be used for any change of name, whether due to marriage or not, and may be followed by the full birth name, or by the birth surname only, when only the surname has changed. There is a properly spelled redirect to this template at {{tl|née}}, but this template without the "é" character may be easier to type (depending on the keyboard layout used). Example: {{demo inline|<nowiki>{{nee|Name}}</nowiki>}} ==TemplateData== {{templatedata header}} <templatedata> { "params": { "1": { "label": "Former name", "description": "The former family name (or full name, if the given name has also changed)", "type": "string", "suggested": true } }, "description": "Indicates a female former name with the word \"née\" (including an explanatory link)." } </templatedata> ==See also== *{{tl|ne}} for male former names * [[Wikipedia:Manual of Style/Biography#Changed names|MOS:MULTIPLENAMES]] <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Typing-aid templates]] }}</includeonly> htlf57ll8ffl52fvbxefvv90v8u3ny8 Template:Il 10 47785 116856 2025-11-29T12:36:02Z en>Toadspike 0 create redirect 116856 wikitext text/x-wiki #REDIRECT [[Template:Interwiki link]] o7vi79ludzrgwn6wvdeoqqrzh1y5d6p 116857 116856 2026-07-16T10:41:54Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Il]] 116856 wikitext text/x-wiki #REDIRECT [[Template:Interwiki link]] o7vi79ludzrgwn6wvdeoqqrzh1y5d6p Ivana Trump 0 47786 116858 2026-07-16T10:56:05Z Tumbuka Arch 6863 Created page with "{{Short description|Muwoli wakale wa Donald Trump (1949–2022)}} {{for|mwana wake mwanakazi|Ivanka Trump}} {{Use American English|date=September 2019}} {{Use mdy dates|date=July 2026}} {{Infobox person | name = Ivana Trump | image = Ivana Trump cropped retouched.jpg | caption = Trump mu 2007 | birth_name = Ivana Marie Zelníčková | birth_date = {{Birth date|1949|2|20}} | birth_place = [[Gottwaldov]], [[Fourth Republic of Czechoslovakia]] (sono [[Czechia]]) | death_dat..." 116858 wikitext text/x-wiki {{Short description|Muwoli wakale wa Donald Trump (1949–2022)}} {{for|mwana wake mwanakazi|Ivanka Trump}} {{Use American English|date=September 2019}} {{Use mdy dates|date=July 2026}} {{Infobox person | name = Ivana Trump | image = Ivana Trump cropped retouched.jpg | caption = Trump mu 2007 | birth_name = Ivana Marie Zelníčková | birth_date = {{Birth date|1949|2|20}} | birth_place = [[Gottwaldov]], [[Fourth Republic of Czechoslovakia]] (sono [[Czechia]]) | death_date = {{death date and age|2022|07|14|1949|02|20}} | death_place = New York City, U.S. | burial_place = [[Trump National Golf Club Bedminster]] | occupation = {{hlist|Mwamalonda mwanakazi|munthu wakumanyikwa mu vyaru|model|wakupanga mapangiro|mulembi}} | citizenship = {{ubl |[[Czechoslovakia]] (m'paka 1993) |Czech Republic (kwambira 1993) |Austria (kwambira 1973)|Canada (kwambira 1978)|United States (kwambira 1988) }} | education = [[Charles University]] | years_active = 1970–2022 | spouse = {{ubl |{{marriage|Alfred Winklmayr|November 1971|August 7, 1973|reason=ŵakapatukana}} |{{marriage|[[Donald Trump|Donald Trump]]|April 9, 1977|December 11, 1990|end=ŵakapatukana}} |{{marriage|Riccardo Mazzucchelli|November 29, 1995|June 17, 1997|reason=ŵakapatukana}} |{{marriage|Rossano Rubicondi|April 12, 2008|December 27, 2009|reason=ŵakapatukana}} }} | partner = Roffredo Gaetani (1997–2005; nyifwa yake) | children = {{hlist|[[Donald Trump Jr.|Donald Trump Jr.]]|[[Ivanka Trump|Ivanka Trump]]|[[Eric Trump|Eric Trump]]}} }} '''Ivana Marie Trump''' ({{nee|'''Zelníčková'''}};{{efn|name=MN|{{IPA|cs|ˈɪvana ˈzɛlɲiːtʃkovaː|small=no}}.}} February 20, 1949 – July 14, 2022) wakaŵa mubizinesi, munthu wakumanyikwa pa umoyo wa ŵanthu, kweniso wakuwoneska mafashoni wa ku Czech na America. Wakakhala ku [[Canada]] m'ma 1970 pambere wandasamire ku United States na kutorana na [[Donald Trump]] mu 1977. Wakagwira maudindo ghakuru gha ulongozgi mu [[Trump Organization]], nga ni muteŵeti mukuru wakuwona vya kapangidwe ka mukati mwa nyumba, CEO na pulezidenti wa Trump's Castle casino resort, kweniso mulaŵiliri wa [[Plaza Hotel]]. Ivana na Donald Trump ŵakaŵa ŵanthu ŵakumanyikwa chomene mu gulu la ŵanthu la ku New York m'ma 1980. Kupatukana kwawo kwa nthengwa, uko kukazomerezgeka mu 1990, kukalembeka chomene mu nkhani za manyuzipepala na vyakupharazga.{{efn|Nkhani ya mulandu uwu yikalutilira mpaka mu 1991, apo ŵakafiska phangano pamanyuma pa kupatukana.<ref name=":15" />}} Pamanyuma pa kupatukana, wakambiska malonda ghake gha vyakuvwara, vyakujitozgera vya mafashoni, na vinthu vya kutoweska ivyo vikaguliskikanga pa [[QVC (British TV channel)|QVC UK]] na [[Home Shopping Network]]. Wakalembanga ndime ya ulongozgi mu ''[[Globe (tabloid)|Globe]]'' yakucemeka "Ask Ivana" kwambira mu 1995 mpaka 2010, ndipo wakafumiska mabuku ghanandi, kusazgapo mabuku gha nthano, gha munkhwala, gha kujovwira wekha, kweniso mbiri yake yakujilemba ''Raising Trump''. ==Umoyo wakwambilira== Ivana Marie Zelníčková{{efn|name=MN}} wakababikira pa February 20, 1949, ku Gottwaldov, [[Czechoslovak Republic]] (sono [[Zlín]], Czech Republic), mwana wa Miloš Zelníček (1927–1990) na Marie Zelníčková (née Francová, b. 1926).{{sfn|Hurt III|1993|p=96}}<ref>{{cite web|url=https://www.respekt.cz/tydenik/2018/44/donald-trump-v-hledacku-stb|title=Zemřela Ivana Trumpová. První manželce Donalda Trumpa bylo 73 let|work=Týdeník Respekt|publisher=Respekt|date=October 27, 2018|access-date=December 31, 2023|archive-date=December 31, 2023|archive-url=https://web.archive.org/web/20231231053019/https://www.respekt.cz/tydenik/2018/44/donald-trump-v-hledacku-stb|url-status=live}}</ref><ref>{{cite web|url=https://www.myheritage.com/names/marie_zeln%C3%AD%C4%8Dkov%C3%A1|title=Marie Zelníčková (born Francová)|website=myheritage.com|access-date=June 1, 2019|archive-date=August 1, 2020|archive-url=https://web.archive.org/web/20200801212809/https://www.myheritage.com/names/marie_zeln%C3%AD%C4%8Dkov%C3%A1|url-status=live}}</ref> Wakakulira mu mbumba ya [[Chikatolika mu Czech Republic|Chikatolika]].<ref>{{Cite magazine |last=Tolentino |first=Jia |author-link=Jia Tolentino |date=December 4, 2017 |title=The Trumpishness of Ivana |language=en-US |magazine=The New Yorker |url=https://www.newyorker.com/books/page-turner/the-trumpishness-of-ivana |access-date=January 3, 2024 |issn=0028-792X |archive-date=January 2, 2018 |archive-url=https://web.archive.org/web/20180102020507/https://www.newyorker.com/books/page-turner/the-trumpishness-of-ivana |url-status=live }}</ref> Adada ŵake ŵakaŵa [[injiniya wa magetsi]] ndipo anyina ŵakagwiranga ntchito ya kulongozga mafoni.<ref name=":1">{{cite web|last=Burleigh|first=Nina|date=November 27, 2017|title=Donald Trump's first ex-wife, Ivana, once wore homemade clothes. Now she spends holidays at Mar-a-Lago|url=https://www.newsweek.com/donald-trump-ivana-donald-ivanka-trump-russia-communism-czech-republic-721669|access-date=August 23, 2020|website=Newsweek|language=en|archive-date=September 24, 2020|archive-url=https://web.archive.org/web/20200924144516/https://www.newsweek.com/donald-trump-ivana-donald-ivanka-trump-russia-communism-czech-republic-721669|url-status=live}}</ref> Adada ŵake ŵakamulimbikiskanga mwana wawo kuti walutilire luso lwake lwa [[kusereŵera ski]], ilo wakamba ali na vyaka vinayi.<ref name=":1" /><ref name=":4">{{cite news|last=Bell|first=Bill|date=February 11, 1990|title=They met, they saw and they conquered: Donald and Ivana Trump seemed to have it all|url=https://www.nydailynews.com/new-york/trumps-article-1.2715780|access-date=August 23, 2020|newspaper=New York Daily News|archive-date=November 18, 2020|archive-url=https://web.archive.org/web/20201118090555/https://www.nydailynews.com/new-york/trumps-article-1.2715780|url-status=live}}</ref> Pamanyuma pakuti waŵa na luso lwa kusereŵera ski, Ivana wakanjira mu timu ya charu ya ŵawukirano ya kusereŵera ski, iyo yikamupa mwaŵi wakwenda kuwaro kwa mphaka za Chikomyunizimu za [[nyengo ya Soviet]] za icho pa nyengo iyo chikachemekanga Czechoslovak Socialist Republic.<ref name=":1" /> Wakasambira pa [[Charles University]] ku Prague ndipo wakapokera digiri ya master's mu [[masambiro gha thupi]] mu 1972.<ref name=":5">{{cite magazine| last1 = van Meter| first1 = Johnathan| date = May 1989| title = That's Why the Lady is a Trump| url = https://books.google.com/books?id=xaCC4gI-zJkC&q=trump%20master's%20degree&pg=PA86| issn = 0890-1759| magazine = [[Spy (magazine)|Spy]]| publisher = Sussex Publishers, LLC| via = [[Google Books]]| access-date = July 14, 2022| archive-date = July 10, 2021| archive-url = https://web.archive.org/web/20210710004200/https://books.google.com/books?id=xaCC4gI-zJkC&q=trump%20master%27s%20degree&pg=PA86| url-status = live}}</ref><ref name=":4" /> Mu 1970, Ivana wakawoneka pa [[Czechoslovak Television]] mu sewero la pa TV la ŵana ''[[Pan Tau]]''.<ref>{{cite web|last=Heinlein|first=Stefan|date=November 16, 2016|title=Ex-Frau von Donald Trump – Ivana Trump plant Diplomatenkarriere in Prag|url=https://www.deutschlandfunk.de/ex-frau-von-donald-trump-ivana-trump-plant.1773.de.html?dram:article_id=371467|access-date=August 24, 2020|website=Deutschlandfunk|language=de-DE|archive-date=November 17, 2020|archive-url=https://web.archive.org/web/20201117133017/https://www.deutschlandfunk.de/ex-frau-von-donald-trump-ivana-trump-plant.1773.de.html?dram:article_id=371467|url-status=live}}</ref> <blockquote>Munthu munyake wa ([[StB]]) uyo wakagwiliskiranga ntchito zina lakubisika lakuti ''Lubos'' wakaphalira ŵalara ŵake mu 1977 umo Ivana wakambira ntchito pa malo ghakuguliskirako mafuta ku Austria, uko wakakumanako na mfumu wake wakwamba mu 1968. Pamanyuma wakasamukira ku Canada, uko wakatorana na Trump.<ref name="theguardian/czech-ivana-files">{{cite news |last1=Connolly |first1=Kate |date=15 December 2016 |title=Czechoslovakia spied on Donald and Ivana Trump, communist-era files show |url=https://www.theguardian.com/us-news/2016/dec/15/czechoslovakia-spied-on-donald-trump-ivana-files |archive-url=https://web.archive.org/web/20161215173718/https://www.theguardian.com/us-news/2016/dec/15/czechoslovakia-spied-on-donald-trump-ivana-files |archive-date=2016-12-15 |access-date=24 July 2025 |work=[[The Guardian]]}}</ref></blockquote> Mu 1988, Ivana wakaphalira ŵapharazgi kuti wakasankhika kuŵa wakusinthira munyake mu timu ya ski ya Czechoslovakia pa [[Czechoslovakia pa Maseŵera gha Nyengo ya Chihanya ya 1972|Maseŵera gha Nyengo ya Chihanya gha 1972]], ndipo wakamanyikwanga pa [[Downhill (mpikisano wa ski)|downhill]] na [[Slalom skiing|slalom]].<ref name=":4"/><ref name="mmw">{{cite web|last=White|first=Marion M.|url=https://infoweb.newsbank.com/resources/doc/nb/news/0EB528F413ED16AC?p=AWNB|title=Ivana Trump: Hard work, discipline and self-reliance|work=[[Tampa Bay Times|St. Petersburg Times]]|date=September 26, 1988|access-date=July 19, 2019|archive-date=November 7, 2018|archive-url=https://web.archive.org/web/20181107132556/https://infoweb.newsbank.com/resources/doc/nb/news/0EB528F413ED16AC?p=AWNB|url-status=live}}</ref> Ndipouli, Czechoslovakia yikatuma ŵanakazi ŵanayi pera ku Maseŵera gha Nyengo ya Chihanya gha 1972 ndipo pakaŵavya uyo wakaseŵeranga alpine ski. Mu 1989, Petr Pomezný, Mlembi Mukuru wa [[Komiti ya Olimpiki ya Czechoslovakia|Komiti ya Olimpiki ya Czechoslovakia]], wakakana ivyo Ivana wakayowoya ndipo wakati nangauli ŵakapenja chomene, pakaŵavya ukaboni uliwose wakuti wakachitako nawo.<ref name=":5" /> Mu 2021, [[Snopes]] yikakhozgera kuti Czechoslovakia yindatume ŵanakazi ŵakuseŵera alpine ski ku Maseŵera gha Nyengo ya Chihanya gha 1972.<ref>{{cite web |last=Ibrahim |first=Nur |url=https://www.snopes.com/fact-check/ivana-trump-czech-1972-olympics/ |title=Was Ivana Trump an Alternate for Czech Ski Team in '72 Olympics? |work=[[Snopes]] |date=July 8, 2021 |access-date=April 6, 2024 |archive-date=April 7, 2024 |archive-url=https://web.archive.org/web/20240407123141/https://www.snopes.com/fact-check/ivana-trump-czech-1972-olympics/ |url-status=live }}</ref> ==Kusamukira ku Canada== Mu 1971, Ivana wakatorana na Alfred Winklmayr, musambizgi wa ski wa ku [[Austria|Austria]] kweniso mubwezi wake wakaŵavya chitemwa, kuti wapoke pasipoti.<ref name="Lague"/><ref name="McCauley" /><ref name="Conconi" /> Nthengwa iyi yikamupa wanangwa wakufuma mu Czechoslovakia kwambura kumanyikwa mwakuti walutilire kuŵa na wanangwa wakuwelera kukawona ŵapapi ŵake.<ref name="Lague">{{cite news |last=Lague |first=Louise |url=https://people.com/archive/ivana-alone-vol-33-no-11/ |title=Ivana Alone |work=[[People (magazine)|People]] |date=March 19, 1990 |access-date=April 23, 2023 |archive-date=November 5, 2018 |archive-url=https://web.archive.org/web/20181105012022/https://people.com/archive/ivana-alone-vol-33-no-11/ |url-status=live }}</ref>{{sfn|Hurt III|1993|p=99}}<ref name="McCauley">{{cite news |last=McCauley |first=Dana |url=https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6 |title=This is the woman who made Donald Trump a household name |website=news.com.au |date=May 1, 2016 |access-date=April 22, 2023 |archive-date=November 4, 2018 |archive-url=https://web.archive.org/web/20181104211237/https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|url-status=live}}</ref><ref name="Gross">{{cite news |last=Gross |first=Michael |url=https://books.google.com/books?id=7PcJmjU_n0UC&pg=PA46 |title=Ivana's New Life |work=[[New York (magazine)|New York]] |date=October 15, 1990 |access-date=April 22, 2023}}</ref> Nga ni Ivana Winklmayr, wakapokera pasipoti yake ya ku Austria mu Malichi 1972.<ref name="Conconi">{{cite news|last=Conconi|first=Chuck|date=February 22, 1990|title=Personalities|url=https://www.washingtonpost.com/archive/lifestyle/1990/02/22/personalities/6416c328-06cb-4efc-817e-03292e68d5a3/|access-date=November 22, 2017|newspaper=[[The Washington Post]]|archive-date=December 1, 2017|archive-url=https://web.archive.org/web/20171201034207/https://www.washingtonpost.com/archive/lifestyle/1990/02/22/personalities/6416c328-06cb-4efc-817e-03292e68d5a3/|url-status=live}}</ref> Mu Ogasiti 1973,<ref name="tampabay/1990/02/22/chorus-line">{{cite news |title=Chorus Line' to close in March; Ivana's 'cold-war' union revealed |url=https://www.tampabay.com/archive/1990/02/22/chorus-line-to-close-in-march/ |access-date=July 24, 2025 |work=[[Tampa Bay Times]] |date=February 22, 1990 |archive-url=https://web.archive.org/web/20200815143857/https://www.tampabay.com/archive/1990/02/22/chorus-line-to-close-in-march/ |archive-date=August 15, 2020 |language=en}}</ref> wakapokera chisudzulo cha nthengwa kwambura kuŵapo na Alfred Winklmayr ku [[Los Angeles]], [[California]], uko wakasamukira kukasambizga ski.<ref name="Lague"/>{{sfn|Hurt III|1993|p=99}}<ref name="Conconi"/> Ivana wakaŵa pa ubwezi wa chitemwa na mulembi wa mazgu gha sumu na maseŵero {{ill|Jiří Štaidl|cs}}, uyo wakafwa mu ngozi ya galimoto mu 1973.{{sfn|Burleigh|2018|p=82}} Pamanyuma pa nyifwa ya Štaidl, Ivana wakasamukira ku Canada, uko wakakhalanga na George (Jiří) Syrovátka uyo wakaŵa nayo pa chitemwa kwambira mu 1967; Syrovátka wakachimbira ku Canada mu 1971 ndipo wakaŵa mwini wake wa sitolo ya vinthu vya ski ku Montreal.{{sfn|Hurt III|1993|p=99}}<ref name="Lague" /><ref name="Gross" /> Pa nyengo iyo, wakayowoyanga kuti wakatorana na Syrovátka, kweni ŵaŵiri aŵa ŵakatorananga yayi.<ref>{{cite book|last1=King|first1=Norman|title=Ivana Trump|date=1990|publisher=Carroll and Graf|page=47}}</ref><ref>{{Cite news |last=Haddrick |first=Margaret |date=December 31, 1975 |title=The Two Faces of Ivana – Model and Sportswoman |work=Montreal Gazette |page=9}}</ref> Ivana wakagwiranga ntchito ya kusambizga ski apo wakakhalanga ku Canada.<ref name=":2">{{cite web|last1=Hallemann|first1=Caroline|last2=Dangremond|first2=Sam|date=June 25, 2019|title=Here's What You Need to Know About Ivana Trump, Donald's First Wife |url=https://www.townandcountrymag.com/society/politics/news/g2605/donald-trump-first-wife-ivana-trump/ |access-date=August 23, 2020 |work=[[Town & Country (magazine)|Town & Country]] |archive-date=August 25, 2020|archive-url=https://web.archive.org/web/20200825055245/https://www.townandcountrymag.com/society/politics/news/g2605/donald-trump-first-wife-ivana-trump/|url-status=live}}</ref> Wakakhala ku [[Montreal]] kwa vyaka viŵiri, uko wakalutilira kusazgirako luso lwake lwa Chingelezi kwizira mu masambiro gha usiku pa [[McGill University]].<ref name="Gross" /> Apo wakagwiranga ntchito ya kuwoneska mafashoni, Ivana wakaphalira ''[[Montreal Gazette]]'' mu 1975 kuti wakawonanga kuwoneska mafashoni kuŵa ntchito pera, yayi ntchito ya umoyo wake wose.<ref>{{Cite news|date=February 20, 2019|title=How a move to Canada helped Donald and Ivana Trump meet|work=CBC|url=https://www.cbc.ca/archives/how-a-move-to-canada-helped-donald-and-ivana-trump-meet-1.5006869|access-date=August 22, 2020|archive-date=October 22, 2020|archive-url=https://web.archive.org/web/20201022072331/https://www.cbc.ca/archives/how-a-move-to-canada-helped-donald-and-ivana-trump-meet-1.5006869|url-status=live}}</ref> Ŵanthu awo ŵakamulemba ntchito yakuwoneska mafashoni ŵakasazgapo sitolo ya [[Eaton's]] na mlengi wa mafashoni Auckie Sanft, kweniso ntchito zakupharazga za [[Maseŵera gha Chihanya gha Olimpiki gha 1976]] ku Montreal.<ref name="Gross" /> ==Nthengwa na Donald Trump== [[File:State Visit of King Fahd of Saudi Arabia State Dinner Receiving Line with Ivana Trump and Donald Trump in East Room - DPLA - 1a44d05819eab8ba3dcf7a6883ad92ba.jpg|thumb|Ivana na Donald Trump pa mzere wakupokelera ŵalendo pa chakurya cha boma cha Themba [[Fahd of Saudi Arabia]] mu 1985, pamoza na mlongozgi wa United States [[Ronald Reagan]] na Mama Wakwamba [[Nancy Reagan]]]] Ivana wakaŵa mu Msumba wa New York pamoza na gulu la ŵamodel mu 1976 apo wakakumana na [[Donald Trump]].<ref name="Gross"/> Pa Epulero 9, 1977, ŵakatorana pa [[Marble Collegiate Church]] pa ukwati uwo ukalongozgekanga na [[Norman Vincent Peale]].{{sfn|Barrett|2016|p=132}}{{sfn|Blair|2015|p=300}}<ref>{{cite news|last1=Mahler|first1=Jonathan|last2=Flegenheimer|first2=Matt|url=https://www.nytimes.com/2016/06/21/us/politics/donald-trump-roy-cohn.html|title=What Donald Trump Learned From Joseph McCarthy's Right-Hand Man|newspaper=The New York Times|date=June 20, 2016|access-date=June 3, 2019|archive-date=June 10, 2020|archive-url=https://web.archive.org/web/20200610051303/https://www.nytimes.com/2016/06/21/us/politics/donald-trump-roy-cohn.html|url-status=live}}</ref><ref>{{cite web|title=Donald and Ivana Trump seemed to have it all|url=https://www.nydailynews.com/new-york/trumps-article-1.2715780|date=July 20, 2016|access-date=March 10, 2023|website=New York Daily News|archive-date=November 18, 2020|archive-url=https://web.archive.org/web/20201118090555/https://www.nydailynews.com/new-york/trumps-article-1.2715780|url-status=live}}</ref><ref name="townandcountrymag/trump-family-tree">{{cite news |last1=Burack |first1=Emily |last2=Kim |first2=Leena |title=A Guide to Donald Trump's Family Tree |url=https://www.townandcountrymag.com/society/politics/a63434923/donald-trump-family-tree-explained/ |access-date=July 24, 2025 |work=[[Town & Country (magazine)|Town & Country]] |date=January 20, 2025 |archive-url=https://web.archive.org/web/20250120163303/https://www.townandcountrymag.com/society/politics/a63434923/donald-trump-family-tree-explained/ |archive-date=January 20, 2025}}</ref> Mu vyaka vya m'ma 1980, ŵakaŵa ŵanthu ŵakumanyikwa chomene mu nyuzipepala za mphekesera za mu New York ndipo ŵakagwiranga ntchito lumoza pa mapulojekiti ghanandi ghakuru, kusazgapo [[Trump Tower (New York)|Trump Tower]] pa [[Fifth Avenue]] mu Manhattan, kunozga [[Grand Hyatt New York|Grand Hyatt Hotel]] mu Msumba wa New York, kweniso kuzenga [[Trump Taj Mahal Casino Resort]] mu [[Atlantic City, New Jersey]].<ref>{{Cite magazine|last=Brenner|first=Marie|date=September 1990|title=After the Gold Rush|url=https://archive.vanityfair.com/article/share/e515a2cd-a51b-4f83-8d61-6ebb9a104e0a|access-date=August 30, 2020|magazine=Vanity Fair|language=en-US|archive-date=April 7, 2019|archive-url=https://web.archive.org/web/20190407040806/https://www.vanityfair.com/magazine/2015/07/donald-ivana-trump-divorce-prenup-marie-brenner|url-status=live}}</ref><ref name=":7">{{cite news|last=Bender|first=Marylin|date=August 7, 1983|title=The Empire and Ego of Donald Trump|url=https://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|access-date=October 31, 2016|work=The New York Times|archive-date=June 16, 2016|archive-url=https://web.archive.org/web/20160616130053/http://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|url-status=live}}</ref> [[File:Estee Lauder with Ivana Trump (1).jpg|thumb|upright|Ivana (kuwoko lamalyero) na [[Estée Lauder (businesswoman)|Estée Lauder]] pa phwando la [[Red Cross]] ku Palm Beach mu 1986]] [[File:Bush Contact Sheet P16206 (cropped).jpg|thumb|right|Ivana wakupokelera Mama Wakwamba [[Barbara Bush]] mu 1990]] Pa nyengo ya nthengwa yawo, Ivana na Donald ŵakaŵa na ŵana ŵatatu: [[Donald Trump Jr.|Donald Jr.]] (wakababika mu 1977), [[Ivanka Trump|Ivana (Ivanka) Marie]] (wakababika mu 1981), na [[Eric Trump|Eric]] (wakababika mu 1984). Donald Jr. wakasambira kuyowoya makora [[Chiyekesi|Chiyekesi]] (na wovwiri wa sekuru ŵake wa ku amama), apo Ivanka wakasambira waka pachoko chiyowoyero cha amama ŵake, ndipo Eric wakasambira yayi chiyowoyero ichi chifukwa ŵasekuru ŵake ŵakagwiliskiranga ntchito Chingelezi mwakufwatuka.<ref>{{cite web|last=Rayner|first=Polly|date=May 14, 1989|title=Ivana Trump Now Fashions Herself As Plaza's Innkeeper|url=https://www.mcall.com/1989/05/14/ivana-trump-now-fashions-herself-as-plazas-innkeeper/|access-date=August 23, 2020|website=The Morning Call|archive-date=August 4, 2016|archive-url=https://web.archive.org/web/20160804065645/http://articles.mcall.com/1989-05-14/features/2690591_1_trump-tower-skis-trump-castle/2|url-status=live}}</ref><ref>{{cite web|last=Van Meter|first=Jonathan|date=December 3, 2004|title=Did Their Father Really Know Best?|url=https://nymag.com/nymetro/news/people/features/10610/|access-date=August 11, 2016|work=New York|archive-date=August 2, 2016|archive-url=https://web.archive.org/web/20160802130124/http://nymag.com/nymetro/news/people/features/10610/|url-status=live}}</ref> <blockquote>"Apo wakaŵa wachali kutengwa na (redacted) ndipo panyake wakakhalanga ku Austria, wakazgoka mwanangwa wa Austria mu 1972. Chaka chimoza kufuma apo wakatoranira na Trump, wakazgoka mwanangwa wa Canada. Ndipo myezi yinkhondi pamanyuma pake wakapokera chilolezo chakukhalira kwamuyirayira mu United States."<ref name="independent/b2354794">{{cite news |last1=Massie |first1=Graeme |title=Secret FBI files reveal questions over Ivana Trump's immigration status |url=https://www.independent.co.uk/news/world/americas/ivana-trump-fbi-secret-files-b2354794.html |access-date=24 July 2025 |work=[[The Independent]] |date=10 June 2023 |archive-url=https://web.archive.org/web/20230609194704/https://www.independent.co.uk/news/world/americas/ivana-trump-fbi-secret-files-b2354794.html |archive-date=2023-06-09 |language=en}}</ref></blockquote> Mulembi munyake uyo wakawona filimu ya pa [[Netflix]] ya 2018 yakucemeka ''[[Trump: An American Dream]]'', wakalongosora Ivana kuti "wakaŵa mwanakazi wakukopa, wakutemwa ntchito, wakulondezga ntchito yake, ndipo wakaŵa wakuyana", kweniso munyake wa umoyo uyo Trump wakamusankha mwadala kuti "wagwirenge nayo ntchito na kumususkanga".<ref>{{cite web|last=Placido|first=Dani Di|title='Trump: An American Dream' Plays Like A Supervillain Origin Story|url=https://www.forbes.com/sites/danidiplacido/2018/04/12/trump-an-american-dream-plays-like-a-supervillain-origin-story/|access-date=August 25, 2020|website=Forbes|language=en|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202094224/https://www.forbes.com/sites/danidiplacido/2018/04/12/trump-an-american-dream-plays-like-a-supervillain-origin-story/|url-status=live}}</ref> Nthengwa ya a Trump iyo yikaŵa na masuzgo yikazgoka nkhani yakumanyikwa chomene pa nyengo ya maholide gha Khisimasi mu 1989, apo ŵakawoneka ŵakukwesana pamanyuma pakuti Ivana wakasangana na mubwezi wa Donald, [[Marla Maples]].<ref name=":11">{{cite web|last1=Lavin|first1=Cheryl|date=February 18, 1990|title=With 'Dynasty' Dead, Just Tune To The Trumps|url=https://www.chicagotribune.com/1990/02/18/with-dynasty-dead-just-tune-to-the-trumps/|archive-url=https://web.archive.org/web/20140405233832/http://articles.chicagotribune.com/1990-02-18/features/9001140529_1_ivana-trump-donald-trump-marla-maples |archive-date=April 5, 2014 |access-date=October 13, 2016|url-status=live|work=[[Chicago Tribune]]}}</ref> ''[[Chicago Tribune]]'' yikaphalira kuti kufika mu Febuluwale 1990, Donald wakajara Ivana kuwaro kwa ofesi yake pa [[Plaza Hotel]], ndipo pakaŵa nkhondo ya malango pa unenesko wa mapangano ghanayi gha [[Prenuptial agreement|vyakukolerana pambere ŵandatore]] agho ŵakachitanga pa vyaka vinandi.<ref name=":11" /> Mu Okutobala 1990, awiske ŵa Ivana ŵa vyaka 63, Miloš Zelníček, ŵakafwa mwamabuchi chifukwa cha matenda gha mtima. Kuyana na ''[[The Guardian]]'', awiske ŵake ŵakaŵa muphaliri wa [[Státní bezpečnost]] (StB), [[intelligence service]] ya Czechoslovakia, ndipo ŵakatumizganga uthenga uwo ŵakapokeleranga kwa mwana wawo, kusazgapo kulaŵiska makora kuti [[George H. W. Bush]] wazamathereska pa [[Visola vya mlongozgi wa United States mu 1988|visola vya mlongozgi wa United States mu 1988]].<ref name="The Guardian">{{cite news |last1=Harding |first1=Luke |title='A very different world' – inside the Czech spying operation on Trump |url=https://www.theguardian.com/us-news/2018/oct/29/czechoslovakia-spied-on-trump-to-exploit-ties-to-highest-echelons-of-us-power |access-date=October 29, 2018 |work=The Guardian |date=October 29, 2018 |archive-date=January 30, 2020 |archive-url=https://web.archive.org/web/20200130030236/https://www.theguardian.com/us-news/2018/oct/29/czechoslovakia-spied-on-trump-to-exploit-ties-to-highest-echelons-of-us-power |url-status=live }}</ref> Nangauli nthengwa yawo yikaŵa na masuzgo ndipo ŵakaŵa pafupi kupatana, Donald wakimilira nayo pamoza pa nyifwa ya awiske ŵake ku [[Zlín]]<ref>{{cite web |last1=Libiger |first1=Milan |last2=Železník |first2=Tomáš |title=Trumpa přivedl do Zlína tchánův pohřeb, děti sem jezdily na prázdniny |url=https://www.idnes.cz/zlin/zpravy/donald-trump-byl-ve-zline-synove-vzpominaji-na-prazdniny-u-prarodicu.A161110_2285077_zlin-zpravy_ras |website=iDNES.cz |access-date=January 19, 2019 |language=cs |date=November 11, 2016 |quote=Father-in-law's funeral brought Trump to Zlín, his children used to spend holidays there |archive-date=April 14, 2020 |archive-url=https://web.archive.org/web/20200414152215/https://www.idnes.cz/zlin/zpravy/donald-trump-byl-ve-zline-synove-vzpominaji-na-prazdniny-u-prarodicu.A161110_2285077_zlin-zpravy_ras |url-status=live }}</ref> iyo yikachitika mu Novembala 1990.<ref name="The Guardian"/> Nkhani ya kupatana kwa a Trump yikamanyikwa pa charu chose chapasi.<ref name=":12" /> Nkhani iyi yikaŵa pa peji lakwamba la manyuzipepala gha mphekesera gha mu New York kwa mazuŵa 11 ghakulondezgana, ndipo yikaŵa nkhani yikuru iyo mulembi wa nkhani za ŵanthu ŵakumanyikwa [[Liz Smith (journalist)|Liz Smith]] wakalemba kwa myezi yitatu yose.<ref name="leland20170730">{{Cite news |url=https://www.nytimes.com/2017/07/28/nyregion/liz-smith-lions-of-new-york.html |title=Life Among the Boldface Names |last=Leland |first=John |date=July 30, 2017 |work=The New York Times |access-date=July 28, 2017 |page=MB1 |language=en-US |issn=0362-4331 |archive-date=July 28, 2017 |archive-url=https://web.archive.org/web/20170728104144/https://www.nytimes.com/2017/07/28/nyregion/liz-smith-lions-of-new-york.html |url-status=live }}</ref> Mu ukaboni uwo wakapelekeka pa mulandu wa kupatana kwawo, Ivana wakapa mulandu Donald kuti wakamuchitiya nkhaza za kugonana.<ref>{{Cite news|last1=Ross|first1=Barbara|last2=Brown|first2=Stephen Rex|date=September 17, 2016|title=Court docs reveal Donald Trump's 'cruel' treatment of Ivana|language=en|work=NY Daily News|url=http://www.nydailynews.com/news/politics/court-docs-reveal-donald-trump-cruel-treatment-ivana-article-1.2796179|archive-url=https://web.archive.org/web/20160917194525/http://www.nydailynews.com/news/politics/court-docs-reveal-donald-trump-cruel-treatment-ivana-article-1.2796179 |archive-date=September 17, 2016 |access-date=October 15, 2017}}</ref> Mu buku la [[Harry Hurt III|Harry Hurt]] lakucemeka ''Lost Tycoon: The Many Lives of Donald J. Trump'', wakazomera kuti "wakajipulika kuti wasuzgika". Ndipouli, mu mazgu agho ghakapelekeka na Donald na maloya ŵake, Ivana wakati nangauli wakagwiliskira ntchito lizgu lakuti ''rape'', wakakhumbanga yayi kuti "mazgu ghake ghapulikikenge mu nthowa yaunenesko panji ya mulandu wa boma".<ref name=":0"/> Kupatana kwawo kwambura kususkika kukazomerezgeka mu Disembala 1990 chifukwa cha nkhaza na kuchitikirika viheni na Donald.<ref name=":12">{{cite news|last=Barron|first=James|date=December 12, 1990|title=Trumps Get Divorce; Next, Who Gets What?|url=https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|access-date=September 7, 2019|website=The New York Times|archive-date=May 8, 2019|archive-url=https://web.archive.org/web/20190508224859/https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|url-status=live}}</ref><ref>{{Cite web|title=The New York Times motion to unseal divorce settlement records|url=https://static.politico.com/52/3c/4e17d1ba4d8a89254bb71460b28e/trumpdivorceunsealpdf.pdf|publisher=Politico|page=6|access-date=April 21, 2024|archive-date=April 11, 2023|archive-url=https://web.archive.org/web/20230411001354/https://static.politico.com/52/3c/4e17d1ba4d8a89254bb71460b28e/trumpdivorceunsealpdf.pdf|url-status=live}}</ref> Ivana wakeneranga kusayina [[non-disclosure agreement]] nga ni chigaŵa cha phangano la kupatana, ndipo wakeneranga kupempha chilolezo kwa Donald pambere wandayowoye pa wumba za nthengwa yawo.<ref name=":0">{{cite web|author=Mak|first1=Tim|last2=Zadrozny|first2=Brandy|author-link2=Brandy Zadrozny|date=July 27, 2015|title=Ex-Wife: Donald Trump Made Me Feel 'Violated' During Sex|url=https://www.thedailybeast.com/ex-wife-donald-trump-made-me-feel-violated-during-sex|access-date=November 9, 2020|work=[[The Daily Beast]]|archive-date=November 9, 2020|archive-url=https://web.archive.org/web/20201109014859/http://www.thedailybeast.com/ex-wife-donald-trump-made-me-feel-violated-during-sex|url-status=live}}</ref><ref>{{Cite news|last=Heil|first=Emily|date=October 11, 2017|title=Here are some fabulous lines from Ivana Trump's 1995 divorce manual|newspaper=[[The Washington Post]]|url=https://www.washingtonpost.com/news/reliable-source/wp/2017/10/11/here-are-some-fabulous-lines-from-ivana-trumps-1995-divorce-manual/|access-date=August 28, 2020|archive-date=February 3, 2021|archive-url=https://web.archive.org/web/20210203025248/https://www.washingtonpost.com/news/reliable-source/wp/2017/10/11/here-are-some-fabulous-lines-from-ivana-trumps-1995-divorce-manual/|url-status=live}}</ref> ''[[The New York Times]]'' yikaphalira mu 1991 kuti Ivana wakapokera ndalama zakukwana $14 miliyoni, nyumba ya vipinda 45 ku Connecticut, nyumba ya mu [[Trump Plaza (New York City)|Trump Plaza]], kweniso mwaŵi wakugwiliskira ntchito [[Mar-a-Lago]] mwezi umoza chaka chilichose.<ref name=":15">{{Cite news|last=Hylton|first=Richard D. |date=March 21, 1991 |title=Trumps Settle; She Gets $14 Million Plus|work=[[The New York Times]] |url=https://www.nytimes.com/1991/03/21/nyregion/trumps-settle-she-gets-14-million-plus.html|archive-url=https://web.archive.org/web/20150525231304/https://www.nytimes.com/1991/03/21/nyregion/trumps-settle-she-gets-14-million-plus.html |archive-date=May 25, 2015 |access-date=November 13, 2021}}</ref> ==Ntchito== Pa nyengo iyo wakaŵa pa nthengwa na Donald, Ivana wakagwira maudindo ghakuru mu [[Trump Organization]], wakagwira ntchito nga ni mulara mukuru kwa vyaka vinkhondi na viŵiri,<ref>{{cite web|last=McCauley|first=Dana|date=April 29, 2016|title=This is the woman who made Donald Trump a household name|url=https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|access-date=August 25, 2020|website=NewsComAu|language=en|archive-date=November 4, 2018|archive-url=https://web.archive.org/web/20181104211237/https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|url-status=live}}</ref> kusazgapo udindo wa vice president mukuru wa kapangidwe ka mukati mwa nyumba.<ref name=":8">{{Cite magazine|last=Shnayerson|first=Michael|date=January 2, 1988|title=Inside Ivana's Role in Donald Trump's Empire|url=https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|access-date=August 23, 2020|magazine=Vanity Fair|archive-date=December 29, 2020|archive-url=https://web.archive.org/web/20201229002006/https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|url-status=live}}</ref><ref name=":7"/> Wakalongozga kapangidwe ka mukati mwa [[Trump Tower (New York)|Trump Tower]], uwo ukumanyikwa na malibwe ghapinki gha marble.<ref name=":8"/> Ivana wakimikika kuŵa CEO<ref>{{cite web|last=Burleigh|first=Nina|date=February 1, 2017|title=What Melania, Ivanka, Ivana, Marla tell us about the role of women in Trump's world|url=https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|access-date=August 24, 2020|website=Newsweek|language=en|archive-date=January 10, 2021|archive-url=https://web.archive.org/web/20210110022312/https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|url-status=live}}</ref><ref>{{cite web|last=Ellison|first=Sarah|title=Ivanka's Apprentice|url=https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|access-date=January 12, 2021|publisher=Vanity Fair|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114052422/https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|url-status=live}}</ref> kweniso pulezidenti wa [[Trump Castle Hotel and Casino]] ku [[Atlantic City, New Jersey|Atlantic City]], ndipo pamanyuma wakazgoka mulongozgi wa [[Plaza Hotel]] ku [[Manhattan]].<ref>{{cite web |url=https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |title=10 Juiciest Secrets of the Plaza Hotel – Donald Trump's Ownership of the Plaza |publisher=Townandcountrymag.com |date=June 7, 2019 |accessdate=July 14, 2022 |archive-date=December 22, 2021 |archive-url=https://web.archive.org/web/20211222171036/https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |url-status=live}}</ref> Donald Trump wakati wapunda pa [[Visola vya mlongozgi wa United States mu 2016|Visola vya mlongozgi wa United States mu 2016]], wakakana pempho lake lakuti waŵe [[Mndandanda wa ŵambasada ŵa United States ku Czech Republic|mbasada ku charu chake cha Czech Republic]].<ref>{{Cite web |last=Klein |first=Betsy |date=October 5, 2017 |title=Ivana Trump turns down ambassadorship {{!}} CNN Politics |url=https://www.cnn.com/2017/10/05/politics/ivana-trump-czech-republic-ambassador-twitter/index.html |access-date=March 17, 2025 |website=CNN |language=en |archive-date=August 14, 2025 |archive-url=https://web.archive.org/web/20250814162706/https://www.cnn.com/2017/10/05/politics/ivana-trump-czech-republic-ambassador-twitter/index.html |url-status=live }}</ref> ===Malonda=== Pati pajumpha nyengo yichoko waka kufuma pa kupatukana kwawo, Ivana wakamba kupanga mizere yake ya vyakuvwara, vyakuvwara vya mawoko, na vyakutozgera thupi, ivyo vikaguliskikanga kwizira mu mawayilesi gha kuguliska vinthu, kusazgapo [[HSN|Home Shopping Network]]<ref name=":9">{{Cite news|last=Dullea|first=Georgia|date=April 5, 1995|title=AT WORK WITH: Ivana Trump; Thinner, Blonder, Wiser|language=en-US|work=The New York Times|url=https://www.nytimes.com/1995/04/05/garden/at-work-with-ivana-trump-thinner-blonder-wiser.html|access-date=August 23, 2020|issn=0362-4331|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202192323/https://www.nytimes.com/1995/04/05/garden/at-work-with-ivana-trump-thinner-blonder-wiser.html|url-status=live}}</ref> na [[QVC (British TV channel)|QVC London]].<ref>{{Cite magazine|last=Trump|first=Ivana|date=October 9, 2017|title=Read an Exclusive Excerpt From Ivana Trump's New Memoir|url=https://time.com/4972300/ivana-trump-excerpt/|access-date=August 23, 2020|magazine=Time|archive-date=November 12, 2020|archive-url=https://web.archive.org/web/20201112031351/https://time.com/4972300/ivana-trump-excerpt/|url-status=live}}</ref> Mu 1995, wakaŵa mulongozgi wa The House of Ivana, kampani ya mafashoni na vyakununkhira iyo yikaŵa na chipinda chakulongolera vinthu pa [[Park Avenue]] ku New York City.<ref name=":9" /> Mu 1998, Ivana wakamba kuchita malonda ku [[Croatia]] (uko ŵapapi ŵake ŵakatemwanga kuluta kukapumulira), agho ghakasazgapo kugura 33% ya nyuzipepara ya zuŵa na zuŵa yachiŵiri pakukura chomene mu charu ichi, ''Polo+10''.<ref>{{cite web|title=Successful Beach Polo Premiere in Croatia|url=http://www.poloplus10.com/rovinj-beach-polo-cup-2016-successful-beach-polo-premiere-croatia-65141/|website=POLO+10 The Polo Magazine|date=May 19, 2016|access-date=November 17, 2016|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202141026/https://www.poloplus10.com/rovinj-beach-polo-cup-2016-successful-beach-polo-premiere-croatia-65141/|url-status=live}}</ref><ref>{{cite news|last1=Tribune New Services|title=And The Town's Name Rang A Bell With Her|url=https://www.chicagotribune.com/1998/01/22/and-the-towns-name-rang-a-bell-with-her/|work=Chicago Tribune|date=January 22, 1998|language=en|access-date=November 17, 2016|archive-date=June 27, 2018|archive-url=https://web.archive.org/web/20180627034310/http://articles.chicagotribune.com/1998-01-22/news/9801220095_1_ivana-trump-donald-trump-croatia|url-status=live}}</ref> Ntchito yakuzenga nyumba ya Bentley Bay yakudumbika na zina la Ivana ku [[Miami, Florida]] yikapempha chitetezo cha bankirapuse mu 2004.<ref name="brand">{{cite web|url=http://www.reviewjournal.com/lvrj_home/2005/Aug-15-Mon-2005/business/2867912.html|title=High-Rise Development: Ivana buys into project|last=Robison|first=Jennifer|date=August 15, 2005|work=[[Las Vegas Review-Journal]]|archive-url=https://web.archive.org/web/20051029050640/http://www.reviewjournal.com/lvrj_home/2005/Aug-15-Mon-2005/business/2867912.html|archive-date=October 29, 2005}}</ref> Chaka chakalondezgapo wakachitako nawo ma projekiti ghanandi gha nyumba za ma condominium, kusazgapo [[Ivana Las Vegas]], iyo yindazengeke.<ref name="brand" /><ref>{{cite web|url=http://www.reviewjournal.com/lvrj_home/2006/Jul-19-Wed-2006/news/8570964.html|title=Pamela, Kid Rock finally to marry|last=Clarke|first=Norm|date=July 19, 2006|work=Las Vegas Review-Journal|archive-url=https://web.archive.org/web/20060720221601/http://www.reviewjournal.com/lvrj_home/2006/Jul-19-Wed-2006/news/8570964.html|archive-date=July 20, 2006}}</ref> Mu 2010, Ivana wakasuma kampani ya mafashoni ya ku Finland ya [[Ivana Helsinki]], wakayisuska kuti yikaguliskanga vyakuvwara vya ŵanakazi ivyo vikagwiliskiranga ntchito zina lake kwambura chilolezo chake.<ref>{{Cite news|last=Stempel|first=Jonathan|date=September 16, 2010|title=Ivana Trump sues Finnish designer over name|work=Reuters|url=https://in.reuters.com/article/us-ivanahelsinki-ivanatrump/ivana-trump-sues-finnish-designer-over-name-idINTRE68F4BQ20100916|access-date=August 25, 2020|archive-date=June 25, 2020|archive-url=https://web.archive.org/web/20200625074708/https://in.reuters.com/article/us-ivanahelsinki-ivanatrump/ivana-trump-sues-finnish-designer-over-name-idINTRE68F4BQ20100916|url-status=dead}}</ref> ===Kulemba=== Ivana wakalemba mabuku ghanandi, kusazgapo ''For Love Alone'' (1992), ''Free to Love'' (1993), na buku la [[kujovwira wekha]] lakuti ''The Best Is Yet to Come: Coping with Divorce and Enjoying Life Again'' (1995).<ref>{{cite web |url=https://www.writerswrite.com/ivana-trump-raising-trump-memoir-4052017177 |title=Ivana Trump to Publish Memoir About Raising Ivanka, Don Jr. and Eric Called Raising Trump |publisher=Writerswrite.com |date=April 5, 2017 |accessdate=July 14, 2022 |archive-date=June 16, 2021 |archive-url=https://web.archive.org/web/20210616013751/https://www.writerswrite.com/ivana-trump-raising-trump-memoir-4052017177 |url-status=live }}</ref> Trump wakalembanga nkhani zakupereka ulongozgi pa nkhani ya chitemwa na umoyo mu ''[[Globe (tabloid)|Globe]]'', yakudanika kuti "Ask Ivana", kwambira mu Juni 1995 m'paka mu Janyuwale 2010.<ref>{{cite web|url=https://news.google.com/newspapers?nid=1957&dat=19950601&id=KHk1AAAAIBAJ&pg=3910,149601|title=Ask Ivana|work=[[The Daily Gazette]]|date=June 1, 1995|access-date=November 28, 2016|archive-date=February 3, 2021|archive-url=https://web.archive.org/web/20210203093120/https://news.google.com/newspapers?nid=1957&dat=19950601&id=KHk1AAAAIBAJ&pg=3910,149601|url-status=live}}</ref><ref>{{cite magazine|last=Trump|first=Ivana|date=January 25, 2010|title=Bye, Bye Ivana!|magazine=[[Globe (tabloid)|Globe]]|page=18|quote=Dear Readers: After years of hard work and devoted service as GLOBE's advice columnist, I regretfully have decided to resign from the position. While I have thoroughly enjoyed being a part of the GLOBE family, as well as the many friendships that I have developed over the years, other business pursuits, both nationally and internationally, will not allow me to devote the attention necessary to the column and to my readers.}}</ref> Mu Febuluwale 1999, Ivana wakambiska magazini yake ya umoyo yakudanika kuti ''Ivana's Living in Style''.<ref>{{cite web|url=http://articles.sun-sentinel.com/1999-02-24/lifestyle/9902230731_1_ivana-trump-miniskirt-takeout|title=Picture This: Ivana Has Her Own Magazine|last=White|first=Diane|work=[[The Boston Globe]]|date=February 24, 1999|access-date=November 29, 2016|archive-date=November 29, 2016|archive-url=https://web.archive.org/web/20161129145805/http://articles.sun-sentinel.com/1999-02-24/lifestyle/9902230731_1_ivana-trump-miniskirt-takeout|url-status=dead}}</ref> Wakalembaso nkhani zakupereka ulongozgi mu ''Divorce Magazine'' mu 2001.<ref>Zwecker, Bill, "Ivana's trump? Divorce column that shares all she's learned", ''Chicago Sun-Times'', January 24, 2001</ref> Mu 2017, Ivana wakafumiska buku lake la mbiri ya umoyo, ''Raising Trump''. Bukuli likulongosora umo wakakulira kweniso vyaka vyakwambilira vya kulera ŵana ŵake pamoza na Donald.<ref name="nyt">{{cite news |last=Collins |first=Gail |author-link=Gail Collins |date=October 12, 2017 |title=The Trumps, the Poodle, the Sex Scandal|url=https://www.nytimes.com/2017/10/12/opinion/ivana-ivanka-trump-book.html?pagewanted=all&src=pm |newspaper=[[The New York Times]] |access-date=February 9, 2020 |archive-date=February 9, 2020 |archive-url=https://web.archive.org/web/20200209011209/https://www.nytimes.com/2017/10/12/opinion/ivana-ivanka-trump-book.html?pagewanted=all&src=pm}}</ref><ref>{{cite book|last1=Trump|first1=Ivana|title=Raising Trump|url=https://books.google.com/books?id=gQ5aDgAAQBAJ&q=Raising+Trump|date=October 2017|publisher=[[Gallery Publishing Group|Gallery Books]]|via=[[Google Books]]|isbn=978-1-5011-7728-6|access-date=October 2, 2020|archive-date=February 16, 2021|archive-url=https://web.archive.org/web/20210216202918/https://books.google.com/books?id=gQ5aDgAAQBAJ&q=Raising+Trump|url-status=live}}</ref> ==Kuwonekera mu vya nkhani== [[File:Life Ball 2009 (arrivals) Ivana Trump.jpg|thumb|upright|Ivana pa [[Life Ball]] ya 2009 mu [[Vienna]]]] Ivana na Donald ŵakawonekera lumoza mu mapulogiramu ghanandi gha pa wayilesi ya kanema, kusazgapo ''[[The Oprah Winfrey Show]]'' mu Epulero 1988,<ref>{{Cite news|date=April 25, 1988|title=Donald Trump on Marriage: 'Ultimately Ivana Does Exactly As I Tell Her to Do'|language=en-us|publisher=Oprah.com|url=http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do|access-date=August 24, 2020|archive-date=November 21, 2020|archive-url=https://web.archive.org/web/20201121145501/http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do|url-status=live}}</ref> ndipo pamanyuma pake ''[[Wogan]]'' ya BBC mu Meyi 1988.<ref>{{cite web|date=May 23, 1988|title=Wogan: Donald Trump and Dame Edna|url=https://www.bbc.co.uk/videos/cd184xejm20o|access-date=August 24, 2020|publisher=BBC Archive|language=en|archive-date=November 10, 2020|archive-url=https://web.archive.org/web/20201110110400/https://www.bbc.co.uk/archive/donald-trump-dame-edna-wogan/zjxcf4j|url-status=live}}</ref> Pamanyuma pa kupatana na Donald, Ivana wakafumbika mafumbo na [[Barbara Walters]] pa pulogiramu ya ABC yakuti ''[[20/20 (American TV program)|20/20]]''. Mu 1991, Donald wakalekeska kumupa ndalama za [[ndalama zakovwira munthu para ŵapatana]] pamanyuma pa kuyowoyeskana uku ndipo wakapharazga kuti wafumbenge Ivana ndalama chifukwa cha vyakunangiska.<ref>{{cite web|last=Winship|first=Frederick M.|date=May 14, 1991|title=Trump ends Ivana's alimony over TV interview|url=https://www.upi.com/Archives/1991/05/14/Trump-ends-Ivanas-alimony-over-TV-interview/1397674193600/|access-date=August 23, 2020|publisher=UPI|language=en|archive-date=January 11, 2021|archive-url=https://web.archive.org/web/20210111065258/https://www.upi.com/Archives/1991/05/14/Trump-ends-Ivanas-alimony-over-TV-interview/1397674193600/|url-status=live}}</ref> Wakaweleraso ku ''The Oprah Winfrey Show'' mu 1992 na uthenga wakuti, "Nilolenge chara kuti ŵanalume ŵanilamulirenge so yayi."<ref>{{cite news|last=Jones|first=Isabel|date=December 5, 2019|title=Donald Trump Reportedly Told Then-Wife Ivana Trump to 'Never Look a Day Over 28'|url=https://money.yahoo.com/donald-trump-reportedly-told-then-223000422.html|access-date=August 24, 2020|publisher=Yahoo! Money|agency=[[InStyle]]|language=en-US|archive-date=October 25, 2020|archive-url=https://web.archive.org/web/20201025031640/https://money.yahoo.com/donald-trump-reportedly-told-then-223000422.html|url-status=live}}</ref> Ivana wakaŵa na gawo lichoko mu filimu ya [[Hollywood (film industry)|Hollywood]] yakuti ''[[The First Wives Club]]'' (1996), apo wakayowoya kuti, "Ŵanakazi, mukwenera kuŵa ŵankhongono kweniso ŵakujiyimira ŵekha. Ndipo kumbukani: mungakwiyanga chara, kweni torani chilichose."<ref name="Cettl">{{cite book|last1=Cettl|first1=Robert|title=Film Talk|date=2010|publisher=Wider Screenings|isbn=9780987050038|page=54}}</ref> Wakaŵa mulongozgi wa pulogiramu ya TV ya ''[[Ivana Young Man]]'', iyo yikawoneskeka pa [[Oxygen (TV network)|Oxygen Network]] mu 2006. Mu pulogiramu iyi ya kusanga wokutemwana nayo, wakawovwira mwanakazi musambazi wa msinkhu wapakati kusanga munyamata muchoko wakuti waŵe nayo pa chitemwa.<ref name=":2" /> Mu 2010, Ivana wakawonekera mu pulogiramu ya pa TV ya ku United Kingdom yakuti ''[[Celebrity Big Brother (British series 7)|Celebrity Big Brother 7]]''; wakamalizga pa malo gha nambara 7.<ref name=":2" /> ==Umoyo wa munthu== Ivana wakatora kanayi. Nthengwa yake yakwamba, na Alfred Winklmayr, yikaŵa ya chilato cha kusanga [[uzika wa ku Austria]].<ref name=":1"/> Ivana wakatora [[Donald Trump]] kufuma mu 1977 mpaka 1990, ndipo ŵakaŵa na ŵana ŵatatu, [[Donald Trump Jr.|Donald Jr.]] mu 1977, [[Ivanka Trump|Ivanka]] mu 1981, na [[Eric Trump|Eric]] mu 1984.<ref name="The Washington Post"/> Wakaŵa mwanakazi wa [[uzika wa United States]] mwakuzomerezgeka mu 1988.<ref>{{cite news |date=May 27, 1988 |title=Ivana Trump becomes U.S. citizen |agency=[[Associated Press]] |url=https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&pg=5053,3823442 |url-status=live |access-date=August 21, 2015 |archive-url=https://web.archive.org/web/20190418083356/https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&sjid=YmYFAAAAIBAJ&pg=5053,3823442 |archive-date=April 18, 2019}}</ref>{{sfn|Hurt III|1993|p=236}} Mu Novembala 1995, Ivana wakatora Riccardo Mazzucchelli, mubizinesi wa ku Italy uyo wakachitanga malonda pa charu chose.<ref>{{cite web|last=Green|first=Michelle|date=July 21, 1997|title=Riccardo, We Hardly Knew Ye|url=http://www.people.com/people/archive/article/0,,20122713,00.html|access-date=July 22, 2016|work=[[People (magazine)|People]]|archive-date=July 25, 2016|archive-url=https://web.archive.org/web/20160725181247/http://www.people.com/people/archive/article/0,,20122713,00.html|url-status=live}}</ref><ref name=":16" /> Ŵakapatukana mu 1997.<ref name=":14">{{cite web|date=September 24, 2017|title=Ivana Trump Former Husband Riccardo Mazzucchelli Dies|url=https://radaronline.com/videos/ivana-trump-former-husband-riccardo-mazzucchelli-dies/|access-date=August 23, 2020|website=RadarOnline|language=en-US|archive-date=August 2, 2020|archive-url=https://web.archive.org/web/20200802003609/https://radaronline.com/videos/ivana-trump-former-husband-riccardo-mazzucchelli-dies/|url-status=live}}</ref> Chaka chenechicho, wakapeleka mulandu wa kuswa phangano wa madola 15 miliyoni ku Mazzucchelli chifukwa cha kuswa dango la kubisa vyamuchipatapata mu phangano lawo la pambere ŵandatore.<ref>{{cite web|last=Baker|first=K.C.|date=July 10, 1997|title=Ivana wants to muzzle soon-to-be-ex|url=http://www.nydailynews.com/archives/news/ivana-muzzle-soon-to-be-ex-article-1.771313|access-date=July 22, 2016|work=New York Daily News|archive-date=August 3, 2016|archive-url=https://web.archive.org/web/20160803180318/http://www.nydailynews.com/archives/news/ivana-muzzle-soon-to-be-ex-article-1.771313|url-status=live}}</ref> Mazzucchelli nayo wakasumba Ivana na mfumu wake wakale Donald ku khoti la Britain chifukwa cha [[kunanga zina]].<ref name=":16">{{cite news|url=https://www.independent.co.uk/news/husband-sues-ivana-and-donald-trump-for-libel-1253222.html|title=Husband sues Ivana and Donald Trump for libel|date=July 29, 1997|work=[[The Independent]]|access-date=July 22, 2016|archive-date=August 20, 2016|archive-url=https://web.archive.org/web/20160820040337/http://www.independent.co.uk/news/husband-sues-ivana-and-donald-trump-for-libel-1253222.html|url-status=live}}</ref> Pamanyuma pake mulandu uwu ukamara pa mapangano agho ghakapharazgika yayi.<ref name=":14" /> Pakati pa 1997, Ivana wakamba kuchezga na mulesi wa ku Italy Count Roffredo [[Gaetani dell'Aquila d'Aragona]] Lovatelli.<ref>{{cite web|title=Muore nell'auto mentre va a trovare la madre – Il Tirreno|url=https://ricerca.gelocal.it/iltirreno/archivio/iltirreno/2005/12/24/LG1PO_LG101.html|access-date=October 30, 2021|website=Archivio – Il Tirreno|language=it|archive-date=October 30, 2021|archive-url=https://web.archive.org/web/20211030023144/https://ricerca.gelocal.it/iltirreno/archivio/iltirreno/2005/12/24/LG1PO_LG101.html|url-status=live}}</ref> Ubwezi wawo ukalutilira mpaka apo wakafwira mu 2005.<ref>{{Cite news| issn = 0362-4331| last = Wadler| first = Joyce| title = PUBLIC LIVES; Ivana's Boy Toy (for the Record, He's a Prince)| work = The New York Times| access-date = March 29, 2017| date = March 20, 1998| url = https://www.nytimes.com/1998/03/20/nyregion/public-lives-ivana-s-boy-toy-for-the-record-he-s-a-prince.html| archive-date = March 30, 2017| archive-url = https://web.archive.org/web/20170330005329/http://www.nytimes.com/1998/03/20/nyregion/public-lives-ivana-s-boy-toy-for-the-record-he-s-a-prince.html| url-status = live}}</ref> Ivana wakachezganga na wakuseŵera wa mafilimu na mtundu wa ku Italy Rossano Rubicondi kwa vyaka vinkhondi na viŵiri pambere ŵandatorane pa Epulero 12, 2008.<ref>{{cite web|date=June 26, 2019|title=Ivana Trump and Ex-Husband Rossano Rubicondi Split for Second Time|url=https://www.usmagazine.com/celebrity-news/news/ivana-trump-and-rossano-rubicondi-split-for-second-time/|access-date=August 23, 2020|website=Us Weekly|language=en-US|archive-date=October 29, 2020|archive-url=https://web.archive.org/web/20201029173824/https://www.usmagazine.com/celebrity-news/news/ivana-trump-and-rossano-rubicondi-split-for-second-time/|url-status=live}}</ref><ref name=":6" /> Nthengwa na Rubicondi, uyo wakaŵa na vyaka 36, yikaŵa ya nambara yachinayi kwa Ivana, uyo wakaŵa mukuru kwa iyo na vyaka 23 ndipo wakaŵa na vyaka 59.<ref name=":6">{{cite web|last=Marx|first=Linda|date=April 12, 2008|title=Ivana Trump Marries for the Fourth Time – Weddings, Ivana Trump|url=http://www.people.com/people/article/0,,20190959,00.html|access-date=October 24, 2012|work=People|archive-date=May 18, 2016|archive-url=https://web.archive.org/web/20160518203722/http://www.people.com/people/article/0,,20190959,00.html|url-status=dead}}</ref> Nthengwa yawo ya madola 3 miliyoni, iyo yikawunganya ŵalendo 400, yikachitikira ku Mar-a-Lago ndipo yikalongozgeka na mfumu wake wakale Donald, apo mwana wake mwanakazi Ivanka wakaŵa msungwana mukuru wa ukwati.<ref>{{Cite news|date=April 17, 2008|title=Ivana Trump weds actor Rossano Rubicond: report|language=en|work=Reuters|url=https://in.reuters.com/article/us-celebrities-idINN1748314820080417|access-date=August 23, 2020|archive-date=January 28, 2017|archive-url=https://web.archive.org/web/20170128093825/http://in.reuters.com/article/us-celebrities-idINN1748314820080417|url-status=dead}}</ref> Umo ukwati ukalongozgekera ukaŵa na Maryanne Trump Barry, uyo wakaŵa mudumbu wa Donald wakale.<ref name=":6" /> Nangauli Ivana na Rubicondi ŵakapatukana pasi pajumpha chaka chimoza, ubwezi wawo ukalutilira mpaka mu 2019, apo Ivana wakapharazga kuti ŵaŵiriwo "ŵamara dankha".<ref name=":2" /><ref>{{Cite magazine|last=Bryant|first=Kenzie|title=Ivana Trump Reunites With Her One True Love: New York Tabloids|url=https://www.vanityfair.com/style/2019/06/ivana-trump-breakup-page-six|access-date=August 23, 2020|magazine=Vanity Fair|date=June 27, 2019|language=en-us|archive-date=September 22, 2020|archive-url=https://web.archive.org/web/20200922202651/https://www.vanityfair.com/style/2019/06/ivana-trump-breakup-page-six|url-status=live}}</ref> Rubicondi wakafwa pa Okutobala 29, 2021, ali na vyaka 49, ndipo vikayowoyeka kuti wakafwa na [[melanoma]].<ref>{{Cite news |url=https://www.ajc.com/news/nation-world/ivana-trumps-ex-husband-actor-rossano-rubicondi-dead-at-49/Y6SHBYCVJBEOVGK6QYN2IQBCWE/ |title=Ivana Trump's ex-husband, actor Rossano Rubicondi, dead at 49 |newspaper=The Atlanta Journal-Constitution |access-date=July 15, 2022 |archive-date=July 15, 2022 |archive-url=https://web.archive.org/web/20220715120940/https://www.ajc.com/news/nation-world/ivana-trumps-ex-husband-actor-rossano-rubicondi-dead-at-49/Y6SHBYCVJBEOVGK6QYN2IQBCWE/ |url-status=live |last1=Assuncao |first1=Muri }}</ref><ref>{{Cite web |title=Ivana Trump's Ex-Husband Rossano Rubicondi Dead at 49: 'I'm Devastated,' She Says |url=https://people.com/politics/ivana-trump-ex-husband-rossano-rubicondi-dead-at-49/ |access-date=February 7, 2025 |website=People.com |language=en |archive-date=December 23, 2024 |archive-url=https://web.archive.org/web/20241223172607/https://people.com/politics/ivana-trump-ex-husband-rossano-rubicondi-dead-at-49/ |url-status=live }}</ref> Ivana wakaŵa na ŵazukuru 10.<ref>{{cite web|last=Yasharoff|first=Hannah|date=August 2019|title=Eric and Lara Trump welcome second baby, President Trump's 10th grandchild: 'We love you already!'|url=https://eu.usatoday.com/story/life/parenting/2019/08/20/president-donald-trump-tenth-grandchild-eric-lara-trump-welcome-second-kid/2059106001/|access-date=May 24, 2020|website=USA Today|archive-date=November 8, 2020|archive-url=https://web.archive.org/web/20201108001514/https://eu.usatoday.com/story/life/parenting/2019/08/20/president-donald-trump-tenth-grandchild-eric-lara-trump-welcome-second-kid/2059106001/|url-status=live}}</ref> Muumaliro wa m'ma 2010, vikayowoyekanga kuti wakagaŵa nyengo yake pakati pa New York City, Miami, na [[Saint-Tropez]].<ref name=":2" /> Wakati wakayowoyanga mwakumanya Chicheki, Chingelezi, Chijeremani, Chifurenchi, na Chirasha.<ref name=":8" /> === Mafumbo gha vya chitetezo === Pa Febuluwale 14, 1989, [[Bungwe la Federal Bureau of Investigation]] (FBI) ku Washington, DC, likapempha kuti ŵambe kufufuza vya ubwezi wa Trump na [[Czechoslovakia]] chifukwa cha uthenga wakufuma ku munthu wakubisika. Kufufuza uku kukambika na ofesi ya FBI ya ku New York sabata yakulondezgapo ndipo kukuti kukatora vyaka viŵiri panji kujumpha.<ref>{{cite news |last1=Leopold |first1=Jason |last2=Beckwith |first2=Ryan |last3=Dorning |first3=Mike |date=March 28, 2023 |title=FBI Releases Files on Ivana Trump |url=https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |publisher=[[Bloomberg News]] |quote=Donald Trump's first wife, Ivana, was under an FBI counterintelligence inquiry into allegations about her connections in her home country of Czechoslovakia in the 1990s, according to excerpts from her FBI file obtained by Bloomberg News. [...] In one document dated February 14, 1989, the FBI said it "recommended a preliminary inquiry be opened on Ivana Trump" based on information the bureau obtained from a confidential source. According to the document, "It is unknown if the allegations stem from jealousies of her wealth and fame. Investigation continuing." [...] While the nature of the FBI's inquiry into Ivana Trump is unknown, it involved the bureau's counterintelligence division and was highly sensitive, according to the documents, and spanned at least two years. |archive-date=March 28, 2023 |access-date=March 28, 2023 |archive-url=https://web.archive.org/web/20230328222806/https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |url-status=live }}</ref><ref>{{cite web |title=FOIPA Request No.: 1553627-000; Subject: Trump, Ivana; Jason Leopold and Bloomberg, L.P. v. FBI and USDOJ; Civil Action No.: 1:22-cv-02651 |url=https://assets.bwbx.io/documents/users/iqjWHBFdfxIU/rRIdgx38yix8/v0 |accessdate=March 28, 2023 |page=15 |quote=Preliminary inquiry initiated February 22, 1989 expires June 23, 1989. [...] Leads: Washington Metropolitan Field Office at Washington D.C. |archive-date=March 27, 2023 |archive-url=https://web.archive.org/web/20230327235052/https://assets.bwbx.io/documents/users/iqjWHBFdfxIU/rRIdgx38yix8/v0 |url-status=live }}</ref> Mu Malichi 2023, vikavumbukwa kuti Ivana wakafufuzikanga na dipatimenti ya FBI yakuwona vya ukazitape chifukwa cha milandu yakukhwaskana na charu chake cha [[Czechoslovakia]].<ref>{{Cite news |date=March 27, 2023 |title=FBI Releases Files on Ivana Trump |url=https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |access-date=March 29, 2023 |work=Bloomberg.com |language=en |archive-date=March 28, 2023 |archive-url=https://web.archive.org/web/20230328222806/https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |url-status=live }}</ref> Bungwe la [[StB]] likamuzonda Ivana mu vyaka vya m'ma 1970 na m'ma 1980 apo wakalutanga kukawona awiske, Miloš Zelníček.<ref name="theguardian/czech-ivana-files" /><ref name="theguardian/C-S--spy-Trump-1980s">{{cite news |last1=Harding |first1=Luke |date=October 29, 2018 |title=Czechoslovakia ramped up spying on Trump in late 1980s, seeking US intel |url=https://www.theguardian.com/us-news/2018/oct/29/trump-czechoslovakia-communism-spying |archive-url=https://web.archive.org/web/20181029085711/https://www.theguardian.com/us-news/2018/oct/29/trump-czechoslovakia-communism-spying |archive-date=October 29, 2018 |access-date=July 24, 2025 |work=[[The Guardian]]}}</ref> == Nyifwa == Pa Julayi 14, 2022, Ivana wakafwa wali na vyaka 73 chifukwa cha [[Kupwetekeka kwakofya|vipweteko vikuru]] ku [[chiŵaro cha pakati pa thupi|thupi]] pamanyuma pakuti wawa pa masitepu ghakuzingilizgika ghakukhora<ref name="vanityfair/ivana-death">{{cite news |last1=Seal |first1=Mark |date=November 3, 2022 |title=Inventing Ivana Trump: Her Improbable Rise and Tragic Death |url=https://www.vanityfair.com/style/2022/11/inventing-ivana-trump-her-improbable-rise-and-tragic-death |work=Vanity Fair |language=en-US |access-date=July 24, 2025 |archive-url=https://web.archive.org/web/20221103120236/https://www.vanityfair.com/style/2022/11/inventing-ivana-trump-her-improbable-rise-and-tragic-death |archive-date=November 3, 2022}}</ref> pa nyumba yake ku [[Upper East Side]] ya [[Manhattan]].<ref>{{cite web |last1=Suliman |first1=Adela |last2=Jacobs |first2=Shayna |date=July 16, 2022 |title=Ivana Trump died of 'blunt impact injuries,' medical examiner says |url=https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |work=The Washington Post |language=en-US |access-date=July 16, 2022 |archive-date=July 16, 2022 |archive-url=https://web.archive.org/web/20220716160620/https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |url-status=live }}</ref><ref>{{cite web |last=Vargas |first=Ramon Antonio |date=July 15, 2022 |title=Ivana Trump died of blunt force injuries to her torso, medical examiner says |url=https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |work=The Guardian |language=en-GB |access-date=July 16, 2022 |archive-date=July 15, 2022 |archive-url=https://web.archive.org/web/20220715234735/https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |url-status=live}}</ref> Mfumu wake wakale, [[Donald Trump]], na ŵana ŵawo ŵatatu, pamoza na ŵandyali na ŵanthu ŵakumanyikwa ŵanandi, ŵakalemba mauthenga gha chitima pa malo ghakusangirako vya pa intaneti.<ref name="People tributes">{{cite magazine |last1=Taheri |first1=Amanda |date=July 14, 2022 |title=The Trump Family, Celebrities and Politicians React to Sudden Passing of Ivana Trump at Age 73 |url=https://people.com/politics/family-celebrities-politicians-react-to-ivana-trump-death/ |magazine=People |access-date=July 14, 2022 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714222944/https://people.com/politics/family-celebrities-politicians-react-to-ivana-trump-death/ |url-status=live}}</ref><ref name="The Washington Post">{{cite news |last1=Schudel |first1=Matt |last2=Fisher |first2=Marc |date=July 14, 2022 |title=Ivana Trump, first wife of former president, has died |url=https://www.washingtonpost.com/local/obituaries/ivana-trump-first-wife-of-former-president-has-died/2022/07/14/1f86a01e-03ae-11ed-8beb-2b4e481b1500_story.html |work=The Washington Post |access-date=July 14, 2022 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714201738/https://www.washingtonpost.com/politics/2022/07/14/ivana-trump-donald-trump/ |url-status=live}}</ref> Chisopo chake chikachitika pa Julayi 20 pa [[Mpingo wa St. Vincent Ferrer (Manhattan)|Mpingo wa St. Vincent Ferrer]], [[Mpingo wa Katolika|Katolika]] uwo uli pafupi na nyumba yake.<ref name="funeral">{{cite news |last1=Hajela |first1=Deepti |date=July 20, 2022 |title=Ivana Trump's Funeral In NYC Attended By Donald Trump |url=https://www.huffpost.com/entry/us-ivana-trump-funeral_n_62d844b1e4b0a6852c32eeaa |website=Associated Press |access-date=July 20, 2022 |archive-date=July 20, 2022 |archive-url=https://web.archive.org/web/20220720215030/https://www.huffpost.com/entry/us-ivana-trump-funeral_n_62d844b1e4b0a6852c32eeaa |url-status=live }}</ref> Ivana wakasungika ku [[Trump National Golf Club Bedminster]] ku [[Bedminster, New Jersey]].<ref>{{cite web |last=Hartmann |first=Margaret |date=August 1, 2022 |title=Why Ivana Trump Was Buried at Bedminster Golf Course: 3 Theories |url=https://nymag.com/intelligencer/article/ivana-trump-buried-bedminster-3-theories.html |url-access=subscription |website=Intelligencer |language=en-US |access-date=August 28, 2023 |archive-date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825175041/https://nymag.com/intelligencer/article/ivana-trump-buried-bedminster-3-theories.html |url-status=live }}</ref> Ivana wakasida chuma chakukwana madola miliyoni 34.<ref name="Alexander 2023">{{Cite web |last=Alexander |first=Dan |date=January 16, 2023 |title=Ivana Trump Left Behind $34 Million. Here's What Is In Her Will |url=https://www.forbes.com/sites/danalexander/2023/01/16/ivana-trump-left-behind-34-million-heres-what-is-in-her-will/?sh=39ccb409b20f |website=Forbes |language=en-US |access-date=January 16, 2023 |archive-date=January 18, 2023 |archive-url=https://web.archive.org/web/20230118031633/https://www.forbes.com/sites/danalexander/2023/01/16/ivana-trump-left-behind-34-million-heres-what-is-in-her-will/?sh=39ccb409b20f |url-status=live }}</ref> Chigaŵa chikuru cha [[katundu]] wake chikapelekeka mwakuyana kwa Donald Jr., Ivanka, na Eric. Ŵanyake awo ŵakapokera ni mubwezi wake Evelyne Galet na Dorothy Curry, uyo wakaŵa mulezi wakale wa ŵana ŵa banja ili.<ref name="Alexander 2023"/><ref>{{Cite web |last=Tangalakis-Lippert |first=Katherine |date=January 18, 2023 |title=Donald Trump got nothing in Ivana Trump's will — but she left her ex-nanny a $1 million condo |url=https://www.businessinsider.com/ivana-trumps-will-who-gets-her-34-million-in-assets-2023-1 |website=Business Insider |language=en-US |access-date=February 7, 2025 |archive-date=April 16, 2025 |archive-url=https://web.archive.org/web/20250416084415/https://www.businessinsider.com/ivana-trumps-will-who-gets-her-34-million-in-assets-2023-1 |url-status=live }}</ref> == Mafilimu na wayilesi == *Ivana wakaseŵeskeka na [[Katheryn Winnick]] mu filimu ya pa wayilesi ya 2005 ''[[Trump Unauthorized]]''. *Ivana wakaseŵeskeka na [[Maria Bakalova]] mu filimu ''[[The Apprentice (filimu ya 2024)|The Apprentice]]''.<ref>{{Cite web |url=https://deadline.com/2023/11/the-apprentice-movie-sebastian-stan-donald-trump-1235643089/ |title=‘The Apprentice’: Jeremy Strong And Maria Bakalova Join Sebastian Stan In Donald Trump Pic |access-date=November 30, 2023 |archive-date=November 29, 2023 |archive-url=https://web.archive.org/web/20231129233512/https://deadline.com/2023/11/the-apprentice-movie-sebastian-stan-donald-trump-1235643089/ |url-status=live }}</ref> *Ivana wakajiseŵeska yekha mu kachigaŵa ka ''[[The First Wives Club]]''. *''For Love Alone: The Ivana Trump Story'' (Filimu ya pa wayilesi ya 1996)<ref>{{imdb title|0164029|For Love Alone: The Ivana Trump Story}} (TV Movie 1996) </ref> ==Mabuku agho wakalemba== {| class="wikitable sortable" |- ! Mutu ! Chaka ! Wakufumiska ! ISBN / ASIN |- | ''For Love Alone'' | 1992 | [[Pocket Books]] | {{ISBN|978-0671790882}} |- | ''Free to Love'' | 1993 | [[Atria Publishing Group|Atria]] | {{ISBN|978-0671743710}} |- | ''The Best Is Yet to Come: Coping with Divorce and Enjoying Life Again'' | 1995 | Pocket Books | {{ISBN|978-0671865696}} |- | ''Raising Trump: Family Values from America's First Mother'' | 2017 | [[Gallery Books]] | {{ISBN|978-1501177293}} |- |} ==Mphotho na ntchindi== *Charu cha Czech: Ivana wakapika [[Mendulo ya Ntchindi (Czech Republic)|Mendulo ya Ntchindi]] pamanyuma pa nyifwa yake na Pulezidenti wa Czech Republic [[Miloš Zeman]] pa Okutobala 28, 2022.<ref>{{cite web|first=Michael|last=Kahn|url=https://www.reuters.com/world/us/ivanka-trump-accepts-czech-state-award-behalf-late-mother-ivana-2022-10-29/|title=Ivanka Trump accepts Czech state award on behalf of late mother Ivana|publisher=Reuters|date=October 29, 2022|access-date=October 29, 2022|archive-date=October 29, 2022|archive-url=https://web.archive.org/web/20221029085642/https://www.reuters.com/world/us/ivanka-trump-accepts-czech-state-award-behalf-late-mother-ivana-2022-10-29/|url-status=live}}</ref> ==Vyakulemba== {{Notelist}} ==Mabuku ghakulongora== ===Mabuku ghakuyowoyeka=== {{Reflist}} ===Mabuku aghagwiriskika ntchito=== *{{cite book |title = Trump: The Deals and the Downfall |last=Barrett|first=Wayne|author-link=Wayne Barrett|publisher=Harper Collins|year=2016|orig-year=1992|edition=First Regan Art Paperback|location=|pages=|isbn=978-1-682450-79-6}} Paperback title: ''The Greatest Show on Earth: The Deals, the Downfall, the Reinvention''. *{{cite book|title=The Trumps: Three Generations That Built an Empire|last=Blair|first=Gwenda|author-link=Gwenda Blair|publisher=Simon & Schuster Paperbacks|year=2015|orig-year=2000|isbn=978-0-7432-1079-9|location=|pages=|url-access=registration|url=https://archive.org/details/trumps00gwen }} *{{cite book |title = Golden Handcuffs: The Secret History of Trump's Women |last=Burleigh|first=Nina|author-link=Nina Burleigh|publisher=Gallery Books|year=2018|orig-year=2018|isbn=978-1-5011-8020-0|location=|pages= |title-link=Golden handcuffs }} *{{cite book |title=The Lost Tycoon: The Rise and Demise of Donald J. Trump |last=Hurt III |first=Harry|author-link=Harry Hurt III|publisher=W. W. Norton Company|year=1993|isbn=0-393-03029-6|location=|pages= |title-link=Lost Tycoon }} ==Vyakukolerana vya kuwaro== {{Commons category|Ivana Trump}} {{Wikiquote}} *{{Find a Grave|241603122|Ivana Trump}} *[http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do Vidiyo ya Ivana na Donald Trump] kufuma ku ''[[The Oprah Winfrey Show]]'', pa Epulero 24, 1988 *[https://www.bbc.co.uk/videos/cd184xejm20o Vidiyo ya Ivana na Donald Trump] apo ŵakawonekera pamoza na [[Dame Edna Everage]] mu ''[[Wogan]]'', BBC, pa Meyi 23, 1988 {{Authority control}} {{DEFAULTSORT:Trump, Ivana}} [[Category:Ŵanthu ŵakubabika mu 1949]] [[Category:Ŵanthu ŵakufwa mu 2022]] [[Category:Ŵanakazi ŵabizinesi ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵabizinesi ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵalembi ŵa mabuku ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵanakazi ŵalembi ŵa mabuku ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵanakazi ŵalembi ŵa ku United States ŵa m'ma 2000]] [[Category:Nyifwa za ngozi chifukwa cha kuwa ku United States]] [[Category:Nyifwa za ngozi ku New York (state)]] [[Category:Ŵalembi ŵa mbiri ya umoyo ŵa ku United States]] [[Category:Ŵanthu ŵa ku United States ŵa mphapu ya Moravia]] [[Category:Ŵanthu ŵakumanyikwa pa umoyo wa chisopa na umoyo wa ŵanthu ŵa ku United States]] [[Category:Ŵasambiri ŵa Charles University]] [[Category:Ŵabizinesi ŵa ku Czech Republic]] [[Category:Ŵa Czech awo ŵakakhalanga ku Canada]] [[Category:Ŵamodelo ŵanakazi ŵa ku Czech]] [[Category:Ŵanthu ŵakumanyikwa pa umoyo wa ŵanthu ŵa ku Czech]] [[Category:Ŵanakazi ŵabizinesi ŵa ku Czech]] [[Category:Ŵanthu ŵakafuma ku Czechoslovakia na kukakhala ku United States]] [[Category:Ŵanthu ŵakazgoka ŵanthu ŵa ku United States mwakuzomerezgeka]] [[Category:Ŵabizinesi ŵakufuma ku Manhattan]] [[Category:Ŵanthu ŵakufuma ku Upper East Side]] [[Category:Ŵanthu ŵakufuma ku Zlín]] [[Category:Ŵanakazi ŵalembi ŵa mbiri ya umoyo]] [[Category:Ŵapokeleri ŵa Medal of Merit (Czech Republic)]] [[Category:Ŵanthu ŵakafuma ku Czechoslovakia na kukakhala ku Canada]] [[Category:Ŵanthu ŵakafuma ku Czech na kukakhala ku United States]] [[Category:Ŵanthu ŵakafuma ku Czech na kukakhala ku Canada]] kcy7qloplk0rr4pdenkcstotmfnbuch 116873 116858 2026-07-16T10:58:18Z Tumbuka Arch 6863 116873 wikitext text/x-wiki {{Short description|Muwoli wakale wa Donald Trump (1949–2022)}} {{for|mwana wake mwanakazi|Ivanka Trump}} {{Use American English|date=September 2019}} {{Use mdy dates|date=July 2026}} {{Infobox person | name = Ivana Trump | image = Ivana Trump cropped retouched.jpg | caption = Trump mu 2007 | birth_name = Ivana Marie Zelníčková | birth_date = {{Birth date|1949|2|20}} | birth_place = [[Gottwaldov]], [[Fourth Republic of Czechoslovakia]] (sono [[Czechia]]) | death_date = {{death date and age|2022|07|14|1949|02|20}} | death_place = New York City, U.S. | burial_place = [[Trump National Golf Club Bedminster]] | occupation = {{hlist|Mwamalonda mwanakazi|munthu wakumanyikwa mu vyaru|model|wakupanga mapangiro|mulembi}} | citizenship = {{ubl |[[Czechoslovakia]] (m'paka 1993) |Czech Republic (kwambira 1993) |Austria (kwambira 1973)|Canada (kwambira 1978)|United States (kwambira 1988) }} | education = [[Charles University]] | years_active = 1970–2022 | spouse = {{ubl |{{marriage|Alfred Winklmayr|November 1971|August 7, 1973|reason=ŵakapatukana}} |{{marriage|[[Donald Trump|Donald Trump]]|April 9, 1977|December 11, 1990|end=ŵakapatukana}} |{{marriage|Riccardo Mazzucchelli|November 29, 1995|June 17, 1997|reason=ŵakapatukana}} |{{marriage|Rossano Rubicondi|April 12, 2008|December 27, 2009|reason=ŵakapatukana}} }} | partner = Roffredo Gaetani (1997–2005; nyifwa yake) | children = {{hlist|[[Donald Trump Jr.|Donald Trump Jr.]]|[[Ivanka Trump|Ivanka Trump]]|[[Eric Trump|Eric Trump]]}} }} '''Ivana Marie Trump''' ({{nee|'''Zelníčková'''}};{{efn|name=MN|{{IPA|cs|ˈɪvana ˈzɛlɲiːtʃkovaː|small=no}}.}} February 20, 1949 – July 14, 2022) wakaŵa mubizinesi, munthu wakumanyikwa pa umoyo wa ŵanthu, kweniso wakuwoneska mafashoni wa ku Czech na America. Wakakhala ku [[Canada]] m'ma 1970 pambere wandasamire ku United States na kutorana na [[Donald Trump]] mu 1977. Wakagwira maudindo ghakuru gha ulongozgi mu [[Trump Organization]], nga ni muteŵeti mukuru wakuwona vya kapangidwe ka mukati mwa nyumba, CEO na pulezidenti wa Trump's Castle casino resort, kweniso mulaŵiliri wa [[Plaza Hotel]]. Ivana na Donald Trump ŵakaŵa ŵanthu ŵakumanyikwa chomene mu gulu la ŵanthu la ku New York m'ma 1980. Kupatukana kwawo kwa nthengwa, uko kukazomerezgeka mu 1990, kukalembeka chomene mu nkhani za manyuzipepala na vyakupharazga.{{efn|Nkhani ya mulandu uwu yikalutilira mpaka mu 1991, apo ŵakafiska phangano pamanyuma pa kupatukana.<ref name=":15" />}} Pamanyuma pa kupatukana, wakambiska malonda ghake gha vyakuvwara, vyakujitozgera vya mafashoni, na vinthu vya kutoweska ivyo vikaguliskikanga pa [[QVC (British TV channel)|QVC UK]] na [[Home Shopping Network]]. Wakalembanga ndime ya ulongozgi mu ''[[Globe (tabloid)|Globe]]'' yakucemeka "Ask Ivana" kwambira mu 1995 mpaka 2010, ndipo wakafumiska mabuku ghanandi, kusazgapo mabuku gha nthano, gha munkhwala, gha kujovwira wekha, kweniso mbiri yake yakujilemba ''Raising Trump''. ==Umoyo wakwambilira== Ivana Marie Zelníčková{{efn|name=MN}} wakababikira pa February 20, 1949, ku Gottwaldov, [[Czechoslovak Republic]] (sono [[Zlín]], Czech Republic), mwana wa Miloš Zelníček (1927–1990) na Marie Zelníčková (née Francová, b. 1926).{{sfn|Hurt III|1993|p=96}}<ref>{{cite web|url=https://www.respekt.cz/tydenik/2018/44/donald-trump-v-hledacku-stb|title=Zemřela Ivana Trumpová. První manželce Donalda Trumpa bylo 73 let|work=Týdeník Respekt|publisher=Respekt|date=October 27, 2018|access-date=December 31, 2023|archive-date=December 31, 2023|archive-url=https://web.archive.org/web/20231231053019/https://www.respekt.cz/tydenik/2018/44/donald-trump-v-hledacku-stb|url-status=live}}</ref><ref>{{cite web|url=https://www.myheritage.com/names/marie_zeln%C3%AD%C4%8Dkov%C3%A1|title=Marie Zelníčková (born Francová)|website=myheritage.com|access-date=June 1, 2019|archive-date=August 1, 2020|archive-url=https://web.archive.org/web/20200801212809/https://www.myheritage.com/names/marie_zeln%C3%AD%C4%8Dkov%C3%A1|url-status=live}}</ref> Wakakulira mu mbumba ya [[Chikatolika mu Czech Republic|Chikatolika]].<ref>{{Cite magazine |last=Tolentino |first=Jia |author-link=Jia Tolentino |date=December 4, 2017 |title=The Trumpishness of Ivana |language=en-US |magazine=The New Yorker |url=https://www.newyorker.com/books/page-turner/the-trumpishness-of-ivana |access-date=January 3, 2024 |issn=0028-792X |archive-date=January 2, 2018 |archive-url=https://web.archive.org/web/20180102020507/https://www.newyorker.com/books/page-turner/the-trumpishness-of-ivana |url-status=live }}</ref> Adada ŵake ŵakaŵa [[injiniya wa magetsi]] ndipo anyina ŵakagwiranga ntchito ya kulongozga mafoni.<ref name=":1">{{cite web|last=Burleigh|first=Nina|date=November 27, 2017|title=Donald Trump's first ex-wife, Ivana, once wore homemade clothes. Now she spends holidays at Mar-a-Lago|url=https://www.newsweek.com/donald-trump-ivana-donald-ivanka-trump-russia-communism-czech-republic-721669|access-date=August 23, 2020|website=Newsweek|language=en|archive-date=September 24, 2020|archive-url=https://web.archive.org/web/20200924144516/https://www.newsweek.com/donald-trump-ivana-donald-ivanka-trump-russia-communism-czech-republic-721669|url-status=live}}</ref> Adada ŵake ŵakamulimbikiskanga mwana wawo kuti walutilire luso lwake lwa [[kusereŵera ski]], ilo wakamba ali na vyaka vinayi.<ref name=":1" /><ref name=":4">{{cite news|last=Bell|first=Bill|date=February 11, 1990|title=They met, they saw and they conquered: Donald and Ivana Trump seemed to have it all|url=https://www.nydailynews.com/new-york/trumps-article-1.2715780|access-date=August 23, 2020|newspaper=New York Daily News|archive-date=November 18, 2020|archive-url=https://web.archive.org/web/20201118090555/https://www.nydailynews.com/new-york/trumps-article-1.2715780|url-status=live}}</ref> Pamanyuma pakuti waŵa na luso lwa kusereŵera ski, Ivana wakanjira mu timu ya charu ya ŵawukirano ya kusereŵera ski, iyo yikamupa mwaŵi wakwenda kuwaro kwa mphaka za Chikomyunizimu za [[nyengo ya Soviet]] za icho pa nyengo iyo chikachemekanga Czechoslovak Socialist Republic.<ref name=":1" /> Wakasambira pa [[Charles University]] ku Prague ndipo wakapokera digiri ya master's mu [[masambiro gha thupi]] mu 1972.<ref name=":5">{{cite magazine| last1 = van Meter| first1 = Johnathan| date = May 1989| title = That's Why the Lady is a Trump| url = https://books.google.com/books?id=xaCC4gI-zJkC&q=trump%20master's%20degree&pg=PA86| issn = 0890-1759| magazine = [[Spy (magazine)|Spy]]| publisher = Sussex Publishers, LLC| via = [[Google Books]]| access-date = July 14, 2022| archive-date = July 10, 2021| archive-url = https://web.archive.org/web/20210710004200/https://books.google.com/books?id=xaCC4gI-zJkC&q=trump%20master%27s%20degree&pg=PA86| url-status = live}}</ref><ref name=":4" /> Mu 1970, Ivana wakawoneka pa [[Czechoslovak Television]] mu sewero la pa TV la ŵana ''[[Pan Tau]]''.<ref>{{cite web|last=Heinlein|first=Stefan|date=November 16, 2016|title=Ex-Frau von Donald Trump – Ivana Trump plant Diplomatenkarriere in Prag|url=https://www.deutschlandfunk.de/ex-frau-von-donald-trump-ivana-trump-plant.1773.de.html?dram:article_id=371467|access-date=August 24, 2020|website=Deutschlandfunk|language=de-DE|archive-date=November 17, 2020|archive-url=https://web.archive.org/web/20201117133017/https://www.deutschlandfunk.de/ex-frau-von-donald-trump-ivana-trump-plant.1773.de.html?dram:article_id=371467|url-status=live}}</ref> <blockquote>Munthu munyake wa ([[StB]]) uyo wakagwiliskiranga ntchito zina lakubisika lakuti ''Lubos'' wakaphalira ŵalara ŵake mu 1977 umo Ivana wakambira ntchito pa malo ghakuguliskirako mafuta ku Austria, uko wakakumanako na mfumu wake wakwamba mu 1968. Pamanyuma wakasamukira ku Canada, uko wakatorana na Trump.<ref name="theguardian/czech-ivana-files">{{cite news |last1=Connolly |first1=Kate |date=15 December 2016 |title=Czechoslovakia spied on Donald and Ivana Trump, communist-era files show |url=https://www.theguardian.com/us-news/2016/dec/15/czechoslovakia-spied-on-donald-trump-ivana-files |archive-url=https://web.archive.org/web/20161215173718/https://www.theguardian.com/us-news/2016/dec/15/czechoslovakia-spied-on-donald-trump-ivana-files |archive-date=2016-12-15 |access-date=24 July 2025 |work=[[The Guardian]]}}</ref></blockquote> Mu 1988, Ivana wakaphalira ŵapharazgi kuti wakasankhika kuŵa wakusinthira munyake mu timu ya ski ya Czechoslovakia pa [[Czechoslovakia pa Maseŵera gha Nyengo ya Chihanya ya 1972|Maseŵera gha Nyengo ya Chihanya gha 1972]], ndipo wakamanyikwanga pa [[Downhill (mpikisano wa ski)|downhill]] na [[Slalom skiing|slalom]].<ref name=":4"/><ref name="mmw">{{cite web|last=White|first=Marion M.|url=https://infoweb.newsbank.com/resources/doc/nb/news/0EB528F413ED16AC?p=AWNB|title=Ivana Trump: Hard work, discipline and self-reliance|work=[[Tampa Bay Times|St. Petersburg Times]]|date=September 26, 1988|access-date=July 19, 2019|archive-date=November 7, 2018|archive-url=https://web.archive.org/web/20181107132556/https://infoweb.newsbank.com/resources/doc/nb/news/0EB528F413ED16AC?p=AWNB|url-status=live}}</ref> Ndipouli, Czechoslovakia yikatuma ŵanakazi ŵanayi pera ku Maseŵera gha Nyengo ya Chihanya gha 1972 ndipo pakaŵavya uyo wakaseŵeranga alpine ski. Mu 1989, Petr Pomezný, Mlembi Mukuru wa [[Komiti ya Olimpiki ya Czechoslovakia|Komiti ya Olimpiki ya Czechoslovakia]], wakakana ivyo Ivana wakayowoya ndipo wakati nangauli ŵakapenja chomene, pakaŵavya ukaboni uliwose wakuti wakachitako nawo.<ref name=":5" /> Mu 2021, [[Snopes]] yikakhozgera kuti Czechoslovakia yindatume ŵanakazi ŵakuseŵera alpine ski ku Maseŵera gha Nyengo ya Chihanya gha 1972.<ref>{{cite web |last=Ibrahim |first=Nur |url=https://www.snopes.com/fact-check/ivana-trump-czech-1972-olympics/ |title=Was Ivana Trump an Alternate for Czech Ski Team in '72 Olympics? |work=[[Snopes]] |date=July 8, 2021 |access-date=April 6, 2024 |archive-date=April 7, 2024 |archive-url=https://web.archive.org/web/20240407123141/https://www.snopes.com/fact-check/ivana-trump-czech-1972-olympics/ |url-status=live }}</ref> ==Kusamukira ku Canada== Mu 1971, Ivana wakatorana na Alfred Winklmayr, musambizgi wa ski wa ku [[Austria|Austria]] kweniso mubwezi wake wakaŵavya chitemwa, kuti wapoke pasipoti.<ref name="Lague"/><ref name="McCauley" /><ref name="Conconi" /> Nthengwa iyi yikamupa wanangwa wakufuma mu Czechoslovakia kwambura kumanyikwa mwakuti walutilire kuŵa na wanangwa wakuwelera kukawona ŵapapi ŵake.<ref name="Lague">{{cite news |last=Lague |first=Louise |url=https://people.com/archive/ivana-alone-vol-33-no-11/ |title=Ivana Alone |work=[[People (magazine)|People]] |date=March 19, 1990 |access-date=April 23, 2023 |archive-date=November 5, 2018 |archive-url=https://web.archive.org/web/20181105012022/https://people.com/archive/ivana-alone-vol-33-no-11/ |url-status=live }}</ref>{{sfn|Hurt III|1993|p=99}}<ref name="McCauley">{{cite news |last=McCauley |first=Dana |url=https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6 |title=This is the woman who made Donald Trump a household name |website=news.com.au |date=May 1, 2016 |access-date=April 22, 2023 |archive-date=November 4, 2018 |archive-url=https://web.archive.org/web/20181104211237/https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|url-status=live}}</ref><ref name="Gross">{{cite news |last=Gross |first=Michael |url=https://books.google.com/books?id=7PcJmjU_n0UC&pg=PA46 |title=Ivana's New Life |work=[[New York (magazine)|New York]] |date=October 15, 1990 |access-date=April 22, 2023}}</ref> Nga ni Ivana Winklmayr, wakapokera pasipoti yake ya ku Austria mu Malichi 1972.<ref name="Conconi">{{cite news|last=Conconi|first=Chuck|date=February 22, 1990|title=Personalities|url=https://www.washingtonpost.com/archive/lifestyle/1990/02/22/personalities/6416c328-06cb-4efc-817e-03292e68d5a3/|access-date=November 22, 2017|newspaper=[[The Washington Post]]|archive-date=December 1, 2017|archive-url=https://web.archive.org/web/20171201034207/https://www.washingtonpost.com/archive/lifestyle/1990/02/22/personalities/6416c328-06cb-4efc-817e-03292e68d5a3/|url-status=live}}</ref> Mu Ogasiti 1973,<ref name="tampabay/1990/02/22/chorus-line">{{cite news |title=Chorus Line' to close in March; Ivana's 'cold-war' union revealed |url=https://www.tampabay.com/archive/1990/02/22/chorus-line-to-close-in-march/ |access-date=July 24, 2025 |work=[[Tampa Bay Times]] |date=February 22, 1990 |archive-url=https://web.archive.org/web/20200815143857/https://www.tampabay.com/archive/1990/02/22/chorus-line-to-close-in-march/ |archive-date=August 15, 2020 |language=en}}</ref> wakapokera chisudzulo cha nthengwa kwambura kuŵapo na Alfred Winklmayr ku [[Los Angeles]], [[California]], uko wakasamukira kukasambizga ski.<ref name="Lague"/>{{sfn|Hurt III|1993|p=99}}<ref name="Conconi"/> Ivana wakaŵa pa ubwezi wa chitemwa na mulembi wa mazgu gha sumu na maseŵero {{ill|Jiří Štaidl|cs}}, uyo wakafwa mu ngozi ya galimoto mu 1973.{{sfn|Burleigh|2018|p=82}} Pamanyuma pa nyifwa ya Štaidl, Ivana wakasamukira ku Canada, uko wakakhalanga na George (Jiří) Syrovátka uyo wakaŵa nayo pa chitemwa kwambira mu 1967; Syrovátka wakachimbira ku Canada mu 1971 ndipo wakaŵa mwini wake wa sitolo ya vinthu vya ski ku Montreal.{{sfn|Hurt III|1993|p=99}}<ref name="Lague" /><ref name="Gross" /> Pa nyengo iyo, wakayowoyanga kuti wakatorana na Syrovátka, kweni ŵaŵiri aŵa ŵakatorananga yayi.<ref>{{cite book|last1=King|first1=Norman|title=Ivana Trump|date=1990|publisher=Carroll and Graf|page=47}}</ref><ref>{{Cite news |last=Haddrick |first=Margaret |date=December 31, 1975 |title=The Two Faces of Ivana – Model and Sportswoman |work=Montreal Gazette |page=9}}</ref> Ivana wakagwiranga ntchito ya kusambizga ski apo wakakhalanga ku Canada.<ref name=":2">{{cite web|last1=Hallemann|first1=Caroline|last2=Dangremond|first2=Sam|date=June 25, 2019|title=Here's What You Need to Know About Ivana Trump, Donald's First Wife |url=https://www.townandcountrymag.com/society/politics/news/g2605/donald-trump-first-wife-ivana-trump/ |access-date=August 23, 2020 |work=[[Town & Country (magazine)|Town & Country]] |archive-date=August 25, 2020|archive-url=https://web.archive.org/web/20200825055245/https://www.townandcountrymag.com/society/politics/news/g2605/donald-trump-first-wife-ivana-trump/|url-status=live}}</ref> Wakakhala ku [[Montreal]] kwa vyaka viŵiri, uko wakalutilira kusazgirako luso lwake lwa Chingelezi kwizira mu masambiro gha usiku pa [[McGill University]].<ref name="Gross" /> Apo wakagwiranga ntchito ya kuwoneska mafashoni, Ivana wakaphalira ''[[Montreal Gazette]]'' mu 1975 kuti wakawonanga kuwoneska mafashoni kuŵa ntchito pera, yayi ntchito ya umoyo wake wose.<ref>{{Cite news|date=February 20, 2019|title=How a move to Canada helped Donald and Ivana Trump meet|work=CBC|url=https://www.cbc.ca/archives/how-a-move-to-canada-helped-donald-and-ivana-trump-meet-1.5006869|access-date=August 22, 2020|archive-date=October 22, 2020|archive-url=https://web.archive.org/web/20201022072331/https://www.cbc.ca/archives/how-a-move-to-canada-helped-donald-and-ivana-trump-meet-1.5006869|url-status=live}}</ref> Ŵanthu awo ŵakamulemba ntchito yakuwoneska mafashoni ŵakasazgapo sitolo ya [[Eaton's]] na mlengi wa mafashoni Auckie Sanft, kweniso ntchito zakupharazga za [[Maseŵera gha Chihanya gha Olimpiki gha 1976]] ku Montreal.<ref name="Gross" /> ==Nthengwa na Donald Trump== [[File:State Visit of King Fahd of Saudi Arabia State Dinner Receiving Line with Ivana Trump and Donald Trump in East Room - DPLA - 1a44d05819eab8ba3dcf7a6883ad92ba.jpg|thumb|Ivana na Donald Trump pa mzere wakupokelera ŵalendo pa chakurya cha boma cha Themba [[Fahd of Saudi Arabia]] mu 1985, pamoza na mlongozgi wa United States [[Ronald Reagan]] na Mama Wakwamba [[Nancy Reagan]]]] Ivana wakaŵa mu Msumba wa New York pamoza na gulu la ŵamodel mu 1976 apo wakakumana na [[Donald Trump]].<ref name="Gross"/> Pa Epulero 9, 1977, ŵakatorana pa [[Marble Collegiate Church]] pa ukwati uwo ukalongozgekanga na [[Norman Vincent Peale]].{{sfn|Barrett|2016|p=132}}{{sfn|Blair|2015|p=300}}<ref>{{cite news|last1=Mahler|first1=Jonathan|last2=Flegenheimer|first2=Matt|url=https://www.nytimes.com/2016/06/21/us/politics/donald-trump-roy-cohn.html|title=What Donald Trump Learned From Joseph McCarthy's Right-Hand Man|newspaper=The New York Times|date=June 20, 2016|access-date=June 3, 2019|archive-date=June 10, 2020|archive-url=https://web.archive.org/web/20200610051303/https://www.nytimes.com/2016/06/21/us/politics/donald-trump-roy-cohn.html|url-status=live}}</ref><ref>{{cite web|title=Donald and Ivana Trump seemed to have it all|url=https://www.nydailynews.com/new-york/trumps-article-1.2715780|date=July 20, 2016|access-date=March 10, 2023|website=New York Daily News|archive-date=November 18, 2020|archive-url=https://web.archive.org/web/20201118090555/https://www.nydailynews.com/new-york/trumps-article-1.2715780|url-status=live}}</ref><ref name="townandcountrymag/trump-family-tree">{{cite news |last1=Burack |first1=Emily |last2=Kim |first2=Leena |title=A Guide to Donald Trump's Family Tree |url=https://www.townandcountrymag.com/society/politics/a63434923/donald-trump-family-tree-explained/ |access-date=July 24, 2025 |work=[[Town & Country (magazine)|Town & Country]] |date=January 20, 2025 |archive-url=https://web.archive.org/web/20250120163303/https://www.townandcountrymag.com/society/politics/a63434923/donald-trump-family-tree-explained/ |archive-date=January 20, 2025}}</ref> Mu vyaka vya m'ma 1980, ŵakaŵa ŵanthu ŵakumanyikwa chomene mu nyuzipepala za mphekesera za mu New York ndipo ŵakagwiranga ntchito lumoza pa mapulojekiti ghanandi ghakuru, kusazgapo [[Trump Tower (New York)|Trump Tower]] pa [[Fifth Avenue]] mu Manhattan, kunozga [[Grand Hyatt New York|Grand Hyatt Hotel]] mu Msumba wa New York, kweniso kuzenga [[Trump Taj Mahal Casino Resort]] mu [[Atlantic City, New Jersey]].<ref>{{Cite magazine|last=Brenner|first=Marie|date=September 1990|title=After the Gold Rush|url=https://archive.vanityfair.com/article/share/e515a2cd-a51b-4f83-8d61-6ebb9a104e0a|access-date=August 30, 2020|magazine=Vanity Fair|language=en-US|archive-date=April 7, 2019|archive-url=https://web.archive.org/web/20190407040806/https://www.vanityfair.com/magazine/2015/07/donald-ivana-trump-divorce-prenup-marie-brenner|url-status=live}}</ref><ref name=":7">{{cite news|last=Bender|first=Marylin|date=August 7, 1983|title=The Empire and Ego of Donald Trump|url=https://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|access-date=October 31, 2016|work=The New York Times|archive-date=June 16, 2016|archive-url=https://web.archive.org/web/20160616130053/http://www.nytimes.com/1983/08/07/business/the-empire-and-ego-of-donald-trump.html|url-status=live}}</ref> [[File:Estee Lauder with Ivana Trump (1).jpg|thumb|upright|Ivana (kuwoko lamalyero) na [[Estée Lauder (businesswoman)|Estée Lauder]] pa phwando la [[Red Cross]] ku Palm Beach mu 1986]] [[File:Bush Contact Sheet P16206 (cropped).jpg|thumb|right|Ivana wakupokelera Mama Wakwamba [[Barbara Bush]] mu 1990]] Pa nyengo ya nthengwa yawo, Ivana na Donald ŵakaŵa na ŵana ŵatatu: [[Donald Trump Jr.|Donald Jr.]] (wakababika mu 1977), [[Ivanka Trump|Ivana (Ivanka) Marie]] (wakababika mu 1981), na [[Eric Trump|Eric]] (wakababika mu 1984). Donald Jr. wakasambira kuyowoya makora [[Chiyekesi|Chiyekesi]] (na wovwiri wa sekuru ŵake wa ku amama), apo Ivanka wakasambira waka pachoko chiyowoyero cha amama ŵake, ndipo Eric wakasambira yayi chiyowoyero ichi chifukwa ŵasekuru ŵake ŵakagwiliskiranga ntchito Chingelezi mwakufwatuka.<ref>{{cite web|last=Rayner|first=Polly|date=May 14, 1989|title=Ivana Trump Now Fashions Herself As Plaza's Innkeeper|url=https://www.mcall.com/1989/05/14/ivana-trump-now-fashions-herself-as-plazas-innkeeper/|access-date=August 23, 2020|website=The Morning Call|archive-date=August 4, 2016|archive-url=https://web.archive.org/web/20160804065645/http://articles.mcall.com/1989-05-14/features/2690591_1_trump-tower-skis-trump-castle/2|url-status=live}}</ref><ref>{{cite web|last=Van Meter|first=Jonathan|date=December 3, 2004|title=Did Their Father Really Know Best?|url=https://nymag.com/nymetro/news/people/features/10610/|access-date=August 11, 2016|work=New York|archive-date=August 2, 2016|archive-url=https://web.archive.org/web/20160802130124/http://nymag.com/nymetro/news/people/features/10610/|url-status=live}}</ref> <blockquote>"Apo wakaŵa wachali kutengwa na (redacted) ndipo panyake wakakhalanga ku Austria, wakazgoka mwanangwa wa Austria mu 1972. Chaka chimoza kufuma apo wakatoranira na Trump, wakazgoka mwanangwa wa Canada. Ndipo myezi yinkhondi pamanyuma pake wakapokera chilolezo chakukhalira kwamuyirayira mu United States."<ref name="independent/b2354794">{{cite news |last1=Massie |first1=Graeme |title=Secret FBI files reveal questions over Ivana Trump's immigration status |url=https://www.independent.co.uk/news/world/americas/ivana-trump-fbi-secret-files-b2354794.html |access-date=24 July 2025 |work=[[The Independent]] |date=10 June 2023 |archive-url=https://web.archive.org/web/20230609194704/https://www.independent.co.uk/news/world/americas/ivana-trump-fbi-secret-files-b2354794.html |archive-date=2023-06-09 |language=en}}</ref></blockquote> Mulembi munyake uyo wakawona filimu ya pa [[Netflix]] ya 2018 yakucemeka ''[[Trump: An American Dream]]'', wakalongosora Ivana kuti "wakaŵa mwanakazi wakukopa, wakutemwa ntchito, wakulondezga ntchito yake, ndipo wakaŵa wakuyana", kweniso munyake wa umoyo uyo Trump wakamusankha mwadala kuti "wagwirenge nayo ntchito na kumususkanga".<ref>{{cite web|last=Placido|first=Dani Di|title='Trump: An American Dream' Plays Like A Supervillain Origin Story|url=https://www.forbes.com/sites/danidiplacido/2018/04/12/trump-an-american-dream-plays-like-a-supervillain-origin-story/|access-date=August 25, 2020|website=Forbes|language=en|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202094224/https://www.forbes.com/sites/danidiplacido/2018/04/12/trump-an-american-dream-plays-like-a-supervillain-origin-story/|url-status=live}}</ref> Nthengwa ya a Trump iyo yikaŵa na masuzgo yikazgoka nkhani yakumanyikwa chomene pa nyengo ya maholide gha Khisimasi mu 1989, apo ŵakawoneka ŵakukwesana pamanyuma pakuti Ivana wakasangana na mubwezi wa Donald, [[Marla Maples]].<ref name=":11">{{cite web|last1=Lavin|first1=Cheryl|date=February 18, 1990|title=With 'Dynasty' Dead, Just Tune To The Trumps|url=https://www.chicagotribune.com/1990/02/18/with-dynasty-dead-just-tune-to-the-trumps/|archive-url=https://web.archive.org/web/20140405233832/http://articles.chicagotribune.com/1990-02-18/features/9001140529_1_ivana-trump-donald-trump-marla-maples |archive-date=April 5, 2014 |access-date=October 13, 2016|url-status=live|work=[[Chicago Tribune]]}}</ref> ''[[Chicago Tribune]]'' yikaphalira kuti kufika mu Febuluwale 1990, Donald wakajara Ivana kuwaro kwa ofesi yake pa [[Plaza Hotel]], ndipo pakaŵa nkhondo ya malango pa unenesko wa mapangano ghanayi gha [[Prenuptial agreement|vyakukolerana pambere ŵandatore]] agho ŵakachitanga pa vyaka vinandi.<ref name=":11" /> Mu Okutobala 1990, awiske ŵa Ivana ŵa vyaka 63, Miloš Zelníček, ŵakafwa mwamabuchi chifukwa cha matenda gha mtima. Kuyana na ''[[The Guardian]]'', awiske ŵake ŵakaŵa muphaliri wa [[Státní bezpečnost]] (StB), [[intelligence service]] ya Czechoslovakia, ndipo ŵakatumizganga uthenga uwo ŵakapokeleranga kwa mwana wawo, kusazgapo kulaŵiska makora kuti [[George H. W. Bush]] wazamathereska pa [[Visola vya mlongozgi wa United States mu 1988|visola vya mlongozgi wa United States mu 1988]].<ref name="The Guardian">{{cite news |last1=Harding |first1=Luke |title='A very different world' – inside the Czech spying operation on Trump |url=https://www.theguardian.com/us-news/2018/oct/29/czechoslovakia-spied-on-trump-to-exploit-ties-to-highest-echelons-of-us-power |access-date=October 29, 2018 |work=The Guardian |date=October 29, 2018 |archive-date=January 30, 2020 |archive-url=https://web.archive.org/web/20200130030236/https://www.theguardian.com/us-news/2018/oct/29/czechoslovakia-spied-on-trump-to-exploit-ties-to-highest-echelons-of-us-power |url-status=live }}</ref> Nangauli nthengwa yawo yikaŵa na masuzgo ndipo ŵakaŵa pafupi kupatana, Donald wakimilira nayo pamoza pa nyifwa ya awiske ŵake ku [[Zlín]]<ref>{{cite web |last1=Libiger |first1=Milan |last2=Železník |first2=Tomáš |title=Trumpa přivedl do Zlína tchánův pohřeb, děti sem jezdily na prázdniny |url=https://www.idnes.cz/zlin/zpravy/donald-trump-byl-ve-zline-synove-vzpominaji-na-prazdniny-u-prarodicu.A161110_2285077_zlin-zpravy_ras |website=iDNES.cz |access-date=January 19, 2019 |language=cs |date=November 11, 2016 |quote=Father-in-law's funeral brought Trump to Zlín, his children used to spend holidays there |archive-date=April 14, 2020 |archive-url=https://web.archive.org/web/20200414152215/https://www.idnes.cz/zlin/zpravy/donald-trump-byl-ve-zline-synove-vzpominaji-na-prazdniny-u-prarodicu.A161110_2285077_zlin-zpravy_ras |url-status=live }}</ref> iyo yikachitika mu Novembala 1990.<ref name="The Guardian"/> Nkhani ya kupatana kwa a Trump yikamanyikwa pa charu chose chapasi.<ref name=":12" /> Nkhani iyi yikaŵa pa peji lakwamba la manyuzipepala gha mphekesera gha mu New York kwa mazuŵa 11 ghakulondezgana, ndipo yikaŵa nkhani yikuru iyo mulembi wa nkhani za ŵanthu ŵakumanyikwa [[Liz Smith (journalist)|Liz Smith]] wakalemba kwa myezi yitatu yose.<ref name="leland20170730">{{Cite news |url=https://www.nytimes.com/2017/07/28/nyregion/liz-smith-lions-of-new-york.html |title=Life Among the Boldface Names |last=Leland |first=John |date=July 30, 2017 |work=The New York Times |access-date=July 28, 2017 |page=MB1 |language=en-US |issn=0362-4331 |archive-date=July 28, 2017 |archive-url=https://web.archive.org/web/20170728104144/https://www.nytimes.com/2017/07/28/nyregion/liz-smith-lions-of-new-york.html |url-status=live }}</ref> Mu ukaboni uwo wakapelekeka pa mulandu wa kupatana kwawo, Ivana wakapa mulandu Donald kuti wakamuchitiya nkhaza za kugonana.<ref>{{Cite news|last1=Ross|first1=Barbara|last2=Brown|first2=Stephen Rex|date=September 17, 2016|title=Court docs reveal Donald Trump's 'cruel' treatment of Ivana|language=en|work=NY Daily News|url=http://www.nydailynews.com/news/politics/court-docs-reveal-donald-trump-cruel-treatment-ivana-article-1.2796179|archive-url=https://web.archive.org/web/20160917194525/http://www.nydailynews.com/news/politics/court-docs-reveal-donald-trump-cruel-treatment-ivana-article-1.2796179 |archive-date=September 17, 2016 |access-date=October 15, 2017}}</ref> Mu buku la [[Harry Hurt III|Harry Hurt]] lakucemeka ''Lost Tycoon: The Many Lives of Donald J. Trump'', wakazomera kuti "wakajipulika kuti wasuzgika". Ndipouli, mu mazgu agho ghakapelekeka na Donald na maloya ŵake, Ivana wakati nangauli wakagwiliskira ntchito lizgu lakuti ''rape'', wakakhumbanga yayi kuti "mazgu ghake ghapulikikenge mu nthowa yaunenesko panji ya mulandu wa boma".<ref name=":0"/> Kupatana kwawo kwambura kususkika kukazomerezgeka mu Disembala 1990 chifukwa cha nkhaza na kuchitikirika viheni na Donald.<ref name=":12">{{cite news|last=Barron|first=James|date=December 12, 1990|title=Trumps Get Divorce; Next, Who Gets What?|url=https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|access-date=September 7, 2019|website=The New York Times|archive-date=May 8, 2019|archive-url=https://web.archive.org/web/20190508224859/https://www.nytimes.com/1990/12/12/nyregion/trumps-get-divorce-next-who-gets-what.html|url-status=live}}</ref><ref>{{Cite web|title=The New York Times motion to unseal divorce settlement records|url=https://static.politico.com/52/3c/4e17d1ba4d8a89254bb71460b28e/trumpdivorceunsealpdf.pdf|publisher=Politico|page=6|access-date=April 21, 2024|archive-date=April 11, 2023|archive-url=https://web.archive.org/web/20230411001354/https://static.politico.com/52/3c/4e17d1ba4d8a89254bb71460b28e/trumpdivorceunsealpdf.pdf|url-status=live}}</ref> Ivana wakeneranga kusayina [[non-disclosure agreement]] nga ni chigaŵa cha phangano la kupatana, ndipo wakeneranga kupempha chilolezo kwa Donald pambere wandayowoye pa wumba za nthengwa yawo.<ref name=":0">{{cite web|author=Mak|first1=Tim|last2=Zadrozny|first2=Brandy|author-link2=Brandy Zadrozny|date=July 27, 2015|title=Ex-Wife: Donald Trump Made Me Feel 'Violated' During Sex|url=https://www.thedailybeast.com/ex-wife-donald-trump-made-me-feel-violated-during-sex|access-date=November 9, 2020|work=[[The Daily Beast]]|archive-date=November 9, 2020|archive-url=https://web.archive.org/web/20201109014859/http://www.thedailybeast.com/ex-wife-donald-trump-made-me-feel-violated-during-sex|url-status=live}}</ref><ref>{{Cite news|last=Heil|first=Emily|date=October 11, 2017|title=Here are some fabulous lines from Ivana Trump's 1995 divorce manual|newspaper=[[The Washington Post]]|url=https://www.washingtonpost.com/news/reliable-source/wp/2017/10/11/here-are-some-fabulous-lines-from-ivana-trumps-1995-divorce-manual/|access-date=August 28, 2020|archive-date=February 3, 2021|archive-url=https://web.archive.org/web/20210203025248/https://www.washingtonpost.com/news/reliable-source/wp/2017/10/11/here-are-some-fabulous-lines-from-ivana-trumps-1995-divorce-manual/|url-status=live}}</ref> ''[[The New York Times]]'' yikaphalira mu 1991 kuti Ivana wakapokera ndalama zakukwana $14 miliyoni, nyumba ya vipinda 45 ku Connecticut, nyumba ya mu [[Trump Plaza (New York City)|Trump Plaza]], kweniso mwaŵi wakugwiliskira ntchito [[Mar-a-Lago]] mwezi umoza chaka chilichose.<ref name=":15">{{Cite news|last=Hylton|first=Richard D. |date=March 21, 1991 |title=Trumps Settle; She Gets $14 Million Plus|work=[[The New York Times]] |url=https://www.nytimes.com/1991/03/21/nyregion/trumps-settle-she-gets-14-million-plus.html|archive-url=https://web.archive.org/web/20150525231304/https://www.nytimes.com/1991/03/21/nyregion/trumps-settle-she-gets-14-million-plus.html |archive-date=May 25, 2015 |access-date=November 13, 2021}}</ref> ==Ntchito== Pa nyengo iyo wakaŵa pa nthengwa na Donald, Ivana wakagwira maudindo ghakuru mu [[Trump Organization]], wakagwira ntchito nga ni mulara mukuru kwa vyaka vinkhondi na viŵiri,<ref>{{cite web|last=McCauley|first=Dana|date=April 29, 2016|title=This is the woman who made Donald Trump a household name|url=https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|access-date=August 25, 2020|website=NewsComAu|language=en|archive-date=November 4, 2018|archive-url=https://web.archive.org/web/20181104211237/https://www.news.com.au/finance/work/leaders/this-is-the-woman-who-made-donald-trump-a-household-name/news-story/429266fca850e552ef18f66cfd4718f6|url-status=live}}</ref> kusazgapo udindo wa vice president mukuru wa kapangidwe ka mukati mwa nyumba.<ref name=":8">{{Cite magazine|last=Shnayerson|first=Michael|date=January 2, 1988|title=Inside Ivana's Role in Donald Trump's Empire|url=https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|access-date=August 23, 2020|magazine=Vanity Fair|archive-date=December 29, 2020|archive-url=https://web.archive.org/web/20201229002006/https://www.vanityfair.com/news/1988/01/ivana-trump-business-empire|url-status=live}}</ref><ref name=":7"/> Wakalongozga kapangidwe ka mukati mwa [[Trump Tower (New York)|Trump Tower]], uwo ukumanyikwa na malibwe ghapinki gha marble.<ref name=":8"/> Ivana wakimikika kuŵa CEO<ref>{{cite web|last=Burleigh|first=Nina|date=February 1, 2017|title=What Melania, Ivanka, Ivana, Marla tell us about the role of women in Trump's world|url=https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|access-date=August 24, 2020|website=Newsweek|language=en|archive-date=January 10, 2021|archive-url=https://web.archive.org/web/20210110022312/https://www.newsweek.com/2017/02/10/melania-ivanka-ivana-marla-women-trump-world-550804.html|url-status=live}}</ref><ref>{{cite web|last=Ellison|first=Sarah|title=Ivanka's Apprentice|url=https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|access-date=January 12, 2021|publisher=Vanity Fair|archive-date=January 14, 2021|archive-url=https://web.archive.org/web/20210114052422/https://archive.vanityfair.com/article/share/a82ef66c-786f-4437-8f94-4333a3f0fb72?itm_content=footer-recirc|url-status=live}}</ref> kweniso pulezidenti wa [[Trump Castle Hotel and Casino]] ku [[Atlantic City, New Jersey|Atlantic City]], ndipo pamanyuma wakazgoka mulongozgi wa [[Plaza Hotel]] ku [[Manhattan]].<ref>{{cite web |url=https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |title=10 Juiciest Secrets of the Plaza Hotel – Donald Trump's Ownership of the Plaza |publisher=Townandcountrymag.com |date=June 7, 2019 |accessdate=July 14, 2022 |archive-date=December 22, 2021 |archive-url=https://web.archive.org/web/20211222171036/https://www.townandcountrymag.com/leisure/arts-and-culture/a27198622/the-plaza-hotel-scandals/ |url-status=live}}</ref> Donald Trump wakati wapunda pa [[Visola vya mlongozgi wa United States mu 2016|Visola vya mlongozgi wa United States mu 2016]], wakakana pempho lake lakuti waŵe [[Mndandanda wa ŵambasada ŵa United States ku Czech Republic|mbasada ku charu chake cha Czech Republic]].<ref>{{Cite web |last=Klein |first=Betsy |date=October 5, 2017 |title=Ivana Trump turns down ambassadorship {{!}} CNN Politics |url=https://www.cnn.com/2017/10/05/politics/ivana-trump-czech-republic-ambassador-twitter/index.html |access-date=March 17, 2025 |website=CNN |language=en |archive-date=August 14, 2025 |archive-url=https://web.archive.org/web/20250814162706/https://www.cnn.com/2017/10/05/politics/ivana-trump-czech-republic-ambassador-twitter/index.html |url-status=live }}</ref> ===Malonda=== Pati pajumpha nyengo yichoko waka kufuma pa kupatukana kwawo, Ivana wakamba kupanga mizere yake ya vyakuvwara, vyakuvwara vya mawoko, na vyakutozgera thupi, ivyo vikaguliskikanga kwizira mu mawayilesi gha kuguliska vinthu, kusazgapo [[HSN|Home Shopping Network]]<ref name=":9">{{Cite news|last=Dullea|first=Georgia|date=April 5, 1995|title=AT WORK WITH: Ivana Trump; Thinner, Blonder, Wiser|language=en-US|work=The New York Times|url=https://www.nytimes.com/1995/04/05/garden/at-work-with-ivana-trump-thinner-blonder-wiser.html|access-date=August 23, 2020|issn=0362-4331|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202192323/https://www.nytimes.com/1995/04/05/garden/at-work-with-ivana-trump-thinner-blonder-wiser.html|url-status=live}}</ref> na [[QVC (British TV channel)|QVC London]].<ref>{{Cite magazine|last=Trump|first=Ivana|date=October 9, 2017|title=Read an Exclusive Excerpt From Ivana Trump's New Memoir|url=https://time.com/4972300/ivana-trump-excerpt/|access-date=August 23, 2020|magazine=Time|archive-date=November 12, 2020|archive-url=https://web.archive.org/web/20201112031351/https://time.com/4972300/ivana-trump-excerpt/|url-status=live}}</ref> Mu 1995, wakaŵa mulongozgi wa The House of Ivana, kampani ya mafashoni na vyakununkhira iyo yikaŵa na chipinda chakulongolera vinthu pa [[Park Avenue]] ku New York City.<ref name=":9" /> Mu 1998, Ivana wakamba kuchita malonda ku [[Croatia]] (uko ŵapapi ŵake ŵakatemwanga kuluta kukapumulira), agho ghakasazgapo kugura 33% ya nyuzipepara ya zuŵa na zuŵa yachiŵiri pakukura chomene mu charu ichi, ''Polo+10''.<ref>{{cite web|title=Successful Beach Polo Premiere in Croatia|url=http://www.poloplus10.com/rovinj-beach-polo-cup-2016-successful-beach-polo-premiere-croatia-65141/|website=POLO+10 The Polo Magazine|date=May 19, 2016|access-date=November 17, 2016|archive-date=February 2, 2021|archive-url=https://web.archive.org/web/20210202141026/https://www.poloplus10.com/rovinj-beach-polo-cup-2016-successful-beach-polo-premiere-croatia-65141/|url-status=live}}</ref><ref>{{cite news|last1=Tribune New Services|title=And The Town's Name Rang A Bell With Her|url=https://www.chicagotribune.com/1998/01/22/and-the-towns-name-rang-a-bell-with-her/|work=Chicago Tribune|date=January 22, 1998|language=en|access-date=November 17, 2016|archive-date=June 27, 2018|archive-url=https://web.archive.org/web/20180627034310/http://articles.chicagotribune.com/1998-01-22/news/9801220095_1_ivana-trump-donald-trump-croatia|url-status=live}}</ref> Ntchito yakuzenga nyumba ya Bentley Bay yakudumbika na zina la Ivana ku [[Miami, Florida]] yikapempha chitetezo cha bankirapuse mu 2004.<ref name="brand">{{cite web|url=http://www.reviewjournal.com/lvrj_home/2005/Aug-15-Mon-2005/business/2867912.html|title=High-Rise Development: Ivana buys into project|last=Robison|first=Jennifer|date=August 15, 2005|work=[[Las Vegas Review-Journal]]|archive-url=https://web.archive.org/web/20051029050640/http://www.reviewjournal.com/lvrj_home/2005/Aug-15-Mon-2005/business/2867912.html|archive-date=October 29, 2005}}</ref> Chaka chakalondezgapo wakachitako nawo ma projekiti ghanandi gha nyumba za ma condominium, kusazgapo [[Ivana Las Vegas]], iyo yindazengeke.<ref name="brand" /><ref>{{cite web|url=http://www.reviewjournal.com/lvrj_home/2006/Jul-19-Wed-2006/news/8570964.html|title=Pamela, Kid Rock finally to marry|last=Clarke|first=Norm|date=July 19, 2006|work=Las Vegas Review-Journal|archive-url=https://web.archive.org/web/20060720221601/http://www.reviewjournal.com/lvrj_home/2006/Jul-19-Wed-2006/news/8570964.html|archive-date=July 20, 2006}}</ref> Mu 2010, Ivana wakasuma kampani ya mafashoni ya ku Finland ya [[Ivana Helsinki]], wakayisuska kuti yikaguliskanga vyakuvwara vya ŵanakazi ivyo vikagwiliskiranga ntchito zina lake kwambura chilolezo chake.<ref>{{Cite news|last=Stempel|first=Jonathan|date=September 16, 2010|title=Ivana Trump sues Finnish designer over name|work=Reuters|url=https://in.reuters.com/article/us-ivanahelsinki-ivanatrump/ivana-trump-sues-finnish-designer-over-name-idINTRE68F4BQ20100916|access-date=August 25, 2020|archive-date=June 25, 2020|archive-url=https://web.archive.org/web/20200625074708/https://in.reuters.com/article/us-ivanahelsinki-ivanatrump/ivana-trump-sues-finnish-designer-over-name-idINTRE68F4BQ20100916|url-status=dead}}</ref> ===Kulemba=== Ivana wakalemba mabuku ghanandi, kusazgapo ''For Love Alone'' (1992), ''Free to Love'' (1993), na buku la [[kujovwira wekha]] lakuti ''The Best Is Yet to Come: Coping with Divorce and Enjoying Life Again'' (1995).<ref>{{cite web |url=https://www.writerswrite.com/ivana-trump-raising-trump-memoir-4052017177 |title=Ivana Trump to Publish Memoir About Raising Ivanka, Don Jr. and Eric Called Raising Trump |publisher=Writerswrite.com |date=April 5, 2017 |accessdate=July 14, 2022 |archive-date=June 16, 2021 |archive-url=https://web.archive.org/web/20210616013751/https://www.writerswrite.com/ivana-trump-raising-trump-memoir-4052017177 |url-status=live }}</ref> Trump wakalembanga nkhani zakupereka ulongozgi pa nkhani ya chitemwa na umoyo mu ''[[Globe (tabloid)|Globe]]'', yakudanika kuti "Ask Ivana", kwambira mu Juni 1995 m'paka mu Janyuwale 2010.<ref>{{cite web|url=https://news.google.com/newspapers?nid=1957&dat=19950601&id=KHk1AAAAIBAJ&pg=3910,149601|title=Ask Ivana|work=[[The Daily Gazette]]|date=June 1, 1995|access-date=November 28, 2016|archive-date=February 3, 2021|archive-url=https://web.archive.org/web/20210203093120/https://news.google.com/newspapers?nid=1957&dat=19950601&id=KHk1AAAAIBAJ&pg=3910,149601|url-status=live}}</ref><ref>{{cite magazine|last=Trump|first=Ivana|date=January 25, 2010|title=Bye, Bye Ivana!|magazine=[[Globe (tabloid)|Globe]]|page=18|quote=Dear Readers: After years of hard work and devoted service as GLOBE's advice columnist, I regretfully have decided to resign from the position. While I have thoroughly enjoyed being a part of the GLOBE family, as well as the many friendships that I have developed over the years, other business pursuits, both nationally and internationally, will not allow me to devote the attention necessary to the column and to my readers.}}</ref> Mu Febuluwale 1999, Ivana wakambiska magazini yake ya umoyo yakudanika kuti ''Ivana's Living in Style''.<ref>{{cite web|url=http://articles.sun-sentinel.com/1999-02-24/lifestyle/9902230731_1_ivana-trump-miniskirt-takeout|title=Picture This: Ivana Has Her Own Magazine|last=White|first=Diane|work=[[The Boston Globe]]|date=February 24, 1999|access-date=November 29, 2016|archive-date=November 29, 2016|archive-url=https://web.archive.org/web/20161129145805/http://articles.sun-sentinel.com/1999-02-24/lifestyle/9902230731_1_ivana-trump-miniskirt-takeout|url-status=dead}}</ref> Wakalembaso nkhani zakupereka ulongozgi mu ''Divorce Magazine'' mu 2001.<ref>Zwecker, Bill, "Ivana's trump? Divorce column that shares all she's learned", ''Chicago Sun-Times'', January 24, 2001</ref> Mu 2017, Ivana wakafumiska buku lake la mbiri ya umoyo, ''Raising Trump''. Bukuli likulongosora umo wakakulira kweniso vyaka vyakwambilira vya kulera ŵana ŵake pamoza na Donald.<ref name="nyt">{{cite news |last=Collins |first=Gail |author-link=Gail Collins |date=October 12, 2017 |title=The Trumps, the Poodle, the Sex Scandal|url=https://www.nytimes.com/2017/10/12/opinion/ivana-ivanka-trump-book.html?pagewanted=all&src=pm |newspaper=[[The New York Times]] |access-date=February 9, 2020 |archive-date=February 9, 2020 |archive-url=https://web.archive.org/web/20200209011209/https://www.nytimes.com/2017/10/12/opinion/ivana-ivanka-trump-book.html?pagewanted=all&src=pm}}</ref><ref>{{cite book|last1=Trump|first1=Ivana|title=Raising Trump|url=https://books.google.com/books?id=gQ5aDgAAQBAJ&q=Raising+Trump|date=October 2017|publisher=[[Gallery Publishing Group|Gallery Books]]|via=[[Google Books]]|isbn=978-1-5011-7728-6|access-date=October 2, 2020|archive-date=February 16, 2021|archive-url=https://web.archive.org/web/20210216202918/https://books.google.com/books?id=gQ5aDgAAQBAJ&q=Raising+Trump|url-status=live}}</ref> ==Kuwonekera mu vya nkhani== [[File:Life Ball 2009 (arrivals) Ivana Trump.jpg|thumb|upright|Ivana pa [[Life Ball]] ya 2009 mu [[Vienna]]]] Ivana na Donald ŵakawonekera lumoza mu mapulogiramu ghanandi gha pa wayilesi ya kanema, kusazgapo ''[[The Oprah Winfrey Show]]'' mu Epulero 1988,<ref>{{Cite news|date=April 25, 1988|title=Donald Trump on Marriage: 'Ultimately Ivana Does Exactly As I Tell Her to Do'|language=en-us|publisher=Oprah.com|url=http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do|access-date=August 24, 2020|archive-date=November 21, 2020|archive-url=https://web.archive.org/web/20201121145501/http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do|url-status=live}}</ref> ndipo pamanyuma pake ''[[Wogan]]'' ya BBC mu Meyi 1988.<ref>{{cite web|date=May 23, 1988|title=Wogan: Donald Trump and Dame Edna|url=https://www.bbc.co.uk/videos/cd184xejm20o|access-date=August 24, 2020|publisher=BBC Archive|language=en|archive-date=November 10, 2020|archive-url=https://web.archive.org/web/20201110110400/https://www.bbc.co.uk/archive/donald-trump-dame-edna-wogan/zjxcf4j|url-status=live}}</ref> Pamanyuma pa kupatana na Donald, Ivana wakafumbika mafumbo na [[Barbara Walters]] pa pulogiramu ya ABC yakuti ''[[20/20 (American TV program)|20/20]]''. Mu 1991, Donald wakalekeska kumupa ndalama za [[ndalama zakovwira munthu para ŵapatana]] pamanyuma pa kuyowoyeskana uku ndipo wakapharazga kuti wafumbenge Ivana ndalama chifukwa cha vyakunangiska.<ref>{{cite web|last=Winship|first=Frederick M.|date=May 14, 1991|title=Trump ends Ivana's alimony over TV interview|url=https://www.upi.com/Archives/1991/05/14/Trump-ends-Ivanas-alimony-over-TV-interview/1397674193600/|access-date=August 23, 2020|publisher=UPI|language=en|archive-date=January 11, 2021|archive-url=https://web.archive.org/web/20210111065258/https://www.upi.com/Archives/1991/05/14/Trump-ends-Ivanas-alimony-over-TV-interview/1397674193600/|url-status=live}}</ref> Wakaweleraso ku ''The Oprah Winfrey Show'' mu 1992 na uthenga wakuti, "Nilolenge chara kuti ŵanalume ŵanilamulirenge so yayi."<ref>{{cite news|last=Jones|first=Isabel|date=December 5, 2019|title=Donald Trump Reportedly Told Then-Wife Ivana Trump to 'Never Look a Day Over 28'|url=https://money.yahoo.com/donald-trump-reportedly-told-then-223000422.html|access-date=August 24, 2020|publisher=Yahoo! Money|agency=[[InStyle]]|language=en-US|archive-date=October 25, 2020|archive-url=https://web.archive.org/web/20201025031640/https://money.yahoo.com/donald-trump-reportedly-told-then-223000422.html|url-status=live}}</ref> Ivana wakaŵa na gawo lichoko mu filimu ya [[Hollywood (film industry)|Hollywood]] yakuti ''[[The First Wives Club]]'' (1996), apo wakayowoya kuti, "Ŵanakazi, mukwenera kuŵa ŵankhongono kweniso ŵakujiyimira ŵekha. Ndipo kumbukani: mungakwiyanga chara, kweni torani chilichose."<ref name="Cettl">{{cite book|last1=Cettl|first1=Robert|title=Film Talk|date=2010|publisher=Wider Screenings|isbn=9780987050038|page=54}}</ref> Wakaŵa mulongozgi wa pulogiramu ya TV ya ''[[Ivana Young Man]]'', iyo yikawoneskeka pa [[Oxygen (TV network)|Oxygen Network]] mu 2006. Mu pulogiramu iyi ya kusanga wokutemwana nayo, wakawovwira mwanakazi musambazi wa msinkhu wapakati kusanga munyamata muchoko wakuti waŵe nayo pa chitemwa.<ref name=":2" /> Mu 2010, Ivana wakawonekera mu pulogiramu ya pa TV ya ku United Kingdom yakuti ''[[Celebrity Big Brother (British series 7)|Celebrity Big Brother 7]]''; wakamalizga pa malo gha nambara 7.<ref name=":2" /> ==Umoyo wa munthu== Ivana wakatora kanayi. Nthengwa yake yakwamba, na Alfred Winklmayr, yikaŵa ya chilato cha kusanga [[uzika wa ku Austria]].<ref name=":1"/> Ivana wakatora [[Donald Trump]] kufuma mu 1977 mpaka 1990, ndipo ŵakaŵa na ŵana ŵatatu, [[Donald Trump Jr.|Donald Jr.]] mu 1977, [[Ivanka Trump|Ivanka]] mu 1981, na [[Eric Trump|Eric]] mu 1984.<ref name="The Washington Post"/> Wakaŵa mwanakazi wa [[uzika wa United States]] mwakuzomerezgeka mu 1988.<ref>{{cite news |date=May 27, 1988 |title=Ivana Trump becomes U.S. citizen |agency=[[Associated Press]] |url=https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&pg=5053,3823442 |url-status=live |access-date=August 21, 2015 |archive-url=https://web.archive.org/web/20190418083356/https://news.google.com/newspapers?nid=1899&dat=19880527&id=LiEgAAAAIBAJ&sjid=YmYFAAAAIBAJ&pg=5053,3823442 |archive-date=April 18, 2019}}</ref>{{sfn|Hurt III|1993|p=236}} Mu Novembala 1995, Ivana wakatora Riccardo Mazzucchelli, mubizinesi wa ku Italy uyo wakachitanga malonda pa charu chose.<ref>{{cite web|last=Green|first=Michelle|date=July 21, 1997|title=Riccardo, We Hardly Knew Ye|url=http://www.people.com/people/archive/article/0,,20122713,00.html|access-date=July 22, 2016|work=[[People (magazine)|People]]|archive-date=July 25, 2016|archive-url=https://web.archive.org/web/20160725181247/http://www.people.com/people/archive/article/0,,20122713,00.html|url-status=live}}</ref><ref name=":16" /> Ŵakapatukana mu 1997.<ref name=":14">{{cite web|date=September 24, 2017|title=Ivana Trump Former Husband Riccardo Mazzucchelli Dies|url=https://radaronline.com/videos/ivana-trump-former-husband-riccardo-mazzucchelli-dies/|access-date=August 23, 2020|website=RadarOnline|language=en-US|archive-date=August 2, 2020|archive-url=https://web.archive.org/web/20200802003609/https://radaronline.com/videos/ivana-trump-former-husband-riccardo-mazzucchelli-dies/|url-status=live}}</ref> Chaka chenechicho, wakapeleka mulandu wa kuswa phangano wa madola 15 miliyoni ku Mazzucchelli chifukwa cha kuswa dango la kubisa vyamuchipatapata mu phangano lawo la pambere ŵandatore.<ref>{{cite web|last=Baker|first=K.C.|date=July 10, 1997|title=Ivana wants to muzzle soon-to-be-ex|url=http://www.nydailynews.com/archives/news/ivana-muzzle-soon-to-be-ex-article-1.771313|access-date=July 22, 2016|work=New York Daily News|archive-date=August 3, 2016|archive-url=https://web.archive.org/web/20160803180318/http://www.nydailynews.com/archives/news/ivana-muzzle-soon-to-be-ex-article-1.771313|url-status=live}}</ref> Mazzucchelli nayo wakasumba Ivana na mfumu wake wakale Donald ku khoti la Britain chifukwa cha [[kunanga zina]].<ref name=":16">{{cite news|url=https://www.independent.co.uk/news/husband-sues-ivana-and-donald-trump-for-libel-1253222.html|title=Husband sues Ivana and Donald Trump for libel|date=July 29, 1997|work=[[The Independent]]|access-date=July 22, 2016|archive-date=August 20, 2016|archive-url=https://web.archive.org/web/20160820040337/http://www.independent.co.uk/news/husband-sues-ivana-and-donald-trump-for-libel-1253222.html|url-status=live}}</ref> Pamanyuma pake mulandu uwu ukamara pa mapangano agho ghakapharazgika yayi.<ref name=":14" /> Pakati pa 1997, Ivana wakamba kuchezga na mulesi wa ku Italy Count Roffredo [[Gaetani dell'Aquila d'Aragona]] Lovatelli.<ref>{{cite web|title=Muore nell'auto mentre va a trovare la madre – Il Tirreno|url=https://ricerca.gelocal.it/iltirreno/archivio/iltirreno/2005/12/24/LG1PO_LG101.html|access-date=October 30, 2021|website=Archivio – Il Tirreno|language=it|archive-date=October 30, 2021|archive-url=https://web.archive.org/web/20211030023144/https://ricerca.gelocal.it/iltirreno/archivio/iltirreno/2005/12/24/LG1PO_LG101.html|url-status=live}}</ref> Ubwezi wawo ukalutilira mpaka apo wakafwira mu 2005.<ref>{{Cite news| issn = 0362-4331| last = Wadler| first = Joyce| title = PUBLIC LIVES; Ivana's Boy Toy (for the Record, He's a Prince)| work = The New York Times| access-date = March 29, 2017| date = March 20, 1998| url = https://www.nytimes.com/1998/03/20/nyregion/public-lives-ivana-s-boy-toy-for-the-record-he-s-a-prince.html| archive-date = March 30, 2017| archive-url = https://web.archive.org/web/20170330005329/http://www.nytimes.com/1998/03/20/nyregion/public-lives-ivana-s-boy-toy-for-the-record-he-s-a-prince.html| url-status = live}}</ref> Ivana wakachezganga na wakuseŵera wa mafilimu na mtundu wa ku Italy Rossano Rubicondi kwa vyaka vinkhondi na viŵiri pambere ŵandatorane pa Epulero 12, 2008.<ref>{{cite web|date=June 26, 2019|title=Ivana Trump and Ex-Husband Rossano Rubicondi Split for Second Time|url=https://www.usmagazine.com/celebrity-news/news/ivana-trump-and-rossano-rubicondi-split-for-second-time/|access-date=August 23, 2020|website=Us Weekly|language=en-US|archive-date=October 29, 2020|archive-url=https://web.archive.org/web/20201029173824/https://www.usmagazine.com/celebrity-news/news/ivana-trump-and-rossano-rubicondi-split-for-second-time/|url-status=live}}</ref><ref name=":6" /> Nthengwa na Rubicondi, uyo wakaŵa na vyaka 36, yikaŵa ya nambara yachinayi kwa Ivana, uyo wakaŵa mukuru kwa iyo na vyaka 23 ndipo wakaŵa na vyaka 59.<ref name=":6">{{cite web|last=Marx|first=Linda|date=April 12, 2008|title=Ivana Trump Marries for the Fourth Time – Weddings, Ivana Trump|url=http://www.people.com/people/article/0,,20190959,00.html|access-date=October 24, 2012|work=People|archive-date=May 18, 2016|archive-url=https://web.archive.org/web/20160518203722/http://www.people.com/people/article/0,,20190959,00.html|url-status=dead}}</ref> Nthengwa yawo ya madola 3 miliyoni, iyo yikawunganya ŵalendo 400, yikachitikira ku Mar-a-Lago ndipo yikalongozgeka na mfumu wake wakale Donald, apo mwana wake mwanakazi Ivanka wakaŵa msungwana mukuru wa ukwati.<ref>{{Cite news|date=April 17, 2008|title=Ivana Trump weds actor Rossano Rubicond: report|language=en|work=Reuters|url=https://in.reuters.com/article/us-celebrities-idINN1748314820080417|access-date=August 23, 2020|archive-date=January 28, 2017|archive-url=https://web.archive.org/web/20170128093825/http://in.reuters.com/article/us-celebrities-idINN1748314820080417|url-status=dead}}</ref> Umo ukwati ukalongozgekera ukaŵa na Maryanne Trump Barry, uyo wakaŵa mudumbu wa Donald wakale.<ref name=":6" /> Nangauli Ivana na Rubicondi ŵakapatukana pasi pajumpha chaka chimoza, ubwezi wawo ukalutilira mpaka mu 2019, apo Ivana wakapharazga kuti ŵaŵiriwo "ŵamara dankha".<ref name=":2" /><ref>{{Cite magazine|last=Bryant|first=Kenzie|title=Ivana Trump Reunites With Her One True Love: New York Tabloids|url=https://www.vanityfair.com/style/2019/06/ivana-trump-breakup-page-six|access-date=August 23, 2020|magazine=Vanity Fair|date=June 27, 2019|language=en-us|archive-date=September 22, 2020|archive-url=https://web.archive.org/web/20200922202651/https://www.vanityfair.com/style/2019/06/ivana-trump-breakup-page-six|url-status=live}}</ref> Rubicondi wakafwa pa Okutobala 29, 2021, ali na vyaka 49, ndipo vikayowoyeka kuti wakafwa na [[melanoma]].<ref>{{Cite news |url=https://www.ajc.com/news/nation-world/ivana-trumps-ex-husband-actor-rossano-rubicondi-dead-at-49/Y6SHBYCVJBEOVGK6QYN2IQBCWE/ |title=Ivana Trump's ex-husband, actor Rossano Rubicondi, dead at 49 |newspaper=The Atlanta Journal-Constitution |access-date=July 15, 2022 |archive-date=July 15, 2022 |archive-url=https://web.archive.org/web/20220715120940/https://www.ajc.com/news/nation-world/ivana-trumps-ex-husband-actor-rossano-rubicondi-dead-at-49/Y6SHBYCVJBEOVGK6QYN2IQBCWE/ |url-status=live |last1=Assuncao |first1=Muri }}</ref><ref>{{Cite web |title=Ivana Trump's Ex-Husband Rossano Rubicondi Dead at 49: 'I'm Devastated,' She Says |url=https://people.com/politics/ivana-trump-ex-husband-rossano-rubicondi-dead-at-49/ |access-date=February 7, 2025 |website=People.com |language=en |archive-date=December 23, 2024 |archive-url=https://web.archive.org/web/20241223172607/https://people.com/politics/ivana-trump-ex-husband-rossano-rubicondi-dead-at-49/ |url-status=live }}</ref> Ivana wakaŵa na ŵazukuru 10.<ref>{{cite web|last=Yasharoff|first=Hannah|date=August 2019|title=Eric and Lara Trump welcome second baby, President Trump's 10th grandchild: 'We love you already!'|url=https://eu.usatoday.com/story/life/parenting/2019/08/20/president-donald-trump-tenth-grandchild-eric-lara-trump-welcome-second-kid/2059106001/|access-date=May 24, 2020|website=USA Today|archive-date=November 8, 2020|archive-url=https://web.archive.org/web/20201108001514/https://eu.usatoday.com/story/life/parenting/2019/08/20/president-donald-trump-tenth-grandchild-eric-lara-trump-welcome-second-kid/2059106001/|url-status=live}}</ref> Muumaliro wa m'ma 2010, vikayowoyekanga kuti wakagaŵa nyengo yake pakati pa New York City, Miami, na [[Saint-Tropez]].<ref name=":2" /> Wakati wakayowoyanga mwakumanya Chicheki, Chingelezi, Chijeremani, Chifurenchi, na Chirasha.<ref name=":8" /> === Mafumbo gha vya chitetezo === Pa Febuluwale 14, 1989, [[Bungwe la Federal Bureau of Investigation]] (FBI) ku Washington, DC, likapempha kuti ŵambe kufufuza vya ubwezi wa Trump na [[Czechoslovakia]] chifukwa cha uthenga wakufuma ku munthu wakubisika. Kufufuza uku kukambika na ofesi ya FBI ya ku New York sabata yakulondezgapo ndipo kukuti kukatora vyaka viŵiri panji kujumpha.<ref>{{cite news |last1=Leopold |first1=Jason |last2=Beckwith |first2=Ryan |last3=Dorning |first3=Mike |date=March 28, 2023 |title=FBI Releases Files on Ivana Trump |url=https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |publisher=[[Bloomberg News]] |quote=Donald Trump's first wife, Ivana, was under an FBI counterintelligence inquiry into allegations about her connections in her home country of Czechoslovakia in the 1990s, according to excerpts from her FBI file obtained by Bloomberg News. [...] In one document dated February 14, 1989, the FBI said it "recommended a preliminary inquiry be opened on Ivana Trump" based on information the bureau obtained from a confidential source. According to the document, "It is unknown if the allegations stem from jealousies of her wealth and fame. Investigation continuing." [...] While the nature of the FBI's inquiry into Ivana Trump is unknown, it involved the bureau's counterintelligence division and was highly sensitive, according to the documents, and spanned at least two years. |archive-date=March 28, 2023 |access-date=March 28, 2023 |archive-url=https://web.archive.org/web/20230328222806/https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |url-status=live }}</ref><ref>{{cite web |title=FOIPA Request No.: 1553627-000; Subject: Trump, Ivana; Jason Leopold and Bloomberg, L.P. v. FBI and USDOJ; Civil Action No.: 1:22-cv-02651 |url=https://assets.bwbx.io/documents/users/iqjWHBFdfxIU/rRIdgx38yix8/v0 |accessdate=March 28, 2023 |page=15 |quote=Preliminary inquiry initiated February 22, 1989 expires June 23, 1989. [...] Leads: Washington Metropolitan Field Office at Washington D.C. |archive-date=March 27, 2023 |archive-url=https://web.archive.org/web/20230327235052/https://assets.bwbx.io/documents/users/iqjWHBFdfxIU/rRIdgx38yix8/v0 |url-status=live }}</ref> Mu Malichi 2023, vikavumbukwa kuti Ivana wakafufuzikanga na dipatimenti ya FBI yakuwona vya ukazitape chifukwa cha milandu yakukhwaskana na charu chake cha [[Czechoslovakia]].<ref>{{Cite news |date=March 27, 2023 |title=FBI Releases Files on Ivana Trump |url=https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |access-date=March 29, 2023 |work=Bloomberg.com |language=en |archive-date=March 28, 2023 |archive-url=https://web.archive.org/web/20230328222806/https://www.bloomberg.com/news/articles/2023-03-27/fbi-releases-files-on-ivana-trump-former-president-s-first-wife |url-status=live }}</ref> Bungwe la [[StB]] likamuzonda Ivana mu vyaka vya m'ma 1970 na m'ma 1980 apo wakalutanga kukawona awiske, Miloš Zelníček.<ref name="theguardian/czech-ivana-files" /><ref name="theguardian/C-S--spy-Trump-1980s">{{cite news |last1=Harding |first1=Luke |date=October 29, 2018 |title=Czechoslovakia ramped up spying on Trump in late 1980s, seeking US intel |url=https://www.theguardian.com/us-news/2018/oct/29/trump-czechoslovakia-communism-spying |archive-url=https://web.archive.org/web/20181029085711/https://www.theguardian.com/us-news/2018/oct/29/trump-czechoslovakia-communism-spying |archive-date=October 29, 2018 |access-date=July 24, 2025 |work=[[The Guardian]]}}</ref> == Nyifwa == Pa Julayi 14, 2022, Ivana wakafwa wali na vyaka 73 chifukwa cha [[Kupwetekeka kwakofya|vipweteko vikuru]] ku [[chiŵaro cha pakati pa thupi|thupi]] pamanyuma pakuti wawa pa masitepu ghakuzingilizgika ghakukhora<ref name="vanityfair/ivana-death">{{cite news |last1=Seal |first1=Mark |date=November 3, 2022 |title=Inventing Ivana Trump: Her Improbable Rise and Tragic Death |url=https://www.vanityfair.com/style/2022/11/inventing-ivana-trump-her-improbable-rise-and-tragic-death |work=Vanity Fair |language=en-US |access-date=July 24, 2025 |archive-url=https://web.archive.org/web/20221103120236/https://www.vanityfair.com/style/2022/11/inventing-ivana-trump-her-improbable-rise-and-tragic-death |archive-date=November 3, 2022}}</ref> pa nyumba yake ku [[Upper East Side]] ya [[Manhattan]].<ref>{{cite web |last1=Suliman |first1=Adela |last2=Jacobs |first2=Shayna |date=July 16, 2022 |title=Ivana Trump died of 'blunt impact injuries,' medical examiner says |url=https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |work=The Washington Post |language=en-US |access-date=July 16, 2022 |archive-date=July 16, 2022 |archive-url=https://web.archive.org/web/20220716160620/https://www.washingtonpost.com/politics/2022/07/16/ivana-trump-death-accident-torso/ |url-status=live }}</ref><ref>{{cite web |last=Vargas |first=Ramon Antonio |date=July 15, 2022 |title=Ivana Trump died of blunt force injuries to her torso, medical examiner says |url=https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |work=The Guardian |language=en-GB |access-date=July 16, 2022 |archive-date=July 15, 2022 |archive-url=https://web.archive.org/web/20220715234735/https://www.theguardian.com/us-news/2022/jul/15/ivana-trump-donald-trump-wife-death-cause |url-status=live}}</ref> Mfumu wake wakale, [[Donald Trump]], na ŵana ŵawo ŵatatu, pamoza na ŵandyali na ŵanthu ŵakumanyikwa ŵanandi, ŵakalemba mauthenga gha chitima pa malo ghakusangirako vya pa intaneti.<ref name="People tributes">{{cite magazine |last1=Taheri |first1=Amanda |date=July 14, 2022 |title=The Trump Family, Celebrities and Politicians React to Sudden Passing of Ivana Trump at Age 73 |url=https://people.com/politics/family-celebrities-politicians-react-to-ivana-trump-death/ |magazine=People |access-date=July 14, 2022 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714222944/https://people.com/politics/family-celebrities-politicians-react-to-ivana-trump-death/ |url-status=live}}</ref><ref name="The Washington Post">{{cite news |last1=Schudel |first1=Matt |last2=Fisher |first2=Marc |date=July 14, 2022 |title=Ivana Trump, first wife of former president, has died |url=https://www.washingtonpost.com/local/obituaries/ivana-trump-first-wife-of-former-president-has-died/2022/07/14/1f86a01e-03ae-11ed-8beb-2b4e481b1500_story.html |work=The Washington Post |access-date=July 14, 2022 |archive-date=July 14, 2022 |archive-url=https://web.archive.org/web/20220714201738/https://www.washingtonpost.com/politics/2022/07/14/ivana-trump-donald-trump/ |url-status=live}}</ref> Chisopo chake chikachitika pa Julayi 20 pa [[Mpingo wa St. Vincent Ferrer (Manhattan)|Mpingo wa St. Vincent Ferrer]], [[Mpingo wa Katolika|Katolika]] uwo uli pafupi na nyumba yake.<ref name="funeral">{{cite news |last1=Hajela |first1=Deepti |date=July 20, 2022 |title=Ivana Trump's Funeral In NYC Attended By Donald Trump |url=https://www.huffpost.com/entry/us-ivana-trump-funeral_n_62d844b1e4b0a6852c32eeaa |website=Associated Press |access-date=July 20, 2022 |archive-date=July 20, 2022 |archive-url=https://web.archive.org/web/20220720215030/https://www.huffpost.com/entry/us-ivana-trump-funeral_n_62d844b1e4b0a6852c32eeaa |url-status=live }}</ref> Ivana wakasungika ku [[Trump National Golf Club Bedminster]] ku [[Bedminster, New Jersey]].<ref>{{cite web |last=Hartmann |first=Margaret |date=August 1, 2022 |title=Why Ivana Trump Was Buried at Bedminster Golf Course: 3 Theories |url=https://nymag.com/intelligencer/article/ivana-trump-buried-bedminster-3-theories.html |url-access=subscription |website=Intelligencer |language=en-US |access-date=August 28, 2023 |archive-date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825175041/https://nymag.com/intelligencer/article/ivana-trump-buried-bedminster-3-theories.html |url-status=live }}</ref> Ivana wakasida chuma chakukwana madola miliyoni 34.<ref name="Alexander 2023">{{Cite web |last=Alexander |first=Dan |date=January 16, 2023 |title=Ivana Trump Left Behind $34 Million. Here's What Is In Her Will |url=https://www.forbes.com/sites/danalexander/2023/01/16/ivana-trump-left-behind-34-million-heres-what-is-in-her-will/?sh=39ccb409b20f |website=Forbes |language=en-US |access-date=January 16, 2023 |archive-date=January 18, 2023 |archive-url=https://web.archive.org/web/20230118031633/https://www.forbes.com/sites/danalexander/2023/01/16/ivana-trump-left-behind-34-million-heres-what-is-in-her-will/?sh=39ccb409b20f |url-status=live }}</ref> Chigaŵa chikuru cha [[katundu]] wake chikapelekeka mwakuyana kwa Donald Jr., Ivanka, na Eric. Ŵanyake awo ŵakapokera ni mubwezi wake Evelyne Galet na Dorothy Curry, uyo wakaŵa mulezi wakale wa ŵana ŵa banja ili.<ref name="Alexander 2023"/><ref>{{Cite web |last=Tangalakis-Lippert |first=Katherine |date=January 18, 2023 |title=Donald Trump got nothing in Ivana Trump's will — but she left her ex-nanny a $1 million condo |url=https://www.businessinsider.com/ivana-trumps-will-who-gets-her-34-million-in-assets-2023-1 |website=Business Insider |language=en-US |access-date=February 7, 2025 |archive-date=April 16, 2025 |archive-url=https://web.archive.org/web/20250416084415/https://www.businessinsider.com/ivana-trumps-will-who-gets-her-34-million-in-assets-2023-1 |url-status=live }}</ref> == Mafilimu na wayilesi == *Ivana wakaseŵeskeka na [[Katheryn Winnick]] mu filimu ya pa wayilesi ya 2005 ''[[Trump Unauthorized]]''. *Ivana wakaseŵeskeka na [[Maria Bakalova]] mu filimu ''[[The Apprentice (filimu ya 2024)|The Apprentice]]''.<ref>{{Cite web |url=https://deadline.com/2023/11/the-apprentice-movie-sebastian-stan-donald-trump-1235643089/ |title=‘The Apprentice’: Jeremy Strong And Maria Bakalova Join Sebastian Stan In Donald Trump Pic |access-date=November 30, 2023 |archive-date=November 29, 2023 |archive-url=https://web.archive.org/web/20231129233512/https://deadline.com/2023/11/the-apprentice-movie-sebastian-stan-donald-trump-1235643089/ |url-status=live }}</ref> *Ivana wakajiseŵeska yekha mu kachigaŵa ka ''[[The First Wives Club]]''. *''For Love Alone: The Ivana Trump Story'' (Filimu ya pa wayilesi ya 1996)<ref>{{imdb title|0164029|For Love Alone: The Ivana Trump Story}} (TV Movie 1996) </ref> ==Mabuku agho wakalemba== {| class="wikitable sortable" |- ! Mutu ! Chaka ! Wakufumiska ! ISBN / ASIN |- | ''For Love Alone'' | 1992 | [[Pocket Books]] | {{ISBN|978-0671790882}} |- | ''Free to Love'' | 1993 | [[Atria Publishing Group|Atria]] | {{ISBN|978-0671743710}} |- | ''The Best Is Yet to Come: Coping with Divorce and Enjoying Life Again'' | 1995 | Pocket Books | {{ISBN|978-0671865696}} |- | ''Raising Trump: Family Values from America's First Mother'' | 2017 | [[Gallery Books]] | {{ISBN|978-1501177293}} |- |} ==Mphotho na ntchindi== *Charu cha Czech: Ivana wakapika [[Mendulo ya Ntchindi (Czech Republic)|Mendulo ya Ntchindi]] pamanyuma pa nyifwa yake na Pulezidenti wa Czech Republic [[Miloš Zeman]] pa Okutobala 28, 2022.<ref>{{cite web|first=Michael|last=Kahn|url=https://www.reuters.com/world/us/ivanka-trump-accepts-czech-state-award-behalf-late-mother-ivana-2022-10-29/|title=Ivanka Trump accepts Czech state award on behalf of late mother Ivana|publisher=Reuters|date=October 29, 2022|access-date=October 29, 2022|archive-date=October 29, 2022|archive-url=https://web.archive.org/web/20221029085642/https://www.reuters.com/world/us/ivanka-trump-accepts-czech-state-award-behalf-late-mother-ivana-2022-10-29/|url-status=live}}</ref> ==Vyakulemba== {{Notelist}} ===Ukaboni=== {{Reflist}} ===Mabuku aghagwiriskika ntchito=== *{{cite book |title = Trump: The Deals and the Downfall |last=Barrett|first=Wayne|author-link=Wayne Barrett|publisher=Harper Collins|year=2016|orig-year=1992|edition=First Regan Art Paperback|location=|pages=|isbn=978-1-682450-79-6}} Paperback title: ''The Greatest Show on Earth: The Deals, the Downfall, the Reinvention''. *{{cite book|title=The Trumps: Three Generations That Built an Empire|last=Blair|first=Gwenda|author-link=Gwenda Blair|publisher=Simon & Schuster Paperbacks|year=2015|orig-year=2000|isbn=978-0-7432-1079-9|location=|pages=|url-access=registration|url=https://archive.org/details/trumps00gwen }} *{{cite book |title = Golden Handcuffs: The Secret History of Trump's Women |last=Burleigh|first=Nina|author-link=Nina Burleigh|publisher=Gallery Books|year=2018|orig-year=2018|isbn=978-1-5011-8020-0|location=|pages= |title-link=Golden handcuffs }} *{{cite book |title=The Lost Tycoon: The Rise and Demise of Donald J. Trump |last=Hurt III |first=Harry|author-link=Harry Hurt III|publisher=W. W. Norton Company|year=1993|isbn=0-393-03029-6|location=|pages= |title-link=Lost Tycoon }} ==Vyakukolerana vya kuwaro== {{Commons category|Ivana Trump}} {{Wikiquote}} *{{Find a Grave|241603122|Ivana Trump}} *[http://www.oprah.com/own-oprahshow/donald-trump-ultimately-ivana-does-exactly-as-i-tell-her-to-do Vidiyo ya Ivana na Donald Trump] kufuma ku ''[[The Oprah Winfrey Show]]'', pa Epulero 24, 1988 *[https://www.bbc.co.uk/videos/cd184xejm20o Vidiyo ya Ivana na Donald Trump] apo ŵakawonekera pamoza na [[Dame Edna Everage]] mu ''[[Wogan]]'', BBC, pa Meyi 23, 1988 {{Authority control}} {{DEFAULTSORT:Trump, Ivana}} [[Category:Ŵanthu ŵakubabika mu 1949]] [[Category:Ŵanthu ŵakufwa mu 2022]] [[Category:Ŵanakazi ŵabizinesi ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵabizinesi ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵalembi ŵa mabuku ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵanakazi ŵalembi ŵa mabuku ŵa ku United States ŵa m'ma 1900]] [[Category:Ŵanakazi ŵalembi ŵa ku United States ŵa m'ma 2000]] [[Category:Nyifwa za ngozi chifukwa cha kuwa ku United States]] [[Category:Nyifwa za ngozi ku New York (state)]] [[Category:Ŵalembi ŵa mbiri ya umoyo ŵa ku United States]] [[Category:Ŵanthu ŵa ku United States ŵa mphapu ya Moravia]] [[Category:Ŵanthu ŵakumanyikwa pa umoyo wa chisopa na umoyo wa ŵanthu ŵa ku United States]] [[Category:Ŵasambiri ŵa Charles University]] [[Category:Ŵabizinesi ŵa ku Czech Republic]] [[Category:Ŵa Czech awo ŵakakhalanga ku Canada]] [[Category:Ŵamodelo ŵanakazi ŵa ku Czech]] [[Category:Ŵanthu ŵakumanyikwa pa umoyo wa ŵanthu ŵa ku Czech]] [[Category:Ŵanakazi ŵabizinesi ŵa ku Czech]] [[Category:Ŵanthu ŵakafuma ku Czechoslovakia na kukakhala ku United States]] [[Category:Ŵanthu ŵakazgoka ŵanthu ŵa ku United States mwakuzomerezgeka]] [[Category:Ŵabizinesi ŵakufuma ku Manhattan]] [[Category:Ŵanthu ŵakufuma ku Upper East Side]] [[Category:Ŵanthu ŵakufuma ku Zlín]] [[Category:Ŵanakazi ŵalembi ŵa mbiri ya umoyo]] [[Category:Ŵapokeleri ŵa Medal of Merit (Czech Republic)]] [[Category:Ŵanthu ŵakafuma ku Czechoslovakia na kukakhala ku Canada]] [[Category:Ŵanthu ŵakafuma ku Czech na kukakhala ku United States]] [[Category:Ŵanthu ŵakafuma ku Czech na kukakhala ku Canada]] nvn0ntcyndg05m9on52xo696wmz3pcx Template:Née 10 47787 116859 2024-08-25T12:03:26Z en>Warudo 0 Added rcat shell for the protection template 116859 wikitext text/x-wiki #REDIRECT [[Template:Nee]] {{Rcat shell| {{R from move}} {{R from title with diacritics}} }} [[Category:Typing-aid templates|Nee]] czlcx02sgyma7tzw9de6qrrij5h9vc2 116860 116859 2026-07-16T10:56:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Née]] 116859 wikitext text/x-wiki #REDIRECT [[Template:Nee]] {{Rcat shell| {{R from move}} {{R from title with diacritics}} }} [[Category:Typing-aid templates|Nee]] czlcx02sgyma7tzw9de6qrrij5h9vc2 Template:R from title with diacritics 10 47788 116867 2022-06-29T03:57:58Z en>Wbm1058 0 removing over-categorization (via [[WP:JWB]]) 116867 wikitext text/x-wiki #REDIRECT [[Template:R from diacritic]] {{Redirect category shell| {{R from move}} {{R to redirect template}} }} ipqktfjn5ssl71akxpa3ntdvlzp4sbg 116868 116867 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_from_title_with_diacritics]] 116867 wikitext text/x-wiki #REDIRECT [[Template:R from diacritic]] {{Redirect category shell| {{R from move}} {{R to redirect template}} }} ipqktfjn5ssl71akxpa3ntdvlzp4sbg Template:Protection padlock 10 47789 116869 2026-05-05T14:17:47Z en>Paine Ellsworth 0 sync to sandbox 116869 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} </noinclude> 0q651nfr0ibf5g4bbb3sw2qkj47h3ic 116870 116869 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Protection_padlock]] 116869 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} </noinclude> 0q651nfr0ibf5g4bbb3sw2qkj47h3ic Template:R protected/excon 10 47790 116871 2026-01-10T23:37:25Z en>Andrybak 0 wrap categorization in <includeonly></includeonly> 116871 wikitext text/x-wiki {{Redirect template |id=R extended-protected |name=[[:Category:Wikipedia extended-confirmed-protected redirects|Extended-confirmed protected]] |from=a title that is extended confirmed protected from editing for any of several possible reasons |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. }}<includeonly>{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R extended-protected||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor=[[Category:Wikipedia template-protected redirects]] |extendedconfirmed=[[Category:Wikipedia extended-confirmed-protected redirects]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |extendedconfirmed=[[Category:Wikipedia extended-confirmed-protected redirects]] |sysop|templateeditor|autoconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}<!--|all category=comment for automatic namespace detection--></includeonly><noinclude> {{documentation}} </noinclude> ak5km0v8k0xfy26ob4cknx73xtwo7ws 116872 116871 2026-07-16T10:56:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_protected/excon]] 116871 wikitext text/x-wiki {{Redirect template |id=R extended-protected |name=[[:Category:Wikipedia extended-confirmed-protected redirects|Extended-confirmed protected]] |from=a title that is extended confirmed protected from editing for any of several possible reasons |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. }}<includeonly>{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R extended-protected||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor=[[Category:Wikipedia template-protected redirects]] |extendedconfirmed=[[Category:Wikipedia extended-confirmed-protected redirects]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |extendedconfirmed=[[Category:Wikipedia extended-confirmed-protected redirects]] |sysop|templateeditor|autoconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}<!--|all category=comment for automatic namespace detection--></includeonly><noinclude> {{documentation}} </noinclude> ak5km0v8k0xfy26ob4cknx73xtwo7ws Template:Find a Grave 10 47791 116874 2026-02-16T15:48:33Z en>WOSlinker 0 bypass redirects 116874 wikitext text/x-wiki {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{{grid|}}} {{#property:P535}} | {{#if: {{{author|}}} {{{last|}}} {{{date|}}} {{{accessdate|{{{access-date|}}}}}} | {{cite web |url=https://www.findagrave.com/memorial/{{#if: {{{1|{{{grid|{{{id|}}}}}}}}} | {{{1|{{{grid|{{{id}}}}}}}}} | {{First word|1={{#property:P535}}|sep=,}} }} |title={{#if: {{{2|{{{name|}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }} |publisher=[[Find a Grave]] |work={{{work|}}} |last={{{last|{{{author|}}}}}} |first={{{first|}}} |date={{{date|}}} |access-date={{{accessdate|{{{access-date|}}}}}} |display-authors={{{display-authors|}}} |ref={{{ref|}}} }} | [https://www.findagrave.com/memorial/{{#if: {{{1|{{{grid|{{{id<includeonly>|</includeonly>}}}}}}}}} | {{{1|{{{grid|{{{id}}}}}}}}} | {{First word|1={{#property:P535}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}]{{#if: {{{work|}}} | , {{{work}}} }} at [[Find a Grave]] }}<includeonly>{{Edit at Wikidata|pid=P535| {{{1|{{{grid|{{{id|}}}}}}}}} }}</includeonly>{{#ifeq: {{Yesno-yes|{{{check-wikidata|}}}}} | yes | {{Wikidata check|property=P535|value={{#invoke:String|match|s={{{1|{{{grid|{{{id|}}}}}}}}}|pattern=^%d+|ignore_errors=true}}|category=Find a Grave template with ID|namespaces=0|nocatsame=1}} }} | <span class="error">&#123;&#123;[[Template:Find a Grave|Find a Grave]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Find a Grave template missing ID and not in Wikidata]]}} }}<noinclude> {{Documentation}}<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> </noinclude> t5ekr8v0q8gy25i38gystv3lezjagrf 116875 116874 2026-07-16T10:58:40Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Find_a_Grave]] 116874 wikitext text/x-wiki {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{{grid|}}} {{#property:P535}} | {{#if: {{{author|}}} {{{last|}}} {{{date|}}} {{{accessdate|{{{access-date|}}}}}} | {{cite web |url=https://www.findagrave.com/memorial/{{#if: {{{1|{{{grid|{{{id|}}}}}}}}} | {{{1|{{{grid|{{{id}}}}}}}}} | {{First word|1={{#property:P535}}|sep=,}} }} |title={{#if: {{{2|{{{name|}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }} |publisher=[[Find a Grave]] |work={{{work|}}} |last={{{last|{{{author|}}}}}} |first={{{first|}}} |date={{{date|}}} |access-date={{{accessdate|{{{access-date|}}}}}} |display-authors={{{display-authors|}}} |ref={{{ref|}}} }} | [https://www.findagrave.com/memorial/{{#if: {{{1|{{{grid|{{{id<includeonly>|</includeonly>}}}}}}}}} | {{{1|{{{grid|{{{id}}}}}}}}} | {{First word|1={{#property:P535}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}]{{#if: {{{work|}}} | , {{{work}}} }} at [[Find a Grave]] }}<includeonly>{{Edit at Wikidata|pid=P535| {{{1|{{{grid|{{{id|}}}}}}}}} }}</includeonly>{{#ifeq: {{Yesno-yes|{{{check-wikidata|}}}}} | yes | {{Wikidata check|property=P535|value={{#invoke:String|match|s={{{1|{{{grid|{{{id|}}}}}}}}}|pattern=^%d+|ignore_errors=true}}|category=Find a Grave template with ID|namespaces=0|nocatsame=1}} }} | <span class="error">&#123;&#123;[[Template:Find a Grave|Find a Grave]]&#125;&#125; template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Find a Grave template missing ID and not in Wikidata]]}} }}<noinclude> {{Documentation}}<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> </noinclude> t5ekr8v0q8gy25i38gystv3lezjagrf Template:Find a Grave/doc 10 47792 116916 2026-06-28T12:08:23Z en>Andrybak 0 Clean up linter warnings. Use [[Template:Magic word link]] 116916 wikitext text/x-wiki {{Documentation subpage}} <!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> {{High-use|37906}} {{warning|Per [[WP:FINDAGRAVE-EL]], this template should be used very sparingly and in most cases the template (or links to Findagrave not using this template) should be removed from articles.}} {{Tracks and uses Wikidata|P535}} {{Lua|Module:EditAtWikidata|Module:WikidataCheck}} '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link or a reference to a memorial on the [[Find a Grave]] website. == Usage == ===External link=== ; Unnamed parameters : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | <var>ID</var> <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> <nowiki>}}</nowiki></code> ; Named parameters : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= | name= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= | name= | work= <nowiki>}}</nowiki></code> ; Using Wikidata property : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | name= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | name= | work= <nowiki>}}</nowiki></code> ===Reference=== ; Two unnamed parameters : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> ; Named parameters : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= | name= | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> ; Using Wikidata property : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> == Usage guidance == {{See also|Wikipedia:External links/Perennial websites#Find a Grave}} Care should be taken when deciding to make a link to the Find a Grave website. While photographs of gravestones provide useful information, the biographical and other additional details may not be reliable. If there are fully [[WP:RS|reliable sources]] which may be used, then the Find a Grave link should not be used, or should be removed in place of the more reliable source. ===As an [[WP:External link]]=== To comply with [[WP:ELNO]], only place in External links section if the website contains unique information not already mentioned and cited in the body of the article and is not a [[WP:COPYLINK]] violation. Remove from External links if Find a Grave is already cited in main body, if burial information is provided in main body by a more reliable source, or if the page contains any unlicensed copyrighted information (e.g., professional [[portrait photography]] or copies of [[obituaries]] from a newspaper). ===As a reference for article content=== With rare exceptions, [[WP:FINDAGRAVE-EL|do not]] use Find a Grave as a source. Find a Grave is not [[WP:RS|reliable]] because it relies on user-generated input without vetting by an editorial body. If any of the parameters: * access-date * author * date * last are specified, this template will produce a citation with {{tl|Cite web}}. Otherwise, it produces a format for use in an "External links" section. If used as a reference, it should not be duplicated in the "External links" section. == Parameters == * <code>id</code> or <code>grid</code> (parameter 1, required unless using Wikidata)&nbsp;– The Find a Grave Memorial ID number, found at the bottom of the Find a Grave article or in the URL (e.g., "1234" for https://www.findagrave.com/memorial/1234/henri-langlois, formerly https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234). This parameter is optional if Wikidata property P535 exists, but required if not. * <code>name</code> (parameter 2, optional)&nbsp;– The name of the deceased. Defaults to <code>{{mwl|PAGENAME}}</code> if not specified. * <code>work</code>&nbsp;– A group or category within the Find a Grave site. * <code>check-wikidata</code>&nbsp;– Include {{para|check-wikidata|no}} to prevent the template comparing the provided ID against the value from Wikidata. Use mainly when this template is used on list, place or other people's articles. * Parameters for {{tl|Cite web}} ** <code>last</code>&nbsp;– The surname of the original author of the Find a Grave article. *** <code>author</code>&nbsp;– Alias for <code>last</code>. If both <code>last</code> and <code>author</code> are specified, <code>last</code> takes precedence. ** <code>first</code>&nbsp;– The given name of the original author of the Find a Grave article. Requires <code>last</code>. ** <code>display-authors</code>&nbsp;– If the Find a Grave article has more than one author, use {{para|display-authors|et al}} to display "et al." after the name of the first author. ** <code>date</code>&nbsp;– The date of the Find a Grave article. ** <code>access-date</code>&nbsp;– The date this citation was added or last updated. == Examples == === External link with unnamed parameters === ; Usage : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 1234 | Henri Langlois <nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}} | 1234 | Henri Langlois }} ; Current URL: : <kbd>[https://www.findagrave.com/memorial/1234/henri-langlois https://www.findagrave.com/memorial/{{Highlight|1234}}/henri-langlois]</kbd> ; Alternate URLs (redirect to URL above): : <kbd>[https://www.findagrave.com/memorial/1234 https://www.findagrave.com/memorial/{{Highlight|1234}}]</kbd> (used in template) : <kbd>[https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234 https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid={{Highlight|1234}}]</kbd> (former URL) === External link with named parameters === ; Usage : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 94078737 | name= Sally Kristen Ride | work= American Astronaut <nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}} | id= 94078737 | name= Sally Kristen Ride | work= American Astronaut }} ; Current URL: : <kbd>[https://www.findagrave.com/memorial/94078737/sally-ride https://www.findagrave.com/memorial/{{Highlight|94078737}}/sally-ride]</kbd> ; Alternate URLs (redirect to URL above): : <kbd>[https://www.findagrave.com/memorial/94078737 https://www.findagrave.com/memorial/{{Highlight|94078737}}]</kbd> (used in template) : <kbd>[https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=94078737 https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid={{Highlight|94078737}}]</kbd> (former URL) === External link using Wikidata property === ; Usage in [[Henri Langlois#External links|Henri Langlois]] : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}}|1234|Henri Langlois}} [[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/Q745858#P535 |Edit this at Wikidata]] === Missing ID and no Wikidata === ; Usage : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> ; Output : {{ {{BASEPAGENAME}} }} === Reference using all of the parameters === ; Usage : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | id = 94078737 | name = Sally Kristen Ride | work = American Astronaut | last = Daniluke | first = Marc J. | display-authors = et al | date = July 23, 2012 | access-date = </nowiki>{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}<nowiki> }}</nowiki></code> ; Output : {{ {{BASEPAGENAME}} | id = 94078737 | name = Sally Kristen Ride | work = American Astronaut | last = Daniluke | first = Marc J. | display-authors = et al | date = July 23, 2012 | access-date = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}} }} == TemplateData == {{collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}} {{TemplateData header|noheader=1}} <templatedata> { "description": "This template displays an external link or a reference to a memorial on the Find a Grave website.", "params": { "id": { "aliases": ["grid","1"], "label": "GRid #", "description": "The Find a Grave Memorial ID number, found at the bottom of the Find a Grave article or in the URL (e.g., '1234' for https://www.findagrave.com/memorial/1234/henri-langlois, formerly https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234). This parameter is optional if Wikidata property P535 exists, but required if not.", "type": "number", "required": false, "default": "Wikidata property P2601" }, "name": { "aliases": ["2"], "label": "Name of deceased", "description": "The name of the deceased. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.", "type": "line", "suggested": true, "default": "{{PAGENAMEBASE}}" }, "work": { "description": "A group or category within the Find a Grave site", "type": "line" }, "last": { "aliases": ["author"], "label": "Author surname", "description": "The surname of the original author of the Find a Grave article.", "type": "line" }, "first": { "label": "Author given name", "description": "The given name of the original author of the Find a Grave article. Requires <code>last</code>.", "type": "line" }, "display-authors": { "label": "Display authors", "description": "If the Find a Grave article has more than one author, use |display-authors=et al to display 'et al.' after the name of the first author.", "type": "string", "example": "et al" }, "date": { "description": "The date of the Find a Grave article.", "type": "date" }, "access-date": { "aliases": ["accessdate"], "label": "Access date", "description": "The date this citation was added or last updated.", "type": "date" }, "check-wikidata": { "label": "check-wikidata", "description": "Include \"|check-wikidata=no\" to prevent the template comparing the provided ID against the value from Wikidata. Use mainly when this template is used on list, place or other people's articles.", "type": "string", "example": "|check-wikidata=no" } }, "paramOrder": [ "id", "name", "work", "last", "first", "display-authors", "date", "access-date", "check-wikidata" ] } </templatedata> {{collapse bottom}} == Tracking categories == ; template with ID : ID is converted to numeric value before comparison with Wikidata : 1234/henri-langlois → {{#invoke:String|match|s=1234/henri-langlois|pattern=^%d+|ignore_errors=true}} : 1234 → {{#invoke:String|match|s=1234|pattern=^%d+|ignore_errors=true}} * {{clc|Find a Grave template with ID different from Wikidata}} * {{clc|Find a Grave template with ID not in Wikidata}} ; template missing ID * {{clc|Find a Grave template missing ID and not in Wikidata}} == See also == * [[Wikipedia:FINDAGRAVE]] * {{tl|Find a Grave cemetery}} to link to a cemetery at Find a Grave <includeonly>{{Sandbox other|| <!--Categories below this line, please; interwikis at Wikidata--> [[Category:People and person external link templates]] [[Category:External link templates with accessdate parameter]] [[Category:External link templates using Wikidata]] [[Category:Templates that add a tracking category]] [[Category:Templates that wrap Cite web]] }}</includeonly> ng87hpda0d8bwgrxsrjqq9ked82048b 116917 116916 2026-07-16T10:58:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Find_a_Grave/doc]] 116916 wikitext text/x-wiki {{Documentation subpage}} <!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> {{High-use|37906}} {{warning|Per [[WP:FINDAGRAVE-EL]], this template should be used very sparingly and in most cases the template (or links to Findagrave not using this template) should be removed from articles.}} {{Tracks and uses Wikidata|P535}} {{Lua|Module:EditAtWikidata|Module:WikidataCheck}} '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link or a reference to a memorial on the [[Find a Grave]] website. == Usage == ===External link=== ; Unnamed parameters : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | <var>ID</var> <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> <nowiki>}}</nowiki></code> ; Named parameters : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= | name= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= | name= | work= <nowiki>}}</nowiki></code> ; Using Wikidata property : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | name= <nowiki>}}</nowiki></code> : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | name= | work= <nowiki>}}</nowiki></code> ===Reference=== ; Two unnamed parameters : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> ; Named parameters : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= | name= | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> ; Using Wikidata property : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= | work= | last= | first= | date= | access-date= <nowiki>}}</nowiki></code> == Usage guidance == {{See also|Wikipedia:External links/Perennial websites#Find a Grave}} Care should be taken when deciding to make a link to the Find a Grave website. While photographs of gravestones provide useful information, the biographical and other additional details may not be reliable. If there are fully [[WP:RS|reliable sources]] which may be used, then the Find a Grave link should not be used, or should be removed in place of the more reliable source. ===As an [[WP:External link]]=== To comply with [[WP:ELNO]], only place in External links section if the website contains unique information not already mentioned and cited in the body of the article and is not a [[WP:COPYLINK]] violation. Remove from External links if Find a Grave is already cited in main body, if burial information is provided in main body by a more reliable source, or if the page contains any unlicensed copyrighted information (e.g., professional [[portrait photography]] or copies of [[obituaries]] from a newspaper). ===As a reference for article content=== With rare exceptions, [[WP:FINDAGRAVE-EL|do not]] use Find a Grave as a source. Find a Grave is not [[WP:RS|reliable]] because it relies on user-generated input without vetting by an editorial body. If any of the parameters: * access-date * author * date * last are specified, this template will produce a citation with {{tl|Cite web}}. Otherwise, it produces a format for use in an "External links" section. If used as a reference, it should not be duplicated in the "External links" section. == Parameters == * <code>id</code> or <code>grid</code> (parameter 1, required unless using Wikidata)&nbsp;– The Find a Grave Memorial ID number, found at the bottom of the Find a Grave article or in the URL (e.g., "1234" for https://www.findagrave.com/memorial/1234/henri-langlois, formerly https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234). This parameter is optional if Wikidata property P535 exists, but required if not. * <code>name</code> (parameter 2, optional)&nbsp;– The name of the deceased. Defaults to <code>{{mwl|PAGENAME}}</code> if not specified. * <code>work</code>&nbsp;– A group or category within the Find a Grave site. * <code>check-wikidata</code>&nbsp;– Include {{para|check-wikidata|no}} to prevent the template comparing the provided ID against the value from Wikidata. Use mainly when this template is used on list, place or other people's articles. * Parameters for {{tl|Cite web}} ** <code>last</code>&nbsp;– The surname of the original author of the Find a Grave article. *** <code>author</code>&nbsp;– Alias for <code>last</code>. If both <code>last</code> and <code>author</code> are specified, <code>last</code> takes precedence. ** <code>first</code>&nbsp;– The given name of the original author of the Find a Grave article. Requires <code>last</code>. ** <code>display-authors</code>&nbsp;– If the Find a Grave article has more than one author, use {{para|display-authors|et al}} to display "et al." after the name of the first author. ** <code>date</code>&nbsp;– The date of the Find a Grave article. ** <code>access-date</code>&nbsp;– The date this citation was added or last updated. == Examples == === External link with unnamed parameters === ; Usage : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 1234 | Henri Langlois <nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}} | 1234 | Henri Langlois }} ; Current URL: : <kbd>[https://www.findagrave.com/memorial/1234/henri-langlois https://www.findagrave.com/memorial/{{Highlight|1234}}/henri-langlois]</kbd> ; Alternate URLs (redirect to URL above): : <kbd>[https://www.findagrave.com/memorial/1234 https://www.findagrave.com/memorial/{{Highlight|1234}}]</kbd> (used in template) : <kbd>[https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234 https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid={{Highlight|1234}}]</kbd> (former URL) === External link with named parameters === ; Usage : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 94078737 | name= Sally Kristen Ride | work= American Astronaut <nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}} | id= 94078737 | name= Sally Kristen Ride | work= American Astronaut }} ; Current URL: : <kbd>[https://www.findagrave.com/memorial/94078737/sally-ride https://www.findagrave.com/memorial/{{Highlight|94078737}}/sally-ride]</kbd> ; Alternate URLs (redirect to URL above): : <kbd>[https://www.findagrave.com/memorial/94078737 https://www.findagrave.com/memorial/{{Highlight|94078737}}]</kbd> (used in template) : <kbd>[https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=94078737 https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid={{Highlight|94078737}}]</kbd> (former URL) === External link using Wikidata property === ; Usage in [[Henri Langlois#External links|Henri Langlois]] : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> ; Output :* {{ {{BASEPAGENAME}}|1234|Henri Langlois}} [[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/Q745858#P535 |Edit this at Wikidata]] === Missing ID and no Wikidata === ; Usage : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> ; Output : {{ {{BASEPAGENAME}} }} === Reference using all of the parameters === ; Usage : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | id = 94078737 | name = Sally Kristen Ride | work = American Astronaut | last = Daniluke | first = Marc J. | display-authors = et al | date = July 23, 2012 | access-date = </nowiki>{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}<nowiki> }}</nowiki></code> ; Output : {{ {{BASEPAGENAME}} | id = 94078737 | name = Sally Kristen Ride | work = American Astronaut | last = Daniluke | first = Marc J. | display-authors = et al | date = July 23, 2012 | access-date = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}} }} == TemplateData == {{collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}} {{TemplateData header|noheader=1}} <templatedata> { "description": "This template displays an external link or a reference to a memorial on the Find a Grave website.", "params": { "id": { "aliases": ["grid","1"], "label": "GRid #", "description": "The Find a Grave Memorial ID number, found at the bottom of the Find a Grave article or in the URL (e.g., '1234' for https://www.findagrave.com/memorial/1234/henri-langlois, formerly https://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=1234). This parameter is optional if Wikidata property P535 exists, but required if not.", "type": "number", "required": false, "default": "Wikidata property P2601" }, "name": { "aliases": ["2"], "label": "Name of deceased", "description": "The name of the deceased. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation.", "type": "line", "suggested": true, "default": "{{PAGENAMEBASE}}" }, "work": { "description": "A group or category within the Find a Grave site", "type": "line" }, "last": { "aliases": ["author"], "label": "Author surname", "description": "The surname of the original author of the Find a Grave article.", "type": "line" }, "first": { "label": "Author given name", "description": "The given name of the original author of the Find a Grave article. Requires <code>last</code>.", "type": "line" }, "display-authors": { "label": "Display authors", "description": "If the Find a Grave article has more than one author, use |display-authors=et al to display 'et al.' after the name of the first author.", "type": "string", "example": "et al" }, "date": { "description": "The date of the Find a Grave article.", "type": "date" }, "access-date": { "aliases": ["accessdate"], "label": "Access date", "description": "The date this citation was added or last updated.", "type": "date" }, "check-wikidata": { "label": "check-wikidata", "description": "Include \"|check-wikidata=no\" to prevent the template comparing the provided ID against the value from Wikidata. Use mainly when this template is used on list, place or other people's articles.", "type": "string", "example": "|check-wikidata=no" } }, "paramOrder": [ "id", "name", "work", "last", "first", "display-authors", "date", "access-date", "check-wikidata" ] } </templatedata> {{collapse bottom}} == Tracking categories == ; template with ID : ID is converted to numeric value before comparison with Wikidata : 1234/henri-langlois → {{#invoke:String|match|s=1234/henri-langlois|pattern=^%d+|ignore_errors=true}} : 1234 → {{#invoke:String|match|s=1234|pattern=^%d+|ignore_errors=true}} * {{clc|Find a Grave template with ID different from Wikidata}} * {{clc|Find a Grave template with ID not in Wikidata}} ; template missing ID * {{clc|Find a Grave template missing ID and not in Wikidata}} == See also == * [[Wikipedia:FINDAGRAVE]] * {{tl|Find a Grave cemetery}} to link to a cemetery at Find a Grave <includeonly>{{Sandbox other|| <!--Categories below this line, please; interwikis at Wikidata--> [[Category:People and person external link templates]] [[Category:External link templates with accessdate parameter]] [[Category:External link templates using Wikidata]] [[Category:Templates that add a tracking category]] [[Category:Templates that wrap Cite web]] }}</includeonly> ng87hpda0d8bwgrxsrjqq9ked82048b Template:Edit at Wikidata 10 47793 116920 2026-01-22T14:02:30Z en>MSGJ 0 MSGJ moved page [[Template:EditAtWikidata]] to [[Template:Edit at Wikidata]]: plain English 116920 wikitext text/x-wiki {{#invoke:EditAtWikidata |showMessage |qid={{{qid|}}} |pid={{{pid|}}} |nbsp={{{nbsp|}}} |{{{1|}}} }}<noinclude> {{documentation}} </noinclude> k3dnbwgfi8ka45sgpcor4r8i5d2lmjb 116921 116920 2026-07-16T10:58:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Edit_at_Wikidata]] 116920 wikitext text/x-wiki {{#invoke:EditAtWikidata |showMessage |qid={{{qid|}}} |pid={{{pid|}}} |nbsp={{{nbsp|}}} |{{{1|}}} }}<noinclude> {{documentation}} </noinclude> k3dnbwgfi8ka45sgpcor4r8i5d2lmjb Template:Magic word link 10 47794 116922 2026-07-08T18:03:46Z en>Grufo 0 Fix inconsistency 116922 wikitext text/x-wiki <includeonly>{{safesubst:<noinclude />#if:{{{1|}}} |{{safesubst:<noinclude />#switch:{{{1}}} | __NOTOC__ = [[:mw:Help:Magic words#NOTOC|__NOTO<nowiki />C__]] | __FORCETOC__ = [[:mw:Help:Magic words#FORCETOC|__FORC<nowiki />ETOC__]] | __TOC__ = [[:mw:Help:Magic words#TOC|__T<nowiki />OC__]] | __NOEDITSECTION__ = [[:mw:Help:Magic words#NOEDITSECTION|__NOEDI<nowiki />TSEC<nowiki />TION__]] | __NEWSECTIONLINK__ = [[:mw:Help:Magic words#NEWSECTIONLINK|__NE<nowiki />WSECTI<nowiki />ONLI<nowiki />NK__]] | __NONEWSECTIONLINK__ = [[:mw:Help:Magic words#NONEWSECTIONLINK|__NONE<nowiki />WSECTI<nowiki />ONLI<nowiki />NK__]] | __NOGALLERY__ = [[:mw:Help:Magic words#NOGALLERY|__NOG<nowiki />ALLERY__]] | __HIDDENCAT__ = [[:mw:Help:Magic words#HIDDENCAT|__HID<nowiki />DENCAT__]] | __EXPECTUNUSEDCATEGORY__ = [[:mw:Help:Magic words#EXPECTUNUSEDCATEGORY|__EXPEC<nowiki />TUNUSE<nowiki />DCATEGORY__]] | __NOCONTENTCONVERT__ = [[:mw:Help:Magic words#NOCONTENTCONVERT|__NOC<nowiki />ONTENTC<nowiki />ONVERT__]] | __NOCC__ = [[:mw:Help:Magic words#NOCC|__NOC<nowiki />C__]] | __NOTITLECONVERT__ = [[:mw:Help:Magic words#NOTITLECONVERT|__NOTI<nowiki />TLECONVE<nowiki />RT__]] | __NOTC__ = [[:mw:Help:Magic words#NOTC|__NO<nowiki />TC__]] | __START__ = [[:mw:Help:Magic words#START|__STA<nowiki />RT__]] | __END__ = [[:mw:Help:Magic words#END|__E<nowiki />ND__]] | __INDEX__ = [[:mw:Help:Magic words#INDEX|__INDE<nowiki />X__]] | __NOINDEX__ = [[:mw:Help:Magic words#NOINDEX|__NOI<nowiki />NDEX__]] | __STATICREDIRECT__ = [[:mw:Help:Magic words#STATICREDIRECT|__STATICREDI<nowiki />RECT__]] | __EXPECTUNUSEDTEMPLATE__ = [[:mw:Help:Magic words#EXPECTUNUSEDTEMPLATE|__EXPECTU<nowiki />NUSEDTE<nowiki />MPLATE__]] | __NOGLOBAL__ = [[:mw:Help:Magic words#NOGLOBAL|__NOGL<nowiki />OBAL__]] | __DISAMBIG__ = [[:mw:Help:Magic words#DISAMBIG|__DISA<nowiki />MBIG__]] | __EXPECTED_UNCONNECTED_PAGE__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __ARCHIVEDTALK__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __NOTALK__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __EXPECTWITHOUTSCANS__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | #REDIRECT = [[:mw:Help:Redirects#Creating a redirect|#REDI<nowiki />RECT]] | #default = &#123;&#123;[[:{{safesubst:<noinclude />#switch:{{{1}}} | CURRENTYEAR = mw:Help:Magic words#Date and time | CURRENTMONTH = mw:Help:Magic words#Date and time | CURRENTMONTH1 = mw:Help:Magic words#Date and time | CURRENTMONTH2 = mw:Help:Magic words#Date and time | CURRENTMONTHNAME = mw:Help:Magic words#Date and time | CURRENTMONTHNAMEGEN = mw:Help:Magic words#Date and time | CURRENTMONTHABBREV = mw:Help:Magic words#Date and time | CURRENTDAY = mw:Help:Magic words#Date and time | CURRENTDAY2 = mw:Help:Magic words#Date and time | CURRENTDOW = mw:Help:Magic words#Date and time | CURRENTDAYNAME = mw:Help:Magic words#Date and time | CURRENTTIME = mw:Help:Magic words#Date and time | CURRENTHOUR = mw:Help:Magic words#Date and time | CURRENTWEEK = mw:Help:Magic words#Date and time | CURRENTTIMESTAMP = mw:Help:Magic words#Date and time | LOCALYEAR = mw:Help:Magic words#Date and time | LOCALMONTH = mw:Help:Magic words#Date and time | LOCALMONTH1 = mw:Help:Magic words#Date and time | LOCALMONTH2 = mw:Help:Magic words#Date and time | LOCALMONTHNAME = mw:Help:Magic words#Date and time | LOCALMONTHNAMEGEN = mw:Help:Magic words#Date and time | LOCALMONTHABBREV = mw:Help:Magic words#Date and time | LOCALDAY = mw:Help:Magic words#Date and time | LOCALDAY2 = mw:Help:Magic words#Date and time | LOCALDOW = mw:Help:Magic words#Date and time | LOCALDAYNAME = mw:Help:Magic words#Date and time | LOCALTIME = mw:Help:Magic words#Date and time | LOCALHOUR = mw:Help:Magic words#Date and time | LOCALWEEK = mw:Help:Magic words#Date and time | LOCALTIMESTAMP = mw:Help:Magic words#Date and time | SITENAME = mw:Help:Magic words#Technical metadata | SERVER = mw:Help:Magic words#Technical metadata | SERVERNAME = mw:Help:Magic words#Technical metadata | DIRMARK = mw:Help:Magic words#Technical metadata | DIRECTIONMARK = mw:Help:Magic words#Technical metadata | ARTICLEPATH = mw:Help:Magic words#Technical metadata | SCRIPTPATH = mw:Help:Magic words#Technical metadata | STYLEPATH = mw:Help:Magic words#Technical metadata | CURRENTVERSION = mw:Help:Magic words#Technical metadata | CONTENTLANGUAGE = mw:Help:Magic words#Technical metadata | CONTENTLANG = mw:Help:Magic words#Technical metadata | PAGEID = mw:Help:Magic words#Technical metadata | CASCADINGSOURCES = mw:Help:Magic words#Technical metadata | REVISIONID = mw:Help:Magic words#Technical metadata | REVISIONDAY = mw:Help:Magic words#Technical metadata | REVISIONDAY2 = mw:Help:Magic words#Technical metadata | REVISIONMONTH = mw:Help:Magic words#Technical metadata | REVISIONMONTH1 = mw:Help:Magic words#Technical metadata | REVISIONYEAR = mw:Help:Magic words#Technical metadata | REVISIONTIMESTAMP = mw:Help:Magic words#Technical metadata | REVISIONUSER = mw:Help:Magic words#Technical metadata | REVISIONSIZE = mw:Help:Magic words#Technical metadata | NOEXTERNALLANGLINKS = mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE | NUMBEROFPAGES = mw:Help:Magic words#Technical metadata | NUMBEROFARTICLES = mw:Help:Magic words#Technical metadata | NUMBEROFFILES = mw:Help:Magic words#Technical metadata | NUMBEROFEDITS = mw:Help:Magic words#Technical metadata | NUMBEROFVIEWS = mw:Help:Magic words#Technical metadata | NUMBEROFUSERS = mw:Help:Magic words#Technical metadata | NUMBEROFADMINS = mw:Help:Magic words#Technical metadata | NUMBEROFACTIVEUSERS = mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE | FULLPAGENAME = mw:Help:Magic words#Page names | PAGENAME = mw:Help:Magic words#Page names | BASEPAGENAME = mw:Help:Magic words#Page names | SUBPAGENAME = mw:Help:Magic words#Page names | SUBJECTPAGENAME = mw:Help:Magic words#Page names | ARTICLEPAGENAME = mw:Help:Magic words#Page names | TALKPAGENAME = mw:Help:Magic words#Page names | ROOTPAGENAME = mw:Help:Magic words#Page names | FULLPAGENAMEE = mw:Help:Magic words#Page names | PAGENAMEE = mw:Help:Magic words#Page names | BASEPAGENAMEE = mw:Help:Magic words#Page names | SUBPAGENAMEE = mw:Help:Magic words#Page names | SUBJECTPAGENAMEE = mw:Help:Magic words#Page names | ARTICLEPAGENAMEE = mw:Help:Magic words#Page names | TALKPAGENAMEE = mw:Help:Magic words#Page names | ROOTPAGENAMEE = mw:Help:Magic words#Page names | NAMESPACE = mw:Help:Magic words#NAMESPACE | NAMESPACENUMBER = mw:Help:Magic words#NAMESPACENUMBER | SUBJECTSPACE = mw:Help:Magic words#SUBJECTSPACE | ARTICLESPACE = mw:Help:Magic words#Namespaces | TALKSPACE = mw:Help:Magic words#TALKSPACE | NAMESPACEE = mw:Help:Magic words#Namespaces | SUBJECTSPACEE = mw:Help:Magic words#Namespaces | TALKSPACEE = mw:Help:Magic words#Namespaces | ! = mw:Help:Magic words#Escaped characters | {{safesubst:<noinclude />=}} = mw:Help:Magic words#Escaped characters | PROTECTIONLEVEL = mw:Help:Magic words#Technical metadata | DISPLAYTITLE = mw:Help:Magic words#DISPLAYTITLE | DEFAULTSORT = mw:Help:Magic words#DEFAULTSORT | PAGESINCATEGORY = mw:Help:Magic words#PAGESINCATEGORY | PAGESINCAT = mw:Help:Magic words#PAGESINCAT | NUMBERINGROUP = mw:Help:Magic words#NUMBERINGROUP | PAGESINNS = mw:Help:Magic words#PAGESINNS | PAGESINNAMESPACE = mw:Help:Magic words#PAGESINNAMESPACE | FULLPAGENAME = mw:Help:Magic words#Page names | PAGENAME = mw:Help:Magic words#Page names | BASEPAGENAME = mw:Help:Magic words#Page names | SUBPAGENAME = mw:Help:Magic words#Page names | SUBJECTPAGENAME = mw:Help:Magic words#Page names | ARTICLEPAGENAME = mw:Help:Magic words#Page names | TALKPAGENAME = mw:Help:Magic words#Page names | ROOTPAGENAME = mw:Help:Magic words#Page names | FULLPAGENAMEE = mw:Help:Magic words#Page names | PAGENAMEE = mw:Help:Magic words#Page names | BASEPAGENAMEE = mw:Help:Magic words#Page names | SUBPAGENAMEE = mw:Help:Magic words#Page names | SUBJECTPAGENAMEE = mw:Help:Magic words#Page names | ARTICLEPAGENAMEE = mw:Help:Magic words#Page names | TALKPAGENAMEE = mw:Help:Magic words#Page names | ROOTPAGENAMEE = mw:Help:Magic words#Page names | NAMESPACE = mw:Help:Magic words#Namespaces | NAMESPACENUMBER = mw:Help:Magic words#Namespaces | SUBJECTSPACE = mw:Help:Magic words#Namespaces | ARTICLESPACE = mw:Help:Magic words#Namespaces | TALKSPACE = mw:Help:Magic words#Namespaces | NAMESPACEE = mw:Help:Magic words#Namespaces | SUBJECTSPACEE = mw:Help:Magic words#Namespaces | TALKSPACEE = mw:Help:Magic words#Namespaces | PAGEID = mw:Help:Magic words#Technical metadata of another page | PAGESIZE = mw:Help:Magic words#Technical metadata of another page | PROTECTIONLEVEL = mw:Help:Magic words#Technical metadata of another page | CASCADINGSOURCES = mw:Help:Magic words#Technical metadata of another page | REVISIONID = mw:Help:Magic words#Technical metadata of another page | REVISIONDAY = mw:Help:Magic words#Technical metadata of another page | REVISIONDAY2 = mw:Help:Magic words#Technical metadata of another page | REVISIONMONTH = mw:Help:Magic words#Technical metadata of another page | REVISIONMONTH1 = mw:Help:Magic words#Technical metadata of another page | REVISIONYEAR = mw:Help:Magic words#Technical metadata of another page | REVISIONTIMESTAMP = mw:Help:Magic words#Technical metadata of another page | REVISIONUSER = mw:Help:Magic words#Technical metadata of another page | SHORTDESC = mw:Extension:Wikibase Client | USERLANGUAGE = mw:Help:Magic words#h-Localization_variables-Variables | #default = {{safesubst:<noinclude />#switch:{{safesubst:<noinclude />lc:{{{1}}}}} | localurl = mw:Help:Magic words#localurl | localurle = mw:Help:Magic words#URL data | fullurl = mw:Help:Magic words#fullurl | fullurle = mw:Help:Magic words#URL data | canonicalurl = mw:Help:Magic words#canonicalurl | canonicalurle = mw:Help:Magic words#URL data | filepath = mw:Help:Magic words#filepath | urlencode = mw:Help:Magic words#urlencode | urldecode = mw:Help:Magic words#URL data | anchorencode = mw:Help:Magic words#anchorencode | noexternallanglinks = mw:Help:Magic words#From Extensions | ns = mw:Help:Magic words#Namespaces | nse = mw:Help:Magic words#Namespaces | formatnum = mw:Help:Magic words#formatnum | #dateformat = mw:Help:Magic words#dateformat | #formatdate = mw:Help:Magic words#formatdate | lc = mw:Help:Magic words#lc | lcfirst = mw:Help:Magic words#lcfirst | uc = mw:Help:Magic words#uc | ucfirst = mw:Help:Magic words#ucfirst | padleft = mw:Help:Magic words#padleft | padright = mw:Help:Magic words#padright | plural = mw:Help:Magic words#PLURAL | grammar = mw:Help:Magic words#GRAMMAR | gender = mw:Help:Magic words#GENDER | int = mw:Help:Magic words#INT | noexternallanglinks = mw:Extension:Wikibase Client | wbreponame = mw:Extension:Wikibase Client | pendingchangelevel = mw:Extension:FlaggedRevs | numberofwikis = mw:Extension:SiteMatrix | #language = mw:Help:Magic words#.23language | #interwikilink = mw:Help:Magic words#interwikilink | #interlanguagelink = mw:Help:Magic words#interlanguagelink | #isbn = mw:Help:Magic words#isbn | #special = mw:Help:Magic words#.23special | #speciale = mw:Help:Magic words#.23speciale | #tag = mw:Help:Magic words#.23tag | #expr = mw:Help:Extension:ParserFunctions#.23expr | #if = mw:Help:Extension:ParserFunctions#.23if | #ifeq = mw:Help:Extension:ParserFunctions#.23ifeq | #iferror = mw:Help:Extension:ParserFunctions#.23iferror | #ifexpr = mw:Help:Extension:ParserFunctions#.23ifexpr | #ifexist = mw:Help:Extension:ParserFunctions#.23ifexist | #rel2abs = mw:Help:Extension:ParserFunctions#.23rel2abs | #switch = mw:Help:Extension:ParserFunctions#.23switch | #time = mw:Help:Extension:ParserFunctions#.23time | #timel = mw:Help:Extension:ParserFunctions#.23timel | #titleparts = mw:Help:Extension:ParserFunctions#.23titleparts | #babel = mw:Extension:Babel#Usage | #categorytree = mw:Extension:CategoryTree#The {{#categorytree}} parser function | #commaseparatedlist = mw:Wikibase/Installation/Advanced_configuration#commaseparatedlist | #coordinates = mw:Extension:GeoData#Parser function | #invoke = mw:Extension:Scribunto#Usage | #lst = mw:Extension:Labeled Section Transclusion#How it works | #lsth = mw:Extension:Labeled Section Transclusion#How it works | #lstx = mw:Extension:Labeled Section Transclusion#How it works | noexternallanglinks = mw:Extension:Wikibase Client | noreplace = mw:Extension:Wikibase Client | pendingchangelevel = mw:Extension:FlaggedRevs | #property = d:Wikidata:How to use data on Wikimedia projects | #statements = d:Wikidata:How to use data on Wikimedia projects | #target = mw:Extension:MassMessage | #default = mw:Help:Magic words#{{{1}}} }} }}|{{{1}}}]]{{safesubst:<noinclude />#ifeq:{{{2|a}}}|{{{2|b}}}|{{safesubst:<noinclude />Encodefirst|:}}}}{{safesubst:<noinclude/>#invoke:for nowiki|template|{{!}}|<nowiki>{{{1}}}</nowiki>|offset=1}}{{safesubst:<noinclude/>#invoke:For each named parameter|main||<nowiki>|{{{name}}}={{{value}}}</nowiki>}}&#125;&#125; }} |{{Error|Error: No magic word was provided.}} }}</includeonly><noinclude>{{Documentation}}</noinclude> s4s26b4vyxhl65h1btul2lnweqzs8j2 116923 116922 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Magic_word_link]] 116922 wikitext text/x-wiki <includeonly>{{safesubst:<noinclude />#if:{{{1|}}} |{{safesubst:<noinclude />#switch:{{{1}}} | __NOTOC__ = [[:mw:Help:Magic words#NOTOC|__NOTO<nowiki />C__]] | __FORCETOC__ = [[:mw:Help:Magic words#FORCETOC|__FORC<nowiki />ETOC__]] | __TOC__ = [[:mw:Help:Magic words#TOC|__T<nowiki />OC__]] | __NOEDITSECTION__ = [[:mw:Help:Magic words#NOEDITSECTION|__NOEDI<nowiki />TSEC<nowiki />TION__]] | __NEWSECTIONLINK__ = [[:mw:Help:Magic words#NEWSECTIONLINK|__NE<nowiki />WSECTI<nowiki />ONLI<nowiki />NK__]] | __NONEWSECTIONLINK__ = [[:mw:Help:Magic words#NONEWSECTIONLINK|__NONE<nowiki />WSECTI<nowiki />ONLI<nowiki />NK__]] | __NOGALLERY__ = [[:mw:Help:Magic words#NOGALLERY|__NOG<nowiki />ALLERY__]] | __HIDDENCAT__ = [[:mw:Help:Magic words#HIDDENCAT|__HID<nowiki />DENCAT__]] | __EXPECTUNUSEDCATEGORY__ = [[:mw:Help:Magic words#EXPECTUNUSEDCATEGORY|__EXPEC<nowiki />TUNUSE<nowiki />DCATEGORY__]] | __NOCONTENTCONVERT__ = [[:mw:Help:Magic words#NOCONTENTCONVERT|__NOC<nowiki />ONTENTC<nowiki />ONVERT__]] | __NOCC__ = [[:mw:Help:Magic words#NOCC|__NOC<nowiki />C__]] | __NOTITLECONVERT__ = [[:mw:Help:Magic words#NOTITLECONVERT|__NOTI<nowiki />TLECONVE<nowiki />RT__]] | __NOTC__ = [[:mw:Help:Magic words#NOTC|__NO<nowiki />TC__]] | __START__ = [[:mw:Help:Magic words#START|__STA<nowiki />RT__]] | __END__ = [[:mw:Help:Magic words#END|__E<nowiki />ND__]] | __INDEX__ = [[:mw:Help:Magic words#INDEX|__INDE<nowiki />X__]] | __NOINDEX__ = [[:mw:Help:Magic words#NOINDEX|__NOI<nowiki />NDEX__]] | __STATICREDIRECT__ = [[:mw:Help:Magic words#STATICREDIRECT|__STATICREDI<nowiki />RECT__]] | __EXPECTUNUSEDTEMPLATE__ = [[:mw:Help:Magic words#EXPECTUNUSEDTEMPLATE|__EXPECTU<nowiki />NUSEDTE<nowiki />MPLATE__]] | __NOGLOBAL__ = [[:mw:Help:Magic words#NOGLOBAL|__NOGL<nowiki />OBAL__]] | __DISAMBIG__ = [[:mw:Help:Magic words#DISAMBIG|__DISA<nowiki />MBIG__]] | __EXPECTED_UNCONNECTED_PAGE__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __ARCHIVEDTALK__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __NOTALK__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | __EXPECTWITHOUTSCANS__ = [[:mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE|__EXPEC<nowiki />TED_UNCO<nowiki />NNECTED_PA<nowiki />GE__]] | #REDIRECT = [[:mw:Help:Redirects#Creating a redirect|#REDI<nowiki />RECT]] | #default = &#123;&#123;[[:{{safesubst:<noinclude />#switch:{{{1}}} | CURRENTYEAR = mw:Help:Magic words#Date and time | CURRENTMONTH = mw:Help:Magic words#Date and time | CURRENTMONTH1 = mw:Help:Magic words#Date and time | CURRENTMONTH2 = mw:Help:Magic words#Date and time | CURRENTMONTHNAME = mw:Help:Magic words#Date and time | CURRENTMONTHNAMEGEN = mw:Help:Magic words#Date and time | CURRENTMONTHABBREV = mw:Help:Magic words#Date and time | CURRENTDAY = mw:Help:Magic words#Date and time | CURRENTDAY2 = mw:Help:Magic words#Date and time | CURRENTDOW = mw:Help:Magic words#Date and time | CURRENTDAYNAME = mw:Help:Magic words#Date and time | CURRENTTIME = mw:Help:Magic words#Date and time | CURRENTHOUR = mw:Help:Magic words#Date and time | CURRENTWEEK = mw:Help:Magic words#Date and time | CURRENTTIMESTAMP = mw:Help:Magic words#Date and time | LOCALYEAR = mw:Help:Magic words#Date and time | LOCALMONTH = mw:Help:Magic words#Date and time | LOCALMONTH1 = mw:Help:Magic words#Date and time | LOCALMONTH2 = mw:Help:Magic words#Date and time | LOCALMONTHNAME = mw:Help:Magic words#Date and time | LOCALMONTHNAMEGEN = mw:Help:Magic words#Date and time | LOCALMONTHABBREV = mw:Help:Magic words#Date and time | LOCALDAY = mw:Help:Magic words#Date and time | LOCALDAY2 = mw:Help:Magic words#Date and time | LOCALDOW = mw:Help:Magic words#Date and time | LOCALDAYNAME = mw:Help:Magic words#Date and time | LOCALTIME = mw:Help:Magic words#Date and time | LOCALHOUR = mw:Help:Magic words#Date and time | LOCALWEEK = mw:Help:Magic words#Date and time | LOCALTIMESTAMP = mw:Help:Magic words#Date and time | SITENAME = mw:Help:Magic words#Technical metadata | SERVER = mw:Help:Magic words#Technical metadata | SERVERNAME = mw:Help:Magic words#Technical metadata | DIRMARK = mw:Help:Magic words#Technical metadata | DIRECTIONMARK = mw:Help:Magic words#Technical metadata | ARTICLEPATH = mw:Help:Magic words#Technical metadata | SCRIPTPATH = mw:Help:Magic words#Technical metadata | STYLEPATH = mw:Help:Magic words#Technical metadata | CURRENTVERSION = mw:Help:Magic words#Technical metadata | CONTENTLANGUAGE = mw:Help:Magic words#Technical metadata | CONTENTLANG = mw:Help:Magic words#Technical metadata | PAGEID = mw:Help:Magic words#Technical metadata | CASCADINGSOURCES = mw:Help:Magic words#Technical metadata | REVISIONID = mw:Help:Magic words#Technical metadata | REVISIONDAY = mw:Help:Magic words#Technical metadata | REVISIONDAY2 = mw:Help:Magic words#Technical metadata | REVISIONMONTH = mw:Help:Magic words#Technical metadata | REVISIONMONTH1 = mw:Help:Magic words#Technical metadata | REVISIONYEAR = mw:Help:Magic words#Technical metadata | REVISIONTIMESTAMP = mw:Help:Magic words#Technical metadata | REVISIONUSER = mw:Help:Magic words#Technical metadata | REVISIONSIZE = mw:Help:Magic words#Technical metadata | NOEXTERNALLANGLINKS = mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE | NUMBEROFPAGES = mw:Help:Magic words#Technical metadata | NUMBEROFARTICLES = mw:Help:Magic words#Technical metadata | NUMBEROFFILES = mw:Help:Magic words#Technical metadata | NUMBEROFEDITS = mw:Help:Magic words#Technical metadata | NUMBEROFVIEWS = mw:Help:Magic words#Technical metadata | NUMBEROFUSERS = mw:Help:Magic words#Technical metadata | NUMBEROFADMINS = mw:Help:Magic words#Technical metadata | NUMBEROFACTIVEUSERS = mw:Help:Magic words#EXPECTED_UNCONNECTED_PAGE | FULLPAGENAME = mw:Help:Magic words#Page names | PAGENAME = mw:Help:Magic words#Page names | BASEPAGENAME = mw:Help:Magic words#Page names | SUBPAGENAME = mw:Help:Magic words#Page names | SUBJECTPAGENAME = mw:Help:Magic words#Page names | ARTICLEPAGENAME = mw:Help:Magic words#Page names | TALKPAGENAME = mw:Help:Magic words#Page names | ROOTPAGENAME = mw:Help:Magic words#Page names | FULLPAGENAMEE = mw:Help:Magic words#Page names | PAGENAMEE = mw:Help:Magic words#Page names | BASEPAGENAMEE = mw:Help:Magic words#Page names | SUBPAGENAMEE = mw:Help:Magic words#Page names | SUBJECTPAGENAMEE = mw:Help:Magic words#Page names | ARTICLEPAGENAMEE = mw:Help:Magic words#Page names | TALKPAGENAMEE = mw:Help:Magic words#Page names | ROOTPAGENAMEE = mw:Help:Magic words#Page names | NAMESPACE = mw:Help:Magic words#NAMESPACE | NAMESPACENUMBER = mw:Help:Magic words#NAMESPACENUMBER | SUBJECTSPACE = mw:Help:Magic words#SUBJECTSPACE | ARTICLESPACE = mw:Help:Magic words#Namespaces | TALKSPACE = mw:Help:Magic words#TALKSPACE | NAMESPACEE = mw:Help:Magic words#Namespaces | SUBJECTSPACEE = mw:Help:Magic words#Namespaces | TALKSPACEE = mw:Help:Magic words#Namespaces | ! = mw:Help:Magic words#Escaped characters | {{safesubst:<noinclude />=}} = mw:Help:Magic words#Escaped characters | PROTECTIONLEVEL = mw:Help:Magic words#Technical metadata | DISPLAYTITLE = mw:Help:Magic words#DISPLAYTITLE | DEFAULTSORT = mw:Help:Magic words#DEFAULTSORT | PAGESINCATEGORY = mw:Help:Magic words#PAGESINCATEGORY | PAGESINCAT = mw:Help:Magic words#PAGESINCAT | NUMBERINGROUP = mw:Help:Magic words#NUMBERINGROUP | PAGESINNS = mw:Help:Magic words#PAGESINNS | PAGESINNAMESPACE = mw:Help:Magic words#PAGESINNAMESPACE | FULLPAGENAME = mw:Help:Magic words#Page names | PAGENAME = mw:Help:Magic words#Page names | BASEPAGENAME = mw:Help:Magic words#Page names | SUBPAGENAME = mw:Help:Magic words#Page names | SUBJECTPAGENAME = mw:Help:Magic words#Page names | ARTICLEPAGENAME = mw:Help:Magic words#Page names | TALKPAGENAME = mw:Help:Magic words#Page names | ROOTPAGENAME = mw:Help:Magic words#Page names | FULLPAGENAMEE = mw:Help:Magic words#Page names | PAGENAMEE = mw:Help:Magic words#Page names | BASEPAGENAMEE = mw:Help:Magic words#Page names | SUBPAGENAMEE = mw:Help:Magic words#Page names | SUBJECTPAGENAMEE = mw:Help:Magic words#Page names | ARTICLEPAGENAMEE = mw:Help:Magic words#Page names | TALKPAGENAMEE = mw:Help:Magic words#Page names | ROOTPAGENAMEE = mw:Help:Magic words#Page names | NAMESPACE = mw:Help:Magic words#Namespaces | NAMESPACENUMBER = mw:Help:Magic words#Namespaces | SUBJECTSPACE = mw:Help:Magic words#Namespaces | ARTICLESPACE = mw:Help:Magic words#Namespaces | TALKSPACE = mw:Help:Magic words#Namespaces | NAMESPACEE = mw:Help:Magic words#Namespaces | SUBJECTSPACEE = mw:Help:Magic words#Namespaces | TALKSPACEE = mw:Help:Magic words#Namespaces | PAGEID = mw:Help:Magic words#Technical metadata of another page | PAGESIZE = mw:Help:Magic words#Technical metadata of another page | PROTECTIONLEVEL = mw:Help:Magic words#Technical metadata of another page | CASCADINGSOURCES = mw:Help:Magic words#Technical metadata of another page | REVISIONID = mw:Help:Magic words#Technical metadata of another page | REVISIONDAY = mw:Help:Magic words#Technical metadata of another page | REVISIONDAY2 = mw:Help:Magic words#Technical metadata of another page | REVISIONMONTH = mw:Help:Magic words#Technical metadata of another page | REVISIONMONTH1 = mw:Help:Magic words#Technical metadata of another page | REVISIONYEAR = mw:Help:Magic words#Technical metadata of another page | REVISIONTIMESTAMP = mw:Help:Magic words#Technical metadata of another page | REVISIONUSER = mw:Help:Magic words#Technical metadata of another page | SHORTDESC = mw:Extension:Wikibase Client | USERLANGUAGE = mw:Help:Magic words#h-Localization_variables-Variables | #default = {{safesubst:<noinclude />#switch:{{safesubst:<noinclude />lc:{{{1}}}}} | localurl = mw:Help:Magic words#localurl | localurle = mw:Help:Magic words#URL data | fullurl = mw:Help:Magic words#fullurl | fullurle = mw:Help:Magic words#URL data | canonicalurl = mw:Help:Magic words#canonicalurl | canonicalurle = mw:Help:Magic words#URL data | filepath = mw:Help:Magic words#filepath | urlencode = mw:Help:Magic words#urlencode | urldecode = mw:Help:Magic words#URL data | anchorencode = mw:Help:Magic words#anchorencode | noexternallanglinks = mw:Help:Magic words#From Extensions | ns = mw:Help:Magic words#Namespaces | nse = mw:Help:Magic words#Namespaces | formatnum = mw:Help:Magic words#formatnum | #dateformat = mw:Help:Magic words#dateformat | #formatdate = mw:Help:Magic words#formatdate | lc = mw:Help:Magic words#lc | lcfirst = mw:Help:Magic words#lcfirst | uc = mw:Help:Magic words#uc | ucfirst = mw:Help:Magic words#ucfirst | padleft = mw:Help:Magic words#padleft | padright = mw:Help:Magic words#padright | plural = mw:Help:Magic words#PLURAL | grammar = mw:Help:Magic words#GRAMMAR | gender = mw:Help:Magic words#GENDER | int = mw:Help:Magic words#INT | noexternallanglinks = mw:Extension:Wikibase Client | wbreponame = mw:Extension:Wikibase Client | pendingchangelevel = mw:Extension:FlaggedRevs | numberofwikis = mw:Extension:SiteMatrix | #language = mw:Help:Magic words#.23language | #interwikilink = mw:Help:Magic words#interwikilink | #interlanguagelink = mw:Help:Magic words#interlanguagelink | #isbn = mw:Help:Magic words#isbn | #special = mw:Help:Magic words#.23special | #speciale = mw:Help:Magic words#.23speciale | #tag = mw:Help:Magic words#.23tag | #expr = mw:Help:Extension:ParserFunctions#.23expr | #if = mw:Help:Extension:ParserFunctions#.23if | #ifeq = mw:Help:Extension:ParserFunctions#.23ifeq | #iferror = mw:Help:Extension:ParserFunctions#.23iferror | #ifexpr = mw:Help:Extension:ParserFunctions#.23ifexpr | #ifexist = mw:Help:Extension:ParserFunctions#.23ifexist | #rel2abs = mw:Help:Extension:ParserFunctions#.23rel2abs | #switch = mw:Help:Extension:ParserFunctions#.23switch | #time = mw:Help:Extension:ParserFunctions#.23time | #timel = mw:Help:Extension:ParserFunctions#.23timel | #titleparts = mw:Help:Extension:ParserFunctions#.23titleparts | #babel = mw:Extension:Babel#Usage | #categorytree = mw:Extension:CategoryTree#The {{#categorytree}} parser function | #commaseparatedlist = mw:Wikibase/Installation/Advanced_configuration#commaseparatedlist | #coordinates = mw:Extension:GeoData#Parser function | #invoke = mw:Extension:Scribunto#Usage | #lst = mw:Extension:Labeled Section Transclusion#How it works | #lsth = mw:Extension:Labeled Section Transclusion#How it works | #lstx = mw:Extension:Labeled Section Transclusion#How it works | noexternallanglinks = mw:Extension:Wikibase Client | noreplace = mw:Extension:Wikibase Client | pendingchangelevel = mw:Extension:FlaggedRevs | #property = d:Wikidata:How to use data on Wikimedia projects | #statements = d:Wikidata:How to use data on Wikimedia projects | #target = mw:Extension:MassMessage | #default = mw:Help:Magic words#{{{1}}} }} }}|{{{1}}}]]{{safesubst:<noinclude />#ifeq:{{{2|a}}}|{{{2|b}}}|{{safesubst:<noinclude />Encodefirst|:}}}}{{safesubst:<noinclude/>#invoke:for nowiki|template|{{!}}|<nowiki>{{{1}}}</nowiki>|offset=1}}{{safesubst:<noinclude/>#invoke:For each named parameter|main||<nowiki>|{{{name}}}={{{value}}}</nowiki>}}&#125;&#125; }} |{{Error|Error: No magic word was provided.}} }}</includeonly><noinclude>{{Documentation}}</noinclude> s4s26b4vyxhl65h1btul2lnweqzs8j2 Template:Sister project/styles.css 10 47795 116924 2025-09-15T17:59:09Z en>Matrix 0 use the actual filter used on wiktionary 116924 sanitized-css text/css /* {{pp-template|small=yes}} */ @media print { body.ns-0 .sistersitebox { display: none !important; } } /* The Wiktionary logo needs a white background in dark mode since it is a transparent SVG */ @media screen { html.skin-theme-clientpref-night .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"] { filter: invert(1) brightness(55%) contrast(250%) hue-rotate(180deg); } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"] { filter: invert(1) brightness(55%) contrast(250%) hue-rotate(180deg); } } j2bzk4iq0mnyye6bjy8xhsg0eb7v9r1 116925 116924 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Sister_project/styles.css]] 116924 sanitized-css text/css /* {{pp-template|small=yes}} */ @media print { body.ns-0 .sistersitebox { display: none !important; } } /* The Wiktionary logo needs a white background in dark mode since it is a transparent SVG */ @media screen { html.skin-theme-clientpref-night .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"] { filter: invert(1) brightness(55%) contrast(250%) hue-rotate(180deg); } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"] { filter: invert(1) brightness(55%) contrast(250%) hue-rotate(180deg); } } j2bzk4iq0mnyye6bjy8xhsg0eb7v9r1 Template:Collapse top/styles.css 10 47796 116926 2024-11-09T18:23:41Z en>Pppery 0 /* {{pp-template}} */ 116926 sanitized-css text/css /* {{pp-template}} */ .cot-header-mainspace { background:#F0F2F5; color:inherit; } .cot-header-other { background:#CCFFCC; color:inherit; } @media screen { html.skin-theme-clientpref-night .cot-header-mainspace { background:#14181F; color:inherit; } html.skin-theme-clientpref-night .cot-header-other { background:#003500; color:inherit; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cot-header-mainspace { background:#14181F; color:inherit; } html.skin-theme-clientpref-os .cot-header-other { background:#003500; color:inherit; } } 3dmy4gvp7pqjgd52ssrwtrpf96lg1jj 116927 116926 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Collapse_top/styles.css]] 116926 sanitized-css text/css /* {{pp-template}} */ .cot-header-mainspace { background:#F0F2F5; color:inherit; } .cot-header-other { background:#CCFFCC; color:inherit; } @media screen { html.skin-theme-clientpref-night .cot-header-mainspace { background:#14181F; color:inherit; } html.skin-theme-clientpref-night .cot-header-other { background:#003500; color:inherit; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cot-header-mainspace { background:#14181F; color:inherit; } html.skin-theme-clientpref-os .cot-header-other { background:#003500; color:inherit; } } 3dmy4gvp7pqjgd52ssrwtrpf96lg1jj Template:Editnotice EXPECTUNUSEDTEMPLATE 10 47797 116928 2026-01-08T04:44:45Z en>HouseBlaster 0 protection padlock provided by [[TM:documentation]] 116928 wikitext text/x-wiki {{#ifeq:Template:Editnotices|{{FULLROOTPAGENAME}}|__EXPECTUNUSEDTEMPLATE__}}<noinclude>{{documentation}}</noinclude> 1zwqf3zeqxnh21v7kbtjaygvxm2lqko 116929 116928 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Editnotice_EXPECTUNUSEDTEMPLATE]] 116928 wikitext text/x-wiki {{#ifeq:Template:Editnotices|{{FULLROOTPAGENAME}}|__EXPECTUNUSEDTEMPLATE__}}<noinclude>{{documentation}}</noinclude> 1zwqf3zeqxnh21v7kbtjaygvxm2lqko Template:Wikidata check 10 47798 116930 2026-01-23T13:04:39Z en>MSGJ 0 MSGJ moved page [[Template:WikidataCheck]] to [[Template:Wikidata check]]: separate words 116930 wikitext text/x-wiki <includeonly>{{#invoke:WikidataCheck|wikidatacheck|property={{{property|}}}|value={{{value|}}}|category={{{category|}}}|namespaces={{{namespaces|0}}}|nocatsame={{{nocatsame|}}}|ignorecase={{{ignorecase|}}}|qid={{{qid|}}}|onlysourced={{{onlysourced|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude> lonkaxqbg229jfakz6ngquub3lnwstv 116931 116930 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Wikidata_check]] 116930 wikitext text/x-wiki <includeonly>{{#invoke:WikidataCheck|wikidatacheck|property={{{property|}}}|value={{{value|}}}|category={{{category|}}}|namespaces={{{namespaces|0}}}|nocatsame={{{nocatsame|}}}|ignorecase={{{ignorecase|}}}|qid={{{qid|}}}|onlysourced={{{onlysourced|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude> lonkaxqbg229jfakz6ngquub3lnwstv Module:Sister project logo 828 47799 116932 2026-05-11T10:07:57Z en>MSGJ 0 Changed protection settings for "[[Module:Sister project logo]]": used on [[Template:Wikipedia's sister projects]] which is fully protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 116932 Scribunto text/plain require('strict') local p = {} -- Lazy-load logo file names and other metadata local data = mw.loadData('Module:Sister project logo/data') -- Convert table of arguments into wiki image markup local function imageMarkup(args) local x = {} -- positional arguments first for _, arg in ipairs(args) do table.insert(x,arg) end -- named arguments converted to foo=bar for k, v in pairs(args) do if not tonumber(k) then table.insert(x,k..'='..v) end end return '[['..table.concat(x,'|')..']]' end function p._main(args) local localArgs = {} -- map possibly verbose project argument into canonical project string local project = args.project and args.project:lower() project = data.projectMap[project] or project -- image=none means bail (for [[Template:Sister project]]) if args.image == 'none' then return '' -- if image specified, return it instead of stored logo (for [[Template:Sister project]]) elseif args.image then return args.image else local logoImage = data.logo[project] -- if project is unknown, use Wikimedia logo (for [[Template:Sister project]]) if not logoImage then project = 'wm' logoImage = data.logo['wm'] end table.insert(localArgs,'File:'..logoImage) end -- size=large means use sizes from [[Template:Wikipedia's sister projects]] -- size defaults to 40x40px (for [[Template:Sister project]]) table.insert(localArgs,args.size == 'large' and (data.largeSize[project] or '35px') or args.size or '40x40px') -- if logo is PD, blank link and alt (to suppress from screen readers) if data.PDicon[project] then localArgs.link = '' localArgs.alt = '' else localArgs.alt = data.logoAlt[project] end -- For dark mode, flip dark-on-light icons to be light-on-dark -- Also: use editor-specified classes (for [[Template:Sister-inline]]) localArgs.class = "noviewer"..(data.darkOnLight[project] and " skin-invert-image" or "") ..(args.class and " "..args.class or "") return imageMarkup(localArgs) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) return p._main(args) or '' end return p 0pipv4aule2ozdl2ed4e2r0imenbloz 116933 116932 2026-07-16T10:58:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Sister_project_logo]] 116932 Scribunto text/plain require('strict') local p = {} -- Lazy-load logo file names and other metadata local data = mw.loadData('Module:Sister project logo/data') -- Convert table of arguments into wiki image markup local function imageMarkup(args) local x = {} -- positional arguments first for _, arg in ipairs(args) do table.insert(x,arg) end -- named arguments converted to foo=bar for k, v in pairs(args) do if not tonumber(k) then table.insert(x,k..'='..v) end end return '[['..table.concat(x,'|')..']]' end function p._main(args) local localArgs = {} -- map possibly verbose project argument into canonical project string local project = args.project and args.project:lower() project = data.projectMap[project] or project -- image=none means bail (for [[Template:Sister project]]) if args.image == 'none' then return '' -- if image specified, return it instead of stored logo (for [[Template:Sister project]]) elseif args.image then return args.image else local logoImage = data.logo[project] -- if project is unknown, use Wikimedia logo (for [[Template:Sister project]]) if not logoImage then project = 'wm' logoImage = data.logo['wm'] end table.insert(localArgs,'File:'..logoImage) end -- size=large means use sizes from [[Template:Wikipedia's sister projects]] -- size defaults to 40x40px (for [[Template:Sister project]]) table.insert(localArgs,args.size == 'large' and (data.largeSize[project] or '35px') or args.size or '40x40px') -- if logo is PD, blank link and alt (to suppress from screen readers) if data.PDicon[project] then localArgs.link = '' localArgs.alt = '' else localArgs.alt = data.logoAlt[project] end -- For dark mode, flip dark-on-light icons to be light-on-dark -- Also: use editor-specified classes (for [[Template:Sister-inline]]) localArgs.class = "noviewer"..(data.darkOnLight[project] and " skin-invert-image" or "") ..(args.class and " "..args.class or "") return imageMarkup(localArgs) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) return p._main(args) or '' end return p 0pipv4aule2ozdl2ed4e2r0imenbloz Module:Sister project logo/data 828 47800 116934 2026-05-11T10:08:21Z en>MSGJ 0 Changed protection settings for "[[Module:Sister project logo/data]]": used on [[Template:Wikipedia's sister projects]] which is fully protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 116934 Scribunto text/plain -- map of verbose project names to canonical ones local projectMap = { commons = 'c', commonscat = 'c', ["wikimedia commons"] = 'c', meta = 'm', metawiki = 'm', ["meta-wiki"] = 'm', wikibooks = 'b', wbk = 'b', wb = 'b', cookbook = 'b', wikijunior = 'b', wikidata = 'd', data = 'd', wikiquote = 'q', quote = 'q', wqt = 'q', wikipedia = 'iw', wp = 'iw', w = 'iw', iw1 = 'iw', iw2 = 'iw', wikisource = 's', source = 's', ws = 's', wikisource2 = 's', source2 = 's', ws2 = 's', s2 = 's', wiktionary = 'wikt', wkt = 'wikt', wdy = 'wikt', wikinews = 'n', news = 'n', wnw = 'n', wikispecies = 'species', wikiversity='v', wvy='v', wikivoyage = 'voy', voyage = 'voy', mediawiki = 'mw', outreachwiki = 'outreach', wikifunctions = 'f' } -- logos per project local logo = { c = "Commons-logo.svg", m = 'Wikimedia Community Logo.svg', b = 'Wikibooks-logo.svg', d = 'Wikidata-logo.svg', q = 'Wikiquote-logo.svg', iw = 'Wikipedia-logo-v2.svg', s = 'Wikisource-logo.svg', wikt = 'Wiktionary-logo-en-v2.svg', n = 'Wikinews-logo.svg', species = 'Wikispecies-logo.svg', v = 'Wikiversity logo 2017.svg', voy = 'Wikivoyage-Logo-v3-icon.svg', mw = 'MediaWiki-2020-icon.svg', outreach = 'Wikimedia Outreach.png', incubator = 'Incubator-notext.svg', f = 'Wikifunctions-logo.svg', wm = 'Wikimedia-logo.svg' } -- which logos are PD and don't need link/alt local PDicon = { m=true,q=true,d=true,outreach=true,wm=true } -- which logos are dark and light and should flip in dark mode local darkOnLight = {wikt=true} -- descriptive alt local logoAlt = { c = 'Wikimedia Commons logo', m = 'Meta-Wiki logo', b = 'Wikibooks logo', d = 'Wikidata logo', q = 'Wikiquote logo', iw = 'Wikipedia logo', s = 'Wikisource logo', wikt = 'Wiktionary logo', n = 'Wikinews logo', species = 'Wikispecies logo', v = 'Wikiversity logo', voy = 'Wikivoyage logo', mw = 'MediaWiki logo', outreach = 'Wikimedia Outreach logo', incubator = 'Wikimedia Incubator logo', f = 'Wikifunctions logo', wm = 'Wikimedia logo' } -- size for [[Template:Wikipedia's sister projects]], defaults to 35px local largeSize = { c = '31px', d = '47px', n = '51px', v = '41px' } return {projectMap=projectMap, logo=logo, PDicon=PDicon, darkOnLight=darkOnLight, logoAlt=logoAlt, largeSize=largeSize} dil9atzat8xhmn759cjoa7g4nzleawp 116935 116934 2026-07-16T10:58:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Sister_project_logo/data]] 116934 Scribunto text/plain -- map of verbose project names to canonical ones local projectMap = { commons = 'c', commonscat = 'c', ["wikimedia commons"] = 'c', meta = 'm', metawiki = 'm', ["meta-wiki"] = 'm', wikibooks = 'b', wbk = 'b', wb = 'b', cookbook = 'b', wikijunior = 'b', wikidata = 'd', data = 'd', wikiquote = 'q', quote = 'q', wqt = 'q', wikipedia = 'iw', wp = 'iw', w = 'iw', iw1 = 'iw', iw2 = 'iw', wikisource = 's', source = 's', ws = 's', wikisource2 = 's', source2 = 's', ws2 = 's', s2 = 's', wiktionary = 'wikt', wkt = 'wikt', wdy = 'wikt', wikinews = 'n', news = 'n', wnw = 'n', wikispecies = 'species', wikiversity='v', wvy='v', wikivoyage = 'voy', voyage = 'voy', mediawiki = 'mw', outreachwiki = 'outreach', wikifunctions = 'f' } -- logos per project local logo = { c = "Commons-logo.svg", m = 'Wikimedia Community Logo.svg', b = 'Wikibooks-logo.svg', d = 'Wikidata-logo.svg', q = 'Wikiquote-logo.svg', iw = 'Wikipedia-logo-v2.svg', s = 'Wikisource-logo.svg', wikt = 'Wiktionary-logo-en-v2.svg', n = 'Wikinews-logo.svg', species = 'Wikispecies-logo.svg', v = 'Wikiversity logo 2017.svg', voy = 'Wikivoyage-Logo-v3-icon.svg', mw = 'MediaWiki-2020-icon.svg', outreach = 'Wikimedia Outreach.png', incubator = 'Incubator-notext.svg', f = 'Wikifunctions-logo.svg', wm = 'Wikimedia-logo.svg' } -- which logos are PD and don't need link/alt local PDicon = { m=true,q=true,d=true,outreach=true,wm=true } -- which logos are dark and light and should flip in dark mode local darkOnLight = {wikt=true} -- descriptive alt local logoAlt = { c = 'Wikimedia Commons logo', m = 'Meta-Wiki logo', b = 'Wikibooks logo', d = 'Wikidata logo', q = 'Wikiquote logo', iw = 'Wikipedia logo', s = 'Wikisource logo', wikt = 'Wiktionary logo', n = 'Wikinews logo', species = 'Wikispecies logo', v = 'Wikiversity logo', voy = 'Wikivoyage logo', mw = 'MediaWiki logo', outreach = 'Wikimedia Outreach logo', incubator = 'Wikimedia Incubator logo', f = 'Wikifunctions logo', wm = 'Wikimedia logo' } -- size for [[Template:Wikipedia's sister projects]], defaults to 35px local largeSize = { c = '31px', d = '47px', n = '51px', v = '41px' } return {projectMap=projectMap, logo=logo, PDicon=PDicon, darkOnLight=darkOnLight, logoAlt=logoAlt, largeSize=largeSize} dil9atzat8xhmn759cjoa7g4nzleawp Module:For each named parameter 828 47801 116936 2026-07-03T18:00:02Z en>MusikBot II 0 Protected "[[Module:For each named parameter]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 333 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) 116936 Scribunto text/plain local p = {} function p.main(frame) local code = mw.text.unstripNoWiki(frame.args.code or frame.args[2]) local results = {} local sep = frame.args[1] or '' for key, value in pairs(frame:getParent().args) do if type(key) ~= 'number' then local actualCode = code:gsub("{{{([^{}|]*)|?[^{}]*}}}", {name = key, value = value}) local result = frame:getParent():preprocess(actualCode) if #result > 0 then table.insert(results, result) end end end return table.concat(results, sep) end return p cjotl69d1nz94eohg5yh3p8llnqfbo2 116937 116936 2026-07-16T10:58:49Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:For_each_named_parameter]] 116936 Scribunto text/plain local p = {} function p.main(frame) local code = mw.text.unstripNoWiki(frame.args.code or frame.args[2]) local results = {} local sep = frame.args[1] or '' for key, value in pairs(frame:getParent().args) do if type(key) ~= 'number' then local actualCode = code:gsub("{{{([^{}|]*)|?[^{}]*}}}", {name = key, value = value}) local result = frame:getParent():preprocess(actualCode) if #result > 0 then table.insert(results, result) end end end return table.concat(results, sep) end return p cjotl69d1nz94eohg5yh3p8llnqfbo2 Template:Find 10 47802 116938 2021-11-09T08:46:44Z en>Mathglot 0 Retarget. 116938 wikitext text/x-wiki #REDIRECT [[Template:Find general sources]] rxpazi7kiylyf14cgmkxjd81hu95hae 116939 116938 2026-07-16T11:00:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Find]] 116938 wikitext text/x-wiki #REDIRECT [[Template:Find general sources]] rxpazi7kiylyf14cgmkxjd81hu95hae Template:Imdb title 10 47803 116940 2023-06-01T22:08:39Z en>MSGJ 0 +rcats 116940 wikitext text/x-wiki #REDIRECT [[Template:IMDb title]] {{Redirect category shell| {{R from move}} {{R from modification}} }} b726tpsuiqqck8p2zcj969snhn8qzup 116941 116940 2026-07-16T11:00:20Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Imdb_title]] 116940 wikitext text/x-wiki #REDIRECT [[Template:IMDb title]] {{Redirect category shell| {{R from move}} {{R from modification}} }} b726tpsuiqqck8p2zcj969snhn8qzup Template:R protected/full 10 47804 116946 2025-01-04T21:08:20Z en>Primefac 0 updates 116946 wikitext text/x-wiki {{pp|small=yes|category=no}}{{Redirect template |id=R fully protected |name=[[:Category:Wikipedia fully protected redirects|Fully protected]] |from=a title that is fully protected from editing for any of several possible reasons. It may have been protected by an administrator, or it may be on the [[Wikipedia:Cascade-protected items/content|Cascade-protected list]], or both |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. |all category=<!--for automatic namespace detection--> }}{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R protected/full||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor=[[Category:Wikipedia template-protected redirects]] |extendedconfirmed=[[Category:Wikipedia extended-protected redirects]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor|extendedconfirmed|autoconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{documentation}} </noinclude> 0zxwq8srrnzfbea7sklde4spqb7x3i2 116947 116946 2026-07-16T11:00:21Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_protected/full]] 116946 wikitext text/x-wiki {{pp|small=yes|category=no}}{{Redirect template |id=R fully protected |name=[[:Category:Wikipedia fully protected redirects|Fully protected]] |from=a title that is fully protected from editing for any of several possible reasons. It may have been protected by an administrator, or it may be on the [[Wikipedia:Cascade-protected items/content|Cascade-protected list]], or both |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. |all category=<!--for automatic namespace detection--> }}{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R protected/full||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor=[[Category:Wikipedia template-protected redirects]] |extendedconfirmed=[[Category:Wikipedia extended-protected redirects]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |sysop=[[Category:Wikipedia fully protected redirects]] |templateeditor|extendedconfirmed|autoconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{documentation}} </noinclude> 0zxwq8srrnzfbea7sklde4spqb7x3i2 Template:Imdb 10 47805 116948 2018-10-17T23:39:38Z en>Paine Ellsworth 0 add [[WP:RCAT|rcat]]s 116948 wikitext text/x-wiki #REDIRECT [[Template:IMDb]] {{Rcat shell| {{R from modification}} {{R from template shortcut}} }} kp3a2at8d1e4bkhc72a36rpcv1k6wf4 116949 116948 2026-07-16T11:00:26Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Imdb]] 116948 wikitext text/x-wiki #REDIRECT [[Template:IMDb]] {{Rcat shell| {{R from modification}} {{R from template shortcut}} }} kp3a2at8d1e4bkhc72a36rpcv1k6wf4 Template:R protected/template 10 47806 116950 2026-01-10T23:38:19Z en>Andrybak 0 wrap categorization in <includeonly></includeonly> to remove this page from [[:Category:Wikipedia pages with incorrect protection templates]] 116950 wikitext text/x-wiki {{Redirect template |id=R template-protected |name=[[:Category:Wikipedia template-protected redirects|Template-protected]] |from=a page that is template-protected from editing for any of several possible reasons. Only administrators and template editors may edit this page |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. |template category=<!--for automatic namespace detection--> }}<includeonly>{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R template-protected||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop=[[Category:Wikipedia move-protected pages]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop|autoconfirmed|extendedconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}</includeonly><noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{documentation}} </noinclude> jn1kvzk5qpnk0dh8vbq74u19oomhxvv 116951 116950 2026-07-16T11:00:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:R_protected/template]] 116950 wikitext text/x-wiki {{Redirect template |id=R template-protected |name=[[:Category:Wikipedia template-protected redirects|Template-protected]] |from=a page that is template-protected from editing for any of several possible reasons. Only administrators and template editors may edit this page |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. |template category=<!--for automatic namespace detection--> }}<includeonly>{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R template-protected||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop=[[Category:Wikipedia move-protected pages]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop|autoconfirmed|extendedconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}</includeonly><noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{documentation}} </noinclude> jn1kvzk5qpnk0dh8vbq74u19oomhxvv Maryanne Trump Barry 0 47807 116952 2026-07-16T11:08:44Z Tumbuka Arch 6863 Created page with "{{Short description|Weruzgi wa ku America (1937–2023)}} {{redirect2|Maryanne Trump|Maryanne Barry|ŵanthu ŵanyake awo ŵali na mazina ghakuyana|Mary Trump (disambiguation){{!}}Mary Trump|and|Marion Barry (disambiguation)}} {{Use American English|date=January 2026}} {{Use mdy dates|date=November 2023}} {{Infobox officeholder | name = Maryanne Trump Barry | image = Maryanne Trump Barry.png | caption = Barry mu 2006 | office = [[Weruzgi Mukuru]] wa Khoti la United Sta..." 116952 wikitext text/x-wiki {{Short description|Weruzgi wa ku America (1937–2023)}} {{redirect2|Maryanne Trump|Maryanne Barry|ŵanthu ŵanyake awo ŵali na mazina ghakuyana|Mary Trump (disambiguation){{!}}Mary Trump|and|Marion Barry (disambiguation)}} {{Use American English|date=January 2026}} {{Use mdy dates|date=November 2023}} {{Infobox officeholder | name = Maryanne Trump Barry | image = Maryanne Trump Barry.png | caption = Barry mu 2006 | office = [[Weruzgi Mukuru]] wa [[Khoti la United States la Apilo la Dera Lachitatu]] | term_start = June 30, 2011 | term_end = February 11, 2019 | office1 = Weruzgi wa [[Khoti la United States la Apilo la Dera Lachitatu]] | term_start1 = September 22, 1999 | term_end1 = June 30, 2011 | appointer1 = [[Mndandanda wa ŵeruzgi ŵa boma ŵa United States ŵakusankhika na Bill Clinton|Bill Clinton]] | predecessor1 = [[H. Lee Sarokin]] | successor1 = [[Patty Shwartz]] | office2 = Weruzgi wa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] | term_start2 = October 7, 1983 | term_end2 = October 25, 1999 | appointer2 = [[Mndandanda wa ŵeruzgi ŵa boma ŵa United States ŵakusankhika na Ronald Reagan|Ronald Reagan]] | predecessor2 = [[Henry Curtis Meanor]] | successor2 = [[Joel A. Pisano]] | birth_name = Maryanne Trump | birth_date = {{Birth date|1937|4|5}} | birth_place = New York City, U.S. | death_date = {{nowrap|{{Death date and age|2023|11|13|1937|4|5}}}} | death_place = New York City, U.S. | party = [[Chipani cha Republican (United States)|Republican]] | spouse = {{plainlist| * {{marriage|David Desmond|1960|1980|end=divorced}} * {{marriage|[[John J. Barry]]|1982|2000|end=died}} }} | children = 1 | parents = {{ubl|[[Fred Trump]]|[[Mary Anne MacLeod Trump]]}} | relatives = [[Banja la Trump]] | education = {{plainlist| * [[Mount Holyoke College]] ([[Bachelor of Arts|BA]]) * [[Columbia University]] ([[Master of Arts|MA]]) * [[Sukulu ya Malango ya Maurice A. Deane|Yunivesite ya Hofstra]] ([[Juris Doctor|JD]]) }} | signature = Maryanne Trump Barry signature.svg }} '''Maryanne Trump Barry''' (Epulero 5, 1937 – Novembala 13, 2023) wakaŵa loya wa ku America kweniso [[weruzgi wa boma la United States]]. Wakazgoka [[msambizgi wa malango wa United States]] mu 1974 ndipo wakasankhika kakwamba ku [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] na Pulezidenti [[Ronald Reagan]] mu 1983. Mu 1999, wakasankhika ku [[Khoti la United States la Apilo la Dera Lachitatu]] na [[Bill Clinton]]. Mu Janyuwale 2006, Barry wakapeleka ukaboni panthazi pa [[Komiti ya Uweruzgi ya Senate ya United States]] pakovwira [[kusankhika kwa Samuel Alito ku Khoti Likuru la United States|kusankhika]] kwa munyake wa ntchito yake [[Samuel Alito]] ku [[Khoti Likuru la United States]]. Wakanjira pa [[udindo wa weruzgi mukuru]] mu Juni 2011, ndipo wakapharazga kuti wafumengepo pa udindo wa weruzgi mu Febuluwale 2019 pamanyuma pakuti pakaŵa kufufuza pa milandu yakuti wakachitako [[uheni wa uweruzgi]] mwa kunjilirapo mu vyachinyengo vya misonkho na ndalama. Barry wakaŵa mudumbu mukuru wa pulezidenti wa nambara 45 na 47 wa [[United States]], [[Donald Trump]]. ==Umoyo wakwambilira na masambiro== Barry wakababikira ku New York City mu chigaŵa cha [[Queens]] pa Epulero 5, 1937, nga ni mwana wakwamba wa wakuzenga nyumba [[Fred Trump]] na muwoli wake [[Mary Anne MacLeod Trump]].{{r|Horowitz (2015)}} Wakaŵa mudumbu mukuru wa [[Donald Trump]].{{r|Johnson (2015)|Candlish (2015)}} Wakasambira ku [[Kew-Forest School]].<ref name="Blair_2000">{{cite book |pages=[https://archive.org/details/trumps00gwen/page/592 592] |publisher=[[Simon & Schuster]] |location=New York City|year= 2001 |orig-year=2000 |isbn=978-0743210799 |title=The Trumps: Three Generations of Builders and a President |first=Gwenda |last=Blair |url=https://archive.org/details/trumps00gwen/page/592}}</ref>{{rp|243}} Wakamalizga masambiro ghake ku [[Mount Holyoke College]] mu 1958 na digiri ya [[Bachelor of Arts|BA]] na ntchindi ya ''[[Latin honors#United States|cum laude]]'',{{r|FJC|Margolick (1992)}}<ref name="Blair_2000"/>{{rp|244}} ndipo wakasanga digiri ya [[Master of Arts|MA]] mu [[sayansi ya ndyali|malango gha boma na boma]] ku [[Columbia University]] mu 1962.{{r|FJC|Maryanne Desmond (1982)}} Pamanyuma pake wakasambira malango, ndipo wakapokera digiri ya [[Juris Doctor|JD]] ku [[Sukulu ya Malango ya Yunivesite ya Hofstra]] mu 1974.{{r|FJC}} ==Ntchito== ===Ofesi ya Loya wa United States=== Pamanyuma pakukhala wakusungilira nyumba kwa vyaka 13, Barry wakaŵa [[Loya wakovwira wa United States]] mu 1974, yumoza mwa ŵanakazi ŵaŵiri pera pa maloya 62 mu ofesi ya [[Loya wa United States wa Chigaŵa cha New Jersey]].<ref name="auto1">{{Cite news |last=Kranish |first=Michael |date=August 22, 2020 |title=In secretly recorded audio, President Trump's sister says he has 'no principles' and 'you can't trust him' |newspaper=The Washington Post |url=https://www.washingtonpost.com/politics/maryanne-trump-barry-secret-recordings/2020/08/22/30d457f4-e334-11ea-ade1-28daf1a5e919_story.html |access-date=August 23, 2023 |archive-date=August 28, 2020 |archive-url=https://web.archive.org/web/20200828051318/https://www.washingtonpost.com/politics/maryanne-trump-barry-secret-recordings/2020/08/22/30d457f4-e334-11ea-ade1-28daf1a5e919_story.html |url-status=live }}</ref> Wakagwira ntchito mu chigaŵa cha milandu ya boma kufuma mu 1974 m'paka 1975 ndipo mu chigaŵa cha madandawuro kufuma mu 1976 m'paka 1982, wakateŵetera nga ni muteŵeti mukuru wakovwira wa chigaŵa ichi kufuma mu 1976 m'paka 1977 ndipo mukuru wa chigaŵa kufuma mu 1977 m'paka 1982. Wakateŵeteraso nga ni Executive Assistant United States Attorney kufuma mu 1981 m'paka 1982. Wakaŵaso First Assistant United States Attorney kufuma mu 1981 m'paka 1983.{{r|FJC}} ===Ntchito yake nga ni mulaŵiliri wa khoti la boma=== ====Ntchito pa Khoti la Chigaŵa la United States==== Pa Seputembala 14, 1983, Barry wakimikika na Pulezidenti [[Ronald Reagan]] ku mpando pa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] uwo ukasiyika na [[Henry Curtis Meanor]].{{r|Horowitz (2015)}} Wakazomerezgeka na [[Seneti ya United States]] pa Okutobala 6, 1983, ndipo wakapokera udindo wake zuŵa lakulondezgapo.<ref>{{Cite web |date=6 October 1983 |title=Congressional Record - Senate |url=https://www.govinfo.gov/content/pkg/GPO-CRECB-1983-pt20/pdf/GPO-CRECB-1983-pt20-2-1.pdf |work=Congressional Record for United States Senate |pages=27604 |via=govinfo.gov |quote= |access-date=November 17, 2023 |archive-date=November 17, 2023 |archive-url=https://web.archive.org/web/20231117054329/https://www.govinfo.gov/content/pkg/GPO-CRECB-1983-pt20/pdf/GPO-CRECB-1983-pt20-2-1.pdf |url-status=live }}</ref> Kuyana na mdumbu wake [[Mary L. Trump]], Donald Trump wakapangiska loya wake [[Roy Cohn]] kuti wawovwire Barry kupokera udindo uwu, icho Donald wakalutilira kumukumbuska Barry, ndipo Barry wakayowoya kuti wakeneranga udindo uwu chifukwa cha ntchito yake.<ref>{{Cite book |last1=Baker |first1=Peter |url=https://books.google.com/books?id=x-VVEAAAQBAJ |title=The Divider: Trump in the White House, 2017–2021 |last2=Glasser |first2=Susan |publisher=[[Knopf Doubleday]] |year=2022 |isbn=978-0-385-54654-6 |pages=90 |language=en |access-date=August 23, 2023 |archive-date=August 11, 2023 |archive-url=https://web.archive.org/web/20230811002622/https://books.google.com/books?id=x-VVEAAAQBAJ |url-status=live }}</ref> Mu 1985, wakajifumiskako pa mulandu wa kuguliska munkhwala wakuzgoŵeska chifukwa cha ubwezi wa mubali wake Donald na munthu uyo wakasangikanga na mulandu uwu.<ref>{{cite web|url=https://medium.com/politicalhaze/in-the-80s-trumps-business-partner-was-a-mob-and-drug-king-pin-62de82dfc6e4|title=In the 80s, Trump's Business Partner was a Mob and Drug King Pin|work=Political Haze|via=Medium|accessdate=November 13, 2023|last=Arizmendi|first=Jordan|date=March 7, 2019|archive-date=July 23, 2024|archive-url=https://web.archive.org/web/20240723044927/https://medium.com/politicalhaze/in-the-80s-trumps-business-partner-was-a-mob-and-drug-king-pin-62de82dfc6e4|url-status=live}}</ref> Ntchito yake pa khoti la chigaŵa yikamara pa Okutobala 25, 1999, apo wakakwezgeka ku Khoti la Madandawuro.{{r|FJC}} Barry wakamanyikwanga nga ni mulaŵiliri wa khoti wakukhwima uyo wakaŵa na mazaza ghakuru pa khoti lake.{{r|Horowitz (2015)}} Mu 1989, apo wakaŵa mulaŵiliri wa Khoti la Chigaŵa ku [[Newark, New Jersey]], wakakana [[phangano la kujipatura na mulandu]] ilo lingafwatura ŵadetective ŵaŵiri ŵa boma awo ŵakasuskikanga kuti ŵakavikilira muguliska munkhwala wakuzgoŵeska, ndipo wakapangiska kuti mulandu ulute ku khoti. Ŵadetective ŵara ŵakasangika na mulandu ndipo ŵakajalirika. Wakalongozgaso mulandu uwo ukapangiska kuti [[Louis Manna]], mulwani wa [[Mbumba ya vigeŵenga ya Genovese]], wasangike na mulandu wakunozga kukoma [[John Gotti]].{{r|Horowitz (2015)}} ====Ntchito pa Khoti la Madandawuro la United States==== [[File:Maryanne Barry Trump in 1992.png|thumb|right|Barry mu 1992]] Nangauli wakaŵa wa chipani cha Republican, Barry wakimikika ku [[Khoti la Madandawuro la United States la Chigaŵa Chachitatu]] na Pulezidenti wa Democratic [[Bill Clinton]]{{r|Horowitz (2015)}} pa Juni 17, 1999. Wakimikika kuti wazuze mpando uwo ukasiyika apo [[H. Lee Sarokin]] wakapumura mu 1996.<ref name="auto">{{Cite web|url=https://www.fjc.gov/history/judges/barry-maryanne-trump|title=Barry, Maryanne Trump |website=[[Federal Judicial Center]] |access-date=August 24, 2020|archive-url=https://web.archive.org/web/20190716230202/https://www.fjc.gov/history/judges/barry-maryanne-trump|archive-date=July 16, 2019|url-status=live}}</ref> (Clinton wakimikaso [[Robert Raymar]] ku mpando uwu mu 1998, kweni kukimikika uku kukamara para chaka chikamara kwambura kupika ku [[Komiti ya Milandu ya Seneti ya United States]].)<ref>{{cite news|first=David|last=Margolick|url=https://www.nytimes.com/1992/03/20/news/yale-alumni-take-lead-again-even-if-not-in-law.html|title=Yale Alumni Take Lead Again, Even If Not in Law|newspaper=[[The New York Times]]|location=New York City|date=March 20, 1992|access-date=August 4, 2019|archive-url=https://web.archive.org/web/20190805010111/https://www.nytimes.com/1992/03/20/news/yale-alumni-take-lead-again-even-if-not-in-law.html|archive-date=August 5, 2019|url-status=live}}</ref> [[Seneti ya United States]] yikazomerezga Barry mwakukolerana pa Seputembala 13, 1999.<ref>{{Cite news|url=https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/|title=When President Clinton did a very nice thing for Donald Trump|newspaper=[[The Washington Post]]|last=Kamen|first=Al|date=July 30, 2015|access-date=February 16, 2016|archive-url=https://archive.today/20161213180718/https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/|archive-date=December 13, 2016|url-status=live}}</ref> Wakapokera udindo wake pa Seputembala 22, 1999.<ref name="auto" /> Mu 1999 Barry wakaphalira ''New Jersey Law Journal'' kuti "nkhuchindikika chomene ndipo nkhumuwonga chomene chifukwa cha kukimikika uku", ndipo wakati "nkhazizwa kuti ŵakanisankha", wakasazgirapo kuti, "Nkhughanaghana kuti mbiri ya ntchito yane pa Khoti la Chigaŵa yikaŵa yiwemi mwakukwana kuti ŵanifipiske, ndipo nkhukondwa kuti ndyali zikaŵavya pakusankha uku".{{r|Ackermann (1999)}} Mu Janyuwale 2006, Barry wakachitira ukaboni wakovwira kukimikika kwa mulaŵiliri munyake wa Khoti la Chigaŵa Chachitatu [[Samuel Alito]] ku Khoti Likuru la United States.<ref>{{Cite web|url=https://www.nj.com/politics/2016/02/cruz_attacks_trumps_sister_maryanne_an_nj_judge.html|title=Cruz again attacks Trump's sister, a N.J. judge|first=Claude|last=Brodesser-Akner|date=February 21, 2016|website=nj.com|access-date=July 16, 2019|archive-url=https://web.archive.org/web/20190716230158/https://www.nj.com/politics/2016/02/cruz_attacks_trumps_sister_maryanne_an_nj_judge.html|archive-date=July 16, 2019|url-status=live}}</ref> Mu cheruzgo cha 2006, ''Abou Cham v. Attorney General'', Barry wakasuska chomene nkharo ya [[Mweruzgi wa Khoti la Vyakunjira mu United States]] pa mulandu uwo ukakhwaskanga muchimbi wakufuma ku [[Gambia]]. Mupempheri wakuchimbira nkhondo wakaŵa mdumbu wa pulezidenti wakale wa Gambia [[Dawda Jawara]], uyo [[Kuwukira boma ku Gambia kwa 1994|wakathereskeka pa kuwukira boma mu 1994]]; boma liphya likajalira panji kukoma ŵabali ŵanandi ŵa Cham ndipo likakanizga chipani chawo cha ndyali. Barry wakadumura mulandu mwakovwira Abou Cham; wakasuska mafumbo gha Judge Donald Ferlise gha mazuŵa ghaŵiri nga ngakofya, ghankhaza, na ghakuzikizga kwa "mupempheri uyo wakalutilira kusuzgika maghanoghano"; ndipo wakadumura kuti Cham "wakaparanyika maghanoghano".<ref name = McClatchy>{{cite news | last =Taylor | first =Marisa | title =Immigration judges face increased scrutiny | newspaper =[[McClatchy]]DC | date =June 28, 2006 | url =https://www.mcclatchydc.com/latest-news/article24456196.html | access-date =August 23, 2020 | archive-date =January 29, 2021 | archive-url =https://web.archive.org/web/20210129000354/https://www.mcclatchydc.com/latest-news/article24456196.html | url-status =live }}</ref><ref name=ABA>{{cite news | last =Tebo | first =Margaret Graham | title =Asylum Ordeals | newspaper =[[ABA Journal]] | date =November 24, 2006 | url =https://www.abajournal.com/magazine/article/asylum_ordeals | access-date =August 23, 2020 | archive-date =January 24, 2021 | archive-url =https://web.archive.org/web/20210124225108/https://www.abajournal.com/magazine/article/asylum_ordeals | url-status =live }}</ref><ref name=Cham>{{cite web | url =https://caselaw.findlaw.com/us-3rd-circuit/1320004.html | title =Abou Cham, Petitioner v. Attorney General of the United States, Respondent | last =Barry | first =Maryanne Trump | date =April 28, 2006 | website =[[FindLaw]] | access-date =August 23, 2020 | archive-date =August 23, 2020 | archive-url =https://web.archive.org/web/20200823004237/https://caselaw.findlaw.com/us-3rd-circuit/1320004.html | url-status =live }}</ref><ref name=Simmons>{{cite book| last =Simmons| first =William Paul| title =Human Rights Law and the Marginalized Other| publisher =[[Cambridge University Press]]| year =2011| pages =173–176| url =https://books.google.com/books?id=NZewdr8pci0C| isbn =978-1139503266| access-date =September 1, 2020| archive-date =July 23, 2024| archive-url =https://web.archive.org/web/20240723044927/https://books.google.com/books?id=NZewdr8pci0C| url-status =live}}</ref> Barry wakalemba kuti pakaŵavya "nanga nkhachoko waka cha ntchindi, ulemu, panji chilongolero chilichose cha urunji" mu umo Ferlise wakachitira na Cham, ndipo ichi chikapangiska Ferlise kughanaghana kuti ukaboni wa Cham ukaŵa wautesi. Wakadumuraso kuti cheruzgo cha Khoti la Vyakunjira chikaŵa "chilonda chikuru" ku ndondomeko ya urunji ya America.<ref name = McClatchy/><ref name=ABA/><ref name=Cham/><ref name=Simmons/> Pamanyuma pachoko waka pa cheruzgo cha Barry, Ferlise wakafumiskika pa ntchito yake.<ref name=ABA/> Mu 2009, Barry wakalongozga mulandu wa chitetezo cha charu wa ''Stephen Beightler v. Essex County Prosecutor's Office (3rd Cir. 2009)'', cheruzgo chakuzirwa chomene chakukhwaskana na chitetezo cha ma state pasi pa Amendment ya 11.<ref>[https://digitalcommons.law.villanova.edu/cgi/viewcontent.cgi?article=1793&context=thirdcircuit_2009 "Stephen Beightler v. Essex Cty Pros"], United States Third Circuit Court of Appeals. University of Villanova. August 20, 2009. Retrieved 5 July 2026</ref> Mulandu uwu ukaŵa pa mulara wa milandu wa boma uyo wakasuskanga munthu kuti waswa chitetezo cha charu panthazi pa khoti la boma. [[Stephen Beightler]] wakasuma, wakuti state yikajalira chitetezo chake ndipo chikeneranga yayi kugwira ntchito chifukwa mulara wa milandu wa boma wakajipereka yekha ku mazaza gha federal mwa kupoka mazaza gha [[Dipatimenti ya Vyarunji ya United States]] ghakupanga masuzgo agha. Barry wakadumura kuti pakaŵavya kuleka chitetezo kwakuyana na umo ma state ghakuchitira nkharo iyi. Mulandu uwu ukukhozgeka kanandi mu makhoti gha state na federal, ndipo khoti linyake la federal likati Khoti la Chigaŵa Chachitatu likaŵa na mwaŵi wakukhazikiska chiyerezgero cha malango kweni likatondeka.<ref>[https://law.justia.com/cases/federal/district-courts/new-jersey/njdce/2:2008cv04325/219490/29/ "COLEY v. COUNTY OF ESSEX et al, No. 2:2008cv04325 - Document 29 (D.N.J. 2010)"], United States District District of New Jersey. Justia U.S. Law. August 4, 2010. p. 4. Retrieved 6 July 2026</ref> Pa Juni 30, 2011, Barry wakatora [[udindo wa mkulu]] (''senior status'').{{r|FJC}} Wakatora udindo wa mkulu wambura kugwira ntchito mu sabata yakwamba ya Febuluwale 2017, pafupifupi masabata ghaŵiri pamanyuma pakuti mubali wake [[Kukhazikiskika kwakwamba kwa Donald Trump|wakhazikiskika kuŵa pulezidenti]].{{r|Mannion (2017)}}<ref>{{cite news |website=[[CNN]] |url=https://www.cnn.com/2018/10/03/politics/donald-trump-older-sister-family-finances/index.html |title=A financial disclosure from Donald Trump's sister led to The New York Times report on his taxes |first1=Elizabeth |last1=Hartfield |date=October 3, 2018 |first2=Erica |last2=Orden |archive-url=https://web.archive.org/web/20181004030901/https://www.cnn.com/2018/10/03/politics/donald-trump-older-sister-family-finances/index.html |archive-date=October 4, 2018 |quote=In 2017, she became an inactive judge.}}</ref> Barry wakapumura ntchito pa Febuluwale 11, 2019. Kupumura kwake kukamalizga kufufuza kwakuti panji wakachitako ndondomeko za [[kubisamiska msonkho]] pamoza na ŵabali ŵake izo zikaphwanya malango gha nkharo ya ŵeruzgi. Kufufuza kukajara kwambura kufika pa fundo yakuti ivyo wakasuskikanga vikaŵa vyaunenesko panji yayi.<ref name=":0" /><ref>{{Cite web|url=https://www.philly.com/news/trump-sister-judge-maryanne-barry-philadelphia-federal-court-third-circuit-20190411.html|title=Trump's sister retires as federal judge in Philadelphia amid reported probe of family finances|last=Gambardello|first=Joseph A.|date=April 13, 2019|website=philly.com|language=en-US|access-date=April 13, 2019|archive-url=https://web.archive.org/web/20190413004606/https://www.philly.com/news/trump-sister-judge-maryanne-barry-philadelphia-federal-court-third-circuit-20190411.html|archive-date=April 13, 2019|url-status=live}}</ref> ==Vyakususkika vya kubisamiska msonkho== Mu Okutobala 2018, ''[[The New York Times]]'' yikafumiska lipoti la kufufuza ilo likati Barry, pamoza na awiske na ŵabali ŵake, ŵakachita vinthu vyachinyengo na vyambura kuzomerezgeka kuti ŵachepeskeko ndalama za [[msonkho wa chiharo]] na [[msonkho wa mphatso]] zakukhwaskana na malonda gha malo gha Fred Trump.<ref name="NYT_Barstow_20181002">{{Cite news|url=https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html|title=Trump Engaged in Suspect Tax Schemes as He Reaped Riches From His Father|last1=Barstow|first1=David|first2=Susanne|last2=Craig|first3=Russ|last3=Buettner|newspaper=The New York Times|date=October 2, 2018|access-date=October 5, 2018|archive-url=https://web.archive.org/web/20190526034238/https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html|archive-date=May 26, 2019|url-status=live}}</ref> Mulembi wakufufuza [[Susanne Craig]] wakasanga chikalata icho Barry wakapeleka ku Senate ya U.S. pa nyengo ya kukhozgeka kwake kuŵa weruzgi wa boma mu 1983, umo wakalongosolera kuti wakapokera ndalama zakukwana madola miliyoni yimoza kufuma ku All County Building Supply & Maintenance.<ref name="NYT_Smith_20181003">{{Cite news|url=https://www.businessinsider.com/new-york-times-story-trump-wealth-source-maryanne-document-2018-10|title=New York Times reveals that its bombshell story on Trump's wealth was made possible by a document his sister submitted to the Senate years ago|last=Smith|first=Allan|date=October 3, 2018|work=Business Insider|access-date=October 5, 2018|archive-url=https://web.archive.org/web/20181005194855/https://www.businessinsider.com/new-york-times-story-trump-wealth-source-maryanne-document-2018-10|archive-date=October 5, 2018|url-status=live}}</ref> ''The Times'' yikati All County Building Supply & Maintenance yikaŵa "kampani yachinyengo" iyo yikapangika mu 1992<ref name="NYT_Smith_20181003" /> ndipo yikaŵa ya Barry, Donald Trump, ŵabali ŵawo na mubali wawo munyake. All County Building Supply & Maintenance yikayowoyeka kuti yikalipiranga ntchito izo zikachitikanga pa nyumba za maapartment za Fred Trump; nyumba zira zikazakawelerangaso ndalama ku kampani, kweni zikasazgirangapo ndalama mwachinyengo pa malipiro agha. Akumanya vya misonkho ŵakayowoya kuti chifukwa All County "yikachitanga ntchito yeneco yayi, kusamuskika kwa ndalama kwizira mu kampani iyi kukaŵa nga ni mphatso iyo yikapona msonkho wa 55 peresenti uwo ukaŵapo pa nyengo yira".<ref name="NYT_Buettner_20181215" /> Adiresi yake yikaŵa nyumba ya [[Manhasset, New York]] ya John Walter, muzukuru wa Fred Trump.<ref name="NYT_Smith_20181003" /><ref group="Notes">According to the investigation by ''The Times'', [[John W. Walter|John Walter]] [https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/ (1934–2018)] ({{Webarchive|url=https://web.archive.org/web/20200128052147/https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|date=January 28, 2020}}) managed Fred Trump's business records. Those records filled the basement of Walter's Flower Hill, New York residence. The investigation by ''The Times'' included thousands of documents such as "bank statements, financial audits, accounting ledgers, cash disbursement reports, invoices and canceled checks" and over 200 of Fred Trump's tax returns.</ref> Mu nkhani yakulondezgapo, ''The New York Times'' yikati ndalama izo All County yikasanganga mwambura kuzomerezgeka zikagaŵikana pakati pa ŵabali ŵa Trump.<ref name="NYT_Buettner_20181215">{{cite news |url=https://www.nytimes.com/2018/12/15/us/politics/trump-tenants-taxes.html |date=December 15, 2018 |access-date=December 15, 2018 |title=As the Trumps Dodged Taxes, Their Tenants Paid a Price |first1=Russ |last1=Buettner |first2=Susanne |last2=Craig |newspaper=[[The New York Times]] |archive-url=https://web.archive.org/web/20190524213618/https://www.nytimes.com/2018/12/15/us/politics/trump-tenants-taxes.html |archive-date=May 24, 2019 |url-status=live }}</ref> Mu Okutobala 2018, chifukwa cha kufumiskika kwa lipoti ili, [[Dipatimenti ya Misonkho na Ndalama ya Boma la New York]] yikamba kuwona ivyo vikayowoyekanga vya uchinyengo pa Barry na ŵabali ŵake.<ref name="NYT_Barstow_20181002" /><ref name="CNN_Borak_20181003">{{cite news |url=https://www.cnn.com/2018/10/02/politics/donald-trump-tax-schemes/index.html |title=New York Times investigation: Trump helped his parents evade taxes, 'including instances of outright fraud' |first1=Donna |last1=Borak |first2=Sophie |last2=Tatum |work=CNN |date=October 3, 2018 |access-date=December 15, 2018 |archive-url=https://web.archive.org/web/20190510174311/https://www.cnn.com/2018/10/02/politics/donald-trump-tax-schemes/index.html |archive-date=May 10, 2019 |url-status=live }}</ref><ref name=":0">{{cite news |url=https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |title=Retiring as a Judge, Trump's Sister Ends Court Inquiry Into Her Role in Tax Dodges |first1=Russ |last1=Buettner |first2=Susanne |last2=Craig |date=April 10, 2019 |newspaper=[[The New York Times]] |location=New York City |access-date=April 11, 2019 |archive-url=https://web.archive.org/web/20190411010703/https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |archive-date=April 11, 2019 |url-status=live }}</ref> Pa Febuluwale 1, 2019, ŵanthu ŵanayi ŵa ntchito ya malango awo ŵakapeleka madandawuro pa Weruzgi Barry mu Okutobala 2018 chifukwa cha ivyo vikayowoyeka mu ''The New York Times'', ŵakaphalirika na [[Khoti la Apilu la United States la Dera Lachiŵiri|Khoti la Apilu la Dera Lachiŵiri]] kuti kufufuza pa nkhani ya kuswa malango gha nkharo ya ŵeruzgi na Barry kukambika, pa ivyo wakasuskikanga vya kunjilirapo mu vyachinyengo vya msonkho na ndalama.<ref>{{Cite news |last1=Buttner |first1=Russ |last2=Craig |first2=Susanne |date=10 April 2019 |title=Retiring as a Judge, Trump's Sister Ends Court Inquiry Into Her Role in Tax Dodges |work=New York Times |url=https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |access-date=16 November 2023 |archive-date=April 11, 2019 |archive-url=https://web.archive.org/web/20190411010703/https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |url-status=live }}</ref> Mazuŵa khumi ghakati ghajumphapo, Barry, uyo wakaŵa weruzgi mukuru wambura kugwira ntchito, wakapharazga kuti wapumura ntchito, ndipo ichi chikamalizga kufufuza.<ref name=":0" /> ==Kususka Donald Trump mwachisisi== Barry wakayowoyapo viyowoyero vichoko waka pa ŵanthu vya mubali wake muchoko [[Donald Trump]] mu nyengo yake yakwamba kuŵa pulezidenti. Wakafwa pambere wandasankhike kaŵiri kuŵa pulezidenti mu 2024.<ref name="auto1" /> Mu Ogasiti 2020, muzukuru wawo [[Mary L. Trump]] wakavumbura kuti wakalemba mwachisisi maora 15 gha nkhani zake na Barry mu 2018 na 2019. Mu nkhani izo zikalembeka, Barry wakasuska chomene mubali wake.<ref name="auto1" /> Mary wakafumiska pa ŵanthu malemba ghanandi na vigaŵa vya mawu gha nkhani izi, kusazgapo ivyo vikaŵavye mu buku lake la 2020 ''[[Too Much and Never Enough]]''.<ref name="auto1" /> Mu malemba agha, Barry wakayowoya vya mubali wake kuti, "Chose icho wakukhumba nkhukondweska [[Trumpism|ŵanthu ŵake ŵakumovwira]]. Walije fundo. Palije. [[Kugwiliskira ntchito Twitter na Donald Trump|Kulemba kwake pa Twitter]] na [[Mazgu ghaboza panji ghakusokweska gha Donald Trump|kuboza]]... aa Chiuta wane. Nkhuyowoya mwakufwatuka chomene, kweni ukumanya. Kusintha nkhani. Kuleka kunozgekera. Kuboza. Eee. [...] Chose ntchautesi. Nchautesi na nkhaza izi. Donald ngwankhaza."<ref name="auto1" /> Wakasazgirapo kuti wakawerenganga mabuku yayi ndipo wakaleka munyake kuti wamulemberere mayeso ghakunjilira ku koleji.<ref name="auto1" /> Mu malemba agha, Barry wakasuskaso ndondomeko yakupatukanya mbumba ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lakwamba la Trump, [[Ndondomeko ya boma la Trump yakupatukanya mbumba|yakupatukanya mbumba]], pamoza na [[Ntchito za bizinesi za Donald Trump|kubankirapuse kwa mabizinesi gha mubali wake]], ndipo wakasazgirapo kuti "mungamugomezganga yayi".<ref name="auto1" /><ref>{{cite news |author1=Kelly Mena |author2=Jeremy Diamond |author3=Kevin Bohn |title=Trump's sister bitterly criticizes him in conversations secretly recorded by her niece Mary Trump |url=https://edition.cnn.com/2020/08/22/politics/maryanne-trump-barry-donald-trump-mary-trump/index.html |agency=CNN |date=August 23, 2020 |access-date=August 26, 2020 |archive-date=January 17, 2021 |archive-url=https://web.archive.org/web/20210117055502/https://edition.cnn.com/2020/08/22/politics/maryanne-trump-barry-donald-trump-mary-trump/index.html |url-status=live }}</ref><ref>{{cite web |title=Donald Trump's Sister Maryanne Trump Barry Leaked Audio Transcript |url=https://www.rev.com/blog/transcripts/donald-trumps-sister-maryanne-trump-leaked-audio-transcript |website=Rev Transcript Library |date=August 24, 2020 |access-date=August 26, 2020 |archive-date=January 29, 2021 |archive-url=https://web.archive.org/web/20210129013044/https://www.rev.com/blog/transcripts/donald-trumps-sister-maryanne-trump-leaked-audio-transcript |url-status=live }}</ref> ==Umoyo wake, ulwari, na nyifwa== Mfumu wakwamba wa Barry wakaŵa David Desmond; ŵakapatukana mu 1980.{{r|Foster (2017)}} Mu 1982, wakatorana na loya wa ku New Jersey [[John J. Barry|John Joseph Barry]].{{r|Horowitz (2015)|Maryanne Desmond (1982)}} Ŵakakhala mu nthengwa vyaka 18 pambere wandafwe pa Epulero 9, 2000.{{r|John Barry (2000)}} Wakaŵa na mwana yumoza kufuma mu nthengwa yake yakwamba.{{r|Foster (2017)|Engagements: Lisa Aitken (1992)}} Barry wakang'anamukira ku Chikatolika wati wakura ndipo kanandi wakalutanga ku [[Misa mu Mpingo wa Katolika|Misa]].<ref>{{Cite news |last=Bernstein |first=Jacob |date=2023-11-17 |title=Trump Attends His Sister's Funeral, but Does Not Speak |language=en-US |work=The New York Times |url=https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |access-date=2023-11-17 |issn=0362-4331 |archive-date=November 17, 2023 |archive-url=https://web.archive.org/web/20231117232019/https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |url-status=live }}</ref> Mu 2016, wakapeleka madola 4 miliyoni ku sukulu ya maJesuit ya [[Fairfield University]] kuti yovwire masambiro gha ŵasambiri kweniso kovwira malo gha yunivesite agho ghakusambizga vya [[uzimu wa Ignatius]].{{r|Roy (2016)|Cipollaro (2016)}} Mu 2023, Barry wakayowoyeka kuti wakaŵa pa chisamaliro cha [[hospice]] chifukwa cha kansa.<ref>{{cite news|url = https://dailyvoice.com/new-york/nassau/former-president-donald-trumps-sister-dies-at-86-in-new-york/|title = Donald Trump's Sister Dies At 86 In New York|work = [[Daily Voice (American hyperlocal news)|Nassau Daily Voice]]|date = November 13, 2023|accessdate = November 13, 2023|last1 = DeMarco|first1 = Jerry|last2 = Reakes|first2 = Kathy|archive-date = November 13, 2023|archive-url = https://web.archive.org/web/20231113150002/https://dailyvoice.com/new-york/nassau/former-president-donald-trumps-sister-dies-at-86-in-new-york/|url-status = live}}</ref> Pa Novembala 13, 2023, wakafwira pa nyumba yake ku [[Upper East Side]] mu Manhattan, wali na vyaka 86.<ref>{{Cite news |last=Bernstein |first=Jacob |date=November 17, 2023 |title=Former President Trump Attends His Sister's Funeral |url=https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |access-date=February 12, 2024 |work=[[The New York Times]] |archive-date=April 4, 2024 |archive-url=https://web.archive.org/web/20240404081708/https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |url-status=live }}</ref> ==Mphotho== Mu 2004, Weruzgi wa Khoti Likuru [[Sandra Day O'Connor]] wakapeleka Barry mphotho iyo yikuthyika zina la O'Connor, iyo [[Seton Hall University School of Law]] yikupeleka ku ŵanakazi awo ŵachita makora chomene mu vya malango na uteŵeti wa paŵanthu. Pa mwambo wa kupeleka mphotho iyi, Barry wakati, "Nkhuphalira ŵanakazi wose kuti mukumbukenge umo vikaŵira vyakusuzga ku ŵanakazi nga ni Weruzgi O'Connor pakwamba", ndipo wakasazgirapo kuti, "Nangauli wakamalizga masambiro na mamaki ghapachanya chomene, wakachimbizgika kugwira ntchito ya mulembi wa malango. Kumbukani umo tafikira patali".{{r|Horowitz (2015)}} ==Mazgu== {{reflist|group="Notes"}} ==Mabuku ghakugwiliskira ntchito== {{reflist|30em|refs= <ref name="Ackermann (1999)"> {{cite journal |last = Ackermann |first = Matt |title = Conservative-with-a-Heart Barry Nominated for Third Circuit Seat |date = June 21, 1999 |journal = New Jersey Law Journal |publisher = [[Rutgers University]] |location = Camden, New Jersey |volume = 156 |pages = 1105 |via = Is That Legal? (blog) |url = http://www.isthatlegal.org/archives/supreme_court/ |archive-url = https://web.archive.org/web/20080918165253/http://www.isthatlegal.org/archives/supreme_court/ |archive-date = September 18, 2008 |url-status = dead }} </ref> <ref name="Candlish (2015)"> {{cite news |last = Candlish |first = Jane |date = May 16, 2015 |title = Councillor Welcomes Trump Donation to Western Isles Care Home |url = http://www.pressandjournal.co.uk/fp/news/581059/councillor-welcomes-trump-donation-to-western-isles-care-home/ |newspaper = [[The Press and Journal (Scotland)|The Press and Journal]] |publisher = [[D. C. Thomson & Co. Ltd.]] |location = [[Aberdeen]], Scotland |access-date = January 25, 2016 |archive-url = https://archive.today/20171104125444/https://www.pressandjournal.co.uk/fp/news/581059/councillor-welcomes-trump-donation-to-western-isles-care-home/ |archive-date = November 4, 2017 |url-status = live }} <ref name="Cipollaro (2016)"> {{cite press release |last = Cipollaro |first = Susan |title = Honorable Maryanne Trump Barry Donates $4M in Honor of Rev. Jeffrey P. von Arx, S.J., President of Fairfield University |date = September 14, 2016 |publisher = [[Yunivesite ya Fairfield]] |location = Fairfield, Connecticut |url = https://www.fairfield.edu/lassochannel/press/pr_index/index.lasso?id=4519 |access-date = November 4, 2017 |archive-url = https://web.archive.org/web/20170820085228/https://www.fairfield.edu/lassochannel/press/pr_index/index.lasso?id=4519 |archive-date = August 20, 2017 |url-status = live }} </ref> <ref name="Engagements: Lisa Aitken (1992)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = Engagements: Lisa Aitken, David Desmond |date = May 31, 1992 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/1992/05/31/style/engagements-lisa-aitken-david-desmond.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011432/http://www.nytimes.com/1992/05/31/style/engagements-lisa-aitken-david-desmond.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="FJC"> {{cite web |title = Barry, Maryanne Trump |website = Federal Judicial Center |url = https://www.fjc.gov/node/1377511 |access-date = November 4, 2017 |archive-url = https://archive.today/20171104120008/https://www.fjc.gov/node/1377511 |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Foster (2017)"> {{cite news |last = Foster |first = Alice |title = Judge Maryanne Trump Barry in Pictures: Donald Trump's Sister Celebrates 80th Birthday |date = April 5, 2017 |newspaper = [[Daily Express]] |publisher = [[Express Newspapers]] |location = London, England |url = http://www.express.co.uk/news/politics/788258/Maryanne-Trump-Barry-in-pictures-Donald-Trump-sister-photographs-images-birthday |access-date = November 4, 2017 |archive-url = https://archive.today/20171104135438/http://www.express.co.uk/news/politics/788258/Maryanne-Trump-Barry-in-pictures-Donald-Trump-sister-photographs-images-birthday |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Horowitz (2015)"> {{cite news |last = Horowitz |first = Jason |title = Familiar Talk on Women, From an Unfamiliar Trump |date = August 18, 2015 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/2015/08/19/us/politics/familiar-talk-women-from-donald-trump-sister.html |access-date = November 2, 2017 |archive-url = https://archive.today/20151110090035/http://www.nytimes.com/2015/08/19/us/politics/familiar-talk-women-from-donald-trump-sister.html?_r=0 |archive-date = November 10, 2015 |url-status = live }} </ref> <ref name="John Barry (2000)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = John Barry, 60, Trial and Appellate Lawyer |date = April 18, 2000 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/2000/04/18/nyregion/john-barry-60-trial-and-appellate-lawyer.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011430/http://www.nytimes.com/2000/04/18/nyregion/john-barry-60-trial-and-appellate-lawyer.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Johnson (2015)"> {{cite news |last = Johnson |first = Jenna |title = Donald Trump Says His Older Sister Isn't Interested in Becoming a Supreme Court Judge |date = October 11, 2015 |newspaper = [[The Washington Post]] |publisher = [[Nash Holdings]] |location = Washington, D.C. |url = https://www.washingtonpost.com/news/post-politics/wp/2015/10/11/donald-trump-says-his-older-sister-isnt-interested-in-becoming-a-supreme-court-judge/ |access-date = November 4, 2017 |archive-url = https://archive.today/20151012164503/https://www.washingtonpost.com/news/post-politics/wp/2015/10/11/donald-trump-says-his-older-sister-isnt-interested-in-becoming-a-supreme-court-judge/ |archive-date = October 12, 2015 |url-status = live }} </ref> <!-- <ref name="Kamen (2015)"> {{cite news |last = Kamen |first = Al |title = When President Clinton Did a Very Nice Thing for Donald Trump |date = 2015 |newspaper = [[Washington Post]] |publisher = [[Nash Holdings]] |location = Washington, D.C. |url = https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/ |access-date = November 4, 2017 |archive-url = https://archive.today/20161213180718/https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/ |archive-date = December 13, 2016 |url-status = live |quote = Barry, a Republican and Reagan-appointed federal trial judge at the time, reportedly was herself surprised she was picked. }} </ref> --> <ref name="Margolick (1992)"> {{cite news |last = Margolick |first = David |author-link = David Margolick |title = At the Bar |date = December 4, 1992 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/1992/12/04/news/at-the-bar.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011419/http://www.nytimes.com/1992/12/04/news/at-the-bar.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Maryanne Desmond (1982)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = Maryanne Desmond Weds John Barry |date = December 27, 1982 |newspaper = [[The New York Times]] |location = New York City |issn = 0362-4331 |url = https://www.nytimes.com/1982/12/27/style/maryanne-desmond-weds-john-barry.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011421/http://www.nytimes.com/1982/12/27/style/maryanne-desmond-weds-john-barry.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Mannion (2017)"> {{cite web |last = Mannion |first = Cara |title = 3rd Circ. Judge, Trump's Sister, Stops Hearing Cases |date = February 3, 2017 |website = Law360 |url = https://www.law360.com/articles/888127/3rd-circ-judge-trump-s-sister-stops-hearing-cases |access-date = November 4, 2017 |archive-url = https://archive.today/20171104125817/https://www.law360.com/articles/888127/3rd-circ-judge-trump-s-sister-stops-hearing-cases |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Roy (2016)"> {{cite news |last = Roy |first = Eleanor |title = Donald Trump's Sister Gives $4 Million to Fairfield University |date = October 9, 2016 |newspaper = [[Palm Beach Daily News]] |publisher = [[Cox Enterprises]] |location = Palm Beach, Florida |url = http://www.palmbeachdailynews.com/news/local/donald-trump-sister-gives-million-fairfield-university/HtIdtYqrS6z6UweGQCtlXO/ |access-date = September 12, 2017 |archive-url = https://archive.today/20171104131825/http://www.palmbeachdailynews.com/news/local/donald-trump-sister-gives-million-fairfield-university/HtIdtYqrS6z6UweGQCtlXO/ |archive-date = November 4, 2017 |url-status = live }} </ref> }} ==Intaneti== {{Wikiquote}} *{{FJC Bio|109|nid=1377511}} *{{C-SPAN|49192}} {{s-start}} {{s-legal}} {{s-bef|before=[[Henry Curtis Meanor]]}} {{s-ttl|title={{nowrap|Mweruzgi wa [[Khoti la Dango la United States la Chigaŵa cha New Jersey]]}}|years=1983–1999}} {{s-aft|after=[[Joel A. Pisano]]}} {{s-bef|before=[[H. Lee Sarokin]]}} {{s-ttl|title={{nowrap|Mweruzgi wa [[Khoti la Maapelo la United States la Dera Lachitatu]]}}|years=1999–2011}} {{s-aft|after=[[Patty Shwartz]]}} {{s-end}} {{Banja la Trump}} {{Portal bar|Dango|United States}} {{Authority control}} {{DEFAULTSORT:Barry, Maryanne Trump}} [[Category:1937 kubabika]] [[Category:2023 kufwa]] [[Category:Ŵaloya ŵa ku America ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵa boma la United States ŵa vyaka vya m'ma 21]] [[Category:Ŵanthu ŵa ku America ŵa mphapu ya ku Germany]] [[Category:Ŵaloŵa ŵa ntchito ya ulongozgi wa dango wa United States]] [[Category:Ŵasambiri ŵa Yunivesite ya Columbia]] [[Category:Ŵasambiri ŵa Yunivesite ya Hofstra]] [[Category:Ŵasambiri ŵa Maurice A. Deane School of Law]] [[Category:Ŵeruzgi ŵa Khoti la Maapelo la United States la Dera Lachitatu]] [[Category:Ŵeruzgi ŵa Khoti la Dango la United States la Chigaŵa cha New Jersey]] [[Category:Ŵaloya kufuma ku New York City]] [[Category:Ŵaloya kufuma ku Philadelphia]] [[Category:Ŵasambiri ŵa Mount Holyoke College]] [[Category:Ŵanthu ŵa chipani Republican cha New York (boma)]] [[Category:Ŵanthu kufuma ku Jamaica Estates, Queens]] [[Category:Ŵanthu ŵa chipani Republican cha Pennsylvania]] [[Category:Banja la Trump|Maryanne]] [[Category:Ŵeruzgi ŵa makhoti gha maapelo gha United States ŵakusankhika na Bill Clinton]] [[Category:Ŵeruzgi ŵa makhoti gha boma gha United States ŵakusankhika na Ronald Reagan]] [[Category:Ŵaloya ŵanakazi ŵa ku America ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵanakazi ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵanakazi ŵa ku United States ŵa vyaka vya m'ma 21]] [[Category:Ŵanthu ŵa Yunivesite ya Fairfield]] [[Category:Ŵakufwa na khansa ku New York (boma)]] [[Category:Ŵanthu kufuma ku Upper East Side]] [[Category:Ŵakuzgoka ku Chikatolika cha Roma]] [[Category:Ŵakatolika kufuma ku New York (boma)]] kbvqry2cowxjia7jmbeemq5doxq1flx 116953 116952 2026-07-16T11:09:28Z Tumbuka Arch 6863 /* Mabuku ghakugwiliskira ntchito */ 116953 wikitext text/x-wiki {{Short description|Weruzgi wa ku America (1937–2023)}} {{redirect2|Maryanne Trump|Maryanne Barry|ŵanthu ŵanyake awo ŵali na mazina ghakuyana|Mary Trump (disambiguation){{!}}Mary Trump|and|Marion Barry (disambiguation)}} {{Use American English|date=January 2026}} {{Use mdy dates|date=November 2023}} {{Infobox officeholder | name = Maryanne Trump Barry | image = Maryanne Trump Barry.png | caption = Barry mu 2006 | office = [[Weruzgi Mukuru]] wa [[Khoti la United States la Apilo la Dera Lachitatu]] | term_start = June 30, 2011 | term_end = February 11, 2019 | office1 = Weruzgi wa [[Khoti la United States la Apilo la Dera Lachitatu]] | term_start1 = September 22, 1999 | term_end1 = June 30, 2011 | appointer1 = [[Mndandanda wa ŵeruzgi ŵa boma ŵa United States ŵakusankhika na Bill Clinton|Bill Clinton]] | predecessor1 = [[H. Lee Sarokin]] | successor1 = [[Patty Shwartz]] | office2 = Weruzgi wa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] | term_start2 = October 7, 1983 | term_end2 = October 25, 1999 | appointer2 = [[Mndandanda wa ŵeruzgi ŵa boma ŵa United States ŵakusankhika na Ronald Reagan|Ronald Reagan]] | predecessor2 = [[Henry Curtis Meanor]] | successor2 = [[Joel A. Pisano]] | birth_name = Maryanne Trump | birth_date = {{Birth date|1937|4|5}} | birth_place = New York City, U.S. | death_date = {{nowrap|{{Death date and age|2023|11|13|1937|4|5}}}} | death_place = New York City, U.S. | party = [[Chipani cha Republican (United States)|Republican]] | spouse = {{plainlist| * {{marriage|David Desmond|1960|1980|end=divorced}} * {{marriage|[[John J. Barry]]|1982|2000|end=died}} }} | children = 1 | parents = {{ubl|[[Fred Trump]]|[[Mary Anne MacLeod Trump]]}} | relatives = [[Banja la Trump]] | education = {{plainlist| * [[Mount Holyoke College]] ([[Bachelor of Arts|BA]]) * [[Columbia University]] ([[Master of Arts|MA]]) * [[Sukulu ya Malango ya Maurice A. Deane|Yunivesite ya Hofstra]] ([[Juris Doctor|JD]]) }} | signature = Maryanne Trump Barry signature.svg }} '''Maryanne Trump Barry''' (Epulero 5, 1937 – Novembala 13, 2023) wakaŵa loya wa ku America kweniso [[weruzgi wa boma la United States]]. Wakazgoka [[msambizgi wa malango wa United States]] mu 1974 ndipo wakasankhika kakwamba ku [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] na Pulezidenti [[Ronald Reagan]] mu 1983. Mu 1999, wakasankhika ku [[Khoti la United States la Apilo la Dera Lachitatu]] na [[Bill Clinton]]. Mu Janyuwale 2006, Barry wakapeleka ukaboni panthazi pa [[Komiti ya Uweruzgi ya Senate ya United States]] pakovwira [[kusankhika kwa Samuel Alito ku Khoti Likuru la United States|kusankhika]] kwa munyake wa ntchito yake [[Samuel Alito]] ku [[Khoti Likuru la United States]]. Wakanjira pa [[udindo wa weruzgi mukuru]] mu Juni 2011, ndipo wakapharazga kuti wafumengepo pa udindo wa weruzgi mu Febuluwale 2019 pamanyuma pakuti pakaŵa kufufuza pa milandu yakuti wakachitako [[uheni wa uweruzgi]] mwa kunjilirapo mu vyachinyengo vya misonkho na ndalama. Barry wakaŵa mudumbu mukuru wa pulezidenti wa nambara 45 na 47 wa [[United States]], [[Donald Trump]]. ==Umoyo wakwambilira na masambiro== Barry wakababikira ku New York City mu chigaŵa cha [[Queens]] pa Epulero 5, 1937, nga ni mwana wakwamba wa wakuzenga nyumba [[Fred Trump]] na muwoli wake [[Mary Anne MacLeod Trump]].{{r|Horowitz (2015)}} Wakaŵa mudumbu mukuru wa [[Donald Trump]].{{r|Johnson (2015)|Candlish (2015)}} Wakasambira ku [[Kew-Forest School]].<ref name="Blair_2000">{{cite book |pages=[https://archive.org/details/trumps00gwen/page/592 592] |publisher=[[Simon & Schuster]] |location=New York City|year= 2001 |orig-year=2000 |isbn=978-0743210799 |title=The Trumps: Three Generations of Builders and a President |first=Gwenda |last=Blair |url=https://archive.org/details/trumps00gwen/page/592}}</ref>{{rp|243}} Wakamalizga masambiro ghake ku [[Mount Holyoke College]] mu 1958 na digiri ya [[Bachelor of Arts|BA]] na ntchindi ya ''[[Latin honors#United States|cum laude]]'',{{r|FJC|Margolick (1992)}}<ref name="Blair_2000"/>{{rp|244}} ndipo wakasanga digiri ya [[Master of Arts|MA]] mu [[sayansi ya ndyali|malango gha boma na boma]] ku [[Columbia University]] mu 1962.{{r|FJC|Maryanne Desmond (1982)}} Pamanyuma pake wakasambira malango, ndipo wakapokera digiri ya [[Juris Doctor|JD]] ku [[Sukulu ya Malango ya Yunivesite ya Hofstra]] mu 1974.{{r|FJC}} ==Ntchito== ===Ofesi ya Loya wa United States=== Pamanyuma pakukhala wakusungilira nyumba kwa vyaka 13, Barry wakaŵa [[Loya wakovwira wa United States]] mu 1974, yumoza mwa ŵanakazi ŵaŵiri pera pa maloya 62 mu ofesi ya [[Loya wa United States wa Chigaŵa cha New Jersey]].<ref name="auto1">{{Cite news |last=Kranish |first=Michael |date=August 22, 2020 |title=In secretly recorded audio, President Trump's sister says he has 'no principles' and 'you can't trust him' |newspaper=The Washington Post |url=https://www.washingtonpost.com/politics/maryanne-trump-barry-secret-recordings/2020/08/22/30d457f4-e334-11ea-ade1-28daf1a5e919_story.html |access-date=August 23, 2023 |archive-date=August 28, 2020 |archive-url=https://web.archive.org/web/20200828051318/https://www.washingtonpost.com/politics/maryanne-trump-barry-secret-recordings/2020/08/22/30d457f4-e334-11ea-ade1-28daf1a5e919_story.html |url-status=live }}</ref> Wakagwira ntchito mu chigaŵa cha milandu ya boma kufuma mu 1974 m'paka 1975 ndipo mu chigaŵa cha madandawuro kufuma mu 1976 m'paka 1982, wakateŵetera nga ni muteŵeti mukuru wakovwira wa chigaŵa ichi kufuma mu 1976 m'paka 1977 ndipo mukuru wa chigaŵa kufuma mu 1977 m'paka 1982. Wakateŵeteraso nga ni Executive Assistant United States Attorney kufuma mu 1981 m'paka 1982. Wakaŵaso First Assistant United States Attorney kufuma mu 1981 m'paka 1983.{{r|FJC}} ===Ntchito yake nga ni mulaŵiliri wa khoti la boma=== ====Ntchito pa Khoti la Chigaŵa la United States==== Pa Seputembala 14, 1983, Barry wakimikika na Pulezidenti [[Ronald Reagan]] ku mpando pa [[Khoti la Chigaŵa la United States la Chigaŵa cha New Jersey]] uwo ukasiyika na [[Henry Curtis Meanor]].{{r|Horowitz (2015)}} Wakazomerezgeka na [[Seneti ya United States]] pa Okutobala 6, 1983, ndipo wakapokera udindo wake zuŵa lakulondezgapo.<ref>{{Cite web |date=6 October 1983 |title=Congressional Record - Senate |url=https://www.govinfo.gov/content/pkg/GPO-CRECB-1983-pt20/pdf/GPO-CRECB-1983-pt20-2-1.pdf |work=Congressional Record for United States Senate |pages=27604 |via=govinfo.gov |quote= |access-date=November 17, 2023 |archive-date=November 17, 2023 |archive-url=https://web.archive.org/web/20231117054329/https://www.govinfo.gov/content/pkg/GPO-CRECB-1983-pt20/pdf/GPO-CRECB-1983-pt20-2-1.pdf |url-status=live }}</ref> Kuyana na mdumbu wake [[Mary L. Trump]], Donald Trump wakapangiska loya wake [[Roy Cohn]] kuti wawovwire Barry kupokera udindo uwu, icho Donald wakalutilira kumukumbuska Barry, ndipo Barry wakayowoya kuti wakeneranga udindo uwu chifukwa cha ntchito yake.<ref>{{Cite book |last1=Baker |first1=Peter |url=https://books.google.com/books?id=x-VVEAAAQBAJ |title=The Divider: Trump in the White House, 2017–2021 |last2=Glasser |first2=Susan |publisher=[[Knopf Doubleday]] |year=2022 |isbn=978-0-385-54654-6 |pages=90 |language=en |access-date=August 23, 2023 |archive-date=August 11, 2023 |archive-url=https://web.archive.org/web/20230811002622/https://books.google.com/books?id=x-VVEAAAQBAJ |url-status=live }}</ref> Mu 1985, wakajifumiskako pa mulandu wa kuguliska munkhwala wakuzgoŵeska chifukwa cha ubwezi wa mubali wake Donald na munthu uyo wakasangikanga na mulandu uwu.<ref>{{cite web|url=https://medium.com/politicalhaze/in-the-80s-trumps-business-partner-was-a-mob-and-drug-king-pin-62de82dfc6e4|title=In the 80s, Trump's Business Partner was a Mob and Drug King Pin|work=Political Haze|via=Medium|accessdate=November 13, 2023|last=Arizmendi|first=Jordan|date=March 7, 2019|archive-date=July 23, 2024|archive-url=https://web.archive.org/web/20240723044927/https://medium.com/politicalhaze/in-the-80s-trumps-business-partner-was-a-mob-and-drug-king-pin-62de82dfc6e4|url-status=live}}</ref> Ntchito yake pa khoti la chigaŵa yikamara pa Okutobala 25, 1999, apo wakakwezgeka ku Khoti la Madandawuro.{{r|FJC}} Barry wakamanyikwanga nga ni mulaŵiliri wa khoti wakukhwima uyo wakaŵa na mazaza ghakuru pa khoti lake.{{r|Horowitz (2015)}} Mu 1989, apo wakaŵa mulaŵiliri wa Khoti la Chigaŵa ku [[Newark, New Jersey]], wakakana [[phangano la kujipatura na mulandu]] ilo lingafwatura ŵadetective ŵaŵiri ŵa boma awo ŵakasuskikanga kuti ŵakavikilira muguliska munkhwala wakuzgoŵeska, ndipo wakapangiska kuti mulandu ulute ku khoti. Ŵadetective ŵara ŵakasangika na mulandu ndipo ŵakajalirika. Wakalongozgaso mulandu uwo ukapangiska kuti [[Louis Manna]], mulwani wa [[Mbumba ya vigeŵenga ya Genovese]], wasangike na mulandu wakunozga kukoma [[John Gotti]].{{r|Horowitz (2015)}} ====Ntchito pa Khoti la Madandawuro la United States==== [[File:Maryanne Barry Trump in 1992.png|thumb|right|Barry mu 1992]] Nangauli wakaŵa wa chipani cha Republican, Barry wakimikika ku [[Khoti la Madandawuro la United States la Chigaŵa Chachitatu]] na Pulezidenti wa Democratic [[Bill Clinton]]{{r|Horowitz (2015)}} pa Juni 17, 1999. Wakimikika kuti wazuze mpando uwo ukasiyika apo [[H. Lee Sarokin]] wakapumura mu 1996.<ref name="auto">{{Cite web|url=https://www.fjc.gov/history/judges/barry-maryanne-trump|title=Barry, Maryanne Trump |website=[[Federal Judicial Center]] |access-date=August 24, 2020|archive-url=https://web.archive.org/web/20190716230202/https://www.fjc.gov/history/judges/barry-maryanne-trump|archive-date=July 16, 2019|url-status=live}}</ref> (Clinton wakimikaso [[Robert Raymar]] ku mpando uwu mu 1998, kweni kukimikika uku kukamara para chaka chikamara kwambura kupika ku [[Komiti ya Milandu ya Seneti ya United States]].)<ref>{{cite news|first=David|last=Margolick|url=https://www.nytimes.com/1992/03/20/news/yale-alumni-take-lead-again-even-if-not-in-law.html|title=Yale Alumni Take Lead Again, Even If Not in Law|newspaper=[[The New York Times]]|location=New York City|date=March 20, 1992|access-date=August 4, 2019|archive-url=https://web.archive.org/web/20190805010111/https://www.nytimes.com/1992/03/20/news/yale-alumni-take-lead-again-even-if-not-in-law.html|archive-date=August 5, 2019|url-status=live}}</ref> [[Seneti ya United States]] yikazomerezga Barry mwakukolerana pa Seputembala 13, 1999.<ref>{{Cite news|url=https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/|title=When President Clinton did a very nice thing for Donald Trump|newspaper=[[The Washington Post]]|last=Kamen|first=Al|date=July 30, 2015|access-date=February 16, 2016|archive-url=https://archive.today/20161213180718/https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/|archive-date=December 13, 2016|url-status=live}}</ref> Wakapokera udindo wake pa Seputembala 22, 1999.<ref name="auto" /> Mu 1999 Barry wakaphalira ''New Jersey Law Journal'' kuti "nkhuchindikika chomene ndipo nkhumuwonga chomene chifukwa cha kukimikika uku", ndipo wakati "nkhazizwa kuti ŵakanisankha", wakasazgirapo kuti, "Nkhughanaghana kuti mbiri ya ntchito yane pa Khoti la Chigaŵa yikaŵa yiwemi mwakukwana kuti ŵanifipiske, ndipo nkhukondwa kuti ndyali zikaŵavya pakusankha uku".{{r|Ackermann (1999)}} Mu Janyuwale 2006, Barry wakachitira ukaboni wakovwira kukimikika kwa mulaŵiliri munyake wa Khoti la Chigaŵa Chachitatu [[Samuel Alito]] ku Khoti Likuru la United States.<ref>{{Cite web|url=https://www.nj.com/politics/2016/02/cruz_attacks_trumps_sister_maryanne_an_nj_judge.html|title=Cruz again attacks Trump's sister, a N.J. judge|first=Claude|last=Brodesser-Akner|date=February 21, 2016|website=nj.com|access-date=July 16, 2019|archive-url=https://web.archive.org/web/20190716230158/https://www.nj.com/politics/2016/02/cruz_attacks_trumps_sister_maryanne_an_nj_judge.html|archive-date=July 16, 2019|url-status=live}}</ref> Mu cheruzgo cha 2006, ''Abou Cham v. Attorney General'', Barry wakasuska chomene nkharo ya [[Mweruzgi wa Khoti la Vyakunjira mu United States]] pa mulandu uwo ukakhwaskanga muchimbi wakufuma ku [[Gambia]]. Mupempheri wakuchimbira nkhondo wakaŵa mdumbu wa pulezidenti wakale wa Gambia [[Dawda Jawara]], uyo [[Kuwukira boma ku Gambia kwa 1994|wakathereskeka pa kuwukira boma mu 1994]]; boma liphya likajalira panji kukoma ŵabali ŵanandi ŵa Cham ndipo likakanizga chipani chawo cha ndyali. Barry wakadumura mulandu mwakovwira Abou Cham; wakasuska mafumbo gha Judge Donald Ferlise gha mazuŵa ghaŵiri nga ngakofya, ghankhaza, na ghakuzikizga kwa "mupempheri uyo wakalutilira kusuzgika maghanoghano"; ndipo wakadumura kuti Cham "wakaparanyika maghanoghano".<ref name = McClatchy>{{cite news | last =Taylor | first =Marisa | title =Immigration judges face increased scrutiny | newspaper =[[McClatchy]]DC | date =June 28, 2006 | url =https://www.mcclatchydc.com/latest-news/article24456196.html | access-date =August 23, 2020 | archive-date =January 29, 2021 | archive-url =https://web.archive.org/web/20210129000354/https://www.mcclatchydc.com/latest-news/article24456196.html | url-status =live }}</ref><ref name=ABA>{{cite news | last =Tebo | first =Margaret Graham | title =Asylum Ordeals | newspaper =[[ABA Journal]] | date =November 24, 2006 | url =https://www.abajournal.com/magazine/article/asylum_ordeals | access-date =August 23, 2020 | archive-date =January 24, 2021 | archive-url =https://web.archive.org/web/20210124225108/https://www.abajournal.com/magazine/article/asylum_ordeals | url-status =live }}</ref><ref name=Cham>{{cite web | url =https://caselaw.findlaw.com/us-3rd-circuit/1320004.html | title =Abou Cham, Petitioner v. Attorney General of the United States, Respondent | last =Barry | first =Maryanne Trump | date =April 28, 2006 | website =[[FindLaw]] | access-date =August 23, 2020 | archive-date =August 23, 2020 | archive-url =https://web.archive.org/web/20200823004237/https://caselaw.findlaw.com/us-3rd-circuit/1320004.html | url-status =live }}</ref><ref name=Simmons>{{cite book| last =Simmons| first =William Paul| title =Human Rights Law and the Marginalized Other| publisher =[[Cambridge University Press]]| year =2011| pages =173–176| url =https://books.google.com/books?id=NZewdr8pci0C| isbn =978-1139503266| access-date =September 1, 2020| archive-date =July 23, 2024| archive-url =https://web.archive.org/web/20240723044927/https://books.google.com/books?id=NZewdr8pci0C| url-status =live}}</ref> Barry wakalemba kuti pakaŵavya "nanga nkhachoko waka cha ntchindi, ulemu, panji chilongolero chilichose cha urunji" mu umo Ferlise wakachitira na Cham, ndipo ichi chikapangiska Ferlise kughanaghana kuti ukaboni wa Cham ukaŵa wautesi. Wakadumuraso kuti cheruzgo cha Khoti la Vyakunjira chikaŵa "chilonda chikuru" ku ndondomeko ya urunji ya America.<ref name = McClatchy/><ref name=ABA/><ref name=Cham/><ref name=Simmons/> Pamanyuma pachoko waka pa cheruzgo cha Barry, Ferlise wakafumiskika pa ntchito yake.<ref name=ABA/> Mu 2009, Barry wakalongozga mulandu wa chitetezo cha charu wa ''Stephen Beightler v. Essex County Prosecutor's Office (3rd Cir. 2009)'', cheruzgo chakuzirwa chomene chakukhwaskana na chitetezo cha ma state pasi pa Amendment ya 11.<ref>[https://digitalcommons.law.villanova.edu/cgi/viewcontent.cgi?article=1793&context=thirdcircuit_2009 "Stephen Beightler v. Essex Cty Pros"], United States Third Circuit Court of Appeals. University of Villanova. August 20, 2009. Retrieved 5 July 2026</ref> Mulandu uwu ukaŵa pa mulara wa milandu wa boma uyo wakasuskanga munthu kuti waswa chitetezo cha charu panthazi pa khoti la boma. [[Stephen Beightler]] wakasuma, wakuti state yikajalira chitetezo chake ndipo chikeneranga yayi kugwira ntchito chifukwa mulara wa milandu wa boma wakajipereka yekha ku mazaza gha federal mwa kupoka mazaza gha [[Dipatimenti ya Vyarunji ya United States]] ghakupanga masuzgo agha. Barry wakadumura kuti pakaŵavya kuleka chitetezo kwakuyana na umo ma state ghakuchitira nkharo iyi. Mulandu uwu ukukhozgeka kanandi mu makhoti gha state na federal, ndipo khoti linyake la federal likati Khoti la Chigaŵa Chachitatu likaŵa na mwaŵi wakukhazikiska chiyerezgero cha malango kweni likatondeka.<ref>[https://law.justia.com/cases/federal/district-courts/new-jersey/njdce/2:2008cv04325/219490/29/ "COLEY v. COUNTY OF ESSEX et al, No. 2:2008cv04325 - Document 29 (D.N.J. 2010)"], United States District District of New Jersey. Justia U.S. Law. August 4, 2010. p. 4. Retrieved 6 July 2026</ref> Pa Juni 30, 2011, Barry wakatora [[udindo wa mkulu]] (''senior status'').{{r|FJC}} Wakatora udindo wa mkulu wambura kugwira ntchito mu sabata yakwamba ya Febuluwale 2017, pafupifupi masabata ghaŵiri pamanyuma pakuti mubali wake [[Kukhazikiskika kwakwamba kwa Donald Trump|wakhazikiskika kuŵa pulezidenti]].{{r|Mannion (2017)}}<ref>{{cite news |website=[[CNN]] |url=https://www.cnn.com/2018/10/03/politics/donald-trump-older-sister-family-finances/index.html |title=A financial disclosure from Donald Trump's sister led to The New York Times report on his taxes |first1=Elizabeth |last1=Hartfield |date=October 3, 2018 |first2=Erica |last2=Orden |archive-url=https://web.archive.org/web/20181004030901/https://www.cnn.com/2018/10/03/politics/donald-trump-older-sister-family-finances/index.html |archive-date=October 4, 2018 |quote=In 2017, she became an inactive judge.}}</ref> Barry wakapumura ntchito pa Febuluwale 11, 2019. Kupumura kwake kukamalizga kufufuza kwakuti panji wakachitako ndondomeko za [[kubisamiska msonkho]] pamoza na ŵabali ŵake izo zikaphwanya malango gha nkharo ya ŵeruzgi. Kufufuza kukajara kwambura kufika pa fundo yakuti ivyo wakasuskikanga vikaŵa vyaunenesko panji yayi.<ref name=":0" /><ref>{{Cite web|url=https://www.philly.com/news/trump-sister-judge-maryanne-barry-philadelphia-federal-court-third-circuit-20190411.html|title=Trump's sister retires as federal judge in Philadelphia amid reported probe of family finances|last=Gambardello|first=Joseph A.|date=April 13, 2019|website=philly.com|language=en-US|access-date=April 13, 2019|archive-url=https://web.archive.org/web/20190413004606/https://www.philly.com/news/trump-sister-judge-maryanne-barry-philadelphia-federal-court-third-circuit-20190411.html|archive-date=April 13, 2019|url-status=live}}</ref> ==Vyakususkika vya kubisamiska msonkho== Mu Okutobala 2018, ''[[The New York Times]]'' yikafumiska lipoti la kufufuza ilo likati Barry, pamoza na awiske na ŵabali ŵake, ŵakachita vinthu vyachinyengo na vyambura kuzomerezgeka kuti ŵachepeskeko ndalama za [[msonkho wa chiharo]] na [[msonkho wa mphatso]] zakukhwaskana na malonda gha malo gha Fred Trump.<ref name="NYT_Barstow_20181002">{{Cite news|url=https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html|title=Trump Engaged in Suspect Tax Schemes as He Reaped Riches From His Father|last1=Barstow|first1=David|first2=Susanne|last2=Craig|first3=Russ|last3=Buettner|newspaper=The New York Times|date=October 2, 2018|access-date=October 5, 2018|archive-url=https://web.archive.org/web/20190526034238/https://www.nytimes.com/interactive/2018/10/02/us/politics/donald-trump-tax-schemes-fred-trump.html|archive-date=May 26, 2019|url-status=live}}</ref> Mulembi wakufufuza [[Susanne Craig]] wakasanga chikalata icho Barry wakapeleka ku Senate ya U.S. pa nyengo ya kukhozgeka kwake kuŵa weruzgi wa boma mu 1983, umo wakalongosolera kuti wakapokera ndalama zakukwana madola miliyoni yimoza kufuma ku All County Building Supply & Maintenance.<ref name="NYT_Smith_20181003">{{Cite news|url=https://www.businessinsider.com/new-york-times-story-trump-wealth-source-maryanne-document-2018-10|title=New York Times reveals that its bombshell story on Trump's wealth was made possible by a document his sister submitted to the Senate years ago|last=Smith|first=Allan|date=October 3, 2018|work=Business Insider|access-date=October 5, 2018|archive-url=https://web.archive.org/web/20181005194855/https://www.businessinsider.com/new-york-times-story-trump-wealth-source-maryanne-document-2018-10|archive-date=October 5, 2018|url-status=live}}</ref> ''The Times'' yikati All County Building Supply & Maintenance yikaŵa "kampani yachinyengo" iyo yikapangika mu 1992<ref name="NYT_Smith_20181003" /> ndipo yikaŵa ya Barry, Donald Trump, ŵabali ŵawo na mubali wawo munyake. All County Building Supply & Maintenance yikayowoyeka kuti yikalipiranga ntchito izo zikachitikanga pa nyumba za maapartment za Fred Trump; nyumba zira zikazakawelerangaso ndalama ku kampani, kweni zikasazgirangapo ndalama mwachinyengo pa malipiro agha. Akumanya vya misonkho ŵakayowoya kuti chifukwa All County "yikachitanga ntchito yeneco yayi, kusamuskika kwa ndalama kwizira mu kampani iyi kukaŵa nga ni mphatso iyo yikapona msonkho wa 55 peresenti uwo ukaŵapo pa nyengo yira".<ref name="NYT_Buettner_20181215" /> Adiresi yake yikaŵa nyumba ya [[Manhasset, New York]] ya John Walter, muzukuru wa Fred Trump.<ref name="NYT_Smith_20181003" /><ref group="Notes">According to the investigation by ''The Times'', [[John W. Walter|John Walter]] [https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/ (1934–2018)] ({{Webarchive|url=https://web.archive.org/web/20200128052147/https://theislandnow.com/news-98/john-walter-flower-hill-mayor-cousin-president-dies/|date=January 28, 2020}}) managed Fred Trump's business records. Those records filled the basement of Walter's Flower Hill, New York residence. The investigation by ''The Times'' included thousands of documents such as "bank statements, financial audits, accounting ledgers, cash disbursement reports, invoices and canceled checks" and over 200 of Fred Trump's tax returns.</ref> Mu nkhani yakulondezgapo, ''The New York Times'' yikati ndalama izo All County yikasanganga mwambura kuzomerezgeka zikagaŵikana pakati pa ŵabali ŵa Trump.<ref name="NYT_Buettner_20181215">{{cite news |url=https://www.nytimes.com/2018/12/15/us/politics/trump-tenants-taxes.html |date=December 15, 2018 |access-date=December 15, 2018 |title=As the Trumps Dodged Taxes, Their Tenants Paid a Price |first1=Russ |last1=Buettner |first2=Susanne |last2=Craig |newspaper=[[The New York Times]] |archive-url=https://web.archive.org/web/20190524213618/https://www.nytimes.com/2018/12/15/us/politics/trump-tenants-taxes.html |archive-date=May 24, 2019 |url-status=live }}</ref> Mu Okutobala 2018, chifukwa cha kufumiskika kwa lipoti ili, [[Dipatimenti ya Misonkho na Ndalama ya Boma la New York]] yikamba kuwona ivyo vikayowoyekanga vya uchinyengo pa Barry na ŵabali ŵake.<ref name="NYT_Barstow_20181002" /><ref name="CNN_Borak_20181003">{{cite news |url=https://www.cnn.com/2018/10/02/politics/donald-trump-tax-schemes/index.html |title=New York Times investigation: Trump helped his parents evade taxes, 'including instances of outright fraud' |first1=Donna |last1=Borak |first2=Sophie |last2=Tatum |work=CNN |date=October 3, 2018 |access-date=December 15, 2018 |archive-url=https://web.archive.org/web/20190510174311/https://www.cnn.com/2018/10/02/politics/donald-trump-tax-schemes/index.html |archive-date=May 10, 2019 |url-status=live }}</ref><ref name=":0">{{cite news |url=https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |title=Retiring as a Judge, Trump's Sister Ends Court Inquiry Into Her Role in Tax Dodges |first1=Russ |last1=Buettner |first2=Susanne |last2=Craig |date=April 10, 2019 |newspaper=[[The New York Times]] |location=New York City |access-date=April 11, 2019 |archive-url=https://web.archive.org/web/20190411010703/https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |archive-date=April 11, 2019 |url-status=live }}</ref> Pa Febuluwale 1, 2019, ŵanthu ŵanayi ŵa ntchito ya malango awo ŵakapeleka madandawuro pa Weruzgi Barry mu Okutobala 2018 chifukwa cha ivyo vikayowoyeka mu ''The New York Times'', ŵakaphalirika na [[Khoti la Apilu la United States la Dera Lachiŵiri|Khoti la Apilu la Dera Lachiŵiri]] kuti kufufuza pa nkhani ya kuswa malango gha nkharo ya ŵeruzgi na Barry kukambika, pa ivyo wakasuskikanga vya kunjilirapo mu vyachinyengo vya msonkho na ndalama.<ref>{{Cite news |last1=Buttner |first1=Russ |last2=Craig |first2=Susanne |date=10 April 2019 |title=Retiring as a Judge, Trump's Sister Ends Court Inquiry Into Her Role in Tax Dodges |work=New York Times |url=https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |access-date=16 November 2023 |archive-date=April 11, 2019 |archive-url=https://web.archive.org/web/20190411010703/https://www.nytimes.com/2019/04/10/us/maryanne-trump-barry-misconduct-inquiry.html |url-status=live }}</ref> Mazuŵa khumi ghakati ghajumphapo, Barry, uyo wakaŵa weruzgi mukuru wambura kugwira ntchito, wakapharazga kuti wapumura ntchito, ndipo ichi chikamalizga kufufuza.<ref name=":0" /> ==Kususka Donald Trump mwachisisi== Barry wakayowoyapo viyowoyero vichoko waka pa ŵanthu vya mubali wake muchoko [[Donald Trump]] mu nyengo yake yakwamba kuŵa pulezidenti. Wakafwa pambere wandasankhike kaŵiri kuŵa pulezidenti mu 2024.<ref name="auto1" /> Mu Ogasiti 2020, muzukuru wawo [[Mary L. Trump]] wakavumbura kuti wakalemba mwachisisi maora 15 gha nkhani zake na Barry mu 2018 na 2019. Mu nkhani izo zikalembeka, Barry wakasuska chomene mubali wake.<ref name="auto1" /> Mary wakafumiska pa ŵanthu malemba ghanandi na vigaŵa vya mawu gha nkhani izi, kusazgapo ivyo vikaŵavye mu buku lake la 2020 ''[[Too Much and Never Enough]]''.<ref name="auto1" /> Mu malemba agha, Barry wakayowoya vya mubali wake kuti, "Chose icho wakukhumba nkhukondweska [[Trumpism|ŵanthu ŵake ŵakumovwira]]. Walije fundo. Palije. [[Kugwiliskira ntchito Twitter na Donald Trump|Kulemba kwake pa Twitter]] na [[Mazgu ghaboza panji ghakusokweska gha Donald Trump|kuboza]]... aa Chiuta wane. Nkhuyowoya mwakufwatuka chomene, kweni ukumanya. Kusintha nkhani. Kuleka kunozgekera. Kuboza. Eee. [...] Chose ntchautesi. Nchautesi na nkhaza izi. Donald ngwankhaza."<ref name="auto1" /> Wakasazgirapo kuti wakawerenganga mabuku yayi ndipo wakaleka munyake kuti wamulemberere mayeso ghakunjilira ku koleji.<ref name="auto1" /> Mu malemba agha, Barry wakasuskaso ndondomeko yakupatukanya mbumba ya ŵanthu ŵakufuma ku vyaru vinyake ya boma lakwamba la Trump, [[Ndondomeko ya boma la Trump yakupatukanya mbumba|yakupatukanya mbumba]], pamoza na [[Ntchito za bizinesi za Donald Trump|kubankirapuse kwa mabizinesi gha mubali wake]], ndipo wakasazgirapo kuti "mungamugomezganga yayi".<ref name="auto1" /><ref>{{cite news |author1=Kelly Mena |author2=Jeremy Diamond |author3=Kevin Bohn |title=Trump's sister bitterly criticizes him in conversations secretly recorded by her niece Mary Trump |url=https://edition.cnn.com/2020/08/22/politics/maryanne-trump-barry-donald-trump-mary-trump/index.html |agency=CNN |date=August 23, 2020 |access-date=August 26, 2020 |archive-date=January 17, 2021 |archive-url=https://web.archive.org/web/20210117055502/https://edition.cnn.com/2020/08/22/politics/maryanne-trump-barry-donald-trump-mary-trump/index.html |url-status=live }}</ref><ref>{{cite web |title=Donald Trump's Sister Maryanne Trump Barry Leaked Audio Transcript |url=https://www.rev.com/blog/transcripts/donald-trumps-sister-maryanne-trump-leaked-audio-transcript |website=Rev Transcript Library |date=August 24, 2020 |access-date=August 26, 2020 |archive-date=January 29, 2021 |archive-url=https://web.archive.org/web/20210129013044/https://www.rev.com/blog/transcripts/donald-trumps-sister-maryanne-trump-leaked-audio-transcript |url-status=live }}</ref> ==Umoyo wake, ulwari, na nyifwa== Mfumu wakwamba wa Barry wakaŵa David Desmond; ŵakapatukana mu 1980.{{r|Foster (2017)}} Mu 1982, wakatorana na loya wa ku New Jersey [[John J. Barry|John Joseph Barry]].{{r|Horowitz (2015)|Maryanne Desmond (1982)}} Ŵakakhala mu nthengwa vyaka 18 pambere wandafwe pa Epulero 9, 2000.{{r|John Barry (2000)}} Wakaŵa na mwana yumoza kufuma mu nthengwa yake yakwamba.{{r|Foster (2017)|Engagements: Lisa Aitken (1992)}} Barry wakang'anamukira ku Chikatolika wati wakura ndipo kanandi wakalutanga ku [[Misa mu Mpingo wa Katolika|Misa]].<ref>{{Cite news |last=Bernstein |first=Jacob |date=2023-11-17 |title=Trump Attends His Sister's Funeral, but Does Not Speak |language=en-US |work=The New York Times |url=https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |access-date=2023-11-17 |issn=0362-4331 |archive-date=November 17, 2023 |archive-url=https://web.archive.org/web/20231117232019/https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |url-status=live }}</ref> Mu 2016, wakapeleka madola 4 miliyoni ku sukulu ya maJesuit ya [[Fairfield University]] kuti yovwire masambiro gha ŵasambiri kweniso kovwira malo gha yunivesite agho ghakusambizga vya [[uzimu wa Ignatius]].{{r|Roy (2016)|Cipollaro (2016)}} Mu 2023, Barry wakayowoyeka kuti wakaŵa pa chisamaliro cha [[hospice]] chifukwa cha kansa.<ref>{{cite news|url = https://dailyvoice.com/new-york/nassau/former-president-donald-trumps-sister-dies-at-86-in-new-york/|title = Donald Trump's Sister Dies At 86 In New York|work = [[Daily Voice (American hyperlocal news)|Nassau Daily Voice]]|date = November 13, 2023|accessdate = November 13, 2023|last1 = DeMarco|first1 = Jerry|last2 = Reakes|first2 = Kathy|archive-date = November 13, 2023|archive-url = https://web.archive.org/web/20231113150002/https://dailyvoice.com/new-york/nassau/former-president-donald-trumps-sister-dies-at-86-in-new-york/|url-status = live}}</ref> Pa Novembala 13, 2023, wakafwira pa nyumba yake ku [[Upper East Side]] mu Manhattan, wali na vyaka 86.<ref>{{Cite news |last=Bernstein |first=Jacob |date=November 17, 2023 |title=Former President Trump Attends His Sister's Funeral |url=https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |access-date=February 12, 2024 |work=[[The New York Times]] |archive-date=April 4, 2024 |archive-url=https://web.archive.org/web/20240404081708/https://www.nytimes.com/2023/11/17/style/trump-sister-funeral-maryanne-barry.html |url-status=live }}</ref> ==Mphotho== Mu 2004, Weruzgi wa Khoti Likuru [[Sandra Day O'Connor]] wakapeleka Barry mphotho iyo yikuthyika zina la O'Connor, iyo [[Seton Hall University School of Law]] yikupeleka ku ŵanakazi awo ŵachita makora chomene mu vya malango na uteŵeti wa paŵanthu. Pa mwambo wa kupeleka mphotho iyi, Barry wakati, "Nkhuphalira ŵanakazi wose kuti mukumbukenge umo vikaŵira vyakusuzga ku ŵanakazi nga ni Weruzgi O'Connor pakwamba", ndipo wakasazgirapo kuti, "Nangauli wakamalizga masambiro na mamaki ghapachanya chomene, wakachimbizgika kugwira ntchito ya mulembi wa malango. Kumbukani umo tafikira patali".{{r|Horowitz (2015)}} ==Mazgu== {{reflist|group="Notes"}} ==Ukaboni== {{reflist|30em|refs= <ref name="Ackermann (1999)"> {{cite journal |last = Ackermann |first = Matt |title = Conservative-with-a-Heart Barry Nominated for Third Circuit Seat |date = June 21, 1999 |journal = New Jersey Law Journal |publisher = [[Rutgers University]] |location = Camden, New Jersey |volume = 156 |pages = 1105 |via = Is That Legal? (blog) |url = http://www.isthatlegal.org/archives/supreme_court/ |archive-url = https://web.archive.org/web/20080918165253/http://www.isthatlegal.org/archives/supreme_court/ |archive-date = September 18, 2008 |url-status = dead }} </ref> <ref name="Candlish (2015)"> {{cite news |last = Candlish |first = Jane |date = May 16, 2015 |title = Councillor Welcomes Trump Donation to Western Isles Care Home |url = http://www.pressandjournal.co.uk/fp/news/581059/councillor-welcomes-trump-donation-to-western-isles-care-home/ |newspaper = [[The Press and Journal (Scotland)|The Press and Journal]] |publisher = [[D. C. Thomson & Co. Ltd.]] |location = [[Aberdeen]], Scotland |access-date = January 25, 2016 |archive-url = https://archive.today/20171104125444/https://www.pressandjournal.co.uk/fp/news/581059/councillor-welcomes-trump-donation-to-western-isles-care-home/ |archive-date = November 4, 2017 |url-status = live }} <ref name="Cipollaro (2016)"> {{cite press release |last = Cipollaro |first = Susan |title = Honorable Maryanne Trump Barry Donates $4M in Honor of Rev. Jeffrey P. von Arx, S.J., President of Fairfield University |date = September 14, 2016 |publisher = [[Yunivesite ya Fairfield]] |location = Fairfield, Connecticut |url = https://www.fairfield.edu/lassochannel/press/pr_index/index.lasso?id=4519 |access-date = November 4, 2017 |archive-url = https://web.archive.org/web/20170820085228/https://www.fairfield.edu/lassochannel/press/pr_index/index.lasso?id=4519 |archive-date = August 20, 2017 |url-status = live }} </ref> <ref name="Engagements: Lisa Aitken (1992)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = Engagements: Lisa Aitken, David Desmond |date = May 31, 1992 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/1992/05/31/style/engagements-lisa-aitken-david-desmond.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011432/http://www.nytimes.com/1992/05/31/style/engagements-lisa-aitken-david-desmond.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="FJC"> {{cite web |title = Barry, Maryanne Trump |website = Federal Judicial Center |url = https://www.fjc.gov/node/1377511 |access-date = November 4, 2017 |archive-url = https://archive.today/20171104120008/https://www.fjc.gov/node/1377511 |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Foster (2017)"> {{cite news |last = Foster |first = Alice |title = Judge Maryanne Trump Barry in Pictures: Donald Trump's Sister Celebrates 80th Birthday |date = April 5, 2017 |newspaper = [[Daily Express]] |publisher = [[Express Newspapers]] |location = London, England |url = http://www.express.co.uk/news/politics/788258/Maryanne-Trump-Barry-in-pictures-Donald-Trump-sister-photographs-images-birthday |access-date = November 4, 2017 |archive-url = https://archive.today/20171104135438/http://www.express.co.uk/news/politics/788258/Maryanne-Trump-Barry-in-pictures-Donald-Trump-sister-photographs-images-birthday |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Horowitz (2015)"> {{cite news |last = Horowitz |first = Jason |title = Familiar Talk on Women, From an Unfamiliar Trump |date = August 18, 2015 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/2015/08/19/us/politics/familiar-talk-women-from-donald-trump-sister.html |access-date = November 2, 2017 |archive-url = https://archive.today/20151110090035/http://www.nytimes.com/2015/08/19/us/politics/familiar-talk-women-from-donald-trump-sister.html?_r=0 |archive-date = November 10, 2015 |url-status = live }} </ref> <ref name="John Barry (2000)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = John Barry, 60, Trial and Appellate Lawyer |date = April 18, 2000 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/2000/04/18/nyregion/john-barry-60-trial-and-appellate-lawyer.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011430/http://www.nytimes.com/2000/04/18/nyregion/john-barry-60-trial-and-appellate-lawyer.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Johnson (2015)"> {{cite news |last = Johnson |first = Jenna |title = Donald Trump Says His Older Sister Isn't Interested in Becoming a Supreme Court Judge |date = October 11, 2015 |newspaper = [[The Washington Post]] |publisher = [[Nash Holdings]] |location = Washington, D.C. |url = https://www.washingtonpost.com/news/post-politics/wp/2015/10/11/donald-trump-says-his-older-sister-isnt-interested-in-becoming-a-supreme-court-judge/ |access-date = November 4, 2017 |archive-url = https://archive.today/20151012164503/https://www.washingtonpost.com/news/post-politics/wp/2015/10/11/donald-trump-says-his-older-sister-isnt-interested-in-becoming-a-supreme-court-judge/ |archive-date = October 12, 2015 |url-status = live }} </ref> <!-- <ref name="Kamen (2015)"> {{cite news |last = Kamen |first = Al |title = When President Clinton Did a Very Nice Thing for Donald Trump |date = 2015 |newspaper = [[Washington Post]] |publisher = [[Nash Holdings]] |location = Washington, D.C. |url = https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/ |access-date = November 4, 2017 |archive-url = https://archive.today/20161213180718/https://www.washingtonpost.com/news/powerpost/wp/2015/07/30/when-president-clinton-did-a-very-nice-thing-for-donald-trump/ |archive-date = December 13, 2016 |url-status = live |quote = Barry, a Republican and Reagan-appointed federal trial judge at the time, reportedly was herself surprised she was picked. }} </ref> --> <ref name="Margolick (1992)"> {{cite news |last = Margolick |first = David |author-link = David Margolick |title = At the Bar |date = December 4, 1992 |newspaper = [[The New York Times]] |location = New York City |url = https://www.nytimes.com/1992/12/04/news/at-the-bar.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011419/http://www.nytimes.com/1992/12/04/news/at-the-bar.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Maryanne Desmond (1982)"> {{cite news |author = <!--Staff writer(s); no by-line.--> |title = Maryanne Desmond Weds John Barry |date = December 27, 1982 |newspaper = [[The New York Times]] |location = New York City |issn = 0362-4331 |url = https://www.nytimes.com/1982/12/27/style/maryanne-desmond-weds-john-barry.html |access-date = November 4, 2017 |archive-url = https://archive.today/20161111011421/http://www.nytimes.com/1982/12/27/style/maryanne-desmond-weds-john-barry.html |archive-date = November 11, 2016 |url-status = live }} </ref> <ref name="Mannion (2017)"> {{cite web |last = Mannion |first = Cara |title = 3rd Circ. Judge, Trump's Sister, Stops Hearing Cases |date = February 3, 2017 |website = Law360 |url = https://www.law360.com/articles/888127/3rd-circ-judge-trump-s-sister-stops-hearing-cases |access-date = November 4, 2017 |archive-url = https://archive.today/20171104125817/https://www.law360.com/articles/888127/3rd-circ-judge-trump-s-sister-stops-hearing-cases |archive-date = November 4, 2017 |url-status = live }} </ref> <ref name="Roy (2016)"> {{cite news |last = Roy |first = Eleanor |title = Donald Trump's Sister Gives $4 Million to Fairfield University |date = October 9, 2016 |newspaper = [[Palm Beach Daily News]] |publisher = [[Cox Enterprises]] |location = Palm Beach, Florida |url = http://www.palmbeachdailynews.com/news/local/donald-trump-sister-gives-million-fairfield-university/HtIdtYqrS6z6UweGQCtlXO/ |access-date = September 12, 2017 |archive-url = https://archive.today/20171104131825/http://www.palmbeachdailynews.com/news/local/donald-trump-sister-gives-million-fairfield-university/HtIdtYqrS6z6UweGQCtlXO/ |archive-date = November 4, 2017 |url-status = live }} </ref> }} ==Intaneti== {{Wikiquote}} *{{FJC Bio|109|nid=1377511}} *{{C-SPAN|49192}} {{s-start}} {{s-legal}} {{s-bef|before=[[Henry Curtis Meanor]]}} {{s-ttl|title={{nowrap|Mweruzgi wa [[Khoti la Dango la United States la Chigaŵa cha New Jersey]]}}|years=1983–1999}} {{s-aft|after=[[Joel A. Pisano]]}} {{s-bef|before=[[H. Lee Sarokin]]}} {{s-ttl|title={{nowrap|Mweruzgi wa [[Khoti la Maapelo la United States la Dera Lachitatu]]}}|years=1999–2011}} {{s-aft|after=[[Patty Shwartz]]}} {{s-end}} {{Banja la Trump}} {{Portal bar|Dango|United States}} {{Authority control}} {{DEFAULTSORT:Barry, Maryanne Trump}} [[Category:1937 kubabika]] [[Category:2023 kufwa]] [[Category:Ŵaloya ŵa ku America ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵa boma la United States ŵa vyaka vya m'ma 21]] [[Category:Ŵanthu ŵa ku America ŵa mphapu ya ku Germany]] [[Category:Ŵaloŵa ŵa ntchito ya ulongozgi wa dango wa United States]] [[Category:Ŵasambiri ŵa Yunivesite ya Columbia]] [[Category:Ŵasambiri ŵa Yunivesite ya Hofstra]] [[Category:Ŵasambiri ŵa Maurice A. Deane School of Law]] [[Category:Ŵeruzgi ŵa Khoti la Maapelo la United States la Dera Lachitatu]] [[Category:Ŵeruzgi ŵa Khoti la Dango la United States la Chigaŵa cha New Jersey]] [[Category:Ŵaloya kufuma ku New York City]] [[Category:Ŵaloya kufuma ku Philadelphia]] [[Category:Ŵasambiri ŵa Mount Holyoke College]] [[Category:Ŵanthu ŵa chipani Republican cha New York (boma)]] [[Category:Ŵanthu kufuma ku Jamaica Estates, Queens]] [[Category:Ŵanthu ŵa chipani Republican cha Pennsylvania]] [[Category:Banja la Trump|Maryanne]] [[Category:Ŵeruzgi ŵa makhoti gha maapelo gha United States ŵakusankhika na Bill Clinton]] [[Category:Ŵeruzgi ŵa makhoti gha boma gha United States ŵakusankhika na Ronald Reagan]] [[Category:Ŵaloya ŵanakazi ŵa ku America ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵanakazi ŵa vyaka vya m'ma 1900]] [[Category:Ŵeruzgi ŵanakazi ŵa ku United States ŵa vyaka vya m'ma 21]] [[Category:Ŵanthu ŵa Yunivesite ya Fairfield]] [[Category:Ŵakufwa na khansa ku New York (boma)]] [[Category:Ŵanthu kufuma ku Upper East Side]] [[Category:Ŵakuzgoka ku Chikatolika cha Roma]] [[Category:Ŵakatolika kufuma ku New York (boma)]] ek0u41p9m2vn1zcthrx9a98djdmb9af Fred Trump Jr. 0 47808 116954 2026-07-16T11:15:17Z Tumbuka Arch 6863 Created page with "{{short description|Mubali wa Donald Trump (1938–1981)}} {{Use American English|date=June 2026}} {{Use mdy dates|date=September 2020}} {{Infobox person | name = Fred Trump Jr. | image = Fred Trump Jr. 1966 (cropped).jpg | caption = Trump mu 1966 | birth_name = Frederick Crist<!-- Not a typo; there is no 'h'. See Trump p. 31 --> Trump Jr.{{sfn|Trump|2020|p=31}} | birth_date = {{Birth date|1938|10|14}} | birth_place = [[Queens]], Msumba wa New Yo..." 116954 wikitext text/x-wiki {{short description|Mubali wa Donald Trump (1938–1981)}} {{Use American English|date=June 2026}} {{Use mdy dates|date=September 2020}} {{Infobox person | name = Fred Trump Jr. | image = Fred Trump Jr. 1966 (cropped).jpg | caption = Trump mu 1966 | birth_name = Frederick Crist<!-- Not a typo; there is no 'h'. See Trump p. 31 --> Trump Jr.{{sfn|Trump|2020|p=31}} | birth_date = {{Birth date|1938|10|14}} | birth_place = [[Queens]], Msumba wa New York, U.S. | death_date = {{Death date and age|1981|09|26|1938|10|14}} | death_place = Queens, Msumba wa New York, U.S. | burial_place = [[All Faiths Cemetery]], Queens, Msumba wa New York | other_names = Freddy Trump | alma_mater = [[Lehigh University]] [[Bachelor of Arts|(BA)]] | occupation = {{hlist|Wakwendeska ndege|[[Ntchito yakunozga|wantchito wakunozga]]}} | spouse = {{marriage|Linda Clapp|1962}} | parents = {{Unbulleted list|[[Fred Trump]]|[[Mary Anne MacLeod Trump]]}} | children = {{hlist|[[Fred Trump III|Fred III]]|[[Mary L. Trump|Mary]]}} | family = [[Mbumba ya Trump|Trump]] }} '''Frederick Crist<!-- Not a typo; there is no 'h'. See Trump p. 31 --> Trump Jr.'''{{efn|Zina lapakati likuzunulika {{IPAc-en|k|ɹ|ɪ|s|t}}, likuyanako na mazgu ghakuti "fist".}} (Okutobala 14, 1938 – Seputembala 26, 1981) wakaŵa wakwendeska ndege wa ku America kweniso wantchito wakunozga. Wakaŵa mwana mulara wa mubizinesi wa nyumba na malo [[Fred Trump|Fred Trump Sr.]], ndipo wakatondeka kukondweska awiske ndipo wakasankha kuŵa wakwendeska ndege m'malo mwa kupokera [[The Trump Organization|bizinesi ya mbumba]], icho chikapangiska mubali wake muchoko [[Donald Trump]] kupokera bizinesi iyi m'malo mwake. Kuyana na mwana wake mwanakazi [[Mary L. Trump|Mary]], wose Fred Sr. na Donald ŵakamuyuyuranga Fred Jr. chifukwa cha chisankho ichi. Kukwambilira kwa m'ma 1970, wakatondekanga kulutilira ntchito yakwendeska ndege chifukwa cha [[uchidakwa]], matenda agho ghakawovwiraso kuti wafwe na [[mtima kufyoka]] pa vyaka 42. ==Umoyo wakwambilira== Frederick Crist<!-- Not a typo; there is no 'h'. See Trump p. 31 --> Trump Jr. wakababika pa Okutobala 14, 1938, wakaŵa mwana mwanalume wakwamba wa mulembi wa nyumba na malo [[Fred Trump|Fred Trump Sr.]] na [[Mary Anne MacLeod Trump]] ku [[Queens]], Msumba wa New York.{{Sfn|Trump|2020|p=31}} Mu 1956, Trump wakamalizga masambiro ghake pa [[St. Paul's School (New York)|Sukulu ya St. Paul's]], sukulu yakunozgekera ŵanalume kunjira ku yunivesite. Chaka chenechicho, awiske Fred Trump Sr. ŵakapeleka ndalama kuti malo ghakusoperapo maseŵero ghanozgekeso, ndipo ghakachemeka Trump Field chifukwa cha kumuchindika.<ref>{{cite news |last=Kordes |first=John |title=The Kordes Korner |url=https://www.gcnews.com/articles/the-kordes-korner-55/ |work=Garden City News |location=Garden City, NY |date=March 29, 2018}}</ref> Trump wakasambira pa [[Lehigh University]] ndipo wakanjira mu gulu la ŵasambiri la [[Ŵayuda|Chiyuda]], [[Sigma Alpha Mu]], nangauli iyo wakaŵavya Chiyuda.<ref name=":2">{{cite news |last=Gerber |first=Drew |date=August 3, 2016 |title=That Time Trump's Older Brother Fred Pretended To Be Jewish – To Join a Jewish Frat |work=The Forward |url=http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |url-status=live |access-date=June 10, 2017 |archive-url=https://web.archive.org/web/20170120165856/http://forward.com/news/346731/trumps-brother-rebelled-against-their-authoritarian-father-by-joining-a-jew/ |archive-date=January 20, 2017}}</ref>{{efn|Fred Jr. wakayowoyapo, mwakuyana na ŵanyake ŵa mu gulu lake la ŵasambiri, kuti awiske ŵakaŵa Muyuda.<ref>{{cite web |title=Does Donald Trump Have Jewish Roots? |url=https://vosizneias.com/2019/11/01/does-donald-trump-have-jewish-roots/ |work=[[Vos Iz Neias?]] |date=November 1, 2019 |access-date=August 12, 2020}}</ref>}} Mu 2018, dokotala wa maghanoghano [[Justin A. Frank]] wakayowoya kuti Trump wakanjira mu gulu ili kuti wasuskane na awiske, awo Frank wakatenge ŵakaŵa [[Antisemitism|ŵakutinkha Ŵayuda]].<ref>{{cite book |last=Frank |first=Justin A. |author-link=Justin A. Frank |title=Trump on the Couch: Inside the Mind of the President |url=https://books.google.com/books?id=G-hqDwAAQBAJ |publisher=[[Penguin Press]] |year=2018 |page=64 |isbn=978-0-7352-2032-4}}</ref> Mu 2020, mwana wake mwanakazi [[Mary L. Trump]] nayo wakayowoya kuti sekuru ŵake ŵakaŵa ŵakutinkha Ŵayuda.<ref>{{cite magazine |last=Corn |first=David |title=Mary Trump on why Donald Trump lies, why he's 'racist,' and why she wrote her book|url=https://www.motherjones.com/politics/2020/07/watch-mary-trump-on-why-donald-trump-lies-why-hes-racist-and-why-she-wrote-her-book/ |magazine=[[Mother Jones (magazine)|Mother Jones]] |date=July 22, 2020 |access-date=September 28, 2021}}</ref> Trump wakaŵa pulezidenti wa gulu la ŵasambiri ili ndipo wakamalizga digiri ya [[Bachelor of Arts]] mu bizinesi. Wakamalizgaso [[Reserve Officers' Training Corps]] ndipo wakanjira mu [[Air National Guard]] na udindo wa second lieutenant.{{sfn|Trump|2020|p=53}} ==Umoyo wapakati na ntchito== Mu 1958, Trump wakakumana na Linda Clapp apo wakaŵa pa ulendo wa kupumulirako ku [[Bahamas]]. Pamanyuma Linda wakaŵa wakupwelelera ŵakwenda pa ndege ndipo wakamupempha kuti wamovwire kusanga nyumba pafupi na [[Idlewild Airport]]; pamanyuma pachoko ŵakamba kutemwana. Wakamulomba nthengwa mu 1961. Kukwambilira kwa 1962, ŵakanjira mu nthengwa ku Florida, ndipo Linda wakaleka ntchito pa kampani ya ndege chifukwa kampani yikazomerezganga yayi ŵakupwelelera ŵakwenda pa ndege awo ŵali pa nthengwa. Ŵakakhalanga ku Manhattan ndipo ŵakababa mwana wawo wakwamba, [[Fred Trump III]], mu Novembala 1962.{{Sfn|Trump|2020|pp=55–56}} Chaka chakulondezgapo, ŵakasamira ku yimoza mwa nyumba za Fred Trump Sr. ku [[Jamaica, Queens]]. Pa nyengo iyi, Trump wakachitanga ntchito zakunozga pa malo gha awiske.{{Sfn|Trump|2020|p=57}} Awiske ŵakhumbanga kuti waŵe "wambura kuthereska" mwakuti wapokere bizinesi yawo ya nyumba na malo, E. Trump & Son (iyo yikazgoka [[The Trump Organization]]), kweni Trump wakaŵa wakwenelera yayi pa ntchito iyi.{{sfn|Trump|2020|p=41}} Mu 1966, Trump wakalembeka mu manyuzipepara kuti wakaŵa vice president wa kampani iyi, kweni wakaŵa na masuzgo ghakuru pakugwira ntchito na awiske.<ref>{{cite web |title=Fred Trump Jr. |url=https://trump24h.com/biography/relatives/fred-trump-jr |publisher=trump24h.com |access-date=31 August 2020 |archive-date=February 19, 2021 |archive-url=https://web.archive.org/web/20210219214221/https://trump24h.com/biography/relatives/fred-trump-jr |url-status=usurped }}</ref> Chaka chenechicho, Fred Jr. wakafumamo mu kampani kuti walondezge loto lake la kuŵa wakwendeska ndege, ndipo mwaluŵiro wakapokerereka ku [[Trans World Airlines]], icho chikapangiska mphindano pakati pake na awiske.<ref name=":3">{{cite news|last1=Horowitz|first1=Jason|date=January 2, 2016|title=For Donald Trump, Lessons From a Brother's Suffering|work=[[The New York Times]]|url=https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|url-status=live|access-date=June 10, 2017|archive-url=https://archive.today/20171027141255/https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|archive-date=October 27, 2017}}</ref> Kuyana na mwana wake mwanakazi Mary, sekuru ŵake "ŵakamunanga mwa kumuyuyura na kuchepeska chilichose cha wunthu wake." Iyo wakati Fred Trump Sr. na [[Donald Trump]] ŵakamusekanga chifukwa cha chisankho chake cha kuŵa wakwendeska ndege wa ndege za malonda, ndipo ŵakayaniskanga ntchito iyi na yakwendeska basi panji galimoto ya munthu.<ref>{{Cite news|last=Lozada|first=Carlos|date=July 9, 2020|title=Review of 'Too Much and Never Enough: How My Family Created the World's Most Dangerous Man' by Mary L. Trump|language=en|newspaper=The Washington Post|url=https://www.washingtonpost.com/outlook/2020/07/09/real-villain-mary-trumps-family-tell-all-isnt-donald-its-fred/|access-date=July 16, 2020}}</ref><ref name=":1">{{cite web|last=D'Antonio|first=Michael|date=June 17, 2020|title=The psychologist in the Trump family speaks|url=https://www.cnn.com/2020/06/17/opinions/mary-trump-book-opinion-dantonio/index.html|access-date=July 2, 2020|publisher=[[CNN]]}}</ref>{{Sfn|Trump|2020|pp=62, 64}}<ref>{{Cite news|last=Kranish|first=Michael|date=August 8, 2019|title=Trump has regrets that he scolded his late, alcoholic brother about his career|newspaper=The Washington Post|url=https://www.washingtonpost.com/politics/trump-pressured-his-alcoholic-brother-about-his-career-now-he-has-regrets-/2019/08/07/58ec2d70-b216-11e9-8f6c-7828e68cb15f_story.html|access-date=2021-08-21}}</ref> ==Uchidakwa na nyifwa== [[File:FredTrump1950-02.png|thumb|upright=.55|[[Fred Trump|Fred Trump Sr.]] {{circa|1950}}]] Pafupifupi mu 1970, pamanyuma pa viphikiro vinandi vya pa nyumba, Clapp wakapempha Trump kuti wafumemo pa nyumba yawo ndipo wakanozga kuti Fred Sr. wasinthe maloko gha pa nyumba.{{Sfn|Trump|2020|p=85}} Apo [[uchidakwa]] wake ukamutondeska kulutilira kugwira ntchito nga ni wakwendeska ndege, Trump wakawelera kukagwira ntchito ku bizinesi ya awiske. Pamanyuma pake wakasamukira mu chipinda chapachanya chambura vinthu cha nyumba ya ŵapapi ŵake ndipo wakambaso ntchito zakunozga pa malo gha Trump.{{Sfn|Trump|2020|p=93}} Pa Seputembala 26, 1981,<ref name=":0">{{cite episode|title=Part 1: New Frontiers|series=[[Biography (TV program)|Biography]]: The Trump Dynasty|date=February 25, 2019|time=1:21|network=[[A&E (TV network)|A&E]]}}</ref> pa msinkhu wa vyaka 42, wakafwa chifukwa cha [[mtima kufyoka]] uwo ukachitika chifukwa cha uchidakwa wake.{{sfn|Blair|2015|p=320}}{{Sfn|Trump|2020|ps=, author's note}}{{Efn|Satifiketi yake ya nyifwa yikulongora kuti wakafwa pa Seputembala 29 chifukwa cha "vyakufwira vyachibadwa".{{sfn|Trump|2020|p=127}}}} ===Vikachitika pamanyuma=== Donald Trump, uyo kwamba mu 1976 wayowoyanga pakweru kuti wakumwanga yayi moŵa,<ref>{{cite web|title=Donald Trump, Real Estate Promoter, Builds Image as He Buys Buildings|website=The New York Times|date=November 1, 1976|url=https://www.nytimes.com/1976/11/01/archives/donald-trump-real-estate-promoter-builds-image-as-he-buys-buildings.html}}</ref><ref>{{cite news|title=RUSH Transcript: Donald Trump CNN Republican Presidential Town Hall Columbia, SC |url=https://cnnpressroom.blogs.cnn.com/2016/02/18/rush-transcript-donald-trump-cnn-republican-presidential-town-hall-columbia-sc |archive-url=https://web.archive.org/web/20160220091639/http://cnnpressroom.blogs.cnn.com/2016/02/18/rush-transcript-donald-trump-cnn-republican-presidential-town-hall-columbia-sc |url-status=dead |archive-date=February 20, 2016 |publisher=[[CNN]] |date=February 18, 2016}}</ref> pakwamba wakati chikanga ichi chikafuma ku [[kuleka kumwa moŵa]] kwa awiske,<ref>{{Cite book |last1=Trump |first1=Donald J. |url=https://books.google.com/books?id=Ye6e_VxM00kC&pg=PA96 |title=Trump: The Art of the Deal |last2=Schwartz |first2=Tony |publisher=Random House |year=2009 |isbn=978-0-307-57533-3 |location=New York |pages=96 |orig-year=1987}}</ref><ref>{{Cite book |last1=Trump |first1=Donald J. |url=https://books.google.com/books?id=jnSfMHluCxEC&q=discipline |title=Trump: Surviving at the Top |last2=Leerhsen |first2=Charles |publisher=Random House |year=1990 |isbn=978-0-307-57533-3 |location=New York |pages=40 |language=en |orig-year=1990}}</ref> kweni wakayowoyaso vya ivyo wakasambira kwa mubali wake, wakati: <blockquote>"Zuŵa lililose wakaniphaliranga, 'Wona umo niliri. Para nkhamukora ukusuta, uzamudandawura, nanga nkhumwa galasi limoza la moŵa chara chifukwa uzamutemwa chomene.' ...Freddy wakachita ntchito yiwemi."<ref>{{cite web|title=Donald Trump Talks Family, Women in Unearthed Transcript|website=[[The Hollywood Reporter]]|orig-date=March 10, 1994|date=October 13, 2016|url=https://www.hollywoodreporter.com/news/donald-trump-women-unearthed-1994-primetime-interview-nancy-collins-938176}}</ref></blockquote> Pa Malichi 16, 1994, anyina ŵa Trump ŵakayowoya mu kuyowoyeskana na wakupharazga wa ku Ireland [[Bibi Baskin]] kuti, "Tikaluza mwana, mwana withu mukuru. Wakaŵa na vyaka 41. Ichi ntchinthu icho anyina ŵangaluwanga yayi."{{efn|Nadi wakaŵa na vyaka 42 pa nyengo iyo wakafwira.}}<ref>{{Cite web |date=March 16, 1994 |title=Mary Anne MacLeod Trump |url=https://www.rte.ie/archives/2016/1010/822886-meet-donald-trumps-mother/ |access-date=2024-03-11 |website=[[RTÉ]] |language=en}}</ref> Mu 2019, Donald Trump wakayowoya vya nyifwa ya mubali wake kuti:<ref>{{Cite news |last=Kranish |first=Michael |date=2019-08-13 |title=Trump pressured his alcoholic brother about his career. Now he says he has regrets. |url=https://www.washingtonpost.com/politics/trump-pressured-his-alcoholic-brother-about-his-career-now-he-has-regrets-/2019/08/07/58ec2d70-b216-11e9-8f6c-7828e68cb15f_story.html |access-date=2024-03-11 |work=The Washington Post |language=en-US |issn=0190-8286}}</ref> <blockquote>"Nadi nkudandawula kuti nkhamukakamizga [kuti walongozgenge bizinesi ya mbumba] chifukwa iyi yikaŵa ntchito iyo wakakhumbanga yayi. ...Yikaŵa ntchito yake yayi. ...Nkughanaghana kuti ubudi uwo ise [Donald na Fred Sr.] tikachita ukaŵa kughanaghana kuti waliyose watemwenge [kulongozga bizinesi]. Uwu ukaŵa ubudi ukuru chomene. ...icho wakatemwanga chomene chikaŵa kwendeska ndege."</blockquote> ==Mu mitheto ya kutchuka== * Fred Trump Jr. wakuseŵeka na [[Charlie Carrick]] mu filimu ya mbiri ya umoyo ya 2024 [[The Apprentice (2024 film)|''The Apprentice'']]. == Mazgu ghakulongosora == {{notelist}} == Ukaboni == === Maukaboni === {{Reflist}} === Mabuku agha ghagwiliskirika ntchito === <!-- This section is ONLY for books that are cited in citations of this Wikipedia article. --> {{refbegin}} * {{cite book |last=Blair |first=Gwenda |author-link=Gwenda Blair |title=The Trumps: Three Generations of Builders and a Presidential Candidate |url=https://books.google.com/books?id=uJifCgAAQBAJ |publisher=[[Simon & Schuster]] |location=New York |year=2015 |orig-year=2000 |isbn=978-1501139369}} * {{cite book |last=Trump |first=Mary L. |author-link=Mary L. Trump |title=Too Much and Never Enough |url=https://books.google.com/books?id=qDnhDwAAQBAJ |publisher=Simon & Schuster |location=New York |year=2020 |oclc=1164093746 |isbn=978-1-9821-4146-2}} {{refend}} {{Trump family}} {{Authority control}} {{DEFAULTSORT:Trump, Fred}} [[Category:Ŵakubabika mu 1938]] [[Category:Ŵakufwa mu 1981]] [[Category:Ŵamalonda ŵa ku America ŵa m'ma 1900]] [[Category:Ŵakwendeska ndege ŵa ku New York (state)]] [[Category:Ŵamalonda ŵa ku Msumba wa New York]] [[Category:Ŵasambiri ŵakale ŵa Lehigh University]] [[Category:Ŵasilikari ŵa New York National Guard]] [[Category:Ŵanthu ŵa ku Jamaica, Queens]] [[Category:Ŵanthu ŵa ku Queens, New York]] [[Category:Mbumba ya Trump|Fred Trump Jr.]] [[Category:Nyifwa zakukhwaskana na moŵa mu Msumba wa New York]] 8agaoli55fs0sbksib8vfbukkvkird9 Module:Lua call 828 47809 116981 2025-07-30T04:17:19Z en>Uzume 0 strict 116981 Scribunto text/plain require[[strict]] local p={} function p.main(frame) local parent = frame.getParent(frame) or {} local explist = {} local fnname, varlist local vars = {} for k, v in pairs(_G) do vars[k] = v -- transfer every global directly to our variable table end for k, v in pairs(parent.args or {}) do vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table end for k, v in pairs(frame.args or {}) do vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table end --- Alas Scribunto does NOT implement coroutines, according to --- https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format --- this will not stop us from trying to implement one single lousy function call if vars[1] then fnname, varlist = mw.ustring.match(vars[1], "^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$") end if varlist then local expn = 0 repeat expn = expn + 1 explist[expn] = vars[mw.ustring.match(varlist, "([^%,]+)")] varlist = mw.ustring.match(varlist, "[^%,]+,(.*)$") until not varlist end local scopetab = vars while mw.ustring.match(fnname, "%.") do local scopekey scopekey, fnname = mw.ustring.match(fnname, "^(%a[^%.]*)%.(.*)$") scopetab = scopetab[scopekey] end local fn = scopetab[fnname] if type(fn) ~= "function" then --XXX: What about callable tables? return tostring(fn) else local output = {fn(unpack(explist))} return output[vars.reserved_return or 1] end end local function tonumberOrString(v) return tonumber(v) or v:gsub("^\\", "", 1) end local function callWithTonumberOrStringOnPairs(f, ...) local args = {} for _, v in ... do table.insert(args, tonumberOrString(v)) end return (f(unpack(args))) end --[[ ------------------------------------------------------------------------------------ -- ipairsAtOffset -- This is an iterator for arrays. It can be used like ipairs, but with -- specified i as first index to iterate. i is an offset from 1 -- ------------------------------------------------------------------------------------ --]] local function ipairsAtOffset(t, i) local f, s, i0 = ipairs(t) return f, s, i0+i end local function get(s) local G = _G; for _ in mw.text.gsplit( mw.text.trim(s, '%s'), '%s*%.%s*' ) do G = G[_] end return G end --[[ ------------------------------------------------------------------------------------ -- call -- -- This function is usually useful for debugging template parameters. -- Prefix parameter with backslash (\) to force interpreting parameter as string. -- The leading backslash will be removed before passed to Lua function. -- -- Example: -- {{#invoke:Lua call|call|mw.log|a|1|2|3}} will return results of mw.log('a', 1, 2, 3) -- {{#invoke:Lua call|call|mw.logObject|\a|321|\321| \321 }} will return results of mw.logObject('a', 321, '321', ' \\321 ') -- -- This example show the debugging to see which Unicode characters are allowed in template parameters, -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0061}}}} return 97 -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0000}}}} return 65533 -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0001}}}} return 65533 -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0002}}}}}} return 0xfffd -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007e}}}}}} return 0x007e -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007f}}}}}} return 0x007f -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0080}}}}}} return 0x0080 -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x00a0}}}}}} return 0x00a0 -- ------------------------------------------------------------------------------------ --]] function p.call(frame) return callWithTonumberOrStringOnPairs(get(frame.args[1]), ipairsAtOffset(frame.args, 1) ) end --local TableTools = require('Module:TableTools') --[[ ------------------------------------------------------------------------------------ -- get -- -- Example: -- {{#invoke:Lua call|get| math.pi }} will return value of math.pi -- {{#invoke:Lua call|get|math|pi}} will return value of math.pi -- {{#invoke:Lua call|get| math |pi}} will return value of _G[' math '].pi -- {{#invoke:Lua call|get|_G| math.pi }} will return value of _G[' math.pi '] -- {{#invoke:Lua call|get|obj.a.5.c}} will return value of obj.a['5'].c -- {{#invoke:Lua call|get|obj|a|5|c}} will return value of obj.a[5].c -- ------------------------------------------------------------------------------------ --]] function p.get(frame) -- #frame.args always return 0, regardless of number of unnamed -- template parameters, so check manually instead if frame.args[2] == nil then -- not do tonumber() for this args style, -- always treat it as string, -- so 'obj.1' will mean obj['1'] rather obj[1] return get(frame.args[1]) else local G = _G for _, v in ipairs(frame.args) do G = G[tonumberOrString(v)] end return G end end --[[ ------------------------------------------------------------------------------------ -- invoke -- -- This function is used by Template:Invoke -- ------------------------------------------------------------------------------------ --]] function p.invoke(frame) local pframe, usedpargs = frame:getParent(), {} -- get module and function names from parent args if not provided local pfargs = setmetatable({frame.args[1], frame.args[2]}, {__index = table}) if not pfargs[1] then pfargs[1], usedpargs[1] = pframe.args[1], true if not pfargs[2] then pfargs[2], usedpargs[2] = pframe.args[2], true end elseif not pfargs[2] then pfargs[2], usedpargs[1] = pframe.args[1], true end -- repack sequential args for i, v in ipairs(pframe.args) do if not usedpargs[i] then pfargs:insert(v) usedpargs[i] = true end end -- copy other args for k, v in pairs(pframe.args) do if not pfargs[k] and not usedpargs[k] then pfargs[k], usedpargs[k] = v, true end end -- #invoke off parent frame so the new frame has the same parent return pframe:callParserFunction{name = '#invoke', args = pfargs} end return p 5ghedutku9genociz4xes1m4p1hp80q 116982 116981 2026-07-16T11:15:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Lua_call]] 116981 Scribunto text/plain require[[strict]] local p={} function p.main(frame) local parent = frame.getParent(frame) or {} local explist = {} local fnname, varlist local vars = {} for k, v in pairs(_G) do vars[k] = v -- transfer every global directly to our variable table end for k, v in pairs(parent.args or {}) do vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table end for k, v in pairs(frame.args or {}) do vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table end --- Alas Scribunto does NOT implement coroutines, according to --- https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format --- this will not stop us from trying to implement one single lousy function call if vars[1] then fnname, varlist = mw.ustring.match(vars[1], "^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$") end if varlist then local expn = 0 repeat expn = expn + 1 explist[expn] = vars[mw.ustring.match(varlist, "([^%,]+)")] varlist = mw.ustring.match(varlist, "[^%,]+,(.*)$") until not varlist end local scopetab = vars while mw.ustring.match(fnname, "%.") do local scopekey scopekey, fnname = mw.ustring.match(fnname, "^(%a[^%.]*)%.(.*)$") scopetab = scopetab[scopekey] end local fn = scopetab[fnname] if type(fn) ~= "function" then --XXX: What about callable tables? return tostring(fn) else local output = {fn(unpack(explist))} return output[vars.reserved_return or 1] end end local function tonumberOrString(v) return tonumber(v) or v:gsub("^\\", "", 1) end local function callWithTonumberOrStringOnPairs(f, ...) local args = {} for _, v in ... do table.insert(args, tonumberOrString(v)) end return (f(unpack(args))) end --[[ ------------------------------------------------------------------------------------ -- ipairsAtOffset -- This is an iterator for arrays. It can be used like ipairs, but with -- specified i as first index to iterate. i is an offset from 1 -- ------------------------------------------------------------------------------------ --]] local function ipairsAtOffset(t, i) local f, s, i0 = ipairs(t) return f, s, i0+i end local function get(s) local G = _G; for _ in mw.text.gsplit( mw.text.trim(s, '%s'), '%s*%.%s*' ) do G = G[_] end return G end --[[ ------------------------------------------------------------------------------------ -- call -- -- This function is usually useful for debugging template parameters. -- Prefix parameter with backslash (\) to force interpreting parameter as string. -- The leading backslash will be removed before passed to Lua function. -- -- Example: -- {{#invoke:Lua call|call|mw.log|a|1|2|3}} will return results of mw.log('a', 1, 2, 3) -- {{#invoke:Lua call|call|mw.logObject|\a|321|\321| \321 }} will return results of mw.logObject('a', 321, '321', ' \\321 ') -- -- This example show the debugging to see which Unicode characters are allowed in template parameters, -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0061}}}} return 97 -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0000}}}} return 65533 -- {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0001}}}} return 65533 -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0002}}}}}} return 0xfffd -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007e}}}}}} return 0x007e -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007f}}}}}} return 0x007f -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0080}}}}}} return 0x0080 -- {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x00a0}}}}}} return 0x00a0 -- ------------------------------------------------------------------------------------ --]] function p.call(frame) return callWithTonumberOrStringOnPairs(get(frame.args[1]), ipairsAtOffset(frame.args, 1) ) end --local TableTools = require('Module:TableTools') --[[ ------------------------------------------------------------------------------------ -- get -- -- Example: -- {{#invoke:Lua call|get| math.pi }} will return value of math.pi -- {{#invoke:Lua call|get|math|pi}} will return value of math.pi -- {{#invoke:Lua call|get| math |pi}} will return value of _G[' math '].pi -- {{#invoke:Lua call|get|_G| math.pi }} will return value of _G[' math.pi '] -- {{#invoke:Lua call|get|obj.a.5.c}} will return value of obj.a['5'].c -- {{#invoke:Lua call|get|obj|a|5|c}} will return value of obj.a[5].c -- ------------------------------------------------------------------------------------ --]] function p.get(frame) -- #frame.args always return 0, regardless of number of unnamed -- template parameters, so check manually instead if frame.args[2] == nil then -- not do tonumber() for this args style, -- always treat it as string, -- so 'obj.1' will mean obj['1'] rather obj[1] return get(frame.args[1]) else local G = _G for _, v in ipairs(frame.args) do G = G[tonumberOrString(v)] end return G end end --[[ ------------------------------------------------------------------------------------ -- invoke -- -- This function is used by Template:Invoke -- ------------------------------------------------------------------------------------ --]] function p.invoke(frame) local pframe, usedpargs = frame:getParent(), {} -- get module and function names from parent args if not provided local pfargs = setmetatable({frame.args[1], frame.args[2]}, {__index = table}) if not pfargs[1] then pfargs[1], usedpargs[1] = pframe.args[1], true if not pfargs[2] then pfargs[2], usedpargs[2] = pframe.args[2], true end elseif not pfargs[2] then pfargs[2], usedpargs[1] = pframe.args[1], true end -- repack sequential args for i, v in ipairs(pframe.args) do if not usedpargs[i] then pfargs:insert(v) usedpargs[i] = true end end -- copy other args for k, v in pairs(pframe.args) do if not pfargs[k] and not usedpargs[k] then pfargs[k], usedpargs[k] = v, true end end -- #invoke off parent frame so the new frame has the same parent return pframe:callParserFunction{name = '#invoke', args = pfargs} end return p 5ghedutku9genociz4xes1m4p1hp80q Template:Source parameter 10 47810 116983 2026-04-12T13:41:20Z en>FaviFake 0 FaviFake moved page [[Template:Param]] to [[Template:Source parameter]]: "Param" is ambiguous and not immediately clear, especially when compared to [[TM:Para]]. "Source parameter" is explicit, distinct from the other template name, and aligns with standard technical terminology, making it easier to understand and use correctly. 116983 wikitext text/x-wiki {{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||<{{{tag|code}}}>}}&#123;&#123;&#123;{{{1<noinclude>|foo</noinclude>}}}{{SAFESUBST:<noinclude />#ifeq:{{{2}}}|{{{2|}}} |&#124;}}{{{2|}}}&#125;&#125;&#125;{{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||</{{{tag|code}}}>}}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> k2oxzdhjfcbt88hy90njp6u20ucxx42 116984 116983 2026-07-16T11:15:51Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Source_parameter]] 116983 wikitext text/x-wiki {{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||<{{{tag|code}}}>}}&#123;&#123;&#123;{{{1<noinclude>|foo</noinclude>}}}{{SAFESUBST:<noinclude />#ifeq:{{{2}}}|{{{2|}}} |&#124;}}{{{2|}}}&#125;&#125;&#125;{{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||</{{{tag|code}}}>}}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> k2oxzdhjfcbt88hy90njp6u20ucxx42 Robert Trump 0 47811 116985 2026-07-16T11:24:49Z Tumbuka Arch 6863 Created page with "{{short description|Mubizinesi wa ku America (1948–2020)}} {{Use American English|date=August 2020}} {{Use mdy dates|date=October 2020}} {{distinguish|text=Wakuseŵera bola la ku America [[Bob Trumpy]]}} {{Infobox person | name = Robert Trump | image = RobertTrump.gif | birth_name = Robert Stewart Trump | birth_date = {{Birth date|1948|8|26}} | birth_place = [[Msumba wa New York]], U.S. | death_date = {{death da..." 116985 wikitext text/x-wiki {{short description|Mubizinesi wa ku America (1948–2020)}} {{Use American English|date=August 2020}} {{Use mdy dates|date=October 2020}} {{distinguish|text=Wakuseŵera bola la ku America [[Bob Trumpy]]}} {{Infobox person | name = Robert Trump | image = RobertTrump.gif | birth_name = Robert Stewart Trump | birth_date = {{Birth date|1948|8|26}} | birth_place = [[Msumba wa New York]], U.S. | death_date = {{death date and age|2020|8|15|1948|8|26}} | death_place = Msumba wa New York, U.S. | resting_place = All Faiths Cemetery, New York | alma_mater = [[Boston University]] ([[Bachelor of Science|BS]]) | occupation = {{hlist|Mubizinesi|wakuzenga nyumba na malo|wakugulitsa ndalama}} | boards = [[ZeniMax Media]] | spouse = {{plainlist| * {{marriage|[[Blaine Trump|Blaine Beard]]|1984|2009|end = divorced}} * {{marriage|Ann Marie Pallan|2020}} }} | parents = [[Fred Trump]]<br>[[Mary Anne MacLeod Trump|Mary Anne MacLeod]] | family = [[Mbumba ya Trump]] }} '''Robert Stewart Trump''' (Ogasiti 26, 1948 – Ogasiti 15, 2020) wakaŵa mubizinesi na wakugulitsa ndalama wa ku America. Wakaŵa mubali muchoko wa [[Donald Trump]], pulezidenti wa 45 na wa 47 wa [[Pulezidenti wa United States]], ndipo wakaŵa wakumovwira wakugomezgeka wa [[Ntchito ya ndyali ya Donald Trump|ntchito ya ndyali ya Donald]]. Trump wakateŵeteranga mu wupu wa ŵalongozgi wa [[ZeniMax Media]], kampani yikuru ya [[Bethesda Softworks]], kufuma mu 1999<ref name=":0" /> m'paka nyifwa yake mu 2020.<ref name=":2">{{cite web|url=https://www.zenimax.com/about|archive-url=https://web.archive.org/web/20200731034441/https://www.zenimax.com/about|title=ZeniMax Media Board of Directors|archive-date=July 31, 2020|access-date=August 16, 2020}}</ref> Padera pa kuŵa yumoza wa ŵalongozgi ŵa ZeniMax, wakaŵaso wakugulitsa ndalama mu kampani iyi.<ref name=":3" /> Mu vyaka vichoko waka pambere wandafwe, Robert Trump wakaŵa pulezidenti wa [[The Trump Organization]], bizinesi iyo yikaŵa ya ŵabali ŵa mbumba ya Trump.<ref name=":4" /> Wakagwiraso ntchito nga ni [[Kuzenga nyumba na malo|wakuzenga nyumba na malo]].<ref name=":5" /> ==Umoyo wakwambilira na masambiro== {{see also|Mbumba ya Donald Trump}} Robert Stewart Trump wakababikira ku [[Queens]] pa Ogasiti 26, 1948, kwa [[Fred Trump]] na [[Mary Anne MacLeod Trump|Mary Anne MacLeod]].<ref name="national">{{cite news|last1=Hannan|first1=Martin|title=An inconvenient truth? Donald Trump's Scottish mother was a low-earning migrant|url=http://www.thenational.scot/news/14903147.An_inconvenient_truth__Donald_Trump_s_Scottish_mother_was_a_low_earning_migrant/|access-date=February 11, 2017|work=[[The National (Scotland)|The National]]|date=May 20, 2016|archive-date=October 14, 2018|archive-url=https://web.archive.org/web/20181014054533/http://www.thenational.scot/news/14903147.An_inconvenient_truth__Donald_Trump_s_Scottish_mother_was_a_low_earning_migrant/|url-status=live}}</ref><ref name="NYT"/> Wakaŵa muchoko chomene pa ŵana ŵawo ŵankhondi; ŵabali na ŵadumbu ŵake ŵakaŵa [[Maryanne Trump Barry|Maryanne]], [[Fred Trump Jr.|Fred Jr.]], [[Elizabeth Trump Grau|Elizabeth]], na [[Donald Trump|Donald]].<ref name="national" /><ref>{{cite news|date=January 9, 2017|title=Trump's Brother and Yankees Executive Coming to Hudson Valley|work=[[WKXP]]|url=http://hudsonvalleycountry.com/trumps-brother-and-yankees-executive-coming-to-hudson-valley/|access-date=February 11, 2017|archive-date=February 12, 2017|archive-url=https://web.archive.org/web/20170212163941/http://hudsonvalleycountry.com/trumps-brother-and-yankees-executive-coming-to-hudson-valley/|url-status=live}}</ref> Wakamalizga masambiro ghake pa [[St. Paul's School (New York)|Sukulu ya St. Paul's]] ku [[Garden City, Long Island]]. Trump wakasambira pa [[Boston University]], uko wakasambiranga vya vyachuma;<ref name="NYT">{{Cite news|last=Karni|first=Annie|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|language=en-US|work=The New York Times|url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August 16, 2020|issn=0362-4331}}</ref> apo wakaŵa kwenekura, wakaseŵeranga [[Bola la mpira|bola la mpira]] ndipo wakaŵa [[Mseŵeri wakuzirwa chomene|MVP]] kweniso kaputeni wa timu mu 1969.<ref>{{cite news |author=Staff Writer |url=http://www.bu.edu/today/close-ups/2020/robert-trump-bu-alum-and-presidents-brother-dies/ |title= Robert Trump, BU Alum and President's Brother, Dies |work=BU Today |date=August 16, 2020 |access-date=August 17, 2020 }}</ref> ==Ntchito== Trump wakanjira mu bizinesi ya awiske ndipo wakamba kulaŵilira malo gha nyumba na malo gha [[The Trump Organization|Trump Organization]] agho ghakaŵa kuwaro kwa [[Manhattan]].<ref>{{cite book|last1=Blair|first1=Gwenda|title=The Trumps: Three Generations of Builders and a Presidential Candidate|date=2015|publisher=Simon & Schuster|isbn=978-1501139369|page=454|url=https://books.google.com/books?id=uJifCgAAQBAJ|access-date=February 11, 2017|archive-date=February 17, 2017|archive-url=https://web.archive.org/web/20170217015120/https://books.google.com/books?id=uJifCgAAQBAJ&dq|url-status=live}}</ref><ref>{{cite news|last1=Horowitz|first1=Jason|title=For Donald Trump, Lessons From a Brother's Suffering|url=https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|access-date=February 11, 2017|work=[[New York Times]]|date=January 2, 2016|archive-date=October 27, 2017|archive-url=https://archive.today/20171027141255/https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|url-status=live}}</ref> Pamanyuma pakuti Mark G. Etess wafwa mu ngozi ya ndege ya helikopita mu Okutobala 1989 pa chigaŵa chapakati cha [[Garden State Parkway]] mu [[Lacey Township, New Jersey|Lacey Township]], [[New Jersey]], Donald Trump wakasankha Robert Trump kuti wapoke malo agho Etess wakaŵa nagho.<ref name=Press11101989>{{cite news |last=Borja |first=Debbie |url=https://pressofatlanticcity.com/gallery/oct-10-1989-3-trump-execs-2-pilots-die-as-helicopter-crashes-in-parkway-median/article_40ea7e95-9309-5e01-89ba-7f6c30409ff3.html |title=October 10, 1989: 3 Trump execs, 2 pilots die as helicopter crashes in Parkway median |work=[[The Press of Atlantic City]] |date=October 11, 1989 |access-date=July 2, 2021}}</ref><ref name=Press10102016>{{cite news |url=https://pressofatlanticcity.com/business/trump-taj-mahal-closed-on-the-anniversary-of-executives-helicopter-crash/article_19e308a4-d5ea-5604-b37d-f21cd9554630.html |title=Trump Taj Mahal closed on the anniversary of executives' helicopter crash |work=[[The Press of Atlantic City]] |date=October 10, 2016 |access-date=July 2, 2021}}</ref>{{efn|Padera pa nyifwa ya Mark Grossinger Etess wa vyaka 37 wakufuma ku [[Margate City, New Jersey|Margate]], ŵanyake awo ŵakafwira mu ngozi ya helikopita ya pa Okutobala 10, 1989 ŵakaŵa wakuwuluka Robert Kent, wakufuma ku [[Ronkonkoma, New York]], munyake wake Lawrence Diener wakufuma ku [[Westbury, New York]], Jonathan Benanav wakufuma ku Margate, na Stephen F. Hyde wakufuma ku [[Linwood, New Jersey|Linwood]]. Jonathan Benanav, wa vyaka 33, wakagwirapo ntchito nga ni mulembi mulara wakovwira na mulara wa ntchito za hotelo pa [[Sands Atlantic City|Sands Hotel & Casino]] mu [[Atlantic City]] kwambira Juni 1982 mpaka Julayi 1985, ndipo pamanyuma wakagwira ntchito nga ni manejala mukuru pa [[Hilton Hotels & Resorts|Airport Hilton]] mu [[Philadelphia]] pambere wandanjire ku Trump Organization mu 1986 uko wakaŵa muteŵeti mukuru wa [[Trump Plaza Hotel and Casino]]. Stephen F. Hyde, wa vyaka 43, wakaŵa munthu wakujikora uyo wakategherezganga chomene vinthu ndipo wakalongozganga malo ghatatu gha kasino gha Trump mu Atlantic City. Ngozi iyi yikachitika pa 1:40 koloko namuhanya kufupi na chisimikizgo cha mtunda 71.5 pa [[Garden State Parkway]], pafupifupi {{convert|0.75|mile}} kufuma ku [[Malo ghakupangira magesi gha nyukiliya gha Oyster Creek]].<ref name=Press11101989/><ref name=Press10102016/>}} Etess wakaŵa mulara mukuru wa [[Hard Rock Hotel & Casino Atlantic City|Trump Taj Mahal]], mulara wa Robert Trump wakulaŵilira maseŵero ghapadera, kweniso munthu wakumanyikwa pa kupanga mapangano ghakuru gha maseŵero na vyakusanguluska vya Donald Trump.{{efn|Pamanyuma pakuti Donald Trump waluta ku Russia na kukawona [[Moscow]] na [[St. Petersburg]] mu 1987, wakamba kunozga maseŵero kwizira mu ŵimiliri na Viktor Galaev ({{langx|ru|Виктор Галаев}}) na Sovintersport ya [[Sergey Chemezov]], uyo wakaŵa wakulaŵilira wa KGB, iyo yikaŵa na wanangwa wekha pa maseŵero gha Soviet.<ref name="nytimes/1989/getting">{{cite news |last1=Berger |first1=Phil |title=Getting to the Main Event Becomes a Main Event |url=http://www.nytimes.com/1989/11/25/sports/getting-to-the-main-event-becomes-a-main-event.html |access-date=25 July 2024 |work=The New York Times |date=25 November 1989 |archive-url=https://web.archive.org/web/20150525124216/http://www.nytimes.com/1989/11/25/sports/getting-to-the-main-event-becomes-a-main-event.html |archive-date=May 25, 2015}}</ref><ref>{{cite news |last=РОЛДУГИН |first=Олег (Roldugin, Oleg) |url=http://www.anticompromat.org/chemezov/sobes2008.html |title=ЧЕМЕЗОВ - ЗАПАСНОЕ ОРУЖИЕ ПУТИНА |trans-title=CHEMEZOV IS PUTIN'S BACKUP WEAPON |language=ru |work=[[:ru:Собеседник (газета)|Собеседник]] (sobesednik.ru) |date=18 March 2008 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20150925000139/http://www.anticompromat.org/chemezov/sobes2008.html |archive-date=25 September 2015}} [http://sobesednik.ru/archive/sb/11-2008/chemezov-gun Original Sobesednik site] as "ЧЕЛОВЕК С РУЖЬЕМ. Как глава Ростехнологии перешел из разведки в бизнеc" ("A MAN WITH A GUN. How the head of Rostekhnologii moved from intelligence to business")</ref><ref>{{cite news |last=Прибыловский |first=Владимир |author-link=Vladimir Pribylovsky |url=http://www.anticompromat.org/chemezov/chemezbio.html |title=ЧЕМЕЗОВ Сергей Викторович |trans-title=CHEMEZOV Sergey Viktorovich |language=ru |work=Антикомпромат (anticompromat.org) |date=2016 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20160427024948/http://www.anticompromat.org/chemezov/chemezbio.html |archive-date=27 April 2016}}</ref><ref>{{cite news |last=Прибыловский |first=Владимир |author-link=Vladimir Pribylovsky |url=http://anticompromat.org/chemezov/index.html |title=ЧЕМЕЗОВ Сергей Викторович: ссылки, аннотации |trans-title=CHEMEZOV Sergey Viktorovich: references, abstracts |language=ru |work=Антикомпромат (anticompromat.org) |date=2016 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20160412130341/http://anticompromat.org/chemezov/index.html |archive-date=12 April 2016}}</ref> Nga mbanthu ŵa [[KGB]], [[Vladimir Putin]] na Chemezov, awo ŵakaŵa mabwezi, ŵakakhalanga mu nyumba yimoza ya maapartment mu [[Dresden]] apo ŵakapanganga Sovintersport mu vyaka vya m'ma 1980.<ref>{{cite news |last=Raschke |first=Erik |url=https://www.velonews.com/events/the-outer-line-tour-de-trump-with-a-russian-accent/ |title=The Outer Line: Tour de Trump with a Russian accent: Erik Raschke examines the connection between Russia and the Tour de Trump. |work=[[VeloNews]] |date=July 1, 2018 |access-date=July 2, 2021 |archive-url=https://web.archive.org/web/20240510223303/https://velo.outsideonline.com/road/road-racing/the-outer-line-tour-de-trump-with-a-russian-accent/?scope=anon |archive-date=May 10, 2024}}</ref><ref>{{cite news |last=Козырев (Kozyrev)|first=Михаил (Mikhail) |url=https://www.forbes.ru/forbes/issue/2007-10/16688-pod-prikrytiem?from_alt_domain=1 |title=Под прикрытием |trans-title=Under cover |language=ru |work=[[Forbes]] |date=3 October 2007 |access-date=August 11, 2021 |archive-date=August 11, 2021 |archive-url=https://web.archive.org/web/20210811222602/https://www.forbes.ru/forbes/issue/2007-10/16688-pod-prikrytiem?from_alt_domain=1}}</ref> Apo ŵanthu ŵakamba kufipa mtima na maseŵero gha pa vidiyo ghankhaza pamanyuma pa [[kukoma ŵanthu pa Sukulu ya Sekondale ya Columbine mu 1999]], "ŵanthu ŵakumanyikwa pa ndyali",<ref name="nytimes/2021/02/13/dead">{{cite news |last1=Roberts |first1=Sam |title=Robert Altman, Video Game Mogul Who Survived Scandal, Dies at 73 |url=https://www.nytimes.com/2021/02/13/business/robert-altman-dead.html |access-date=28 July 2024 |work=[[The New York Times]] |date=13 February 2021}}</ref> kusazgapo Robert Trump, ŵakasankhika kuŵa pa gulu la ŵalongozgi la [[ZeniMax Media]], kampani yakupapi ya [[Bethesda Softworks]].<ref name=":0">{{cite web|first= Alissa|last=McAloon|url=https://www.gamedeveloper.com/business/obituary-zenimax-board-member-robert-trump|title=Obituary: ZeniMax board member Robert Trump|website=[[Gamasutra]]|date=August 17, 2020|access-date=August 17, 2020}}</ref> Pa nyengo iyo wakaŵa pa gulu la ŵalongozgi, ZeniMax yikafumiska maseŵero ghanandi, kusazgapo [[Fallout (franchise)|''Fallout'']], ''[[The Elder Scrolls]]'', [[Doom (franchise)|''Doom'']], na ''[[Wolfenstein]]''. Mabungwe gha nkhani ghakalongosora vya udindo wake mu kampani iyi pamanyuma pa [[kuwukira kwa sukulu ya Parkland]], apo mubali wake [[Nkhanza na maseŵero gha pa vidiyo#Kuwukira kwa sukulu ya Parkland (2018)|wakayaniska]] maseŵero gha pa vidiyo na nkhaza ndipo pamanyuma wakakumana na ŵalongozgi ŵakupambanapambana ŵa mafakitale,<ref name="Bloomberg">{{cite web|url=https://www.bloomberg.com/news/articles/2018-03-08/game-maker-joining-gun-violence-discussion-has-a-trump-on-board|title=Video-Game Companies Are Meeting With Trump. His Brother Is on One's Board|last1=Sink|first1=Justin|last2=Palmeri|first2=Christopher|publisher=Bloomberg|date=March 8, 2018|access-date=August 16, 2020|archive-date=June 25, 2020|archive-url=https://web.archive.org/web/20200625224610/https://www.bloomberg.com/news/articles/2018-03-08/game-maker-joining-gun-violence-discussion-has-a-trump-on-board|url-status=live}}</ref><ref name="NPR">{{cite web|url=https://www.npr.org/2018/03/08/591884059/trump-pits-video-game-makers-against-harshest-critics-in-another-made-for-tv-mee|title=Trump Pits Video Game Makers Against Harshest Critics In Closed-Door Meeting|publisher=NPR|last1=Montanaro|first1=Domenico|last2=Parks|first2=Miles|date=March 18, 2018|access-date=August 16, 2020}}</ref> kusazgapo [[Robert A. Altman|Robert Altman]], [[mulara mukuru wakulongozga|CEO]] wa ZeniMax.<ref>{{cite web | url = https://www.usatoday.com/story/tech/news/2018/03/08/trump-talk-video-game-makers-critics-thursday-white-house-meeting/406374002/ | title = These are the video games the White House played in its meeting on game violence |first= Mike | last =Snider | date = March 8, 2018 | access-date = August 16, 2020 | work = [[USA Today]] }}</ref> Padera pa kuŵa yumoza wa ŵalongozgi ŵa ZeniMax, Trump nayo wakaŵa wakuguliska ndalama mu kampani iyi.<ref name=":3">{{cite web|first=Dean|last=Takahashi|url=https://venturebeat.com/2008/05/30/zenimax-media-raises-99-million-from-some-big-names/|title=ZeniMax Media raises $9.9 million from some big names|website=[[VentureBeat]]|date=May 30, 2008|access-date=August 16, 2020|archive-date=June 25, 2016|archive-url=https://web.archive.org/web/20160625124752/http://venturebeat.com/2008/05/30/zenimax-media-raises-99-million-from-some-big-names/|url-status=live}}</ref> Robert Trump wakaŵa pulezidenti wa [[The Trump Organization|Trump Management, Inc.]],<ref name="casetext/trump-v-trump">{{cite web |title=Mary L. Trump, Plaintiff, v. Donald J. Trump, in his personal capacity, 77 Misc. 3d 543 |url=https://casetext.com/case/trump-v-trump-10 |archive-url=https://web.archive.org/web/20240725113308/https://casetext.com/case/trump-v-trump-10 |url-status=dead |archive-date=July 25, 2024 |website=CaseText + Citator |publisher=Supreme Court, New York County |access-date=25 July 2024 |date=November 14, 2022}}</ref> bizinesi ya [[Fred Trump]],<ref name="wapo/obit/robert-trump">{{cite news |last1=Kranish |first1=Michael |title=Robert Trump, younger brother of the president, dies at 71 |url=https://www.washingtonpost.com/local/obituaries/robert-trump-younger-brother-of-president-trump-who-filed-lawsuit-against-niece-dies-at-71/2020/08/15/6ec0f102-de62-11ea-8051-d5f887d73381_story.html |access-date=25 July 2024 |newspaper=Washington Post |date=16 August 2020}}</ref> iyo pamanyuma yikazakaŵa ya ŵabali ŵa Trump, kusazgapo Donald, Robert, Maryanne Trump-Barry, na Elizabeth Trump-Grau.<ref name=":4">{{cite news|url=https://www.ibtimes.com/who-robert-trump-presidents-brother-hospitalized-seriously-ill-3028636|title=Who Is Robert Trump? President's Brother Hospitalized, Seriously Ill|author=Thomas Kika|work=[[International Business Times]]|date=August 14, 2020|access-date=August 16, 2020}}</ref> Pa nyengo yinyake, Trump wakagwiranga ntchito nga ni [[wakupangiska malo gha malonda]].<ref name=":5">{{cite web |title=Trump says younger brother and 'best friend' Robert Trump has died |url=https://www.independent.co.uk/news/world/americas/robert-trump-death-brother-age-cause-worth-today-latest-a9672651.html |website=The Independent |access-date=August 16, 2020 |language=en |date=August 16, 2020}}</ref> ===Mulandu wa buku la Mary Trump=== {{Main|Too Much and Never Enough}} Mu Juni 2020, Robert Trump wakapeleka mulandu ku khoti kupenja kuti waleke kufumiskika kwa buku la muzukuru wake [[Mary L. Trump]] lakuti ''[[Too Much and Never Enough]]''. Mulandu wa Trump ukazikika pa phangano la 2001 la kusunga visisi ilo Mary wakalembapo apo ŵakamalizganga mulandu wakukhwaskana na chiharo na wasiya wa sekuru ŵake Fred Trump.<ref>{{cite news |last1=Jacobs |first1=Shayna |title=Judge affirms Trump's niece can publish her book about the president and his family |url=https://www.washingtonpost.com/national-security/mary-trump-book-too-much-and-never-enough/2020/07/13/6d8c64d8-c521-11ea-a99f-3bbdffb1af38_story.html |access-date=July 17, 2020 |newspaper=[[The Washington Post]] |date=July 13, 2020 |archive-date=July 18, 2020 |archive-url=https://web.archive.org/web/20200718041120/https://www.washingtonpost.com/national-security/mary-trump-book-too-much-and-never-enough/2020/07/13/6d8c64d8-c521-11ea-a99f-3bbdffb1af38_story.html |url-status=live }}</ref> Mu Julayi 2020, Mweruzgi Hal B. Greenwald wa [[Khoti Likuru la New York]] wakadumura kuti wakufumiska mabuku, [[Simon & Schuster]], wakaŵavya chigaŵa mu phangano la 2001 la [[Phangano lakukanizga kuvumbura vyachisisi|NDA]], ndipo wanangwa wake wakufumiska buku ili ukakanizgikanga yayi na phangano ili. Greenwald wakakhozgera kuti phangano la Mary Trump na wakufumiska mabuku likamupanga yayi nkhongono yakukanizga kufumiskika kwa buku pa nyengo yira.<ref>{{cite news|title=Donald Trump's Niece Mary Can Speak Out About Her Family with Scathing New Memoir, Judge Rules|url=https://people.com/politics/judge-rules-for-mary-trump-in-memoir-lawsuit/|work=[[People.com]]|date=July 14, 2020|access-date=August 15, 2020|archive-date=August 5, 2020|archive-url=https://web.archive.org/web/20200805035450/https://people.com/politics/judge-rules-for-mary-trump-in-memoir-lawsuit/|url-status=live}}</ref> Buku ili likafumiskika pa Julayi 14, 2020. ==Umoyo wa munthu== Robert Trump wakakhalanga ku [[Millbrook, New York]].<ref name="nytimes/2000/08/11/death">{{cite news |title=Paid Notice: Deaths: Trump, MaryA. |url=https://www.nytimes.com/2000/08/11/classified/paid-notice-deaths-trump-mary-a.html |access-date=28 July 2024 |work=[[The New York Times]] |date=11 August 2000}}</ref><ref name="tc">{{cite news|last1=Kasssel|first1=Matthew|date=November 2, 2016|title=Where Has Donald Trump's Brother Robert Been During This Election?|work=[[Town & Country (magazine)|Town & Country]]|url=http://www.townandcountrymag.com/society/money-and-power/news/a8479/robert-trump/|access-date=February 11, 2017|archive-url=https://web.archive.org/web/20170520102534/https://www.townandcountrymag.com/society/money-and-power/news/a8479/robert-trump/|archive-date=May 20, 2017|ref=tc}}</ref> Mu 1984, wakatora [[Blaine Trump|Blaine Beard]],<ref name="nytimes/2002/03/08/death">{{cite news |title=Paid Notice: Deaths: Beard, Josephus Simmons II |url=https://www.nytimes.com/2002/03/08/classified/paid-notice-deaths-beard-josephus-simmons-ii.html |access-date=28 July 2024 |work=[[The New York Times]] |date=8 March 2002}}</ref> uyo wakakumana nayo pa chipharazgo cha ndalama cha [[Christie's]].<ref>{{cite news|date=October 28, 1987|title=The Winning Ways of Blaine Trump|work=[[New York Times]]|url=https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|access-date=February 11, 2017|archive-date=January 27, 2017|archive-url=https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live}}</ref> Wakaŵa na mwana wakulera zina lake Christopher Trump-Retchin. Mu 2004, Blaine wakamwa mapilisi ghanandi chomene ndipo wakagonekeka ku chipatala cha [[Chipatala cha Mount Sinai (Manhattan)|Mount Sinai Hospital]] mu Manhattan pamanyuma pakuti wakamanya kuti Robert wakagulira mulembi wake kweniso msungwana wake pa nyengo iyo, Ann Marie Pallan, nyumba ya ndalama zakukwana madola 3.7 miliyoni pa [[Long Island]].<ref>[https://www.thelist.com/237117/ann-marie-pallan-who-is-robert-trumps-wife Ann Marie Pallan: Who is Robert Trump's wife?]</ref> Ŵakamba mphindano ya kulekana pa nthengwa iyo yikambira mu 2007 m'paka apo ŵakafikira pa phangano lachisisi mu 2010.<ref name=":6">{{Cite news|url=http://nymag.com/news/intelligencer/41836/|title=Divorce, Park Avenue Style|last=Rosenblum|first=Emma|date=December 8, 2007|work=[[New York (magazine)|New York]]|access-date=February 18, 2019}}</ref><ref name="NYT" /><ref>{{cite news|last1=Rosenblum|first1=Emma|date=December 8, 2007|title=Divorce, Park Avenue Style|work=[[New York (magazine)|New York]]|url=http://nymag.com/news/intelligencer/41836/|access-date=February 11, 2017|archive-date=June 3, 2017|archive-url=https://web.archive.org/web/20170603152842/http://nymag.com/news/intelligencer/41836/|url-status=live}}</ref> Mu 2006, Robert na Blaine ŵakati ŵapatukana, ŵakaguliska nyumba yawo ya {{convert|6,500|sqft|m2|abbr=off|adj=on|sp=us}} iyo yikaŵa na mauniti ghatatu, vipinda vitatu, ndipo yikaŵa yindamare kuzengeka.<ref name="nytimes/2006/05/14/deal1">{{cite news |last1=Neuman |first1=William |title=A Trump Triplex Goes on the Market |url=https://www.nytimes.com/2006/05/14/realestate/14deal1.html |access-date=28 July 2024 |work=[[The New York Times]] |date=14 May 2006}}</ref> Mu 2012, Blaine Trump wakayika nyumba yake ya ndalama zakukwana madola 17.5 miliyoni ku Millbrook kuti yiguliskike.<ref name=":7">{{Cite news |last=Bear |first=Rob |date=June 22, 2012 |title=The Oh-So-Very Un-Trump Mansion of Socialite Blaine Trump |url=https://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump |archive-url=https://web.archive.org/web/20160227073310/http://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump |url-status=dead |archive-date=February 27, 2016 |access-date=February 18, 2019 |work=[[Curbed]]}}</ref> Trump wakatora muwoli wake wachiŵiri, Ann Marie Pallan, mu Janyuwale 2020.<ref>{{cite web |title=Robert Trump, younger brother of president, dead at 71 |date=August 16, 2020 |url=https://www.kiro7.com/news/trending/robert-trump-younger-brother-president-has-died/RMMNFKTZOFGKNIIKLRN2J4T47M/ |access-date=August 31, 2020}}</ref> Trump wakaŵa mubwezi wa nyengo yitali wa [[Robert A. Altman]].<ref>{{cite web |first=Christopher |last=Palmeri |url=https://www.bloomberg.com/news/articles/2020-09-25/from-banking-scandal-to-video-game-ceo-to-billion-dollar-score |title=From Banking Scandal to Video-Game CEO to Billion-Dollar Score |website=bloomberg.com |date=September 25, 2020 |access-date=February 7, 2021 |archive-date=September 27, 2020 |archive-url=https://web.archive.org/web/20200927030721/https://www.bloomberg.com/news/articles/2020-09-25/from-banking-scandal-to-video-game-ceo-to-billion-dollar-score |url-status=live}}</ref> ===Ubwezi wake na mubali wake Donald=== Mu 1990, Donald Trump wakimika Robert kuŵa mulaŵiliri wa kasino wa [[Trump Taj Mahal]] mu [[Atlantic City, New Jersey]].<ref name="nytimes/1984/05/15/casino">{{cite news |last1=Janson |first1=Donald |title=10TH AND LARGEST CASINO OPENS IN ATLANTIC CITY |url=https://www.nytimes.com/1984/05/15/nyregion/10th-and-largest-casino-opens-in-atlantic-city.html |access-date=28 July 2024 |work=[[The New York Times]] |date=15 May 1984}}</ref> Kasino iyi yikaŵa na masuzgo ghakuru pa zuŵa lakujulira, chomenechomene pa nkhani ya kuwona vya ndalama za makina gha slot, ndipo vikatora myezi yinandi kuti vyinozgeke. Kuyana na Jack O'Donnell, uyo wakaŵa mulara wa [[The Trump Organization|Trump Organization]], pa ungano umoza, "Donald Trump wakachemerezgera mubali wake, wakamuponya mulandu wose pa suzgo la makina gha slot."<ref name="NYT"/> Robert Trump wakalutilira kuŵa wakugomezgeka pa kuthandazga [[Nchito ya ndyali ya Donald Trump|ntchito ya ndyali ya mubali wake]]. Robert wakati wafwa, wakuyowoya pa Fox [[Eric Bolling]] wakati Robert na muwoli wake Ann Marie Pallan ŵakaŵa ŵakovwira ŵankhongono ŵa Donald. Donald wakayowoya pa ''[[Fox & Friends]]'' kuti Robert ndiyo wakaŵa munthu wake mukuru wakumutemwa chomene, ndipo wakati nawo ŵanji ŵakamuphalirapo vya umo Robert wakamovwiliranga.<ref name=":1"/> ==Ulwari na nyifwa== Pa Ogasiti 14, 2020, [[ABC News (United States)|ABC News]] yikayowoya kuti Trump wakagonekeka ku [[Chipatala cha Mount Sinai (Manhattan)|Mount Sinai Hospital]] mu [[Manhattan]] pamanyuma pakuti wakaŵapo kale mu chipinda cha [[chipinda cha ŵalwari ŵakusuzga chomene]] kwa sabata yakuluska yimoza mu Juni.<ref name="Indo">{{cite news|author=Holland, Steve|date=August 16, 2020|title='He was my best friend' - Robert Trump, US president's brother who shunned the spotlight, dies|url=https://www.independent.ie/world-news/he-was-my-best-friend-robert-trump-us-presidents-brother-who-shunned-the-spotlight-dies-39453225.html|work=Irish Independent}}</ref> Donald Trump wakamuluta kukamuwona pa zuŵa lenelira ndipo wakati pamanyuma pake Robert wakalwaranga chomene ndipo "wakasuzgikanga chomene".<ref>{{cite news|title=Robert Trump, Donald's brother, seriously ill in New York hospital|url=https://www.theguardian.com/us-news/2020/aug/14/robert-trump-donald-brother-seriously-ill-new-york-hospital|access-date=August 16, 2020|work=The Guardian}}</ref><ref>{{Cite news|last1=Jackson|first1=David|last2=Fritze|first2=John|last3=Subramanian|first3=Courtney|date=August 14, 2020|title='Having a hard time.' President Trump's brother Robert is hospitalized in New York|language=en-US|work=[[USA Today]]|url=https://www.usatoday.com/story/news/politics/2020/08/14/trumps-brother-robert-trump-admitted-hospital-white-house-says/3374790001/|access-date=August 16, 2020}}</ref> Robert Trump wakafwira ku [[New York–Presbyterian Hospital]] mu Manhattan pa zuŵa lakulondezgapo, Ogasiti 15, pa vyaka 71. ''[[The New York Times]]'' yikazunura mubwezi wa mbumba uyo wakati Trump wakaŵa kwamba wayamba kusuzgika na [[Kutuluka ndopa mu ubongo|kutuluka ndopa mu ubongo]] pamanyuma pa kugwa.<ref name="NYT"/> Mzukuru wake [[Mary L. Trump|Mary]], mu mafumbo na [[Greenpeace]] mazuŵa ghachoko waka pambere wandafwe, wakati Robert wakalwaranga ndipo wakagonekekapo ku chipatala "kaŵiri panji katatu mu myezi yitatu yajumpha".<ref>{{cite web|title=Fireside fire drill with Jane Fonda and Mary Trump| date=August 14, 2020 |url=https://youtube.com/watch?v=hw3Z2cpOrFQ|access-date=August 14, 2020|publisher=Greenpeace USA}}</ref> Mu uthenga wake, Donald Trump wakalemba kuti, "Wakaŵavya waka mubali wane pera, kweni wakaŵa mubwezi wane wapamtima chomene."<ref name="NYT"/><ref>{{cite web|title=Robert Trump, the younger brother of President Donald Trump, dead at age 71|date=August 16, 2020 |url=https://www.cnn.com/2020/08/15/politics/robert-trump-dead/index.html|access-date=August 16, 2020|publisher=CNN}}</ref> Pa Ogasiti 21, [[chisopo cha nyifwa]] chikachitikira Robert mu [[East Room]]. Ŵanthu 150 ŵakiza ku chisopo ichi. Aka kakaŵa kakwamba mu vyaka pafupifupi 100 kuti purezidenti wachite chisopo cha nyifwa mu East Room.<ref name=":1">{{cite news|title=Trump Holds a Rare White House Funeral for His Younger Brother, Robert|url=https://www.nytimes.com/2020/08/21/us/politics/funeral-robert-trump.html|access-date=August 24, 2020|work=The New York Times|date=August 21, 2020 |last1=Rogers |first1=Katie |last2=Haberman |first2=Maggie }}</ref> ==Vyakukumbuska== {{notelist}} ==Ukaboni== {{reflist}} {{Trump family}} {{Authority control}} {{DEFAULTSORT:Trump, Robert}} [[Category:Ŵakubabika mu 1948]] [[Category:Ŵakufwa mu 2020]] [[Category:Ŵamalonda ŵaku America ŵa m'ma 1900]] [[Category:Ŵamalonda ŵaku America ŵa m'ma 2000]] [[Category:Ŵalongozgi ŵa makampani ŵaku America]] [[Category:Ŵakuguliska ndalama ŵaku America]] [[Category:Ŵanthu ŵaku America ŵa mphapu ya Chijeremani]] [[Category:Ŵakupangiska na kuguliska malo ŵaku America]] [[Category:Ŵalongozgi ŵakuru ŵa makampani gha tekinoloje ŵaku America]] [[Category:Ŵamalonda ŵaku America mu bizinesi ya maseŵero gha vidiyo]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵa Boston University Terriers]] [[Category:Ŵamalonda ŵakufuma ku Queens, New York]] [[Category:Ŵanthu ŵakufuma ku Millbrook, New York]] [[Category:Mbumba ya Trump|Robert]] [[Category:Ŵantchito ŵa The Trump Organization]] [[Category:ZeniMax Media]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵanalembeka yayi malo agho ŵakaseŵerangapo]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵambura kulembeka mtundu wa charu chawo]] nzje5an05i6l7a2vhmh0k4h1009lkov 116992 116985 2026-07-16T11:27:14Z Tumbuka Arch 6863 116992 wikitext text/x-wiki {{short description|Mubizinesi wa ku America (1948–2020)}} {{Use mdy dates|date=October 2020}} {{distinguish|text=Wakuseŵera bola la ku America [[Bob Trumpy]]}} {{Infobox person | name = Robert Trump | image = RobertTrump.gif | birth_name = Robert Stewart Trump | birth_date = {{Birth date|1948|8|26}} | birth_place = [[Msumba wa New York]], U.S. | death_date = {{death date and age|2020|8|15|1948|8|26}} | death_place = Msumba wa New York, U.S. | resting_place = All Faiths Cemetery, New York | alma_mater = [[Boston University]] ([[Bachelor of Science|BS]]) | occupation = {{hlist|Mubizinesi|wakuzenga nyumba na malo|wakugulitsa ndalama}} | boards = [[ZeniMax Media]] | spouse = {{plainlist| * {{marriage|[[Blaine Trump|Blaine Beard]]|1984|2009|end = divorced}} * {{marriage|Ann Marie Pallan|2020}} }} | parents = [[Fred Trump]]<br>[[Mary Anne MacLeod Trump|Mary Anne MacLeod]] | family = [[Mbumba ya Trump]] }} '''Robert Stewart Trump''' (Ogasiti 26, 1948 – Ogasiti 15, 2020) wakaŵa mubizinesi na wakugulitsa ndalama wa ku America. Wakaŵa mubali muchoko wa [[Donald Trump]], pulezidenti wa 45 na wa 47 wa [[Pulezidenti wa United States]], ndipo wakaŵa wakumovwira wakugomezgeka wa [[Ntchito ya ndyali ya Donald Trump|ntchito ya ndyali ya Donald]]. Trump wakateŵeteranga mu wupu wa ŵalongozgi wa [[ZeniMax Media]], kampani yikuru ya [[Bethesda Softworks]], kufuma mu 1999<ref name=":0" /> m'paka nyifwa yake mu 2020.<ref name=":2">{{cite web|url=https://www.zenimax.com/about|archive-url=https://web.archive.org/web/20200731034441/https://www.zenimax.com/about|title=ZeniMax Media Board of Directors|archive-date=July 31, 2020|access-date=August 16, 2020}}</ref> Padera pa kuŵa yumoza wa ŵalongozgi ŵa ZeniMax, wakaŵaso wakugulitsa ndalama mu kampani iyi.<ref name=":3" /> Mu vyaka vichoko waka pambere wandafwe, Robert Trump wakaŵa pulezidenti wa [[The Trump Organization]], bizinesi iyo yikaŵa ya ŵabali ŵa mbumba ya Trump.<ref name=":4" /> Wakagwiraso ntchito nga ni [[Kuzenga nyumba na malo|wakuzenga nyumba na malo]].<ref name=":5" /> ==Umoyo wakwambilira na masambiro== {{see also|Mbumba ya Donald Trump}} Robert Stewart Trump wakababikira ku [[Queens]] pa Ogasiti 26, 1948, kwa [[Fred Trump]] na [[Mary Anne MacLeod Trump|Mary Anne MacLeod]].<ref name="national">{{cite news|last1=Hannan|first1=Martin|title=An inconvenient truth? Donald Trump's Scottish mother was a low-earning migrant|url=http://www.thenational.scot/news/14903147.An_inconvenient_truth__Donald_Trump_s_Scottish_mother_was_a_low_earning_migrant/|access-date=February 11, 2017|work=[[The National (Scotland)|The National]]|date=May 20, 2016|archive-date=October 14, 2018|archive-url=https://web.archive.org/web/20181014054533/http://www.thenational.scot/news/14903147.An_inconvenient_truth__Donald_Trump_s_Scottish_mother_was_a_low_earning_migrant/|url-status=live}}</ref><ref name="NYT"/> Wakaŵa muchoko chomene pa ŵana ŵawo ŵankhondi; ŵabali na ŵadumbu ŵake ŵakaŵa [[Maryanne Trump Barry|Maryanne]], [[Fred Trump Jr.|Fred Jr.]], [[Elizabeth Trump Grau|Elizabeth]], na [[Donald Trump|Donald]].<ref name="national" /><ref>{{cite news|date=January 9, 2017|title=Trump's Brother and Yankees Executive Coming to Hudson Valley|work=[[WKXP]]|url=http://hudsonvalleycountry.com/trumps-brother-and-yankees-executive-coming-to-hudson-valley/|access-date=February 11, 2017|archive-date=February 12, 2017|archive-url=https://web.archive.org/web/20170212163941/http://hudsonvalleycountry.com/trumps-brother-and-yankees-executive-coming-to-hudson-valley/|url-status=live}}</ref> Wakamalizga masambiro ghake pa [[St. Paul's School (New York)|Sukulu ya St. Paul's]] ku [[Garden City, Long Island]]. Trump wakasambira pa [[Boston University]], uko wakasambiranga vya vyachuma;<ref name="NYT">{{Cite news|last=Karni|first=Annie|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|language=en-US|work=The New York Times|url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August 16, 2020|issn=0362-4331}}</ref> apo wakaŵa kwenekura, wakaseŵeranga [[Bola la mpira|bola la mpira]] ndipo wakaŵa [[Mseŵeri wakuzirwa chomene|MVP]] kweniso kaputeni wa timu mu 1969.<ref>{{cite news |author=Staff Writer |url=http://www.bu.edu/today/close-ups/2020/robert-trump-bu-alum-and-presidents-brother-dies/ |title= Robert Trump, BU Alum and President's Brother, Dies |work=BU Today |date=August 16, 2020 |access-date=August 17, 2020 }}</ref> ==Ntchito== Trump wakanjira mu bizinesi ya awiske ndipo wakamba kulaŵilira malo gha nyumba na malo gha [[The Trump Organization|Trump Organization]] agho ghakaŵa kuwaro kwa [[Manhattan]].<ref>{{cite book|last1=Blair|first1=Gwenda|title=The Trumps: Three Generations of Builders and a Presidential Candidate|date=2015|publisher=Simon & Schuster|isbn=978-1501139369|page=454|url=https://books.google.com/books?id=uJifCgAAQBAJ|access-date=February 11, 2017|archive-date=February 17, 2017|archive-url=https://web.archive.org/web/20170217015120/https://books.google.com/books?id=uJifCgAAQBAJ&dq|url-status=live}}</ref><ref>{{cite news|last1=Horowitz|first1=Jason|title=For Donald Trump, Lessons From a Brother's Suffering|url=https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|access-date=February 11, 2017|work=[[New York Times]]|date=January 2, 2016|archive-date=October 27, 2017|archive-url=https://archive.today/20171027141255/https://www.nytimes.com/2016/01/03/us/politics/for-donald-trump-lessons-from-a-brothers-suffering.html|url-status=live}}</ref> Pamanyuma pakuti Mark G. Etess wafwa mu ngozi ya ndege ya helikopita mu Okutobala 1989 pa chigaŵa chapakati cha [[Garden State Parkway]] mu [[Lacey Township, New Jersey|Lacey Township]], [[New Jersey]], Donald Trump wakasankha Robert Trump kuti wapoke malo agho Etess wakaŵa nagho.<ref name=Press11101989>{{cite news |last=Borja |first=Debbie |url=https://pressofatlanticcity.com/gallery/oct-10-1989-3-trump-execs-2-pilots-die-as-helicopter-crashes-in-parkway-median/article_40ea7e95-9309-5e01-89ba-7f6c30409ff3.html |title=October 10, 1989: 3 Trump execs, 2 pilots die as helicopter crashes in Parkway median |work=[[The Press of Atlantic City]] |date=October 11, 1989 |access-date=July 2, 2021}}</ref><ref name=Press10102016>{{cite news |url=https://pressofatlanticcity.com/business/trump-taj-mahal-closed-on-the-anniversary-of-executives-helicopter-crash/article_19e308a4-d5ea-5604-b37d-f21cd9554630.html |title=Trump Taj Mahal closed on the anniversary of executives' helicopter crash |work=[[The Press of Atlantic City]] |date=October 10, 2016 |access-date=July 2, 2021}}</ref>{{efn|Padera pa nyifwa ya Mark Grossinger Etess wa vyaka 37 wakufuma ku [[Margate City, New Jersey|Margate]], ŵanyake awo ŵakafwira mu ngozi ya helikopita ya pa Okutobala 10, 1989 ŵakaŵa wakuwuluka Robert Kent, wakufuma ku [[Ronkonkoma, New York]], munyake wake Lawrence Diener wakufuma ku [[Westbury, New York]], Jonathan Benanav wakufuma ku Margate, na Stephen F. Hyde wakufuma ku [[Linwood, New Jersey|Linwood]]. Jonathan Benanav, wa vyaka 33, wakagwirapo ntchito nga ni mulembi mulara wakovwira na mulara wa ntchito za hotelo pa [[Sands Atlantic City|Sands Hotel & Casino]] mu [[Atlantic City]] kwambira Juni 1982 mpaka Julayi 1985, ndipo pamanyuma wakagwira ntchito nga ni manejala mukuru pa [[Hilton Hotels & Resorts|Airport Hilton]] mu [[Philadelphia]] pambere wandanjire ku Trump Organization mu 1986 uko wakaŵa muteŵeti mukuru wa [[Trump Plaza Hotel and Casino]]. Stephen F. Hyde, wa vyaka 43, wakaŵa munthu wakujikora uyo wakategherezganga chomene vinthu ndipo wakalongozganga malo ghatatu gha kasino gha Trump mu Atlantic City. Ngozi iyi yikachitika pa 1:40 koloko namuhanya kufupi na chisimikizgo cha mtunda 71.5 pa [[Garden State Parkway]], pafupifupi {{convert|0.75|mile}} kufuma ku [[Malo ghakupangira magesi gha nyukiliya gha Oyster Creek]].<ref name=Press11101989/><ref name=Press10102016/>}} Etess wakaŵa mulara mukuru wa [[Hard Rock Hotel & Casino Atlantic City|Trump Taj Mahal]], mulara wa Robert Trump wakulaŵilira maseŵero ghapadera, kweniso munthu wakumanyikwa pa kupanga mapangano ghakuru gha maseŵero na vyakusanguluska vya Donald Trump.{{efn|Pamanyuma pakuti Donald Trump waluta ku Russia na kukawona [[Moscow]] na [[St. Petersburg]] mu 1987, wakamba kunozga maseŵero kwizira mu ŵimiliri na Viktor Galaev ({{langx|ru|Виктор Галаев}}) na Sovintersport ya [[Sergey Chemezov]], uyo wakaŵa wakulaŵilira wa KGB, iyo yikaŵa na wanangwa wekha pa maseŵero gha Soviet.<ref name="nytimes/1989/getting">{{cite news |last1=Berger |first1=Phil |title=Getting to the Main Event Becomes a Main Event |url=http://www.nytimes.com/1989/11/25/sports/getting-to-the-main-event-becomes-a-main-event.html |access-date=25 July 2024 |work=The New York Times |date=25 November 1989 |archive-url=https://web.archive.org/web/20150525124216/http://www.nytimes.com/1989/11/25/sports/getting-to-the-main-event-becomes-a-main-event.html |archive-date=May 25, 2015}}</ref><ref>{{cite news |last=РОЛДУГИН |first=Олег (Roldugin, Oleg) |url=http://www.anticompromat.org/chemezov/sobes2008.html |title=ЧЕМЕЗОВ - ЗАПАСНОЕ ОРУЖИЕ ПУТИНА |trans-title=CHEMEZOV IS PUTIN'S BACKUP WEAPON |language=ru |work=[[:ru:Собеседник (газета)|Собеседник]] (sobesednik.ru) |date=18 March 2008 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20150925000139/http://www.anticompromat.org/chemezov/sobes2008.html |archive-date=25 September 2015}} [http://sobesednik.ru/archive/sb/11-2008/chemezov-gun Original Sobesednik site] as "ЧЕЛОВЕК С РУЖЬЕМ. Как глава Ростехнологии перешел из разведки в бизнеc" ("A MAN WITH A GUN. How the head of Rostekhnologii moved from intelligence to business")</ref><ref>{{cite news |last=Прибыловский |first=Владимир |author-link=Vladimir Pribylovsky |url=http://www.anticompromat.org/chemezov/chemezbio.html |title=ЧЕМЕЗОВ Сергей Викторович |trans-title=CHEMEZOV Sergey Viktorovich |language=ru |work=Антикомпромат (anticompromat.org) |date=2016 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20160427024948/http://www.anticompromat.org/chemezov/chemezbio.html |archive-date=27 April 2016}}</ref><ref>{{cite news |last=Прибыловский |first=Владимир |author-link=Vladimir Pribylovsky |url=http://anticompromat.org/chemezov/index.html |title=ЧЕМЕЗОВ Сергей Викторович: ссылки, аннотации |trans-title=CHEMEZOV Sergey Viktorovich: references, abstracts |language=ru |work=Антикомпромат (anticompromat.org) |date=2016 |access-date=18 March 2025 |archive-url=https://web.archive.org/web/20160412130341/http://anticompromat.org/chemezov/index.html |archive-date=12 April 2016}}</ref> Nga mbanthu ŵa [[KGB]], [[Vladimir Putin]] na Chemezov, awo ŵakaŵa mabwezi, ŵakakhalanga mu nyumba yimoza ya maapartment mu [[Dresden]] apo ŵakapanganga Sovintersport mu vyaka vya m'ma 1980.<ref>{{cite news |last=Raschke |first=Erik |url=https://www.velonews.com/events/the-outer-line-tour-de-trump-with-a-russian-accent/ |title=The Outer Line: Tour de Trump with a Russian accent: Erik Raschke examines the connection between Russia and the Tour de Trump. |work=[[VeloNews]] |date=July 1, 2018 |access-date=July 2, 2021 |archive-url=https://web.archive.org/web/20240510223303/https://velo.outsideonline.com/road/road-racing/the-outer-line-tour-de-trump-with-a-russian-accent/?scope=anon |archive-date=May 10, 2024}}</ref><ref>{{cite news |last=Козырев (Kozyrev)|first=Михаил (Mikhail) |url=https://www.forbes.ru/forbes/issue/2007-10/16688-pod-prikrytiem?from_alt_domain=1 |title=Под прикрытием |trans-title=Under cover |language=ru |work=[[Forbes]] |date=3 October 2007 |access-date=August 11, 2021 |archive-date=August 11, 2021 |archive-url=https://web.archive.org/web/20210811222602/https://www.forbes.ru/forbes/issue/2007-10/16688-pod-prikrytiem?from_alt_domain=1}}</ref> Apo ŵanthu ŵakamba kufipa mtima na maseŵero gha pa vidiyo ghankhaza pamanyuma pa [[kukoma ŵanthu pa Sukulu ya Sekondale ya Columbine mu 1999]], "ŵanthu ŵakumanyikwa pa ndyali",<ref name="nytimes/2021/02/13/dead">{{cite news |last1=Roberts |first1=Sam |title=Robert Altman, Video Game Mogul Who Survived Scandal, Dies at 73 |url=https://www.nytimes.com/2021/02/13/business/robert-altman-dead.html |access-date=28 July 2024 |work=[[The New York Times]] |date=13 February 2021}}</ref> kusazgapo Robert Trump, ŵakasankhika kuŵa pa gulu la ŵalongozgi la [[ZeniMax Media]], kampani yakupapi ya [[Bethesda Softworks]].<ref name=":0">{{cite web|first= Alissa|last=McAloon|url=https://www.gamedeveloper.com/business/obituary-zenimax-board-member-robert-trump|title=Obituary: ZeniMax board member Robert Trump|website=[[Gamasutra]]|date=August 17, 2020|access-date=August 17, 2020}}</ref> Pa nyengo iyo wakaŵa pa gulu la ŵalongozgi, ZeniMax yikafumiska maseŵero ghanandi, kusazgapo [[Fallout (franchise)|''Fallout'']], ''[[The Elder Scrolls]]'', [[Doom (franchise)|''Doom'']], na ''[[Wolfenstein]]''. Mabungwe gha nkhani ghakalongosora vya udindo wake mu kampani iyi pamanyuma pa [[kuwukira kwa sukulu ya Parkland]], apo mubali wake [[Nkhanza na maseŵero gha pa vidiyo#Kuwukira kwa sukulu ya Parkland (2018)|wakayaniska]] maseŵero gha pa vidiyo na nkhaza ndipo pamanyuma wakakumana na ŵalongozgi ŵakupambanapambana ŵa mafakitale,<ref name="Bloomberg">{{cite web|url=https://www.bloomberg.com/news/articles/2018-03-08/game-maker-joining-gun-violence-discussion-has-a-trump-on-board|title=Video-Game Companies Are Meeting With Trump. His Brother Is on One's Board|last1=Sink|first1=Justin|last2=Palmeri|first2=Christopher|publisher=Bloomberg|date=March 8, 2018|access-date=August 16, 2020|archive-date=June 25, 2020|archive-url=https://web.archive.org/web/20200625224610/https://www.bloomberg.com/news/articles/2018-03-08/game-maker-joining-gun-violence-discussion-has-a-trump-on-board|url-status=live}}</ref><ref name="NPR">{{cite web|url=https://www.npr.org/2018/03/08/591884059/trump-pits-video-game-makers-against-harshest-critics-in-another-made-for-tv-mee|title=Trump Pits Video Game Makers Against Harshest Critics In Closed-Door Meeting|publisher=NPR|last1=Montanaro|first1=Domenico|last2=Parks|first2=Miles|date=March 18, 2018|access-date=August 16, 2020}}</ref> kusazgapo [[Robert A. Altman|Robert Altman]], [[mulara mukuru wakulongozga|CEO]] wa ZeniMax.<ref>{{cite web | url = https://www.usatoday.com/story/tech/news/2018/03/08/trump-talk-video-game-makers-critics-thursday-white-house-meeting/406374002/ | title = These are the video games the White House played in its meeting on game violence |first= Mike | last =Snider | date = March 8, 2018 | access-date = August 16, 2020 | work = [[USA Today]] }}</ref> Padera pa kuŵa yumoza wa ŵalongozgi ŵa ZeniMax, Trump nayo wakaŵa wakuguliska ndalama mu kampani iyi.<ref name=":3">{{cite web|first=Dean|last=Takahashi|url=https://venturebeat.com/2008/05/30/zenimax-media-raises-99-million-from-some-big-names/|title=ZeniMax Media raises $9.9 million from some big names|website=[[VentureBeat]]|date=May 30, 2008|access-date=August 16, 2020|archive-date=June 25, 2016|archive-url=https://web.archive.org/web/20160625124752/http://venturebeat.com/2008/05/30/zenimax-media-raises-99-million-from-some-big-names/|url-status=live}}</ref> Robert Trump wakaŵa pulezidenti wa [[The Trump Organization|Trump Management, Inc.]],<ref name="casetext/trump-v-trump">{{cite web |title=Mary L. Trump, Plaintiff, v. Donald J. Trump, in his personal capacity, 77 Misc. 3d 543 |url=https://casetext.com/case/trump-v-trump-10 |archive-url=https://web.archive.org/web/20240725113308/https://casetext.com/case/trump-v-trump-10 |url-status=dead |archive-date=July 25, 2024 |website=CaseText + Citator |publisher=Supreme Court, New York County |access-date=25 July 2024 |date=November 14, 2022}}</ref> bizinesi ya [[Fred Trump]],<ref name="wapo/obit/robert-trump">{{cite news |last1=Kranish |first1=Michael |title=Robert Trump, younger brother of the president, dies at 71 |url=https://www.washingtonpost.com/local/obituaries/robert-trump-younger-brother-of-president-trump-who-filed-lawsuit-against-niece-dies-at-71/2020/08/15/6ec0f102-de62-11ea-8051-d5f887d73381_story.html |access-date=25 July 2024 |newspaper=Washington Post |date=16 August 2020}}</ref> iyo pamanyuma yikazakaŵa ya ŵabali ŵa Trump, kusazgapo Donald, Robert, Maryanne Trump-Barry, na Elizabeth Trump-Grau.<ref name=":4">{{cite news|url=https://www.ibtimes.com/who-robert-trump-presidents-brother-hospitalized-seriously-ill-3028636|title=Who Is Robert Trump? President's Brother Hospitalized, Seriously Ill|author=Thomas Kika|work=[[International Business Times]]|date=August 14, 2020|access-date=August 16, 2020}}</ref> Pa nyengo yinyake, Trump wakagwiranga ntchito nga ni [[wakupangiska malo gha malonda]].<ref name=":5">{{cite web |title=Trump says younger brother and 'best friend' Robert Trump has died |url=https://www.independent.co.uk/news/world/americas/robert-trump-death-brother-age-cause-worth-today-latest-a9672651.html |website=The Independent |access-date=August 16, 2020 |language=en |date=August 16, 2020}}</ref> ===Mulandu wa buku la Mary Trump=== {{Main|Too Much and Never Enough}} Mu Juni 2020, Robert Trump wakapeleka mulandu ku khoti kupenja kuti waleke kufumiskika kwa buku la muzukuru wake [[Mary L. Trump]] lakuti ''[[Too Much and Never Enough]]''. Mulandu wa Trump ukazikika pa phangano la 2001 la kusunga visisi ilo Mary wakalembapo apo ŵakamalizganga mulandu wakukhwaskana na chiharo na wasiya wa sekuru ŵake Fred Trump.<ref>{{cite news |last1=Jacobs |first1=Shayna |title=Judge affirms Trump's niece can publish her book about the president and his family |url=https://www.washingtonpost.com/national-security/mary-trump-book-too-much-and-never-enough/2020/07/13/6d8c64d8-c521-11ea-a99f-3bbdffb1af38_story.html |access-date=July 17, 2020 |newspaper=[[The Washington Post]] |date=July 13, 2020 |archive-date=July 18, 2020 |archive-url=https://web.archive.org/web/20200718041120/https://www.washingtonpost.com/national-security/mary-trump-book-too-much-and-never-enough/2020/07/13/6d8c64d8-c521-11ea-a99f-3bbdffb1af38_story.html |url-status=live }}</ref> Mu Julayi 2020, Mweruzgi Hal B. Greenwald wa [[Khoti Likuru la New York]] wakadumura kuti wakufumiska mabuku, [[Simon & Schuster]], wakaŵavya chigaŵa mu phangano la 2001 la [[Phangano lakukanizga kuvumbura vyachisisi|NDA]], ndipo wanangwa wake wakufumiska buku ili ukakanizgikanga yayi na phangano ili. Greenwald wakakhozgera kuti phangano la Mary Trump na wakufumiska mabuku likamupanga yayi nkhongono yakukanizga kufumiskika kwa buku pa nyengo yira.<ref>{{cite news|title=Donald Trump's Niece Mary Can Speak Out About Her Family with Scathing New Memoir, Judge Rules|url=https://people.com/politics/judge-rules-for-mary-trump-in-memoir-lawsuit/|work=[[People.com]]|date=July 14, 2020|access-date=August 15, 2020|archive-date=August 5, 2020|archive-url=https://web.archive.org/web/20200805035450/https://people.com/politics/judge-rules-for-mary-trump-in-memoir-lawsuit/|url-status=live}}</ref> Buku ili likafumiskika pa Julayi 14, 2020. ==Umoyo wa munthu== Robert Trump wakakhalanga ku [[Millbrook, New York]].<ref name="nytimes/2000/08/11/death">{{cite news |title=Paid Notice: Deaths: Trump, MaryA. |url=https://www.nytimes.com/2000/08/11/classified/paid-notice-deaths-trump-mary-a.html |access-date=28 July 2024 |work=[[The New York Times]] |date=11 August 2000}}</ref><ref name="tc">{{cite news|last1=Kasssel|first1=Matthew|date=November 2, 2016|title=Where Has Donald Trump's Brother Robert Been During This Election?|work=[[Town & Country (magazine)|Town & Country]]|url=http://www.townandcountrymag.com/society/money-and-power/news/a8479/robert-trump/|access-date=February 11, 2017|archive-url=https://web.archive.org/web/20170520102534/https://www.townandcountrymag.com/society/money-and-power/news/a8479/robert-trump/|archive-date=May 20, 2017|ref=tc}}</ref> Mu 1984, wakatora [[Blaine Trump|Blaine Beard]],<ref name="nytimes/2002/03/08/death">{{cite news |title=Paid Notice: Deaths: Beard, Josephus Simmons II |url=https://www.nytimes.com/2002/03/08/classified/paid-notice-deaths-beard-josephus-simmons-ii.html |access-date=28 July 2024 |work=[[The New York Times]] |date=8 March 2002}}</ref> uyo wakakumana nayo pa chipharazgo cha ndalama cha [[Christie's]].<ref>{{cite news|date=October 28, 1987|title=The Winning Ways of Blaine Trump|work=[[New York Times]]|url=https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|access-date=February 11, 2017|archive-date=January 27, 2017|archive-url=https://web.archive.org/web/20170127082911/http://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|url-status=live}}</ref> Wakaŵa na mwana wakulera zina lake Christopher Trump-Retchin. Mu 2004, Blaine wakamwa mapilisi ghanandi chomene ndipo wakagonekeka ku chipatala cha [[Chipatala cha Mount Sinai (Manhattan)|Mount Sinai Hospital]] mu Manhattan pamanyuma pakuti wakamanya kuti Robert wakagulira mulembi wake kweniso msungwana wake pa nyengo iyo, Ann Marie Pallan, nyumba ya ndalama zakukwana madola 3.7 miliyoni pa [[Long Island]].<ref>[https://www.thelist.com/237117/ann-marie-pallan-who-is-robert-trumps-wife Ann Marie Pallan: Who is Robert Trump's wife?]</ref> Ŵakamba mphindano ya kulekana pa nthengwa iyo yikambira mu 2007 m'paka apo ŵakafikira pa phangano lachisisi mu 2010.<ref name=":6">{{Cite news|url=http://nymag.com/news/intelligencer/41836/|title=Divorce, Park Avenue Style|last=Rosenblum|first=Emma|date=December 8, 2007|work=[[New York (magazine)|New York]]|access-date=February 18, 2019}}</ref><ref name="NYT" /><ref>{{cite news|last1=Rosenblum|first1=Emma|date=December 8, 2007|title=Divorce, Park Avenue Style|work=[[New York (magazine)|New York]]|url=http://nymag.com/news/intelligencer/41836/|access-date=February 11, 2017|archive-date=June 3, 2017|archive-url=https://web.archive.org/web/20170603152842/http://nymag.com/news/intelligencer/41836/|url-status=live}}</ref> Mu 2006, Robert na Blaine ŵakati ŵapatukana, ŵakaguliska nyumba yawo ya {{convert|6,500|sqft|m2|abbr=off|adj=on|sp=us}} iyo yikaŵa na mauniti ghatatu, vipinda vitatu, ndipo yikaŵa yindamare kuzengeka.<ref name="nytimes/2006/05/14/deal1">{{cite news |last1=Neuman |first1=William |title=A Trump Triplex Goes on the Market |url=https://www.nytimes.com/2006/05/14/realestate/14deal1.html |access-date=28 July 2024 |work=[[The New York Times]] |date=14 May 2006}}</ref> Mu 2012, Blaine Trump wakayika nyumba yake ya ndalama zakukwana madola 17.5 miliyoni ku Millbrook kuti yiguliskike.<ref name=":7">{{Cite news |last=Bear |first=Rob |date=June 22, 2012 |title=The Oh-So-Very Un-Trump Mansion of Socialite Blaine Trump |url=https://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump |archive-url=https://web.archive.org/web/20160227073310/http://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump |url-status=dead |archive-date=February 27, 2016 |access-date=February 18, 2019 |work=[[Curbed]]}}</ref> Trump wakatora muwoli wake wachiŵiri, Ann Marie Pallan, mu Janyuwale 2020.<ref>{{cite web |title=Robert Trump, younger brother of president, dead at 71 |date=August 16, 2020 |url=https://www.kiro7.com/news/trending/robert-trump-younger-brother-president-has-died/RMMNFKTZOFGKNIIKLRN2J4T47M/ |access-date=August 31, 2020}}</ref> Trump wakaŵa mubwezi wa nyengo yitali wa [[Robert A. Altman]].<ref>{{cite web |first=Christopher |last=Palmeri |url=https://www.bloomberg.com/news/articles/2020-09-25/from-banking-scandal-to-video-game-ceo-to-billion-dollar-score |title=From Banking Scandal to Video-Game CEO to Billion-Dollar Score |website=bloomberg.com |date=September 25, 2020 |access-date=February 7, 2021 |archive-date=September 27, 2020 |archive-url=https://web.archive.org/web/20200927030721/https://www.bloomberg.com/news/articles/2020-09-25/from-banking-scandal-to-video-game-ceo-to-billion-dollar-score |url-status=live}}</ref> ===Ubwezi wake na mubali wake Donald=== Mu 1990, Donald Trump wakimika Robert kuŵa mulaŵiliri wa kasino wa [[Trump Taj Mahal]] mu [[Atlantic City, New Jersey]].<ref name="nytimes/1984/05/15/casino">{{cite news |last1=Janson |first1=Donald |title=10TH AND LARGEST CASINO OPENS IN ATLANTIC CITY |url=https://www.nytimes.com/1984/05/15/nyregion/10th-and-largest-casino-opens-in-atlantic-city.html |access-date=28 July 2024 |work=[[The New York Times]] |date=15 May 1984}}</ref> Kasino iyi yikaŵa na masuzgo ghakuru pa zuŵa lakujulira, chomenechomene pa nkhani ya kuwona vya ndalama za makina gha slot, ndipo vikatora myezi yinandi kuti vyinozgeke. Kuyana na Jack O'Donnell, uyo wakaŵa mulara wa [[The Trump Organization|Trump Organization]], pa ungano umoza, "Donald Trump wakachemerezgera mubali wake, wakamuponya mulandu wose pa suzgo la makina gha slot."<ref name="NYT"/> Robert Trump wakalutilira kuŵa wakugomezgeka pa kuthandazga [[Nchito ya ndyali ya Donald Trump|ntchito ya ndyali ya mubali wake]]. Robert wakati wafwa, wakuyowoya pa Fox [[Eric Bolling]] wakati Robert na muwoli wake Ann Marie Pallan ŵakaŵa ŵakovwira ŵankhongono ŵa Donald. Donald wakayowoya pa ''[[Fox & Friends]]'' kuti Robert ndiyo wakaŵa munthu wake mukuru wakumutemwa chomene, ndipo wakati nawo ŵanji ŵakamuphalirapo vya umo Robert wakamovwiliranga.<ref name=":1"/> ==Ulwari na nyifwa== Pa Ogasiti 14, 2020, [[ABC News (United States)|ABC News]] yikayowoya kuti Trump wakagonekeka ku [[Chipatala cha Mount Sinai (Manhattan)|Mount Sinai Hospital]] mu [[Manhattan]] pamanyuma pakuti wakaŵapo kale mu chipinda cha [[chipinda cha ŵalwari ŵakusuzga chomene]] kwa sabata yakuluska yimoza mu Juni.<ref name="Indo">{{cite news|author=Holland, Steve|date=August 16, 2020|title='He was my best friend' - Robert Trump, US president's brother who shunned the spotlight, dies|url=https://www.independent.ie/world-news/he-was-my-best-friend-robert-trump-us-presidents-brother-who-shunned-the-spotlight-dies-39453225.html|work=Irish Independent}}</ref> Donald Trump wakamuluta kukamuwona pa zuŵa lenelira ndipo wakati pamanyuma pake Robert wakalwaranga chomene ndipo "wakasuzgikanga chomene".<ref>{{cite news|title=Robert Trump, Donald's brother, seriously ill in New York hospital|url=https://www.theguardian.com/us-news/2020/aug/14/robert-trump-donald-brother-seriously-ill-new-york-hospital|access-date=August 16, 2020|work=The Guardian}}</ref><ref>{{Cite news|last1=Jackson|first1=David|last2=Fritze|first2=John|last3=Subramanian|first3=Courtney|date=August 14, 2020|title='Having a hard time.' President Trump's brother Robert is hospitalized in New York|language=en-US|work=[[USA Today]]|url=https://www.usatoday.com/story/news/politics/2020/08/14/trumps-brother-robert-trump-admitted-hospital-white-house-says/3374790001/|access-date=August 16, 2020}}</ref> Robert Trump wakafwira ku [[New York–Presbyterian Hospital]] mu Manhattan pa zuŵa lakulondezgapo, Ogasiti 15, pa vyaka 71. ''[[The New York Times]]'' yikazunura mubwezi wa mbumba uyo wakati Trump wakaŵa kwamba wayamba kusuzgika na [[Kutuluka ndopa mu ubongo|kutuluka ndopa mu ubongo]] pamanyuma pa kugwa.<ref name="NYT"/> Mzukuru wake [[Mary L. Trump|Mary]], mu mafumbo na [[Greenpeace]] mazuŵa ghachoko waka pambere wandafwe, wakati Robert wakalwaranga ndipo wakagonekekapo ku chipatala "kaŵiri panji katatu mu myezi yitatu yajumpha".<ref>{{cite web|title=Fireside fire drill with Jane Fonda and Mary Trump| date=August 14, 2020 |url=https://youtube.com/watch?v=hw3Z2cpOrFQ|access-date=August 14, 2020|publisher=Greenpeace USA}}</ref> Mu uthenga wake, Donald Trump wakalemba kuti, "Wakaŵavya waka mubali wane pera, kweni wakaŵa mubwezi wane wapamtima chomene."<ref name="NYT"/><ref>{{cite web|title=Robert Trump, the younger brother of President Donald Trump, dead at age 71|date=August 16, 2020 |url=https://www.cnn.com/2020/08/15/politics/robert-trump-dead/index.html|access-date=August 16, 2020|publisher=CNN}}</ref> Pa Ogasiti 21, [[chisopo cha nyifwa]] chikachitikira Robert mu [[East Room]]. Ŵanthu 150 ŵakiza ku chisopo ichi. Aka kakaŵa kakwamba mu vyaka pafupifupi 100 kuti purezidenti wachite chisopo cha nyifwa mu East Room.<ref name=":1">{{cite news|title=Trump Holds a Rare White House Funeral for His Younger Brother, Robert|url=https://www.nytimes.com/2020/08/21/us/politics/funeral-robert-trump.html|access-date=August 24, 2020|work=The New York Times|date=August 21, 2020 |last1=Rogers |first1=Katie |last2=Haberman |first2=Maggie }}</ref> ==Vyakukumbuska== {{notelist}} ==Ukaboni== {{reflist}} {{Trump family}} {{Authority control}} {{DEFAULTSORT:Trump, Robert}} [[Category:Ŵakubabika mu 1948]] [[Category:Ŵakufwa mu 2020]] [[Category:Ŵamalonda ŵaku America ŵa m'ma 1900]] [[Category:Ŵamalonda ŵaku America ŵa m'ma 2000]] [[Category:Ŵalongozgi ŵa makampani ŵaku America]] [[Category:Ŵakuguliska ndalama ŵaku America]] [[Category:Ŵanthu ŵaku America ŵa mphapu ya Chijeremani]] [[Category:Ŵakupangiska na kuguliska malo ŵaku America]] [[Category:Ŵalongozgi ŵakuru ŵa makampani gha tekinoloje ŵaku America]] [[Category:Ŵamalonda ŵaku America mu bizinesi ya maseŵero gha vidiyo]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵa Boston University Terriers]] [[Category:Ŵamalonda ŵakufuma ku Queens, New York]] [[Category:Ŵanthu ŵakufuma ku Millbrook, New York]] [[Category:Mbumba ya Trump|Robert]] [[Category:Ŵantchito ŵa The Trump Organization]] [[Category:ZeniMax Media]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵanalembeka yayi malo agho ŵakaseŵerangapo]] [[Category:Ŵaseŵero ŵa mpira wa pasi ŵambura kulembeka mtundu wa charu chawo]] 5dx1myfd4s8ed5bmyx2py6o2zi3ofp8 Template:File 10 47812 116986 2025-03-11T02:58:58Z en>JPxG 0 works 116986 wikitext text/x-wiki File:{{PAGENAME:{{{1}}}}}<noinclude>{{Documentation}}</noinclude> rmratsmcddk40mkm1s1y0gkzs0993hc 116987 116986 2026-07-16T11:26:14Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:File]] 116986 wikitext text/x-wiki File:{{PAGENAME:{{{1}}}}}<noinclude>{{Documentation}}</noinclude> rmratsmcddk40mkm1s1y0gkzs0993hc Template:File/doc 10 47813 116988 2025-03-13T10:54:15Z en>DB1729 0 Category:File namespace templates 116988 wikitext text/x-wiki This template is a quick way to sanitize filename strings, which ensures they are always formatted as <code>File:</code> and will work with [[WP:Image syntax|embedding syntax]]. For example, say a template takes an <code>image</code> parameter. Should it be <code>Dog.jpg</code> or <code>File:Dog.jpg</code>? You could make everyone read the documentation, or you could clutter up your own template with extra code, or you could use this. Cheap and easy (it only uses a single [[:mw:Help:Magic_words#Page_names|PAGENAME]] magic word call). {|class="wikitable" |- |<syntaxhighlight lang="wikitext" inline>{{file|File:Dog.jpg}}</syntaxhighlight> |{{file|Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Dog.jpg}}</syntaxhighlight> |{{file|Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Image:Dog.jpg}}</syntaxhighlight> |{{file|Image:Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|File:The Dog File: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|File:The Dog File: Woofs Of The Dog Still.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Image:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|Image:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} |} Bizarre edge-cases where a file's name itself starts with "File:" are not going to work properly (I don't even know if it's possible to upload these, but if you do, then don't). {|class="wikitable" |- |<syntaxhighlight lang="wikitext" inline>{{file|File:File:File:How To Remove Metal From A File: The Hard Way.pdf}}</syntaxhighlight> |{{file|File:File:File:How To Remove Metal From A File: The Hard Way.pdf}} |} <includeonly>{{Sandbox other|| <!-- Categories below this line --> [[Category:File namespace templates]] [[Category:Image formatting and function templates]] [[Category:String manipulation templates]] }}</includeonly> b0a321xnp21o85axtqdckg2pnjlqwvn 116989 116988 2026-07-16T11:26:15Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:File/doc]] 116988 wikitext text/x-wiki This template is a quick way to sanitize filename strings, which ensures they are always formatted as <code>File:</code> and will work with [[WP:Image syntax|embedding syntax]]. For example, say a template takes an <code>image</code> parameter. Should it be <code>Dog.jpg</code> or <code>File:Dog.jpg</code>? You could make everyone read the documentation, or you could clutter up your own template with extra code, or you could use this. Cheap and easy (it only uses a single [[:mw:Help:Magic_words#Page_names|PAGENAME]] magic word call). {|class="wikitable" |- |<syntaxhighlight lang="wikitext" inline>{{file|File:Dog.jpg}}</syntaxhighlight> |{{file|Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Dog.jpg}}</syntaxhighlight> |{{file|Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Image:Dog.jpg}}</syntaxhighlight> |{{file|Image:Dog.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|File:The Dog File: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|File:The Dog File: Woofs Of The Dog Still.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|Image:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|Image:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} |- |<syntaxhighlight lang="wikitext" inline>{{file|The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}}</syntaxhighlight> |{{file|The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} |} Bizarre edge-cases where a file's name itself starts with "File:" are not going to work properly (I don't even know if it's possible to upload these, but if you do, then don't). {|class="wikitable" |- |<syntaxhighlight lang="wikitext" inline>{{file|File:File:File:How To Remove Metal From A File: The Hard Way.pdf}}</syntaxhighlight> |{{file|File:File:File:How To Remove Metal From A File: The Hard Way.pdf}} |} <includeonly>{{Sandbox other|| <!-- Categories below this line --> [[Category:File namespace templates]] [[Category:Image formatting and function templates]] [[Category:String manipulation templates]] }}</includeonly> b0a321xnp21o85axtqdckg2pnjlqwvn Template:Photo 10 47814 116990 2018-01-19T00:32:28Z en>Primefac 0 Protected "[[Template:Photo]]": [[WP:SEMIPROT|semi-protection]] of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)) 116990 wikitext text/x-wiki #REDIRECT [[Template:Photo requested]] 4ionpd98usmi3huhswbee1ex61fnd6v 116991 116990 2026-07-16T11:26:33Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Photo]] 116990 wikitext text/x-wiki #REDIRECT [[Template:Photo requested]] 4ionpd98usmi3huhswbee1ex61fnd6v Amalija Knavs 0 47815 116994 2026-07-16T11:32:03Z Tumbuka Arch 6863 Created page with "{{Short description|Wantchito wa nsalu wa ku Slovenia (1945–2024)}} {{Use mdy dates|date=February 2025}} {{Infobox person | image = Amalija Knavs.png | caption = Knavs mu 2024 | birth_name = Amalija Ulčnik | birth_date = {{birth date|1945|7|9}} | birth_place = [[Judendorf-Straßengel]], [[Austria wakawusikanga na ŵa Allies]] | death_date = {{death date and age|2024|1|9|1945|7|9}} | death_place = [[Miami]],..." 116994 wikitext text/x-wiki {{Short description|Wantchito wa nsalu wa ku Slovenia (1945–2024)}} {{Use mdy dates|date=February 2025}} {{Infobox person | image = Amalija Knavs.png | caption = Knavs mu 2024 | birth_name = Amalija Ulčnik | birth_date = {{birth date|1945|7|9}} | birth_place = [[Judendorf-Straßengel]], [[Austria wakawusikanga na ŵa Allies]] | death_date = {{death date and age|2024|1|9|1945|7|9}} | death_place = [[Miami]], [[Florida]], U.S. | citizenship = {{hlist|Slovenia|United States}} | spouse = {{marriage|Viktor Knavs|1966}} | children = 2, kusazgapo [[Melania Trump|Melania]] | relatives = [[Barron Trump]] (muzukuru) }} '''Amalija Knavs''' ({{nee|'''Ulčnik'''}}; July 9, 1945 – January 9, 2024) was a Slovenian textile worker and the mother of [[Melania Trump]], the [[first lady of the United States]].<ref name="auto">{{Cite news|url=https://www.nytimes.com/2024/01/09/us/politics/amalija-knavs-dead.html|title=Amalija Knavs, Mother of Former First Lady Melania Trump, Dies at 78|first=Richard|last=Sandomir|date=January 9, 2024|newspaper=[[The New York Times]]|access-date=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110060547/https://www.nytimes.com/2024/01/09/us/politics/amalija-knavs-dead.html|url-status=live}}</ref><ref>{{Cite web|url=https://www.nbcnews.com/politics/politics-news/melania-trumps-mother-amalija-knavs-dies-78-rcna133185|title=Melania Trump's mother, Amalija Knavs, dies at 78|first=Zoë|last=Richards|date=January 10, 2024|publisher=[[NBC News]]|access-date=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110060554/https://www.nbcnews.com/politics/politics-news/melania-trumps-mother-amalija-knavs-dies-78-rcna133185|url-status=live}}</ref> == Early and personal life == Amalija Ulčnik was born on July 9, 1945, in [[Judendorf-Straßengel]], [[Allied-occupied Austria]]. She was raised there and in [[Socialist Republic of Slovenia|Slovenia]], which was at the time part of [[Socialist Federal Republic of Yugoslavia]]. Her mother, Amalija ({{nee|Gliha}}), was a [[seamstress]] and farmer and her father, Anton Ulčnik, was a cobbler and later a red-onion farmer.<ref name="auto" /> In her youth, she worked on her family's onion farm. From 1964 to 1997, she worked at a state-owned children's clothing factory where she created and monitored textile patterns.<ref name="auto" /> Ulčnik wakakumana na mfumu wake, Viktor Knavs, uyo wakaŵa membala wa [[League of Communists of Slovenia|Chipani cha Ŵakomyunisiti cha Slovenia]] mu [[Sevnica]] mu 1966.<ref>{{Cite web|url=https://people.com/all-about-melania-trump-parents-8620972|title=All About Melania Trump's Parents, Viktor and Amalija Knavs|website=Peoplemag}}</ref> Pamanyuma pakutorana, ŵakakhalanga mu Sevnica, Slovenia.<ref name=":0">{{Cite web |last=Dangremond |first=Sam |date=August 25, 2020 |title=Everything to Know About Melania Trump's Parents, Viktor And Amalija Knavs |url=https://www.townandcountrymag.com/society/politics/g9968592/melania-trump-parents-amalija-knavs-viktor-knavs/ |access-date=January 10, 2024 |website=Town & Country |language=en-US |archive-date=January 10, 2024 |archive-url=https://web.archive.org/web/20240110080623/https://www.townandcountrymag.com/society/politics/g9968592/melania-trump-parents-amalija-knavs-viktor-knavs/ |url-status=live }}</ref> Ŵakutorana aŵa ŵakaŵa na ŵana ŵanakazi ŵaŵiri: Ines (wakababika mu 1968) na [[Melania Trump|Melanija]] (wakababika mu 1970).<ref name=":0" /> == Umoyo wa pamanyuma na nyifwa == Mu Ogasiti 2017, Amalija na mfumu wake ŵakaŵa kukhala ku [[New York City]].<ref>{{cite news|url=https://apnews.com/1bdcdd2c8899478791526c536ce1ab43|title=First lady appears to borrow from Michelle Obama's playbook|first=Darlene|last=Superville|publisher=Associated Press|date=August 28, 2017|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110065648/https://apnews.com/1bdcdd2c8899478791526c536ce1ab43|url-status=live}}</ref> Pamanyuma vikazomelezgeka kuti Melania ndiyo wakalembeska ŵapapi ŵake pa [[green card]]s.<ref name=citizenship /> Mu Meyi 2018, Amalija wakaŵapo pa mwambo wa [[White House Rose Garden]] apo Melania wakayambiska pulogalamu yake ya ulongozgi wa ŵanthu ya [[Be Best]].<ref>{{cite news|url=https://apnews.com/parenting-united-states-government-2aefddc6f11044d4ac340809f9e75bb3|title=Melania Trump debuts 'Be Best' campaign for kids' well-being|first=Darlene|last=Superville|publisher=Associated Press|date=May 7, 2018|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110055458/https://apnews.com/parenting-united-states-government-2aefddc6f11044d4ac340809f9e75bb3|url-status=live}}</ref> Mu Ogasiti 2018, Amalija na Viktor Knavs ŵakazgoka ŵanthu ŵa ku U.S. pamanyuma pa kulapa chilapo ku khoti la ku [[New York City]].<ref name=citizenship>{{cite news|url=https://apnews.com/article/immigration-ap-top-news-new-york-city-new-york-ny-state-wire-e9ef38a1031744ae9e3a098c96f6a706|title=Meet the newest US citizens: Melania Trump's parents|first=Michael R.|last=Sisak|publisher=Associated Press|date=August 9, 2018|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110051701/https://apnews.com/article/immigration-ap-top-news-new-york-city-new-york-ny-state-wire-e9ef38a1031744ae9e3a098c96f6a706|url-status=live}}</ref> ''[[The New York Times]]'' yikalongosora kuti pa ŵanthu wose wakawonekanga nga wakalondezga yayi "vyakugomezgeka vya anyinamama ŵa ku America".<ref>{{Cite news |url=https://www.nytimes.com/2024/01/11/style/melania-trump-mother-amalija-knavs.html |title=The Inscrutable Glamour of Melania Trump's Mother |work=The New York Times |date=January 11, 2024 |access-date=January 12, 2024 |archive-date=January 12, 2024 |archive-url=https://web.archive.org/web/20240112225530/https://www.nytimes.com/2024/01/11/style/melania-trump-mother-amalija-knavs.html |url-status=live |last1=Garelick |first1=Rhonda }}</ref> Pa 9 Januwale 2024, Knavs wakafwa ku chipatala ku [[Miami, Florida]], apo wakaŵa na vyaka 78.<ref>{{cite news|url=https://apnews.com/article/amalija-knavs-melania-trump-mother-death-obituary-28fc01c5098ad87813a36bfde7c49584|title=Former first lady Melania Trump's mother, Amalija Knavs, has died|publisher=Associated Press|date=January 10, 2024|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110062013/https://apnews.com/article/amalija-knavs-melania-trump-mother-death-obituary-28fc01c5098ad87813a36bfde7c49584|url-status=live}}</ref> Wakaŵa "wakalwara chomene" kufuma kuumaliro wa 2023, ndipo ŵanthu awo ŵakayowoya na ''[[People (magazini)|People]]'' ŵakasimikizga kuti Melania wakaleka kuŵapo pa phwando la [[Mar-a-Lago]] la [[New Year's Eve]] kuti wakhalenge pafupi na anyina.<ref>{{cite news|url=https://people.com/amalija-knavs-melania-trump-mother-dead-8421380|title=Melania Trump's Mother, Amalija Knavs, Dead at 78|first=Virginia|last=Chamlee|publisher=People|date=January 10, 2024|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110032450/https://people.com/amalija-knavs-melania-trump-mother-dead-8421380|url-status=live}}</ref> == Ukaboni == {{Reflist}} {{Melania Trump}} {{Trump family}} {{DEFAULTSORT:Knavs, Amalija}} [[Category:Ŵakubabika mu 1945]] [[Category:Ŵakufwa mu 2024]] [[Category:Ŵanthu ŵa ku Slovenia awo ŵakasamira ku United States]] [[Category:Ŵanthu ŵa ku United States awo ŵakasanga wanangwa wa kukhala mu charu]] [[Category:Ŵakupanga malaya ŵa ku America ŵa mu vyaka vya m'ma 1900]] [[Category:Ŵa mu mbumba ya Trump]] [[Category:Melania Trump]] [[Category:Ŵanthu ŵakufuma mu chigaŵa cha Graz-Umgebung]] [[Category:Ŵanthu ŵakufuma ku Sevnica]] 5m5325zrommtwp98nja53g7ju84jqfo 116999 116994 2026-07-16T11:33:20Z Tumbuka Arch 6863 116999 wikitext text/x-wiki {{Short description|Wantchito wa nsalu wa ku Slovenia (1945–2024)}} {{Use mdy dates|date=February 2025}} {{Infobox person | image = Amalija Knavs.png | caption = Knavs mu 2024 | birth_name = Amalija Ulčnik | birth_date = {{birth date|1945|7|9}} | birth_place = [[Judendorf-Straßengel]], [[Austria wakawusikanga na ŵa Allies]] | death_date = {{death date and age|2024|1|9|1945|7|9}} | death_place = [[Miami]], [[Florida]], U.S. | citizenship = {{hlist|Slovenia|United States}} | spouse = {{marriage|Viktor Knavs|1966}} | children = 2, kusazgapo [[Melania Trump|Melania]] | relatives = [[Barron Trump]] (muzukuru) }} '''Amalija Knavs''' ({{nee|'''Ulčnik'''}}; July 9, 1945 – January 9, 2024) was a Slovenian textile worker and the mother of [[Melania Trump]], the [[first lady of the United States]].<ref name="auto">{{Cite news|url=https://www.nytimes.com/2024/01/09/us/politics/amalija-knavs-dead.html|title=Amalija Knavs, Mother of Former First Lady Melania Trump, Dies at 78|first=Richard|last=Sandomir|date=January 9, 2024|newspaper=[[The New York Times]]|access-date=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110060547/https://www.nytimes.com/2024/01/09/us/politics/amalija-knavs-dead.html|url-status=live}}</ref><ref>{{Cite web|url=https://www.nbcnews.com/politics/politics-news/melania-trumps-mother-amalija-knavs-dies-78-rcna133185|title=Melania Trump's mother, Amalija Knavs, dies at 78|first=Zoë|last=Richards|date=January 10, 2024|publisher=[[NBC News]]|access-date=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110060554/https://www.nbcnews.com/politics/politics-news/melania-trumps-mother-amalija-knavs-dies-78-rcna133185|url-status=live}}</ref> == Mbili ya umoyo == Amalija Ulčnik was born on July 9, 1945, in [[Judendorf-Straßengel]], [[Allied-occupied Austria]]. She was raised there and in [[Socialist Republic of Slovenia|Slovenia]], which was at the time part of [[Socialist Federal Republic of Yugoslavia]]. Her mother, Amalija ({{nee|Gliha}}), was a [[seamstress]] and farmer and her father, Anton Ulčnik, was a cobbler and later a red-onion farmer.<ref name="auto" /> In her youth, she worked on her family's onion farm. From 1964 to 1997, she worked at a state-owned children's clothing factory where she created and monitored textile patterns.<ref name="auto" /> Ulčnik wakakumana na mfumu wake, Viktor Knavs, uyo wakaŵa membala wa [[League of Communists of Slovenia|Chipani cha Ŵakomyunisiti cha Slovenia]] mu [[Sevnica]] mu 1966.<ref>{{Cite web|url=https://people.com/all-about-melania-trump-parents-8620972|title=All About Melania Trump's Parents, Viktor and Amalija Knavs|website=Peoplemag}}</ref> Pamanyuma pakutorana, ŵakakhalanga mu Sevnica, Slovenia.<ref name=":0">{{Cite web |last=Dangremond |first=Sam |date=August 25, 2020 |title=Everything to Know About Melania Trump's Parents, Viktor And Amalija Knavs |url=https://www.townandcountrymag.com/society/politics/g9968592/melania-trump-parents-amalija-knavs-viktor-knavs/ |access-date=January 10, 2024 |website=Town & Country |language=en-US |archive-date=January 10, 2024 |archive-url=https://web.archive.org/web/20240110080623/https://www.townandcountrymag.com/society/politics/g9968592/melania-trump-parents-amalija-knavs-viktor-knavs/ |url-status=live }}</ref> Ŵakutorana aŵa ŵakaŵa na ŵana ŵanakazi ŵaŵiri: Ines (wakababika mu 1968) na [[Melania Trump|Melanija]] (wakababika mu 1970).<ref name=":0" /> == Umoyo wa pamanyuma na nyifwa == Mu Ogasiti 2017, Amalija na mfumu wake ŵakaŵa kukhala ku [[New York City]].<ref>{{cite news|url=https://apnews.com/1bdcdd2c8899478791526c536ce1ab43|title=First lady appears to borrow from Michelle Obama's playbook|first=Darlene|last=Superville|publisher=Associated Press|date=August 28, 2017|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110065648/https://apnews.com/1bdcdd2c8899478791526c536ce1ab43|url-status=live}}</ref> Pamanyuma vikazomelezgeka kuti Melania ndiyo wakalembeska ŵapapi ŵake pa [[green card]]s.<ref name=citizenship /> Mu Meyi 2018, Amalija wakaŵapo pa mwambo wa [[White House Rose Garden]] apo Melania wakayambiska pulogalamu yake ya ulongozgi wa ŵanthu ya [[Be Best]].<ref>{{cite news|url=https://apnews.com/parenting-united-states-government-2aefddc6f11044d4ac340809f9e75bb3|title=Melania Trump debuts 'Be Best' campaign for kids' well-being|first=Darlene|last=Superville|publisher=Associated Press|date=May 7, 2018|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110055458/https://apnews.com/parenting-united-states-government-2aefddc6f11044d4ac340809f9e75bb3|url-status=live}}</ref> Mu Ogasiti 2018, Amalija na Viktor Knavs ŵakazgoka ŵanthu ŵa ku U.S. pamanyuma pa kulapa chilapo ku khoti la ku [[New York City]].<ref name=citizenship>{{cite news|url=https://apnews.com/article/immigration-ap-top-news-new-york-city-new-york-ny-state-wire-e9ef38a1031744ae9e3a098c96f6a706|title=Meet the newest US citizens: Melania Trump's parents|first=Michael R.|last=Sisak|publisher=Associated Press|date=August 9, 2018|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110051701/https://apnews.com/article/immigration-ap-top-news-new-york-city-new-york-ny-state-wire-e9ef38a1031744ae9e3a098c96f6a706|url-status=live}}</ref> ''[[The New York Times]]'' yikalongosora kuti pa ŵanthu wose wakawonekanga nga wakalondezga yayi "vyakugomezgeka vya anyinamama ŵa ku America".<ref>{{Cite news |url=https://www.nytimes.com/2024/01/11/style/melania-trump-mother-amalija-knavs.html |title=The Inscrutable Glamour of Melania Trump's Mother |work=The New York Times |date=January 11, 2024 |access-date=January 12, 2024 |archive-date=January 12, 2024 |archive-url=https://web.archive.org/web/20240112225530/https://www.nytimes.com/2024/01/11/style/melania-trump-mother-amalija-knavs.html |url-status=live |last1=Garelick |first1=Rhonda }}</ref> Pa 9 Januwale 2024, Knavs wakafwa ku chipatala ku [[Miami, Florida]], apo wakaŵa na vyaka 78.<ref>{{cite news|url=https://apnews.com/article/amalija-knavs-melania-trump-mother-death-obituary-28fc01c5098ad87813a36bfde7c49584|title=Former first lady Melania Trump's mother, Amalija Knavs, has died|publisher=Associated Press|date=January 10, 2024|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110062013/https://apnews.com/article/amalija-knavs-melania-trump-mother-death-obituary-28fc01c5098ad87813a36bfde7c49584|url-status=live}}</ref> Wakaŵa "wakalwara chomene" kufuma kuumaliro wa 2023, ndipo ŵanthu awo ŵakayowoya na ''[[People (magazini)|People]]'' ŵakasimikizga kuti Melania wakaleka kuŵapo pa phwando la [[Mar-a-Lago]] la [[New Year's Eve]] kuti wakhalenge pafupi na anyina.<ref>{{cite news|url=https://people.com/amalija-knavs-melania-trump-mother-dead-8421380|title=Melania Trump's Mother, Amalija Knavs, Dead at 78|first=Virginia|last=Chamlee|publisher=People|date=January 10, 2024|accessdate=January 10, 2024|archive-date=January 10, 2024|archive-url=https://web.archive.org/web/20240110032450/https://people.com/amalija-knavs-melania-trump-mother-dead-8421380|url-status=live}}</ref> == Ukaboni == {{Reflist}} {{Melania Trump}} {{Trump family}} {{DEFAULTSORT:Knavs, Amalija}} [[Category:Ŵakubabika mu 1945]] [[Category:Ŵakufwa mu 2024]] [[Category:Ŵanthu ŵa ku Slovenia awo ŵakasamira ku United States]] [[Category:Ŵanthu ŵa ku United States awo ŵakasanga wanangwa wa kukhala mu charu]] [[Category:Ŵakupanga malaya ŵa ku America ŵa mu vyaka vya m'ma 1900]] [[Category:Ŵa mu mbumba ya Trump]] [[Category:Melania Trump]] [[Category:Ŵanthu ŵakufuma mu chigaŵa cha Graz-Umgebung]] [[Category:Ŵanthu ŵakufuma ku Sevnica]] aw8sz74y8z5owmmsxc1mx9lm0q50188 Template:Melania Trump 10 47816 116995 2025-12-27T09:48:31Z en>Dash9Z 0 116995 wikitext text/x-wiki {{navbox |name = Melania Trump |title = [[Melania Trump]] |state = {{{state|autocollapse}}} |bodyclass= hlist |image = [[File:Melania Trump official portrait.jpg|140px]] |above = * [[First Lady of the United States]] (2017–2021, 2025–present) |group1 = Life and work |list1 = * [[Melania Trump#Early modeling career|Modeling career]] * [[Trump Tower]] ([[Trump Tower penthouse of Donald Trump|Penthouse]]) (New York City, New York residence) * [[Trump National Golf Club Bedminster]] (Bedminster, New Jersey residence) * [[Mar-a-Lago]] (Palm Beach, Florida residence) * [[Be Best]] * [[TAKE IT DOWN Act]] |group2 = Books |list2 = * ''[[Melania (memoir)|Melania]]'' (2024) |group3 = [[Family of Donald Trump|Family]] |list3 = * [[Donald Trump]] (husband) * [[Barron Trump]] (son) * [[Viktor Knavs]] (father) * [[Amalija Knavs]] (mother) |group4 = [[Public image of Melania Trump|Public image]] |list4 = {{#invoke:navbox|navbox|subgroup |group1 = Books |list1 = * ''[[Melania and Me]]'' (2020) |group2 = Film |list2 = * ''[[Melania (film)|Melania]]'' (2026) |group3 = Television |list3 = * ''[[Our Cartoon President]]'' (2018) |group4 = Other |list4 = * [[Statue of Melania Trump]] (2019) }} |group5 = Related |list5 = * [[Melania Trump replacement conspiracy theory]] |below = {{Icon|Category}} [[:Category:Melania Trump|Category]] }}<noinclude> {{collapsible option}} [[Category:First ladies of the United States navigational boxes|Trump, Melania]] </noinclude> nveg18xb22k5ztgu8wx1p08lfto3uzd 116996 116995 2026-07-16T11:32:29Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Melania_Trump]] 116995 wikitext text/x-wiki {{navbox |name = Melania Trump |title = [[Melania Trump]] |state = {{{state|autocollapse}}} |bodyclass= hlist |image = [[File:Melania Trump official portrait.jpg|140px]] |above = * [[First Lady of the United States]] (2017–2021, 2025–present) |group1 = Life and work |list1 = * [[Melania Trump#Early modeling career|Modeling career]] * [[Trump Tower]] ([[Trump Tower penthouse of Donald Trump|Penthouse]]) (New York City, New York residence) * [[Trump National Golf Club Bedminster]] (Bedminster, New Jersey residence) * [[Mar-a-Lago]] (Palm Beach, Florida residence) * [[Be Best]] * [[TAKE IT DOWN Act]] |group2 = Books |list2 = * ''[[Melania (memoir)|Melania]]'' (2024) |group3 = [[Family of Donald Trump|Family]] |list3 = * [[Donald Trump]] (husband) * [[Barron Trump]] (son) * [[Viktor Knavs]] (father) * [[Amalija Knavs]] (mother) |group4 = [[Public image of Melania Trump|Public image]] |list4 = {{#invoke:navbox|navbox|subgroup |group1 = Books |list1 = * ''[[Melania and Me]]'' (2020) |group2 = Film |list2 = * ''[[Melania (film)|Melania]]'' (2026) |group3 = Television |list3 = * ''[[Our Cartoon President]]'' (2018) |group4 = Other |list4 = * [[Statue of Melania Trump]] (2019) }} |group5 = Related |list5 = * [[Melania Trump replacement conspiracy theory]] |below = {{Icon|Category}} [[:Category:Melania Trump|Category]] }}<noinclude> {{collapsible option}} [[Category:First ladies of the United States navigational boxes|Trump, Melania]] </noinclude> nveg18xb22k5ztgu8wx1p08lfto3uzd Blaine Trump 0 47817 117000 2026-07-16T11:34:46Z Tumbuka Arch 6863 Created page with "{{Short description|Ŵanthu wakumanyikwa wa ku America, wakovwira ŵanyake, ndiposo wa mu mbumba ya Trump (wakababika mu 1948)}} {{Infobox person | name = Blaine Trump | birth_name = Martha Lindley Blaine Beard | birth_date = {{Birth year and age|1948}} | birth_place = [[Mountain Brook, Alabama]], U.S. | education = {{plainlist| * [[International School of the Sacred Heart]] * [[American School of Paris]] * Bennett College..." 117000 wikitext text/x-wiki {{Short description|Ŵanthu wakumanyikwa wa ku America, wakovwira ŵanyake, ndiposo wa mu mbumba ya Trump (wakababika mu 1948)}} {{Infobox person | name = Blaine Trump | birth_name = Martha Lindley Blaine Beard | birth_date = {{Birth year and age|1948}} | birth_place = [[Mountain Brook, Alabama]], U.S. | education = {{plainlist| * [[International School of the Sacred Heart]] * [[American School of Paris]] * [[Bennett College (New York)|Bennett College]] * [[University of Tokyo]] }} | occupation = {{hlist|[[Socialite]]|[[philanthropist]]}} | known_for = {{hlist|Ŵanthu wakumanyikwa wa ku America|Mwenekazi wa [[American Ballet Theatre]]}} | spouse = {{marriage|Peter Retchin|July 1970|end=div}}<br>{{marriage|[[Robert Trump]]|1984|2010|end=div}} | partner = Steve Simon (2010s–present) | children = 1 }} '''Martha Lindley Blaine Trump''' ([[Birth name|née]] '''Beard'''; wakababika mu 1948)<ref name="1950census">{{Cite United States census|url=https://www.familysearch.org/ark:/61903/1:1:6F7G-5S34|title=M L Blaine Beard|location=Mountain Brook, Jefferson, Alabama|year=1950|roll=3254|Page=19|line=3|enumdist=37-301B|accessdate=February 9, 2024}})</ref> ni mwanakazi wakumanyikwa wa ku America ndiposo wakovwira ŵanyake. Kwa vyaka 25 wakaŵa muwoli wa mbumba ya chuma cha malo [[Robert Trump]]. Iye ni munung'una wakale wa muwoli wa [[President of the United States|Mulongozgi wa United States]] [[Donald Trump]]. == Umoyo wakwambilira na masambiro == Blaine Trump wakababika zina lakuti Martha Lindley Blaine Beard,<ref name="1950census" /> ndipo wakakulira mu [[South Carolina]], [[Florida]] na [[Alabama]]. Awiske, Joseph Beard,<ref name="nytimes/2002/03/08/death">{{cite news |title=Paid Notice: Deaths: Beard, Josephus Simmons II |url=https://www.nytimes.com/2002/03/08/classified/paid-notice-deaths-beard-josephus-simmons-ii.html |access-date=July 28, 2024 |newspaper=[[The New York Times]] |date=March 8, 2002}}</ref><ref name="nytimes/2000/08/11/death">{{cite news |title=Paid Notice: Deaths: Trump, MaryA. |url=https://www.nytimes.com/2000/08/11/classified/paid-notice-deaths-trump-mary-a.html |access-date=28 July 2024 |newspaper=[[The New York Times]] |date=August 11, 2000}}</ref> wakaŵa mulara mukuru ku [[IBM]].<ref name=":0">{{Cite news|url=https://www.nytimes.com/1987/10/28/garden/the-winning-ways-of-blaine-trump.html|title=The Winning Ways of Blaine Trump|last=Schiro|first=Anne-Marie|date=October 28, 1987|work=[[The New York Times]]|access-date=February 18, 2019}}</ref> Blaine na mbumba yake ŵakasamira ku [[Yokohama]] chifukwa cha ntchito ya awiske apo wakaŵa na vyaka 10. Kwenekura wakasambira ku [[International School of the Sacred Heart]].<ref name=":0" /> Pamanyuma wakamalizga masambiro ku [[American School of Paris]] mu [[Louveciennes]]. Wakasambira ku [[Bennett College (New York)|Bennett College]] mu [[Millbrook, New York]], ndipo pamanyuma<ref name=":8">{{Cite news|url=https://www.newspapers.com/clip/9405755/the_orlando_sentinel/|title= Martha Lindley Blaine Beard . . .|date=August 28, 1966|newspaper=[[Orlando Sentinel]]|access-date=February 18, 2019}}</ref> ku [[University of Tokyo]] pambere wandaleke masambiro kuti watorane na Peter Retchin.<ref name=":1">{{Cite news|url=https://people.com/archive/blaine-trump-socialite-vol-49-no-18/|title=Blaine Trump: Socialite|date=May 11, 1998|magazine=[[People (magazine)|People]]|access-date=February 18, 2019|issue=18|volume=49}}</ref> == Ntchito == Trump ni [[trustee]] wa [[American Ballet Theatre]].<ref>{{Cite web|url=https://www.abt.org/the-company/board-of-trustees/|title=Board of Governing Trustees|publisher=[[American Ballet Theatre]]|access-date=February 18, 2019}}</ref> Mu 1998, Trump wakapokera chawanangwa cha [[Marietta Tree]] chifukwa cha ntchito zake zakovwira ŵanthu kufuma ku komiti ya ŵanthu ŵa ku New York City.{{citation needed|date=July 2023}} == Umoyo wake == Blaine Trump wali kutorana na kupatana kaŵiri. Chakwamba wakatorana na Peter Retchin mu 1970, ndipo ŵakaŵa na mwana mu 1978, Christopher Hollister, uyo ni mulara wa bizinesi ya malo, pambere ŵandapatane.<ref name=":1" /><ref name=":3">{{Cite news|url=https://www.nytimes.com/2007/06/10/fashion/weddings/10dieterle.html|title=Raina Dieterle, Christopher Trump-Retchin|date=June 10, 2007|newspaper=[[The New York Times]]|access-date=February 18, 2019}}</ref> Mu 1984 wakatorana na [[Robert Trump]], uyo wakagwiranga ntchito mu kampani ya mbumba yake ya vyamalonda ya malo ya [[Trump Organization]], ndipo ŵakakhala pamoza vyaka 25, kufuma mu 1984 mpaka 2009.<ref>{{Cite news|last=Karni|first=Annie|date=August 15, 2020|title=Robert S. Trump, the President's Younger Brother, Dies at 71|newspaper=The New York Times|url=https://www.nytimes.com/2020/08/15/us/politics/robert-s-trump-dead.html|access-date=August 16, 2020|issn=0362-4331}}</ref> Mu Okutobala 2004, Blaine wakamwa mapilisi mwakujumphizga ndipo wakapelekeka ku chipatala cha [[Mount Sinai Hospital (Manhattan)|Mount Sinai Hospital]] ku Manhattan, New York, pamanyuma pakumanya kuti [[mwanalume|mfumu]] wake wakagula nyumba ya ndalama zakukwana $3.7 miliyoni pa [[Long Island]] kuti yiŵe ya munyake Ann Marie Pallan, uyo wakaŵa mulembi wake kwa vyaka vinandi.<ref>[https://www.thelist.com/237117/ann-marie-pallan-who-is-robert-trumps-wife Ann Marie Pallan: Who is Robert Trump's wife?]</ref> Ŵakaŵa mu mphindano yitali ya kupatana. Mlandu wa kupatana ukayambika mu 2007, ukafika ku khoti mu 2008, ndipo ŵakafika pa phangano la chisisi mu 2010.<ref name=":6">{{Cite magazine|url=http://nymag.com/news/intelligencer/41836/|title=Divorce, Park Avenue Style|last=Rosenblum|first=Emma|date=December 8, 2007|magazine=[[New York (magazine)|New York]]|access-date=February 18, 2019}}</ref> Pamanyuma pakuti Robert na Blaine ŵapatana mu 2006, pamanyuma pa vyaka vyakujumpha 20 vya nthengwa, ŵakagulitsa nyumba yawo ya vipinda vitatu ya 6,500 square feet iyo yikaŵa yambura kumalizgika.<ref name="nytimes/2006/05/14/deal1">{{cite news |last1=Neuman |first1=William |title=A Trump Triplex Goes on the Market |url=https://www.nytimes.com/2006/05/14/realestate/14deal1.html |access-date=July 28, 2024 |newspaper=[[The New York Times]] |date=May 14, 2006}}</ref> Mu 2012, Blaine Trump wakaguliska nyumba yake yikuru ya ndalama zakukwana $17.5 miliyoni ku [[Millbrook, New York]].<ref name=":7">{{Cite web|url=https://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump|archive-url=https://web.archive.org/web/20160227073310/http://www.curbed.com/2012/6/22/10361690/the-ohsovery-untrump-mansion-of-socialite-blaine-trump|url-status=dead|archive-date=February 27, 2016|title=The Oh-So-Very Un-Trump Mansion of Socialite Blaine Trump|last=Bear|first=Rob|date=June 22, 2012|publisher=[[Curbed]]|access-date=February 18, 2019}}</ref> Pakati pa vyaka vinkhondi pamanyuma, iye na munyake Steve Simon ŵakaluta ku chiphikiro cha kulapa cha Mulongozgi [[First inauguration of Donald Trump|Donald Trump]] ku Washington.<ref name=":4">{{Cite magazine|last=Goldfarb|first=Brad|date=December 19, 2016|title=Socialite Blaine Trump's Home in Manhattan|magazine=[[Architectural Digest]]|url=https://www.architecturaldigest.com/story/blaine-trump-manhattan-apartment-article|access-date=February 18, 2019}}</ref><ref name=":5">{{Cite news|last=Barsamian|first=Edward|date=January 21, 2017|title=Inside the 2017 Inauguration Day and Ball Ceremonies With Blaine Trump|magazine=[[Vogue (magazine)|Vogue]]|url=https://www.vogue.com/article/blaine-trump-inauguration-day-2017-celebrity-photo-diary-style|access-date=February 18, 2019}}</ref> == Ukaboni == {{Reflist}} {{Authority control}} {{DEFAULTSORT:Trump, Blaine}} [[Category:Ŵakubabika mu 1948]] [[Category:Ŵanthu ŵakumanyikwa ŵa ku America]] [[Category:American Ballet Theatre]] [[Category:Ŵakuvwira ŵanyake kufuma ku New York (boma)]] [[Category:Ŵanakazi ŵakuvwira ŵanyake ŵa ku America]] [[Category:Ŵanthu ŵamoyo]] [[Category:Ŵanthu awo ŵakasambira ku University of Tokyo]] [[Category:Ŵanthu awo ŵakasambira ku Bennett College]] 5l20gts2k86pxtpnv3zawha2jwk9avh Template:Cite United States census 10 47818 117001 2025-03-24T07:01:24Z en>J3133 0 117001 wikitext text/x-wiki <includeonly><templatestyles src="Citation/styles.css"/><span class="citation census">{{#if: {{{title|}}} |&#32;{{#if:{{{url|}}} |[{{{url}}} "{{{title}}}"] |{{{title}}} }}, [[United States census]], }}{{#if: {{{year|{{{date|}}}}}} |&#32;{{{year|{{{date}}}}}}; }}{{#if: {{{location|}}} |&#32;{{{location}}}{{#if:{{{roll|}}}{{{page|}}}{{{line|}}}{{{enumdist|}}}{{{filmnum|}}}{{{nafilm|}}}|&#59;}} }}{{#if: {{{roll|}}} |&#32; roll {{{roll}}}, }}{{#if: {{{page|}}} |&#32; page {{{page}}}, }}{{#if: {{{line|}}} |&#32; line {{{line}}} }}{{#if: {{{enumdist|}}} |,&#32; enumeration district {{{enumdist}}} }}{{#if: {{{filmnum|}}} |,&#32; Family History film {{{filmnum}}} }}{{#if: {{{nafilm|}}} |,&#32; National Archives film number {{{nafilm}}} }}{{#if: {{{accessdate|}}} |. Retrieved on {{{accessdate}}}. |. }}</span></includeonly><noinclude> {{documentation}} </noinclude> 5aw1117koklgkn6tbi983rzwspqbxo8 117002 117001 2026-07-16T11:35:19Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Cite_United_States_census]] 117001 wikitext text/x-wiki <includeonly><templatestyles src="Citation/styles.css"/><span class="citation census">{{#if: {{{title|}}} |&#32;{{#if:{{{url|}}} |[{{{url}}} "{{{title}}}"] |{{{title}}} }}, [[United States census]], }}{{#if: {{{year|{{{date|}}}}}} |&#32;{{{year|{{{date}}}}}}; }}{{#if: {{{location|}}} |&#32;{{{location}}}{{#if:{{{roll|}}}{{{page|}}}{{{line|}}}{{{enumdist|}}}{{{filmnum|}}}{{{nafilm|}}}|&#59;}} }}{{#if: {{{roll|}}} |&#32; roll {{{roll}}}, }}{{#if: {{{page|}}} |&#32; page {{{page}}}, }}{{#if: {{{line|}}} |&#32; line {{{line}}} }}{{#if: {{{enumdist|}}} |,&#32; enumeration district {{{enumdist}}} }}{{#if: {{{filmnum|}}} |,&#32; Family History film {{{filmnum}}} }}{{#if: {{{nafilm|}}} |,&#32; National Archives film number {{{nafilm}}} }}{{#if: {{{accessdate|}}} |. Retrieved on {{{accessdate}}}. |. }}</span></includeonly><noinclude> {{documentation}} </noinclude> 5aw1117koklgkn6tbi983rzwspqbxo8 Template:Cite United States census/doc 10 47819 117003 2024-02-19T01:30:13Z en>Pppery 0 - 117003 wikitext text/x-wiki {{Documentation subpage}} {{Uses TemplateStyles|Template:Citation/styles.css}} === Usage === Cite template to deal with citing individual records found in the [[United States census]]. U.S. Census data is publicly available for years 1790 to 1950. For years 1850 to 1950, these records often contain names, addresses, ages, national origins, and occupations. === Parameters (no required parameters) === Horizontal format: <syntaxhighlight lang="wikitext"> {{cite United States census | url = | title = | year = | location = | roll = | page = | line = | enumdist = | filmnum = | nafilm = | accessdate = }} </syntaxhighlight> Vertical format: <syntaxhighlight lang="wikitext"> {{cite United States census | url = | title = | year = | location = | roll = | page = | line = | enumdist = | filmnum = | nafilm = | accessdate = }} </syntaxhighlight> ===Example usage=== <syntaxhighlight lang="wikitext"> {{cite United States census | url = https://www.familysearch.org/ark:/61903/1:1:X44C-62N | title = Charles Jacobs | year = 1900 | location = Orange, Cuyahoga, Ohio | roll = T623 1261 | page = 4A | line = 34 | enumdist = 22 | filmnum = 1254075 | nafilm = T9-0075 | accessdate = 2008-09-10 }} </syntaxhighlight> The entry above will produce the following: <blockquote>{{cite United States census | url = https://www.familysearch.org/ark:/61903/1:1:X44C-62N | title = Charles Jacobs | year = 1900 | location = Orange, Cuyahoga, Ohio | roll = T623 1261 | page = 4A | line = 34 | enumdist = 22 | filmnum = 1254075 | nafilm = T9-0075 | accessdate = 2008-09-10 }}</blockquote> === Description of parameters === * '''title''': title of the census record * '''url''': URL of the source record * '''year''': year the census was taken * '''location''': the census place (town or city, township or county, state) * '''roll''': microfilm roll number * '''page''': census page number * '''line''': entry line number * '''enumdist''' : census enumeration district * '''filmnum''': LDS Family History Center film or microfiche image number * '''nafilm''': National Archives film number * '''accessdate''': when you looked it up <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:Specific-source templates]] }}</includeonly> <templatedata> { "params": { "title": { "label": "Title", "description": "Title of the census record" }, "url": { "label": "URL", "description": "URL of the source record", "type": "url" }, "year": { "label": "Year", "description": "Year the census was taken" }, "location": { "label": "Location", "description": "The census place (town or city, township or county, state)" }, "roll": { "label": "Roll", "description": "Microfilm roll number" }, "page": { "label": "Page", "description": "Census page number" }, "line": { "label": "Line", "description": "Entry line number" }, "enumdist": { "label": "Enumeration district", "description": "Census enumeration district" }, "filmnum": { "label": "Film number", "description": "LDS Family History Center film or microfiche image number" }, "nafilm": { "label": "National Archives film number", "description": "National Archives film number" }, "accessdate": { "label": "Access date", "description": "Date of URL access", "type": "date" } }, "description": "Cite template to deal with citing individual records found in the United States census.", "format": "inline" } </templatedata> jauehol36xjw5dnsa1nfgwu87t1r382 117004 117003 2026-07-16T11:35:20Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Cite_United_States_census/doc]] 117003 wikitext text/x-wiki {{Documentation subpage}} {{Uses TemplateStyles|Template:Citation/styles.css}} === Usage === Cite template to deal with citing individual records found in the [[United States census]]. U.S. Census data is publicly available for years 1790 to 1950. For years 1850 to 1950, these records often contain names, addresses, ages, national origins, and occupations. === Parameters (no required parameters) === Horizontal format: <syntaxhighlight lang="wikitext"> {{cite United States census | url = | title = | year = | location = | roll = | page = | line = | enumdist = | filmnum = | nafilm = | accessdate = }} </syntaxhighlight> Vertical format: <syntaxhighlight lang="wikitext"> {{cite United States census | url = | title = | year = | location = | roll = | page = | line = | enumdist = | filmnum = | nafilm = | accessdate = }} </syntaxhighlight> ===Example usage=== <syntaxhighlight lang="wikitext"> {{cite United States census | url = https://www.familysearch.org/ark:/61903/1:1:X44C-62N | title = Charles Jacobs | year = 1900 | location = Orange, Cuyahoga, Ohio | roll = T623 1261 | page = 4A | line = 34 | enumdist = 22 | filmnum = 1254075 | nafilm = T9-0075 | accessdate = 2008-09-10 }} </syntaxhighlight> The entry above will produce the following: <blockquote>{{cite United States census | url = https://www.familysearch.org/ark:/61903/1:1:X44C-62N | title = Charles Jacobs | year = 1900 | location = Orange, Cuyahoga, Ohio | roll = T623 1261 | page = 4A | line = 34 | enumdist = 22 | filmnum = 1254075 | nafilm = T9-0075 | accessdate = 2008-09-10 }}</blockquote> === Description of parameters === * '''title''': title of the census record * '''url''': URL of the source record * '''year''': year the census was taken * '''location''': the census place (town or city, township or county, state) * '''roll''': microfilm roll number * '''page''': census page number * '''line''': entry line number * '''enumdist''' : census enumeration district * '''filmnum''': LDS Family History Center film or microfiche image number * '''nafilm''': National Archives film number * '''accessdate''': when you looked it up <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:Specific-source templates]] }}</includeonly> <templatedata> { "params": { "title": { "label": "Title", "description": "Title of the census record" }, "url": { "label": "URL", "description": "URL of the source record", "type": "url" }, "year": { "label": "Year", "description": "Year the census was taken" }, "location": { "label": "Location", "description": "The census place (town or city, township or county, state)" }, "roll": { "label": "Roll", "description": "Microfilm roll number" }, "page": { "label": "Page", "description": "Census page number" }, "line": { "label": "Line", "description": "Entry line number" }, "enumdist": { "label": "Enumeration district", "description": "Census enumeration district" }, "filmnum": { "label": "Film number", "description": "LDS Family History Center film or microfiche image number" }, "nafilm": { "label": "National Archives film number", "description": "National Archives film number" }, "accessdate": { "label": "Access date", "description": "Date of URL access", "type": "date" } }, "description": "Cite template to deal with citing individual records found in the United States census.", "format": "inline" } </templatedata> jauehol36xjw5dnsa1nfgwu87t1r382 Category:Ŵanakazi ŵakuvwira ŵanyake ŵa ku America 14 47820 117005 2026-07-16T11:37:00Z Tumbuka Arch 6863 Created blank page 117005 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:Ŵanthu awo ŵakasambira ku Bennett College 14 47821 117006 2026-07-16T11:37:04Z Tumbuka Arch 6863 Created blank page 117006 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:American Ballet Theatre 14 47822 117007 2026-07-16T11:37:08Z Tumbuka Arch 6863 Created blank page 117007 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:Articles without Wikidata item 14 47823 117008 2020-04-08T15:29:58Z en>BrownHairedGirl 0 {{Category TOC}} → {{CatAutoTOC}} on [Category:Template Category TOC on category with over 1200 pages|categories with over 1200 pages]] 117008 wikitext text/x-wiki {{Possibly empty category}} {{Wikipedia category|hidden=yes|tracking=yes}} Articles without a [[Wikidata]] item. This hidden category may be added by templates or modules which use/track properties in Wikidata ([https://en.wikipedia.org/w/index.php?search=insource%3A%22Articles+without+Wikidata+item%22&title=Special:Search&profile=advanced&fulltext=1&ns10=1&ns828=1 search for templates including it]). {{Clear}} {{CatAutoTOC}} [[Category:Wikidata tracking categories]] bjvsrzmuqqmpljq43sy7e9pjlk32033 117009 117008 2026-07-16T11:37:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles_without_Wikidata_item]] 117008 wikitext text/x-wiki {{Possibly empty category}} {{Wikipedia category|hidden=yes|tracking=yes}} Articles without a [[Wikidata]] item. This hidden category may be added by templates or modules which use/track properties in Wikidata ([https://en.wikipedia.org/w/index.php?search=insource%3A%22Articles+without+Wikidata+item%22&title=Special:Search&profile=advanced&fulltext=1&ns10=1&ns828=1 search for templates including it]). {{Clear}} {{CatAutoTOC}} [[Category:Wikidata tracking categories]] bjvsrzmuqqmpljq43sy7e9pjlk32033 Template:Automatic category TOC 10 47824 117028 2024-05-12T05:07:09Z en>Pppery 0 Per request 117028 wikitext text/x-wiki <includeonly><!-- # TOC, depending on category size # <= 100 pages → no TOC # 101–1200 pages → {{Category TOC}} # > 1200 pages → {{Large category TOC}} -->{{Category other|<!-- ####################################################################### #### This is a category page, so generate a TOC if needed. #### #### #### #### Use a sub-template [[Template:Automatic category TOC/core]], #### #### so that we never have more than one call to the #### #### [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}} #### ####################################################################### -->{{Automatic category TOC/core<!-- -->|pagecount={{PAGESINCATEGORY:{{#invoke:HTMLDecode | HTMLDecode | text={{PAGENAME}} }}|R}}<!-- -->|align = {{{align|}}}<!-- -->|top = {{{top|}}}<!-- -->|numerals = {{{numerals|}}}<!-- -->|uppercase = {{{uppercase|}}}<!-- -->|lowercase = {{{lowercase|}}}<!-- -->}}<!-- -->}}<!-- -->{{Template other<!-- -->|<!-- ####################################################################### #### This page is a template, so categorise it #### #### in [[Category:Templates using Automatic category TOC]] ... #### #### #### #### ... unless it is a /doc, /testcases or /sandbox #### #### #### #### There is no point categorising every sub-page of the #### #### same template #### ####################################################################### -->{{#if: {{Str endswith|{{PAGENAME}}|/doc}}{{Str endswith|{{PAGENAME}}|/testcases}}{{Str endswith|{{PAGENAME}}|/sandbox}}<!-- -->|<!-- ### Don't categorise /doc, /testcases or /sandbox pages -->|<!-- ### Not a /doc, /testcases or /sandbox page, so categorise it -->[[Category:Templates using Automatic category TOC]]<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation}} [[Category:Wikipedia Automatic category TOC]] </noinclude> fu28obs3bcc3b5jr8a9o17mhaah7p58 117029 117028 2026-07-16T11:37:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Automatic_category_TOC]] 117028 wikitext text/x-wiki <includeonly><!-- # TOC, depending on category size # <= 100 pages → no TOC # 101–1200 pages → {{Category TOC}} # > 1200 pages → {{Large category TOC}} -->{{Category other|<!-- ####################################################################### #### This is a category page, so generate a TOC if needed. #### #### #### #### Use a sub-template [[Template:Automatic category TOC/core]], #### #### so that we never have more than one call to the #### #### [[WP:EXPENSIVE]] function {{PAGESINCATEGORY}} #### ####################################################################### -->{{Automatic category TOC/core<!-- -->|pagecount={{PAGESINCATEGORY:{{#invoke:HTMLDecode | HTMLDecode | text={{PAGENAME}} }}|R}}<!-- -->|align = {{{align|}}}<!-- -->|top = {{{top|}}}<!-- -->|numerals = {{{numerals|}}}<!-- -->|uppercase = {{{uppercase|}}}<!-- -->|lowercase = {{{lowercase|}}}<!-- -->}}<!-- -->}}<!-- -->{{Template other<!-- -->|<!-- ####################################################################### #### This page is a template, so categorise it #### #### in [[Category:Templates using Automatic category TOC]] ... #### #### #### #### ... unless it is a /doc, /testcases or /sandbox #### #### #### #### There is no point categorising every sub-page of the #### #### same template #### ####################################################################### -->{{#if: {{Str endswith|{{PAGENAME}}|/doc}}{{Str endswith|{{PAGENAME}}|/testcases}}{{Str endswith|{{PAGENAME}}|/sandbox}}<!-- -->|<!-- ### Don't categorise /doc, /testcases or /sandbox pages -->|<!-- ### Not a /doc, /testcases or /sandbox page, so categorise it -->[[Category:Templates using Automatic category TOC]]<!-- -->}}<!-- -->}}</includeonly><noinclude> {{Documentation}} [[Category:Wikipedia Automatic category TOC]] </noinclude> fu28obs3bcc3b5jr8a9o17mhaah7p58 Template:Automatic category TOC/core 10 47825 117030 2024-05-10T08:28:02Z en>MSGJ 0 update after moves, and remove excessive whitespace 117030 wikitext text/x-wiki {{#ifexpr:{{{pagecount|0}}} > 1200 |{{Large category TOC |CatAutoTOC = yes |pagecount = {{{pagecount}}} }}[[Category:Automatic category TOC generates Large category TOC]] |{{#ifexpr:{{{pagecount|0}}} > 100 |{{Category TOC |pagecount={{{pagecount}}} |CatAutoTOC=yes |align = {{#if:{{{align|}}}|{{{align}}}|left}} |top = {{#if:{{{top|}}}|{{{top}}}|yes}} |numerals = {{#if:{{{numerals|}}}|{{{numerals}}}|group}} |uppercase = {{#if:{{{uppercase|}}}|{{{uppercase}}}|yes}} |lowercase = {{#if:{{{lowercase|}}}|{{{lowercase}}}|no}} }}[[Category:Automatic category TOC generates standard Category TOC]] |[[Category:Automatic category TOC generates no TOC]] }} }}{{#ifeq:{{{pagecount}}}|0 |[[Category:Automatic category TOC on pages where PAGESINCATEGORY returns zero]] }}{{clear}}<noinclude> {{Documentation|Template:{{ROOTPAGENAME}}/doc}} [[Category:Wikipedia Automatic category TOC]] </noinclude> 0e5u9bmmwid4q0o7c5pybouiwgwp4lu 117031 117030 2026-07-16T11:37:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Automatic_category_TOC/core]] 117030 wikitext text/x-wiki {{#ifexpr:{{{pagecount|0}}} > 1200 |{{Large category TOC |CatAutoTOC = yes |pagecount = {{{pagecount}}} }}[[Category:Automatic category TOC generates Large category TOC]] |{{#ifexpr:{{{pagecount|0}}} > 100 |{{Category TOC |pagecount={{{pagecount}}} |CatAutoTOC=yes |align = {{#if:{{{align|}}}|{{{align}}}|left}} |top = {{#if:{{{top|}}}|{{{top}}}|yes}} |numerals = {{#if:{{{numerals|}}}|{{{numerals}}}|group}} |uppercase = {{#if:{{{uppercase|}}}|{{{uppercase}}}|yes}} |lowercase = {{#if:{{{lowercase|}}}|{{{lowercase}}}|no}} }}[[Category:Automatic category TOC generates standard Category TOC]] |[[Category:Automatic category TOC generates no TOC]] }} }}{{#ifeq:{{{pagecount}}}|0 |[[Category:Automatic category TOC on pages where PAGESINCATEGORY returns zero]] }}{{clear}}<noinclude> {{Documentation|Template:{{ROOTPAGENAME}}/doc}} [[Category:Wikipedia Automatic category TOC]] </noinclude> 0e5u9bmmwid4q0o7c5pybouiwgwp4lu Category:Articles with long short description 14 47826 117048 2026-07-10T06:50:30Z en>GhostInTheMachine 0 cat should be empty much of the time 117048 wikitext text/x-wiki {{Short description|Short description maintenance category}} {{Maintenance category|hidden=yes}} {{Empty category}} {{cat main|WP:Short description}} This category contains articles with excessively long short descriptions. This category is applied when short descriptions, which are typically no more than about 40 characters, are longer than 100 characters. See [[WP:SDFORMAT]] and [[WP:SDEXAMPLES]] for guidance on how to fix these short descriptions. To view the short descriptions next to each article name on this page, import [[User:SD0001/shortdescs-in-category.js]] into your [[Special:MyPage/common.js|common.js]] file. That script will display a "Show SDs" button next to the article list. If you find any errors (ie articles that ought not to be appearing in this list), please report them at [[Wikipedia talk:Short description]]. See also [[Wikipedia:Database reports/Long short descriptions]] for articles with long short descriptions that do not reach the 100-character threshold that assigns this category. {{CatAutoTOC}} [[Category:Wikipedia pages with long short description]] [[Category:Wikipedia article errors]] aqs76xaap9ea6nmi4qjemvoz85r1rc5 117049 117048 2026-07-16T11:39:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles_with_long_short_description]] 117048 wikitext text/x-wiki {{Short description|Short description maintenance category}} {{Maintenance category|hidden=yes}} {{Empty category}} {{cat main|WP:Short description}} This category contains articles with excessively long short descriptions. This category is applied when short descriptions, which are typically no more than about 40 characters, are longer than 100 characters. See [[WP:SDFORMAT]] and [[WP:SDEXAMPLES]] for guidance on how to fix these short descriptions. To view the short descriptions next to each article name on this page, import [[User:SD0001/shortdescs-in-category.js]] into your [[Special:MyPage/common.js|common.js]] file. That script will display a "Show SDs" button next to the article list. If you find any errors (ie articles that ought not to be appearing in this list), please report them at [[Wikipedia talk:Short description]]. See also [[Wikipedia:Database reports/Long short descriptions]] for articles with long short descriptions that do not reach the 100-character threshold that assigns this category. {{CatAutoTOC}} [[Category:Wikipedia pages with long short description]] [[Category:Wikipedia article errors]] aqs76xaap9ea6nmi4qjemvoz85r1rc5 Template:Category main article 10 47827 117056 2023-12-30T18:55:42Z en>Extraordinary Writ 0 per talk 117056 wikitext text/x-wiki {{#invoke:Category main article|catMain}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 93ywomtawinj6ihztk938yo4nvud211 117057 117056 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Category_main_article]] 117056 wikitext text/x-wiki {{#invoke:Category main article|catMain}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 93ywomtawinj6ihztk938yo4nvud211 Module:Category main article 828 47828 117060 2025-12-08T18:37:11Z en>Pigsonthewing 0 per talk page request 117060 Scribunto text/plain -- This module implements {{Category main article}}. local mHatnote = require('Module:Hatnote') local mFormatLink = require('Module:Format link') local yesno = require('Module:Yesno') local mTableTools -- lazily initialise local mArguments -- lazily initialise local p = {} -- Helper: true if the page is in Template: or Module: namespace local function isTemplateOrModule(title) local t = (type(title) == 'string' and title) or (title and title.prefixedText) or '' if t == '' then return false end local ok, tt = pcall(mw.title.new, t) if not ok or not tt then return false end local ns = tt.namespace return ns == 10 or ns == 828 end function p.catMain(frame) mTableTools = require('Module:TableTools') mArguments = require('Module:Arguments') -- Grab args local args = mArguments.getArgs(frame, {wrappers = 'Template:Category main article'}) local pages = mTableTools.compressSparseArray(args) if #pages == 0 and args[1] then pages = { args[1] } end local options = { article = args.article, selfref = args.selfref, _rawPages = pages, } -- Determine the outer page (the page using the template) local thisTitle = frame and frame.getParent and frame:getParent() and frame:getParent().title or mw.title.getCurrentTitle() local titleText = thisTitle and thisTitle.prefixedText or '' local ns = thisTitle and thisTitle.namespace or nil -- Skip tracking categories on template/module pages local isTemplate = isTemplateOrModule(titleText) -- Remember original arg count local origCount = #pages -- Generate hatnote text local text, firstLink, usedAutoFill = p._catMain(options, thisTitle, unpack(pages)) if isTemplate then -- On templates/modules, just return the hatnote (no tracking categories) return text end -- Add tracking categories local cats = {} -- Wrong namespace detection (Article, Draft) if ns == 0 or ns == 118 then table.insert(cats, '[[Category:Articles using category hatnotes]]') end -- Title mismatch detection if firstLink and (origCount == 1 or (origCount == 0 and usedAutoFill)) then local function normalizeTitle(s) return (s or ''):gsub('^%s+', ''):gsub('%s+$', ''):gsub('^[^:]*:', ''):gsub('%s+', ' '):gsub('^%l', string.upper) end local compareStr if usedAutoFill then compareStr = normalizeTitle(firstLink) else local raw = (options._rawPages and options._rawPages[1]) or firstLink compareStr = normalizeTitle(raw:gsub("|.*", "")) end local catName = normalizeTitle(thisTitle and thisTitle.text or '') if compareStr ~= catName then table.insert(cats, '[[Category:Category main article does not match category title]]') end end if #cats > 0 then text = text .. '\n' .. table.concat(cats, '\n') end return text end function p._catMain(options, thisTitle, ...) options = options or {} local pages = {...} thisTitle = thisTitle or mw.title.getCurrentTitle() local fullTitle = thisTitle and thisTitle.prefixedText or '' local thisText = thisTitle and thisTitle.text or (pages[1] or '') local isTemplate = isTemplateOrModule(fullTitle) -- Red link detection local rawLinks = mFormatLink.formatPages({ categorizeMissing = not isTemplate and 'Categories with hatnote templates targeting a non-existent page' or nil }, pages) -- Convert to plain strings local links = {} for i, link in ipairs(rawLinks or {}) do links[i] = tostring(link) end -- Auto-fill if empty local firstOutputLink = nil local usedAutoFill = false if not links[1] or links[1] == '' then local title = mw.title.new(thisText) if title and title.isRedirect then title = title.redirectTarget end firstOutputLink = title and title.text or thisText usedAutoFill = true links[1] = tostring(mFormatLink._formatLink{ link = firstOutputLink, categorizeMissing = not isTemplate and 'Categories with hatnote templates targeting a non-existent page' or nil }) pages = { firstOutputLink } else local visible = links[1] visible = visible:gsub("^'''", ""):gsub("'''$", "") visible = visible:gsub("%[%[", ""):gsub("%]%]", "") visible = visible:gsub("|.*$", "") visible = visible:gsub("#.*$", "") firstOutputLink = visible usedAutoFill = false end -- Bold links for i, link in ipairs(links) do links[i] = string.format("'''%s'''", link) end -- Determine pagetype local pagetype if options.article ~= nil then pagetype = yesno(options.article) ~= false and 'article' or 'page' elseif pages and pages[1] then local page = pages[1]:gsub("|.*","") local tt = mw.title.new(page) pagetype = tt and tt.namespace == 0 and "article" or "page" else pagetype = "article" end -- Work out whether we need to be singular or plural local stringToFormat if #links > 1 then stringToFormat = 'The main %ss for this [[Help:Categories|category]] are %s.' else stringToFormat = 'The main %s for this [[Help:Categories|category]] is %s.' end -- Build hatnote text local text = string.format( stringToFormat, pagetype, mw.text.listToText(links) ) -- Pass through Module:Hatnote local hnOptions = { selfref = options.selfref } text = mHatnote._hatnote(text, hnOptions) return text, firstOutputLink, usedAutoFill end return p olrtro1zfdkuz89uoqbww6bq8ppsafd 117061 117060 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Category_main_article]] 117060 Scribunto text/plain -- This module implements {{Category main article}}. local mHatnote = require('Module:Hatnote') local mFormatLink = require('Module:Format link') local yesno = require('Module:Yesno') local mTableTools -- lazily initialise local mArguments -- lazily initialise local p = {} -- Helper: true if the page is in Template: or Module: namespace local function isTemplateOrModule(title) local t = (type(title) == 'string' and title) or (title and title.prefixedText) or '' if t == '' then return false end local ok, tt = pcall(mw.title.new, t) if not ok or not tt then return false end local ns = tt.namespace return ns == 10 or ns == 828 end function p.catMain(frame) mTableTools = require('Module:TableTools') mArguments = require('Module:Arguments') -- Grab args local args = mArguments.getArgs(frame, {wrappers = 'Template:Category main article'}) local pages = mTableTools.compressSparseArray(args) if #pages == 0 and args[1] then pages = { args[1] } end local options = { article = args.article, selfref = args.selfref, _rawPages = pages, } -- Determine the outer page (the page using the template) local thisTitle = frame and frame.getParent and frame:getParent() and frame:getParent().title or mw.title.getCurrentTitle() local titleText = thisTitle and thisTitle.prefixedText or '' local ns = thisTitle and thisTitle.namespace or nil -- Skip tracking categories on template/module pages local isTemplate = isTemplateOrModule(titleText) -- Remember original arg count local origCount = #pages -- Generate hatnote text local text, firstLink, usedAutoFill = p._catMain(options, thisTitle, unpack(pages)) if isTemplate then -- On templates/modules, just return the hatnote (no tracking categories) return text end -- Add tracking categories local cats = {} -- Wrong namespace detection (Article, Draft) if ns == 0 or ns == 118 then table.insert(cats, '[[Category:Articles using category hatnotes]]') end -- Title mismatch detection if firstLink and (origCount == 1 or (origCount == 0 and usedAutoFill)) then local function normalizeTitle(s) return (s or ''):gsub('^%s+', ''):gsub('%s+$', ''):gsub('^[^:]*:', ''):gsub('%s+', ' '):gsub('^%l', string.upper) end local compareStr if usedAutoFill then compareStr = normalizeTitle(firstLink) else local raw = (options._rawPages and options._rawPages[1]) or firstLink compareStr = normalizeTitle(raw:gsub("|.*", "")) end local catName = normalizeTitle(thisTitle and thisTitle.text or '') if compareStr ~= catName then table.insert(cats, '[[Category:Category main article does not match category title]]') end end if #cats > 0 then text = text .. '\n' .. table.concat(cats, '\n') end return text end function p._catMain(options, thisTitle, ...) options = options or {} local pages = {...} thisTitle = thisTitle or mw.title.getCurrentTitle() local fullTitle = thisTitle and thisTitle.prefixedText or '' local thisText = thisTitle and thisTitle.text or (pages[1] or '') local isTemplate = isTemplateOrModule(fullTitle) -- Red link detection local rawLinks = mFormatLink.formatPages({ categorizeMissing = not isTemplate and 'Categories with hatnote templates targeting a non-existent page' or nil }, pages) -- Convert to plain strings local links = {} for i, link in ipairs(rawLinks or {}) do links[i] = tostring(link) end -- Auto-fill if empty local firstOutputLink = nil local usedAutoFill = false if not links[1] or links[1] == '' then local title = mw.title.new(thisText) if title and title.isRedirect then title = title.redirectTarget end firstOutputLink = title and title.text or thisText usedAutoFill = true links[1] = tostring(mFormatLink._formatLink{ link = firstOutputLink, categorizeMissing = not isTemplate and 'Categories with hatnote templates targeting a non-existent page' or nil }) pages = { firstOutputLink } else local visible = links[1] visible = visible:gsub("^'''", ""):gsub("'''$", "") visible = visible:gsub("%[%[", ""):gsub("%]%]", "") visible = visible:gsub("|.*$", "") visible = visible:gsub("#.*$", "") firstOutputLink = visible usedAutoFill = false end -- Bold links for i, link in ipairs(links) do links[i] = string.format("'''%s'''", link) end -- Determine pagetype local pagetype if options.article ~= nil then pagetype = yesno(options.article) ~= false and 'article' or 'page' elseif pages and pages[1] then local page = pages[1]:gsub("|.*","") local tt = mw.title.new(page) pagetype = tt and tt.namespace == 0 and "article" or "page" else pagetype = "article" end -- Work out whether we need to be singular or plural local stringToFormat if #links > 1 then stringToFormat = 'The main %ss for this [[Help:Categories|category]] are %s.' else stringToFormat = 'The main %s for this [[Help:Categories|category]] is %s.' end -- Build hatnote text local text = string.format( stringToFormat, pagetype, mw.text.listToText(links) ) -- Pass through Module:Hatnote local hnOptions = { selfref = options.selfref } text = mHatnote._hatnote(text, hnOptions) return text, firstOutputLink, usedAutoFill end return p olrtro1zfdkuz89uoqbww6bq8ppsafd Module:Pagetype/softredirect 828 47829 117062 2024-08-08T21:25:34Z en>MSGJ 0 update from sandbox as StradBot found lots more of these templates 117062 Scribunto text/plain -- This page contains a table of all soft redirect templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["R from category navigation"] = true, ["Redirect from category navigation"] = true, ["Category redirect"] = true, ["Cat move"] = true, ["Cat red"] = true, ["Cat redir"] = true, ["Cat redirect"] = true, ["Category move"] = true, ["Category Redirect"] = true, ["Categoryredirect"] = true, ["Catr"] = true, ["Catred"] = true, ["Catredir"] = true, ["Catredirect"] = true, ["R from template-generated category"] = true, ["Redirect from template-generated category"] = true, ["Portal soft redirect"] = true, ["Portal Redirect"] = true, ["Portal redirect"] = true, ["Portal Soft Redirect"] = true, ["Portalredirect"] = true, ["Portalsoftredirect"] = true, ["PortRed"] = true, ["Portred"] = true, ["Portsoftred"] = true, ["PSR"] = true, ["Psr"] = true, ["Soft portal redirect"] = true, ["Soft redirect portal"] = true, ["SPR"] = true, ["Spr"] = true, ["SRP"] = true, ["Srp"] = true, ["Salted redirect"] = true, ["Soft redirect"] = true, ["Interwiki redirect"] = true, ["Plain soft redirect"] = true, ["Soft"] = true, ["Soft link"] = true, ["Soft redir"] = true, ["Soft Redirect"] = true, ["Softr"] = true, ["Softredir"] = true, ["SoftRedirect"] = true, ["Softredirect"] = true, ["Userrename"] = true, ["Wikibooks redirect"] = true, ["WBOOK"] = true, ["Wbook"] = true, ["Wikibook redirect"] = true, ["Wikibooks Redirect"] = true, ["WikibooksRedirect"] = true, ["Wikibooksredirect"] = true, ["Wikimedia Commons redirect"] = true, ["COMM"] = true, ["Comm"] = true, ["Commons Redirect"] = true, ["Commons redirect"] = true, ["CommonsRedirect"] = true, ["Commonsredirect"] = true, ["Wikimedia commons redirect"] = true, ["Wikiquote redirect"] = true, ["Wq"] = true, ["Wikisource redirect"] = true, ["Wikispecies redirect"] = true, ["Wikispecies Redirect"] = true, ["WikispeciesRedirect"] = true, ["Wikispeciesredirect"] = true, ["WSPEC"] = true, ["Wspec"] = true, ["Wikivoyage redirect"] = true, ["Wiktionary redirect"] = true, ["Moved to Wiktionary"] = true, ["RedirecttoWiktionary"] = true, ["Wi"] = true, ["Wikt red"] = true, ["Wikt redirect"] = true, ["Wiktionary Redirect"] = true, ["Wiktionary-redirect"] = true, ["WiktionaryRedirect"] = true, ["Wiktionaryredirect"] = true, ["Wiktr"] = true, ["Wiktred"] = true, ["Wiktredir"] = true, ["Wtr"] = true, ["Wtsr"] = true, } krad2do3vq17ck777hpwdoaxr3vo5yt 117063 117062 2026-07-16T11:39:08Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/softredirect]] 117062 Scribunto text/plain -- This page contains a table of all soft redirect templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["R from category navigation"] = true, ["Redirect from category navigation"] = true, ["Category redirect"] = true, ["Cat move"] = true, ["Cat red"] = true, ["Cat redir"] = true, ["Cat redirect"] = true, ["Category move"] = true, ["Category Redirect"] = true, ["Categoryredirect"] = true, ["Catr"] = true, ["Catred"] = true, ["Catredir"] = true, ["Catredirect"] = true, ["R from template-generated category"] = true, ["Redirect from template-generated category"] = true, ["Portal soft redirect"] = true, ["Portal Redirect"] = true, ["Portal redirect"] = true, ["Portal Soft Redirect"] = true, ["Portalredirect"] = true, ["Portalsoftredirect"] = true, ["PortRed"] = true, ["Portred"] = true, ["Portsoftred"] = true, ["PSR"] = true, ["Psr"] = true, ["Soft portal redirect"] = true, ["Soft redirect portal"] = true, ["SPR"] = true, ["Spr"] = true, ["SRP"] = true, ["Srp"] = true, ["Salted redirect"] = true, ["Soft redirect"] = true, ["Interwiki redirect"] = true, ["Plain soft redirect"] = true, ["Soft"] = true, ["Soft link"] = true, ["Soft redir"] = true, ["Soft Redirect"] = true, ["Softr"] = true, ["Softredir"] = true, ["SoftRedirect"] = true, ["Softredirect"] = true, ["Userrename"] = true, ["Wikibooks redirect"] = true, ["WBOOK"] = true, ["Wbook"] = true, ["Wikibook redirect"] = true, ["Wikibooks Redirect"] = true, ["WikibooksRedirect"] = true, ["Wikibooksredirect"] = true, ["Wikimedia Commons redirect"] = true, ["COMM"] = true, ["Comm"] = true, ["Commons Redirect"] = true, ["Commons redirect"] = true, ["CommonsRedirect"] = true, ["Commonsredirect"] = true, ["Wikimedia commons redirect"] = true, ["Wikiquote redirect"] = true, ["Wq"] = true, ["Wikisource redirect"] = true, ["Wikispecies redirect"] = true, ["Wikispecies Redirect"] = true, ["WikispeciesRedirect"] = true, ["Wikispeciesredirect"] = true, ["WSPEC"] = true, ["Wspec"] = true, ["Wikivoyage redirect"] = true, ["Wiktionary redirect"] = true, ["Moved to Wiktionary"] = true, ["RedirecttoWiktionary"] = true, ["Wi"] = true, ["Wikt red"] = true, ["Wikt redirect"] = true, ["Wiktionary Redirect"] = true, ["Wiktionary-redirect"] = true, ["WiktionaryRedirect"] = true, ["Wiktionaryredirect"] = true, ["Wiktr"] = true, ["Wiktred"] = true, ["Wiktredir"] = true, ["Wtr"] = true, ["Wtsr"] = true, } krad2do3vq17ck777hpwdoaxr3vo5yt Module:Pagetype/rfd 828 47830 117064 2024-08-20T20:41:41Z en>Pppery 0 Changed protection settings for "[[Module:Pagetype/rfd]]": The highest-use template on the project that's not currently fully protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 117064 Scribunto text/plain -- This page contains a table of all RfD templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { -- Template forms (these should be substituted so we should rarely see these) ["Redirect for discussion"] = true, ["RFD"] = true, ["RfD"] = true, ["Rfd1"] = true, ["Rfd-t"] = true, ["Rfd"] = true, ["Rfd-NPF"] = true, ["Rfd-NPF/core"] = true, -- Module forms ["#invoke:RfD"] = true, ["<includeonly>safesubst:</includeonly>#invoke:RfD"] = true, -- The form made by substituting RfD } 9dx0g2c8g863kg6hcwx1wgsou16k45p 117065 117064 2026-07-16T11:39:09Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/rfd]] 117064 Scribunto text/plain -- This page contains a table of all RfD templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { -- Template forms (these should be substituted so we should rarely see these) ["Redirect for discussion"] = true, ["RFD"] = true, ["RfD"] = true, ["Rfd1"] = true, ["Rfd-t"] = true, ["Rfd"] = true, ["Rfd-NPF"] = true, ["Rfd-NPF/core"] = true, -- Module forms ["#invoke:RfD"] = true, ["<includeonly>safesubst:</includeonly>#invoke:RfD"] = true, -- The form made by substituting RfD } 9dx0g2c8g863kg6hcwx1wgsou16k45p Category:Pages using infobox person with multiple spouses 14 47831 117066 2024-05-09T02:43:44Z en>Pedantical 0 minor phrasing improvements 117066 wikitext text/x-wiki {{Tracking category}} == Notes == This category is populated by articles transcluding {{tl|Infobox person}} with '''potentially''' multiple people after the <code>| spouse =</code> parameter. The template code for ''Infobox person'' contains logic to dynamically change the label to display "Spouse" if there is only one person listed or "Spouses" if multiple people are listed (such as using any of the typical list templates like [[Template:Plainlist|Plainlist]] or [[Template:Unbulleted list|Unbulleted list]]). If the template logic is unable to determine a singular or plural set, the label will display as "Spouse(s)" to remain neutral. * Example: the logic for commas assumes a comma separates two distinct people when it could instead just be part of a person's legal name (e.g., a comma before the suffix Jr. or Sr., as in "Alex Aardvark, Jr."). A less graceful workaround to force the template to recognize the singular person can include adding the template {{tl|Force singular}} after the name. === Additional Examples === Expand the section below for examples on improved formatting of ambiguous plurals. {{collapse top | title = Examples of resolving ambiguous plurals }} {| class="wikitable" ! style='width: 10%'| Description !! Wikitext !! style='width: 15%'| Displays as |- | style='background: #d9dddd' rowspan="2" | ==== Plural 1 ==== Plain text names separated by a comma | style='background: #d9dddd' | {{Bang}} '''Ambiguous Plural:''' <nowiki>|spouse = Alex Aardvark, Bennie Baracuda</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = Alex Aardvark, Bennie Baracuda }} |- | style='background: #d9dddd' | {{Marked}} '''Definite Plural:''' <nowiki>|spouse = {{plainlist|</nowiki> <nowiki>*</nowiki> Alex Aardvark, <nowiki>*</nowiki><nowiki> Bennie Baracuda }}</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = {{plainlist| * Alex Aardvark * Bennie Baracuda }} }} |- | rowspan="2" | ==== Plural 2 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | {{Bang}} '''Ambiguous Plural:''' <nowiki>|spouse = {{marriage|Alex Aardvark|1990|1993|end=divorced}} <br> Bennie Baracuda</nowiki> | {{Infobox person | name = Subject | spouse = {{marriage|Alex Aardvark|1990|1993|end=divorced}} <br> Bennie Baracuda }} |- | {{Marked}} '''Definite Plural:''' <nowiki>|spouse = {{plainlist|</nowiki> <nowiki>*</nowiki> <nowiki>{{marriage|Alex Aardvark|1990|1993|end=divorced}}</nowiki> <nowiki>*</nowiki><nowiki> Bennie Baracuda }}</nowiki> |{{Infobox person | name = Subject | spouse = {{plainlist| * {{marriage|Alex Aardvark|1990|1993|end=divorced}} * Bennie Baracuda }} }} |- | style='background: #d9dddd' rowspan="2" | ==== Singular 1 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | style='background: #d9dddd' | {{Bang}} '''Ambiguous Singular:''' <nowiki>|spouse = Alex Aardvark, Jr.</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = Alex Aardvark, Jr. }} |- | style='background: #d9dddd' | {{Marked}} '''Definite Singular:''' <nowiki>|</nowiki>spouse = Alex Aardvark, Jr.'''<nowiki>{{force singular}}</nowiki>''' |style='background: #d9dddd' |{{Infobox person | name = Subject | spouse = Alex Aardvark, Jr.{{force singular}} }} |- | rowspan="2" | ==== Singular 2 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | {{Bang}} '''Ambiguous Singular:''' <nowiki>|spouse = Cary Chameleon, m. 1897, died 1918</nowiki> |{{Infobox person | name = Subject | spouse = Cary Chameleon, m. 1897, died 1918 }} |- | {{Marked}} '''Definite Singular:''' <nowiki>|spouse = {{marriage|Cary Chameleon|1897|1918|end=died}}</nowiki> |{{Infobox person | name = Subject | spouse = {{marriage|Cary Chameleon|1897|1918|end=died}} }} |} {{collapse bottom}} {{Auto category TOC}} fie0ybdtf4oylwb0fddm8a327yccfkj 117067 117066 2026-07-16T11:39:35Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Pages_using_infobox_person_with_multiple_spouses]] 117066 wikitext text/x-wiki {{Tracking category}} == Notes == This category is populated by articles transcluding {{tl|Infobox person}} with '''potentially''' multiple people after the <code>| spouse =</code> parameter. The template code for ''Infobox person'' contains logic to dynamically change the label to display "Spouse" if there is only one person listed or "Spouses" if multiple people are listed (such as using any of the typical list templates like [[Template:Plainlist|Plainlist]] or [[Template:Unbulleted list|Unbulleted list]]). If the template logic is unable to determine a singular or plural set, the label will display as "Spouse(s)" to remain neutral. * Example: the logic for commas assumes a comma separates two distinct people when it could instead just be part of a person's legal name (e.g., a comma before the suffix Jr. or Sr., as in "Alex Aardvark, Jr."). A less graceful workaround to force the template to recognize the singular person can include adding the template {{tl|Force singular}} after the name. === Additional Examples === Expand the section below for examples on improved formatting of ambiguous plurals. {{collapse top | title = Examples of resolving ambiguous plurals }} {| class="wikitable" ! style='width: 10%'| Description !! Wikitext !! style='width: 15%'| Displays as |- | style='background: #d9dddd' rowspan="2" | ==== Plural 1 ==== Plain text names separated by a comma | style='background: #d9dddd' | {{Bang}} '''Ambiguous Plural:''' <nowiki>|spouse = Alex Aardvark, Bennie Baracuda</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = Alex Aardvark, Bennie Baracuda }} |- | style='background: #d9dddd' | {{Marked}} '''Definite Plural:''' <nowiki>|spouse = {{plainlist|</nowiki> <nowiki>*</nowiki> Alex Aardvark, <nowiki>*</nowiki><nowiki> Bennie Baracuda }}</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = {{plainlist| * Alex Aardvark * Bennie Baracuda }} }} |- | rowspan="2" | ==== Plural 2 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | {{Bang}} '''Ambiguous Plural:''' <nowiki>|spouse = {{marriage|Alex Aardvark|1990|1993|end=divorced}} <br> Bennie Baracuda</nowiki> | {{Infobox person | name = Subject | spouse = {{marriage|Alex Aardvark|1990|1993|end=divorced}} <br> Bennie Baracuda }} |- | {{Marked}} '''Definite Plural:''' <nowiki>|spouse = {{plainlist|</nowiki> <nowiki>*</nowiki> <nowiki>{{marriage|Alex Aardvark|1990|1993|end=divorced}}</nowiki> <nowiki>*</nowiki><nowiki> Bennie Baracuda }}</nowiki> |{{Infobox person | name = Subject | spouse = {{plainlist| * {{marriage|Alex Aardvark|1990|1993|end=divorced}} * Bennie Baracuda }} }} |- | style='background: #d9dddd' rowspan="2" | ==== Singular 1 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | style='background: #d9dddd' | {{Bang}} '''Ambiguous Singular:''' <nowiki>|spouse = Alex Aardvark, Jr.</nowiki> | style='background: #d9dddd' | {{Infobox person | name = Subject | spouse = Alex Aardvark, Jr. }} |- | style='background: #d9dddd' | {{Marked}} '''Definite Singular:''' <nowiki>|</nowiki>spouse = Alex Aardvark, Jr.'''<nowiki>{{force singular}}</nowiki>''' |style='background: #d9dddd' |{{Infobox person | name = Subject | spouse = Alex Aardvark, Jr.{{force singular}} }} |- | rowspan="2" | ==== Singular 2 ==== Plain text name and Template:Marriage usage, separated by <nowiki><br></nowiki> tag. | {{Bang}} '''Ambiguous Singular:''' <nowiki>|spouse = Cary Chameleon, m. 1897, died 1918</nowiki> |{{Infobox person | name = Subject | spouse = Cary Chameleon, m. 1897, died 1918 }} |- | {{Marked}} '''Definite Singular:''' <nowiki>|spouse = {{marriage|Cary Chameleon|1897|1918|end=died}}</nowiki> |{{Infobox person | name = Subject | spouse = {{marriage|Cary Chameleon|1897|1918|end=died}} }} |} {{collapse bottom}} {{Auto category TOC}} fie0ybdtf4oylwb0fddm8a327yccfkj Module:Person date 828 47832 117120 2025-12-06T07:51:53Z en>Zackmann08 0 no longer needed or supported 117120 Scribunto text/plain require("strict") local p = {} local TEMPLATES = { birth_date = "Birth date", birth_date_and_age = "Birth date and age", birth_year = "Birth year", birth_year_and_age = "Birth year and age", death_date = "Death date", death_date_text = "Death date text", death_date_and_age = "Death date and age", death_year = "Death year", death_year_and_age = "Death year and age", } local invalid_date_category = '' local tracking_category = '' local Date = require('Module:Date')._Date local getArgs = require('Module:Arguments').getArgs if mw.title.getCurrentTitle():inNamespaces(0, 828, 829) then -- Category only in namespaces: 0=article, 828=module & 829=module talk (last 2 needed for testcases) tracking_category = '[[Category:Pages where birth or death is being automatically determined]]' invalid_date_category = '[[Category:Pages with invalid birth or death dates]]' end local function check_for_invalid_date(str) return mw.ustring.match(str, '^%?') or mw.ustring.match(str, '^%d%d%?') or mw.ustring.match(str, '^[Uu]nk') end local function expand_template(template, args) return mw.getCurrentFrame():expandTemplate{title = template, args = args} end local function parse_date(str) local date = Date(str) if date then return tostring(date.year), tostring(date.month), tostring(date.day) end -- TODO: Date has not been parsed. Need to work out what to do. For now, throw an error. -- Example where this can occur: "birth_date = 22 December 1946" at [[Maurice Pasternak]]. -- There was a nonbreaking space after "22" whidh Date does not accept. error('Module:Person_date parse_date invalid date: "' .. tostring(str) .. '"') end local function date_format(str) if mw.ustring.match (str, '^%d+%s*%a+[%.]*%s*%d%d%d%d$') then return 'df' elseif mw.ustring.match(str, '^%a+[%.]*%s+%d+,%s*%d%d%d%d$') then return 'mf' else return 'ERROR' end end local function is_valid_month (str) str = string.upper(mw.ustring.sub(str,1,1))..string.lower(mw.ustring.sub(str,2)) local months = {'Jan','Jan.','January','Feb','Feb.','February','Mar','March','Apr','Apr.','April','May','Jun','Jun.','June','Jul','Jul.','July','Aug','Aug.','August','Sep','Sept','Sep.','Sept.','September','Oct','Oct.','October','Nov','Nov','November','Dec','Dec.','December'} for index, value in ipairs(months) do if value == str then return true end end return false end local function is_month_year_only(str) local month = mw.ustring.match(str, '^(%a+)[%.]*%s+%d%d%d%d$') if month == nil then return false else return is_valid_month(month) end end local function is_valid_date(str) local month = mw.ustring.match (str, '^%d+%s*(%a+)[%.]*%s*%d%d%d%d$') or mw.ustring.match(str, '^(%a+)[%.]*%s+%d+,%s*%d%d%d%d$') if month == nil then return false else return is_valid_month(month) end end local function is_year_only(str) return mw.ustring.match(str, '^%d%d%d%d$') end local function already_has_template(str) str = mw.ustring.gsub(str, '&[Nn][Bb][Ss][Pp];', ' ') return mw.ustring.match(str, '<span') or mw.ustring.match(str, '<time') or mw.ustring.match(str,'%(aged%s*%d+') or mw.ustring.match(str,'%(age%s*%d+') end local function sanatize_date(str) -- Sanatize leading & trailing whitespace (this caused an issue before it was implemented) str = mw.ustring.gsub(str,'^%s*','') str = mw.ustring.gsub(str,'%s*$','') -- Sanatize ordinals str = mw.ustring.gsub(str, '(%d+)st([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)rd([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)th([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)nd([,%s])', '%1%2') return str end local function parse_birth(args) local birth_date = args['birth_date'] or '' local death_date = args['death_date'] or '' local disap_date = args['disappeared_date'] or '' local original = birth_date birth_date = sanatize_date(birth_date) death_date = sanatize_date(death_date) disap_date = sanatize_date(disap_date) -- Check for bad inputs. This used to be covered by a switch statement in infoboxes if check_for_invalid_date(birth_date) then return original..invalid_date_category end if already_has_template(birth_date) then return original end if is_valid_date(birth_date) then local location = mw.ustring.find(birth_date, '%d%d%d%d') local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category local date = mw.ustring.sub(birth_date, 1,location+3) local year, month, day = parse_date(date) local format = date_format(date) if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_date_and_age, {year, month, day, [format] = 'yes'}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then return expand_template(TEMPLATES.birth_date, {year, month, day, [format] = 'yes'}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end if is_month_year_only(birth_date) then local year = Date('1 '..birth_date):text('%Y') local month = Date('1 '..birth_date):text('%-m') local location = mw.ustring.find(birth_date, '%d%d%d%d') local date = mw.ustring.sub(birth_date, 1,location+3) local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_year_and_age, {year, month}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then return expand_template(TEMPLATES.birth_year, {date}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end if is_year_only(birth_date) then local date = mw.ustring.sub(birth_date, 1, 5) local extra = mw.ustring.sub(birth_date, 5) .. tracking_category if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_year_and_age, {date}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) then return expand_template(TEMPLATES.birth_year, {date}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end return original end local function parse_death(args) local birth_date = args['birth_date'] or '' local death_date = args['death_date'] or '' local original = death_date birth_date = sanatize_date(birth_date) death_date = sanatize_date(death_date) -- Check for bad inputs. This used to be covered by a switch statement in infoboxes if check_for_invalid_date(death_date) then return original..invalid_date_category end if already_has_template(death_date) then return original end if is_valid_date(death_date) or is_month_year_only(death_date) then local location = mw.ustring.find(death_date, '%d%d%d%d') local date = mw.ustring.sub(death_date, 1,location+3) local extra = mw.ustring.sub(death_date, location+4) .. tracking_category local format = date_format(date) if birth_date == '' then if is_month_year_only(death_date) then return expand_template(TEMPLATES.death_date_text, {date}) .. extra end local year, month, day = parse_date(date) return expand_template(TEMPLATES.death_date, {year, month, day, [format] = 'yes'}) .. extra else if is_year_only(birth_date) then location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) if is_month_year_only(death_date) then return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = 'yes'}) .. extra elseif is_valid_date(birth_date) or is_month_year_only(birth_date) then location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) if (is_month_year_only(death_date)) then return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = 'yes'}) .. extra end end end if is_year_only(death_date) then if birth_date == '' then return expand_template(TEMPLATES.death_year, {mw.ustring.sub(death_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category else if is_year_only(birth_date) then return expand_template(TEMPLATES.death_year_and_age, {mw.ustring.sub(death_date, 1, 5), mw.ustring.sub(birth_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category else if is_valid_date(birth_date) then local location = mw.ustring.find(death_date, '%d%d%d%d') local date = mw.ustring.sub(death_date, 1,location+3) local extra = mw.ustring.sub(death_date, location+4) .. tracking_category location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end end end end return original end function p.birth(frame) return parse_birth(getArgs(frame, {parentFirst = true})) end function p.death(frame) return parse_death(getArgs(frame, {parentFirst = true})) end return p qm4tcdz8g5vkfc018ay0tu8zlfditks 117121 117120 2026-07-16T11:39:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Person_date]] 117120 Scribunto text/plain require("strict") local p = {} local TEMPLATES = { birth_date = "Birth date", birth_date_and_age = "Birth date and age", birth_year = "Birth year", birth_year_and_age = "Birth year and age", death_date = "Death date", death_date_text = "Death date text", death_date_and_age = "Death date and age", death_year = "Death year", death_year_and_age = "Death year and age", } local invalid_date_category = '' local tracking_category = '' local Date = require('Module:Date')._Date local getArgs = require('Module:Arguments').getArgs if mw.title.getCurrentTitle():inNamespaces(0, 828, 829) then -- Category only in namespaces: 0=article, 828=module & 829=module talk (last 2 needed for testcases) tracking_category = '[[Category:Pages where birth or death is being automatically determined]]' invalid_date_category = '[[Category:Pages with invalid birth or death dates]]' end local function check_for_invalid_date(str) return mw.ustring.match(str, '^%?') or mw.ustring.match(str, '^%d%d%?') or mw.ustring.match(str, '^[Uu]nk') end local function expand_template(template, args) return mw.getCurrentFrame():expandTemplate{title = template, args = args} end local function parse_date(str) local date = Date(str) if date then return tostring(date.year), tostring(date.month), tostring(date.day) end -- TODO: Date has not been parsed. Need to work out what to do. For now, throw an error. -- Example where this can occur: "birth_date = 22 December 1946" at [[Maurice Pasternak]]. -- There was a nonbreaking space after "22" whidh Date does not accept. error('Module:Person_date parse_date invalid date: "' .. tostring(str) .. '"') end local function date_format(str) if mw.ustring.match (str, '^%d+%s*%a+[%.]*%s*%d%d%d%d$') then return 'df' elseif mw.ustring.match(str, '^%a+[%.]*%s+%d+,%s*%d%d%d%d$') then return 'mf' else return 'ERROR' end end local function is_valid_month (str) str = string.upper(mw.ustring.sub(str,1,1))..string.lower(mw.ustring.sub(str,2)) local months = {'Jan','Jan.','January','Feb','Feb.','February','Mar','March','Apr','Apr.','April','May','Jun','Jun.','June','Jul','Jul.','July','Aug','Aug.','August','Sep','Sept','Sep.','Sept.','September','Oct','Oct.','October','Nov','Nov','November','Dec','Dec.','December'} for index, value in ipairs(months) do if value == str then return true end end return false end local function is_month_year_only(str) local month = mw.ustring.match(str, '^(%a+)[%.]*%s+%d%d%d%d$') if month == nil then return false else return is_valid_month(month) end end local function is_valid_date(str) local month = mw.ustring.match (str, '^%d+%s*(%a+)[%.]*%s*%d%d%d%d$') or mw.ustring.match(str, '^(%a+)[%.]*%s+%d+,%s*%d%d%d%d$') if month == nil then return false else return is_valid_month(month) end end local function is_year_only(str) return mw.ustring.match(str, '^%d%d%d%d$') end local function already_has_template(str) str = mw.ustring.gsub(str, '&[Nn][Bb][Ss][Pp];', ' ') return mw.ustring.match(str, '<span') or mw.ustring.match(str, '<time') or mw.ustring.match(str,'%(aged%s*%d+') or mw.ustring.match(str,'%(age%s*%d+') end local function sanatize_date(str) -- Sanatize leading & trailing whitespace (this caused an issue before it was implemented) str = mw.ustring.gsub(str,'^%s*','') str = mw.ustring.gsub(str,'%s*$','') -- Sanatize ordinals str = mw.ustring.gsub(str, '(%d+)st([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)rd([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)th([,%s])', '%1%2') str = mw.ustring.gsub(str, '(%d+)nd([,%s])', '%1%2') return str end local function parse_birth(args) local birth_date = args['birth_date'] or '' local death_date = args['death_date'] or '' local disap_date = args['disappeared_date'] or '' local original = birth_date birth_date = sanatize_date(birth_date) death_date = sanatize_date(death_date) disap_date = sanatize_date(disap_date) -- Check for bad inputs. This used to be covered by a switch statement in infoboxes if check_for_invalid_date(birth_date) then return original..invalid_date_category end if already_has_template(birth_date) then return original end if is_valid_date(birth_date) then local location = mw.ustring.find(birth_date, '%d%d%d%d') local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category local date = mw.ustring.sub(birth_date, 1,location+3) local year, month, day = parse_date(date) local format = date_format(date) if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_date_and_age, {year, month, day, [format] = 'yes'}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then return expand_template(TEMPLATES.birth_date, {year, month, day, [format] = 'yes'}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end if is_month_year_only(birth_date) then local year = Date('1 '..birth_date):text('%Y') local month = Date('1 '..birth_date):text('%-m') local location = mw.ustring.find(birth_date, '%d%d%d%d') local date = mw.ustring.sub(birth_date, 1,location+3) local extra = mw.ustring.sub(birth_date, location+4) .. tracking_category if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_year_and_age, {year, month}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) or is_month_year_only(death_date) then return expand_template(TEMPLATES.birth_year, {date}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end if is_year_only(birth_date) then local date = mw.ustring.sub(birth_date, 1, 5) local extra = mw.ustring.sub(birth_date, 5) .. tracking_category if death_date == '' and disap_date == '' then return expand_template(TEMPLATES.birth_year_and_age, {date}) .. extra elseif is_year_only(death_date) or is_valid_date(death_date) then return expand_template(TEMPLATES.birth_year, {date}) .. extra else -- death_date is not a valid string (example: 'unknown') return original end end return original end local function parse_death(args) local birth_date = args['birth_date'] or '' local death_date = args['death_date'] or '' local original = death_date birth_date = sanatize_date(birth_date) death_date = sanatize_date(death_date) -- Check for bad inputs. This used to be covered by a switch statement in infoboxes if check_for_invalid_date(death_date) then return original..invalid_date_category end if already_has_template(death_date) then return original end if is_valid_date(death_date) or is_month_year_only(death_date) then local location = mw.ustring.find(death_date, '%d%d%d%d') local date = mw.ustring.sub(death_date, 1,location+3) local extra = mw.ustring.sub(death_date, location+4) .. tracking_category local format = date_format(date) if birth_date == '' then if is_month_year_only(death_date) then return expand_template(TEMPLATES.death_date_text, {date}) .. extra end local year, month, day = parse_date(date) return expand_template(TEMPLATES.death_date, {year, month, day, [format] = 'yes'}) .. extra else if is_year_only(birth_date) then location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) if is_month_year_only(death_date) then return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = 'yes'}) .. extra elseif is_valid_date(birth_date) or is_month_year_only(birth_date) then location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) if (is_month_year_only(death_date)) then return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end return expand_template(TEMPLATES.death_date_and_age, {date, bd, [format] = 'yes'}) .. extra end end end if is_year_only(death_date) then if birth_date == '' then return expand_template(TEMPLATES.death_year, {mw.ustring.sub(death_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category else if is_year_only(birth_date) then return expand_template(TEMPLATES.death_year_and_age, {mw.ustring.sub(death_date, 1, 5), mw.ustring.sub(birth_date, 1, 5)}) .. mw.ustring.sub(death_date, 5) .. tracking_category else if is_valid_date(birth_date) then local location = mw.ustring.find(death_date, '%d%d%d%d') local date = mw.ustring.sub(death_date, 1,location+3) local extra = mw.ustring.sub(death_date, location+4) .. tracking_category location = mw.ustring.find(birth_date, '%d%d%d%d') local bd = mw.ustring.sub(birth_date, 1,location+3) return expand_template(TEMPLATES.death_date_and_age, {date, bd}) .. extra end end end end return original end function p.birth(frame) return parse_birth(getArgs(frame, {parentFirst = true})) end function p.death(frame) return parse_death(getArgs(frame, {parentFirst = true})) end return p qm4tcdz8g5vkfc018ay0tu8zlfditks Module:Check for conflicting parameters 828 47833 117122 2025-12-28T03:34:01Z en>Zackmann08 0 Zackmann08 moved page [[Module:Check for clobbered parameters]] to [[Module:Check for conflicting parameters]]: renaming module per [[special:Permalink/1329078454#Rename|discussion]] 117122 Scribunto text/plain local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p 59n770hna40q9pw4oa0dsp86euaks0u 117123 117122 2026-07-16T11:39:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Check_for_conflicting_parameters]] 117122 Scribunto text/plain local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p 59n770hna40q9pw4oa0dsp86euaks0u Category:Articles with unsourced statements from July 2023 14 47834 117124 2023-09-24T05:28:41Z en>HappyWithWhatYouHaveToBeHappyWith 0 add progress bar 117124 wikitext text/x-wiki {{Monthly clean-up category}} {{align|center|{{resbox|'''{{large|{{Random page in category}}}}'''}}}} {{Filter category by topic}} {{Backlog progress bar|initial=9063|category=Articles with unsourced statements from July 2023}}<!-- Initial as of 24 September 2023 --> *'''Please help improve an article in this category by adding [[WP:REFB|references]] to [[WP:Reliable sources|reliable sources]] that [[WP:V|verify]] content within the article. Once the reliable source references have been added, the unsourced (citation needed) tag can be removed.''' 5j2cb83cocmhf8f7ii0jay7srj28bzc 117125 117124 2026-07-16T11:40:10Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles_with_unsourced_statements_from_July_2023]] 117124 wikitext text/x-wiki {{Monthly clean-up category}} {{align|center|{{resbox|'''{{large|{{Random page in category}}}}'''}}}} {{Filter category by topic}} {{Backlog progress bar|initial=9063|category=Articles with unsourced statements from July 2023}}<!-- Initial as of 24 September 2023 --> *'''Please help improve an article in this category by adding [[WP:REFB|references]] to [[WP:Reliable sources|reliable sources]] that [[WP:V|verify]] content within the article. Once the reliable source references have been added, the unsourced (citation needed) tag can be removed.''' 5j2cb83cocmhf8f7ii0jay7srj28bzc Template:Monthly clean-up category 10 47835 117132 2025-10-15T11:52:56Z en>Rich Farmbrough 0 Add css. 117132 wikitext text/x-wiki <noinclude>{{TemplateStyles|src=Template:Monthly clean-up category/styles.css}} </noinclude><includeonly> <templatestyles src="Template:Monthly clean-up category/styles.css" /> {{Monthly clean-up category/outer core | type = {{{type|}}} | name part = {{Monthly clean-up category/name part|{{PAGENAME}}}} | toc = {{{toc|toc}}} | year = {{{year|{{#invoke:string|sub|{{PAGENAME}}|-4}}}}} | monthno = {{{monthno|{{Monthly clean-up category/monthno|{{PAGENAME}}}}}}} | month name = {{{month name|{{Monthly clean-up category/monthname|{{PAGENAME}}}}}}} | cat = {{{cat|}}} | message = {{{message|}}} | datecat = {{{datecat|}}} | clean-up = {{{clean-up|}}} | track = {{{track|yes}}} }}</includeonly><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE AND INTERWIKIS TO WIKIDATA, THANK YOU! --> </noinclude> g080deovj1pphfwg6u0ethsbstig9k0 117133 117132 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category]] 117132 wikitext text/x-wiki <noinclude>{{TemplateStyles|src=Template:Monthly clean-up category/styles.css}} </noinclude><includeonly> <templatestyles src="Template:Monthly clean-up category/styles.css" /> {{Monthly clean-up category/outer core | type = {{{type|}}} | name part = {{Monthly clean-up category/name part|{{PAGENAME}}}} | toc = {{{toc|toc}}} | year = {{{year|{{#invoke:string|sub|{{PAGENAME}}|-4}}}}} | monthno = {{{monthno|{{Monthly clean-up category/monthno|{{PAGENAME}}}}}}} | month name = {{{month name|{{Monthly clean-up category/monthname|{{PAGENAME}}}}}}} | cat = {{{cat|}}} | message = {{{message|}}} | datecat = {{{datecat|}}} | clean-up = {{{clean-up|}}} | track = {{{track|yes}}} }}</includeonly><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE AND INTERWIKIS TO WIKIDATA, THANK YOU! --> </noinclude> g080deovj1pphfwg6u0ethsbstig9k0 Template:Monthly clean-up category/core 10 47836 117136 2025-10-15T11:49:15Z en>Rich Farmbrough 0 Modifications to permit large cat toc to resize. 117136 wikitext text/x-wiki {{#ifeq:{{{page count}}}|0 |{{#ifexpr: ( {{CURRENTYEAR}}*12+{{CURRENTMONTH}} > {{{year|0}}}*12+{{{monthno|0}}}+1 or {{CURRENTYEAR}}*12+{{CURRENTMONTH}} = {{{year|0}}}*12+{{{monthno|0}}}+1 and ( {{CURRENTDAY}} > 1 or {{CURRENTHOUR}} >= 12 ) ) or ( {{CURRENTYEAR}}*12+{{CURRENTMONTH}}+1 < {{{year|0}}}*12+{{{monthno|0}}} ) |<includeonly>{{Db-c4}}</includeonly> }} }} {{Purge button|left}} {{#ifexist:Template:{{{cat|}}} progress |<div style="float:right;margin:0 0 0 .6em">{{{{{cat}}} progress}}</div> }} {{Maintenance category|tracking=yes}} {{#ifexist:Template:Monthly clean-up category/Messages/Type/{{{name part}}} |{{Monthly clean-up category/Messages/Type/{{{name part}}} |month name = {{{month name|}}} |year = {{{year|}}} |cat = {{{cat|}}} }} |This category combines all {{{type}}} from {{{month name|}}} {{{year|}}} <small>({{{year}}}-{{{monthno|}}})</small> to enable us to {{#ifeq:{{{clean-up|}}}|no|maintain them|work through the backlog}} more systematically. It is a member of [[:Category:{{{cat}}}]].<br /> }} {{#if:{{{message<includeonly>|</includeonly>}}} |{{{message}}} |{{#ifexist:Template:Monthly clean-up category/Messages/{{{name part}}} |{{Monthly clean-up category/Messages/{{{name part}}} |month name = {{{month name|}}} |year = {{{year|}}} }} }} }} {{#switch:{{{toc}}} |focus={{Focusmessage}} |none={{ns:0}} |toc={{#ifexpr:{{{page count|0}}} > 1200 |<div role="navigation" style="margin-top:1em" class="toc-box"> {{#invoke:Large category TOC|aejot}} </div> |{{#ifexpr:{{{page count|0}}} > 200 |{{Category TOC |pagecount={{{page count}}} <!-- these are probably the defaults but that may change so let's be explicit --> |align = left |top = yes |numerals = group |uppercase = yes |lowercase = no }} }} }} }}{{#if:{{{datecat|}}} |[[Category:{{{datecat}}} {{{month name|}}} {{{year|}}}]] }}{{#ifeq:{{NAMESPACE}}|Category |[[Category:{{{cat|}}}| {{{year|}}}-{{{monthno| }}}]] }}<includeonly>[[Category:Monthly clean-up category counter|{{{sort|{{{name part|}}}}}} {{{year|}}}-{{{monthno| }}}]] [[Category:Monthly clean-up category ({{{cat|}}}) counter| {{{year|}}}-{{{monthno| }}}]] {{#ifeq:{{PAGENAME}}|Clean-up categories from {{{month name|}}} {{{year|}}}|[[Category:Clean-up categories from {{{year|}}}]]|[[Category:Clean-up categories from {{{month name|}}} {{{year|}}}]]}} {{#ifeq:{{{track|}}}|yes|{{CatTrack}}|}}</includeonly> obk3mrzzpfjm3gyhod0ldvbqyhevtx0 117137 117136 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/core]] 117136 wikitext text/x-wiki {{#ifeq:{{{page count}}}|0 |{{#ifexpr: ( {{CURRENTYEAR}}*12+{{CURRENTMONTH}} > {{{year|0}}}*12+{{{monthno|0}}}+1 or {{CURRENTYEAR}}*12+{{CURRENTMONTH}} = {{{year|0}}}*12+{{{monthno|0}}}+1 and ( {{CURRENTDAY}} > 1 or {{CURRENTHOUR}} >= 12 ) ) or ( {{CURRENTYEAR}}*12+{{CURRENTMONTH}}+1 < {{{year|0}}}*12+{{{monthno|0}}} ) |<includeonly>{{Db-c4}}</includeonly> }} }} {{Purge button|left}} {{#ifexist:Template:{{{cat|}}} progress |<div style="float:right;margin:0 0 0 .6em">{{{{{cat}}} progress}}</div> }} {{Maintenance category|tracking=yes}} {{#ifexist:Template:Monthly clean-up category/Messages/Type/{{{name part}}} |{{Monthly clean-up category/Messages/Type/{{{name part}}} |month name = {{{month name|}}} |year = {{{year|}}} |cat = {{{cat|}}} }} |This category combines all {{{type}}} from {{{month name|}}} {{{year|}}} <small>({{{year}}}-{{{monthno|}}})</small> to enable us to {{#ifeq:{{{clean-up|}}}|no|maintain them|work through the backlog}} more systematically. It is a member of [[:Category:{{{cat}}}]].<br /> }} {{#if:{{{message<includeonly>|</includeonly>}}} |{{{message}}} |{{#ifexist:Template:Monthly clean-up category/Messages/{{{name part}}} |{{Monthly clean-up category/Messages/{{{name part}}} |month name = {{{month name|}}} |year = {{{year|}}} }} }} }} {{#switch:{{{toc}}} |focus={{Focusmessage}} |none={{ns:0}} |toc={{#ifexpr:{{{page count|0}}} > 1200 |<div role="navigation" style="margin-top:1em" class="toc-box"> {{#invoke:Large category TOC|aejot}} </div> |{{#ifexpr:{{{page count|0}}} > 200 |{{Category TOC |pagecount={{{page count}}} <!-- these are probably the defaults but that may change so let's be explicit --> |align = left |top = yes |numerals = group |uppercase = yes |lowercase = no }} }} }} }}{{#if:{{{datecat|}}} |[[Category:{{{datecat}}} {{{month name|}}} {{{year|}}}]] }}{{#ifeq:{{NAMESPACE}}|Category |[[Category:{{{cat|}}}| {{{year|}}}-{{{monthno| }}}]] }}<includeonly>[[Category:Monthly clean-up category counter|{{{sort|{{{name part|}}}}}} {{{year|}}}-{{{monthno| }}}]] [[Category:Monthly clean-up category ({{{cat|}}}) counter| {{{year|}}}-{{{monthno| }}}]] {{#ifeq:{{PAGENAME}}|Clean-up categories from {{{month name|}}} {{{year|}}}|[[Category:Clean-up categories from {{{year|}}}]]|[[Category:Clean-up categories from {{{month name|}}} {{{year|}}}]]}} {{#ifeq:{{{track|}}}|yes|{{CatTrack}}|}}</includeonly> obk3mrzzpfjm3gyhod0ldvbqyhevtx0 Template:Monthly clean-up category/name part 10 47837 117140 2021-06-12T09:26:12Z en>GKFX 0 - 117140 wikitext text/x-wiki {{#invoke:MultiReplace|main|{{{1}}}|(.*)[ _]from.*|%1|.*|}}<noinclude> {{Documentation | content = The '''{{tl|{{BASETEMPLATENAME}}}}''' extracts the name prefix from parameter 1, as all of the text prior to the spaced-word "&nbsp;from" before the month/year. If the word "&nbsp;from" is not present within the parameter 1 text, then nothing is returned. }} </noinclude> lf4y7zhkdxlgml2zis2ygj24r71mqda 117141 117140 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/name_part]] 117140 wikitext text/x-wiki {{#invoke:MultiReplace|main|{{{1}}}|(.*)[ _]from.*|%1|.*|}}<noinclude> {{Documentation | content = The '''{{tl|{{BASETEMPLATENAME}}}}''' extracts the name prefix from parameter 1, as all of the text prior to the spaced-word "&nbsp;from" before the month/year. If the word "&nbsp;from" is not present within the parameter 1 text, then nothing is returned. }} </noinclude> lf4y7zhkdxlgml2zis2ygj24r71mqda Template:Progress box 10 47838 117142 2025-06-06T08:36:16Z en>Rich Farmbrough 0 117142 wikitext text/x-wiki <includeonly>{{#invoke:Progress box|main}} {{#ifeq:{{NAMESPACE}}|Template |{{#ifeq:{{Last word|{{PAGENAME}}}}|progress |{{Progress box/Instantiated doc}} [[Category:Wikipedia progress templates]] }} }}</includeonly><noinclude> {{Documentation}} </noinclude> h7ytlv3oluebip6bf03rvzfribb2yk6 117143 117142 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Progress_box]] 117142 wikitext text/x-wiki <includeonly>{{#invoke:Progress box|main}} {{#ifeq:{{NAMESPACE}}|Template |{{#ifeq:{{Last word|{{PAGENAME}}}}|progress |{{Progress box/Instantiated doc}} [[Category:Wikipedia progress templates]] }} }}</includeonly><noinclude> {{Documentation}} </noinclude> h7ytlv3oluebip6bf03rvzfribb2yk6 Template:Monthly clean-up category/monthname 10 47839 117144 2021-06-12T08:53:46Z en>GKFX 0 Support wider range of (valid) input format - spaces can be underscores 117144 wikitext text/x-wiki {{#switch:{{lc:{{#invoke:string|replace|{{{1}}}|.*[ _]from[ _](...).*|%1|plain=0}}}} |jan=January |feb=February |mar=March |apr=April |may=May |jun=June |jul=July |aug=August |sep=September |oct=October |nov=November |dec=December |00 }}<noinclude> {{documentation}}</noinclude> 84tvasasjybyxhbywuyn3a81eg4yr1i 117145 117144 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/monthname]] 117144 wikitext text/x-wiki {{#switch:{{lc:{{#invoke:string|replace|{{{1}}}|.*[ _]from[ _](...).*|%1|plain=0}}}} |jan=January |feb=February |mar=March |apr=April |may=May |jun=June |jul=July |aug=August |sep=September |oct=October |nov=November |dec=December |00 }}<noinclude> {{documentation}}</noinclude> 84tvasasjybyxhbywuyn3a81eg4yr1i Template:Monthly clean-up category/monthno 10 47840 117146 2021-06-12T09:19:21Z en>GKFX 0 Copy changes from ./monthname 117146 wikitext text/x-wiki <includeonly>{{#switch:{{lc:{{#invoke:string|replace|{{{1}}}|.*[ _]from[ _](...).*|%1|plain=0}}}} |jan=01 |feb=02 |mar=03 |apr=04 |may=05 |jun=06 |jul=07 |aug=08 |sep=09 |oct=10 |nov=11 |dec=12 |00 }}</includeonly><noinclude>{{Documentation|content= Example: ;{{Tlx|Monthly clean up category/monthno|jfhiues h from February 2009}} :{{Monthly clean up category/monthno|jfhiues h from February 2009}} ;{{Tlx|Monthly clean up category/monthno|jfhiues h from X 2009}} :{{Monthly clean up category/monthno|jfhiues h from X 2009}} }}</noinclude> 7hwt98kvfncvivzs7w7k3hcmaqiygy4 117147 117146 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/monthno]] 117146 wikitext text/x-wiki <includeonly>{{#switch:{{lc:{{#invoke:string|replace|{{{1}}}|.*[ _]from[ _](...).*|%1|plain=0}}}} |jan=01 |feb=02 |mar=03 |apr=04 |may=05 |jun=06 |jul=07 |aug=08 |sep=09 |oct=10 |nov=11 |dec=12 |00 }}</includeonly><noinclude>{{Documentation|content= Example: ;{{Tlx|Monthly clean up category/monthno|jfhiues h from February 2009}} :{{Monthly clean up category/monthno|jfhiues h from February 2009}} ;{{Tlx|Monthly clean up category/monthno|jfhiues h from X 2009}} :{{Monthly clean up category/monthno|jfhiues h from X 2009}} }}</noinclude> 7hwt98kvfncvivzs7w7k3hcmaqiygy4 Module:Progress box 828 47841 117148 2023-03-01T04:23:23Z en>Izno 0 -silly implements line, it's in the /doc 117148 Scribunto text/plain local makePurgeLink = require('Module:Purge')._main local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Progress box/config' ------------------------------------------------------------------------------- -- Message mixin -- -- This function is mixed into all of the other classes ------------------------------------------------------------------------------- local function message(self, key, ...) local msg = self._cfg[key] if not msg then error(string.format("no message found with key '%s'", tostring(key)), 2) end if select('#', ...) > 0 then return mw.message.newRawMessage(msg, ...):plain() else return msg end end ------------------------------------------------------------------------------- -- Category class ------------------------------------------------------------------------------- local Category = {} Category.__index = Category Category.message = message function Category.new(data) local self = setmetatable({}, Category) self._cfg = data.cfg self._whatToCount = data.whatToCount self:setCategory(data.category) return self end function Category:setCategory(category) self._category = category end function Category:getCategory() return self._category end function Category:makeCategoryLink(display) local cat = self:getCategory() display = display or cat return string.format('[[:Category:%s|%s]]', cat, display) end function Category:getCount() if not self._count then local counts = mw.site.stats.pagesInCategory(self:getCategory(), '*') self._count = counts[self._whatToCount or 'pages'] if not self._count then error("the count type must be one of 'pages', 'subcats', 'files' or 'all'") end end return self._count end function Category:getFormattedCount() return lang:formatNum(self:getCount()) end function Category:exists() return mw.title.makeTitle(14, self:getCategory()).exists end ------------------------------------------------------------------------------- -- DatedCategory class -- Inherits from Category ------------------------------------------------------------------------------- local DatedCategory = {} DatedCategory.__index = DatedCategory setmetatable(DatedCategory, Category) function DatedCategory.new(data) local self = setmetatable(Category.new(data), {__index = DatedCategory}) self._date = data.date self._dateFormat = data.dateFormat or self:message('date-format') self._formattedDate = self:formatDate(self._date) do local category = self:message( 'dated-category-format', data.baseCategory, self._formattedDate, data.from or self:message('dated-category-format-from'), data.suffix or '' ) category = category:match('^%s*(.-)%s*$') -- trim whitespace self:setCategory(category) end return self end function DatedCategory:formatDate(date) return lang:formatDate(self._dateFormat, date) end function DatedCategory:getDate() return self._date end function DatedCategory:getFormattedDate() return self._formattedDate end ------------------------------------------------------------------------------- -- ProgressBox class ------------------------------------------------------------------------------- local ProgressBox = {} ProgressBox.__index = ProgressBox ProgressBox.message = message function ProgressBox.new(args, cfg, title) local self = setmetatable({}, ProgressBox) -- Argument defaults args = args or {} self._cfg = cfg or mw.loadData(CONFIG_MODULE) self._title = title or mw.title.getCurrentTitle() -- Set data if not args.float or (args.float and (args.float == 'left' or args.float == '')) then self._float_class = 'maint-cat-progress-left' elseif args.float == 'right' then self._float_class = 'maint-cat-progress-right' elseif args.float == 'none' then -- 'none' is actually 'center'ed self._float_class = 'maint-cat-progress-center' end self._header = args[1] self._frame = mw.getCurrentFrame() -- Make the base category object if not args[1] then error('no base category specified', 3) end self._baseCategoryObj = Category.new{ cfg = self._cfg, category = args[1], } -- Make datedCategory objects self._datedCategories = {} do local cfg = self._cfg local baseCategory = args[2] or self._baseCategoryObj:getCategory() local whatToCount = args.count local from = args.from or self:message('dated-category-format-from') local suffix = args.suffix local currentDate = lang:formatDate('Y-m') local date = self:findEarliestCategoryDate() local dateFormat = self:message('date-format') while date <= currentDate do local datedCategoryObj = DatedCategory.new{ cfg = cfg, baseCategory = baseCategory, whatToCount = whatToCount, from = from, suffix = suffix, date = date, dateFormat = dateFormat, } if datedCategoryObj:getCount() > 0 then table.insert(self._datedCategories, datedCategoryObj) end date = ProgressBox.incrementDate(date) end end -- Make all-article category object do local allCategory if args[3] then allCategory = args[3] else allCategory = self:message( 'all-articles-category-format', self._baseCategoryObj:getCategory() ) allCategory = self._frame:preprocess(allCategory) end self._allCategoryObj = Category.new{ cfg = self._cfg, category = allCategory, } end return self end -- Increments a date in the format YYYY-MM function ProgressBox.incrementDate(date) local year, month = date:match('^(%d%d%d%d)%-(%d%d)$') year = tonumber(year) month = tonumber(month) if not year or not month then error(string.format("error parsing date '%s'", tostring(date)), 2) end month = month + 1 if month > 12 then month = 1 year = year + 1 end return string.format('%04d-%02d', year, month) end function ProgressBox:findEarliestCategoryDate() return self:message('start-date') end function ProgressBox:isCollapsed() return self._title.namespace ~= 10 -- is not in template namespace end function ProgressBox:makeTotalLabel() local display = self:message('all-articles-label') if self._allCategoryObj:exists() then return self._allCategoryObj:makeCategoryLink(display) else return display end end function ProgressBox:getTotalCount() local count = 0 for i, obj in ipairs(self._datedCategories) do count = count + obj:getCount() end count = count + self._baseCategoryObj:getCount() return count end function ProgressBox:getFormattedTotalCount() return lang:formatNum(self:getTotalCount()) end function ProgressBox:__tostring() data = data or {} local root = mw.html.create('div') -- Base classes and styles root :addClass('maint-cat-progress') :addClass(self._float_class) -- Header row root:tag('div') :addClass('maint-cat-progress-header') :wikitext(self._header) -- Refresh row root:tag('div') :addClass('maint-cat-progress-refresh') :wikitext(makePurgeLink{self:message('purge-link-display')}) -- Subtotals local subtotalTable = mw.html.create('table') subtotalTable :addClass('maint-cat-progress-subtotals mw-collapsible') :addClass(self:isCollapsed() and 'mw-collapsed' or nil) :tag('caption') :wikitext(self:message('subtotal-heading')) for i, datedCategoryObj in ipairs(self._datedCategories) do subtotalTable :tag('tr') :tag('td') :wikitext(datedCategoryObj:makeCategoryLink( datedCategoryObj:getFormattedDate() )) :done() :tag('td') :wikitext(datedCategoryObj:getFormattedCount()) end -- Undated articles subtotalTable :tag('tr') :tag('td') :wikitext(self._baseCategoryObj:makeCategoryLink( self:message('undated-articles-label') )) :done() :tag('td') :wikitext(self._baseCategoryObj:getFormattedCount()) :allDone() -- Total root :node(subtotalTable) :tag('div') :addClass('maint-cat-progress-total-row') :tag('div') :addClass('maint-cat-progress-total-label') :wikitext(self:makeTotalLabel()) :done() :tag('div') :addClass('maint-cat-progress-total') :wikitext(self:getFormattedTotalCount()) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = {src = 'Module:Progress box/styles.css'} } .. tostring(root) end ------------------------------------------------------------------------------- -- Exports ------------------------------------------------------------------------------- local p = {} function p._exportClasses() return { Category = Category, DatedCategory = DatedCategory, ProgressBox = ProgressBox, } end function p._main(args, cfg, title) return tostring(ProgressBox.new(args, cfg, title)) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Progress box' }) return p._main(args) end return p dkqxr21zsvmxigt428fk6q6gm229x6u 117149 117148 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Progress_box]] 117148 Scribunto text/plain local makePurgeLink = require('Module:Purge')._main local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Progress box/config' ------------------------------------------------------------------------------- -- Message mixin -- -- This function is mixed into all of the other classes ------------------------------------------------------------------------------- local function message(self, key, ...) local msg = self._cfg[key] if not msg then error(string.format("no message found with key '%s'", tostring(key)), 2) end if select('#', ...) > 0 then return mw.message.newRawMessage(msg, ...):plain() else return msg end end ------------------------------------------------------------------------------- -- Category class ------------------------------------------------------------------------------- local Category = {} Category.__index = Category Category.message = message function Category.new(data) local self = setmetatable({}, Category) self._cfg = data.cfg self._whatToCount = data.whatToCount self:setCategory(data.category) return self end function Category:setCategory(category) self._category = category end function Category:getCategory() return self._category end function Category:makeCategoryLink(display) local cat = self:getCategory() display = display or cat return string.format('[[:Category:%s|%s]]', cat, display) end function Category:getCount() if not self._count then local counts = mw.site.stats.pagesInCategory(self:getCategory(), '*') self._count = counts[self._whatToCount or 'pages'] if not self._count then error("the count type must be one of 'pages', 'subcats', 'files' or 'all'") end end return self._count end function Category:getFormattedCount() return lang:formatNum(self:getCount()) end function Category:exists() return mw.title.makeTitle(14, self:getCategory()).exists end ------------------------------------------------------------------------------- -- DatedCategory class -- Inherits from Category ------------------------------------------------------------------------------- local DatedCategory = {} DatedCategory.__index = DatedCategory setmetatable(DatedCategory, Category) function DatedCategory.new(data) local self = setmetatable(Category.new(data), {__index = DatedCategory}) self._date = data.date self._dateFormat = data.dateFormat or self:message('date-format') self._formattedDate = self:formatDate(self._date) do local category = self:message( 'dated-category-format', data.baseCategory, self._formattedDate, data.from or self:message('dated-category-format-from'), data.suffix or '' ) category = category:match('^%s*(.-)%s*$') -- trim whitespace self:setCategory(category) end return self end function DatedCategory:formatDate(date) return lang:formatDate(self._dateFormat, date) end function DatedCategory:getDate() return self._date end function DatedCategory:getFormattedDate() return self._formattedDate end ------------------------------------------------------------------------------- -- ProgressBox class ------------------------------------------------------------------------------- local ProgressBox = {} ProgressBox.__index = ProgressBox ProgressBox.message = message function ProgressBox.new(args, cfg, title) local self = setmetatable({}, ProgressBox) -- Argument defaults args = args or {} self._cfg = cfg or mw.loadData(CONFIG_MODULE) self._title = title or mw.title.getCurrentTitle() -- Set data if not args.float or (args.float and (args.float == 'left' or args.float == '')) then self._float_class = 'maint-cat-progress-left' elseif args.float == 'right' then self._float_class = 'maint-cat-progress-right' elseif args.float == 'none' then -- 'none' is actually 'center'ed self._float_class = 'maint-cat-progress-center' end self._header = args[1] self._frame = mw.getCurrentFrame() -- Make the base category object if not args[1] then error('no base category specified', 3) end self._baseCategoryObj = Category.new{ cfg = self._cfg, category = args[1], } -- Make datedCategory objects self._datedCategories = {} do local cfg = self._cfg local baseCategory = args[2] or self._baseCategoryObj:getCategory() local whatToCount = args.count local from = args.from or self:message('dated-category-format-from') local suffix = args.suffix local currentDate = lang:formatDate('Y-m') local date = self:findEarliestCategoryDate() local dateFormat = self:message('date-format') while date <= currentDate do local datedCategoryObj = DatedCategory.new{ cfg = cfg, baseCategory = baseCategory, whatToCount = whatToCount, from = from, suffix = suffix, date = date, dateFormat = dateFormat, } if datedCategoryObj:getCount() > 0 then table.insert(self._datedCategories, datedCategoryObj) end date = ProgressBox.incrementDate(date) end end -- Make all-article category object do local allCategory if args[3] then allCategory = args[3] else allCategory = self:message( 'all-articles-category-format', self._baseCategoryObj:getCategory() ) allCategory = self._frame:preprocess(allCategory) end self._allCategoryObj = Category.new{ cfg = self._cfg, category = allCategory, } end return self end -- Increments a date in the format YYYY-MM function ProgressBox.incrementDate(date) local year, month = date:match('^(%d%d%d%d)%-(%d%d)$') year = tonumber(year) month = tonumber(month) if not year or not month then error(string.format("error parsing date '%s'", tostring(date)), 2) end month = month + 1 if month > 12 then month = 1 year = year + 1 end return string.format('%04d-%02d', year, month) end function ProgressBox:findEarliestCategoryDate() return self:message('start-date') end function ProgressBox:isCollapsed() return self._title.namespace ~= 10 -- is not in template namespace end function ProgressBox:makeTotalLabel() local display = self:message('all-articles-label') if self._allCategoryObj:exists() then return self._allCategoryObj:makeCategoryLink(display) else return display end end function ProgressBox:getTotalCount() local count = 0 for i, obj in ipairs(self._datedCategories) do count = count + obj:getCount() end count = count + self._baseCategoryObj:getCount() return count end function ProgressBox:getFormattedTotalCount() return lang:formatNum(self:getTotalCount()) end function ProgressBox:__tostring() data = data or {} local root = mw.html.create('div') -- Base classes and styles root :addClass('maint-cat-progress') :addClass(self._float_class) -- Header row root:tag('div') :addClass('maint-cat-progress-header') :wikitext(self._header) -- Refresh row root:tag('div') :addClass('maint-cat-progress-refresh') :wikitext(makePurgeLink{self:message('purge-link-display')}) -- Subtotals local subtotalTable = mw.html.create('table') subtotalTable :addClass('maint-cat-progress-subtotals mw-collapsible') :addClass(self:isCollapsed() and 'mw-collapsed' or nil) :tag('caption') :wikitext(self:message('subtotal-heading')) for i, datedCategoryObj in ipairs(self._datedCategories) do subtotalTable :tag('tr') :tag('td') :wikitext(datedCategoryObj:makeCategoryLink( datedCategoryObj:getFormattedDate() )) :done() :tag('td') :wikitext(datedCategoryObj:getFormattedCount()) end -- Undated articles subtotalTable :tag('tr') :tag('td') :wikitext(self._baseCategoryObj:makeCategoryLink( self:message('undated-articles-label') )) :done() :tag('td') :wikitext(self._baseCategoryObj:getFormattedCount()) :allDone() -- Total root :node(subtotalTable) :tag('div') :addClass('maint-cat-progress-total-row') :tag('div') :addClass('maint-cat-progress-total-label') :wikitext(self:makeTotalLabel()) :done() :tag('div') :addClass('maint-cat-progress-total') :wikitext(self:getFormattedTotalCount()) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = {src = 'Module:Progress box/styles.css'} } .. tostring(root) end ------------------------------------------------------------------------------- -- Exports ------------------------------------------------------------------------------- local p = {} function p._exportClasses() return { Category = Category, DatedCategory = DatedCategory, ProgressBox = ProgressBox, } end function p._main(args, cfg, title) return tostring(ProgressBox.new(args, cfg, title)) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Progress box' }) return p._main(args) end return p dkqxr21zsvmxigt428fk6q6gm229x6u Module:Progress box/config 828 47842 117150 2025-12-27T01:25:39Z en>Jlwoodwa 0 update start-date: [[Category:Clean-up categories from October 2006]] is the oldest remaining 117150 Scribunto text/plain -- This module contains configuration data for [[Module:Progress box]]. return { -- The date at which to start checking for existing categories, in YYYY-MM -- format. ['start-date'] = '2006-10', -- The heading for the subtotals ['subtotal-heading'] = 'Subtotals', -- The format used for maintenance category dates. This should be input that is -- valid for the #time parser function. ['date-format'] = 'F Y', -- The format of dated maintenance categories for this wiki. -- Parameters: -- $1: the category base, e.g. "Articles to be split" -- $2: the formatted date, e.g. "May 2015" -- $3: preposition joining the category base and the date, e.g. "from" -- $4: optional suffix ['dated-category-format'] = '$1 $3 $2 $4', -- Default preoposition to use with the category-format message. ['dated-category-format-from'] = 'from', -- Display text for the link to the undated articles category. ['undated-articles-label'] = 'Undated articles', -- The format of categories containing all pages for a particular maintenance -- task. This message is preprocessed. -- Parameters: -- $1: The undated category ['all-articles-category-format'] = 'All {{lcfirst:$1}}', -- Heading for the "all articles" row. ['all-articles-label'] = 'All articles', -- Display text for the purge link. ['purge-link-display'] = '(refresh)', } ozus49oramgloz5om42cyy89f400fhv 117151 117150 2026-07-16T11:40:11Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Progress_box/config]] 117150 Scribunto text/plain -- This module contains configuration data for [[Module:Progress box]]. return { -- The date at which to start checking for existing categories, in YYYY-MM -- format. ['start-date'] = '2006-10', -- The heading for the subtotals ['subtotal-heading'] = 'Subtotals', -- The format used for maintenance category dates. This should be input that is -- valid for the #time parser function. ['date-format'] = 'F Y', -- The format of dated maintenance categories for this wiki. -- Parameters: -- $1: the category base, e.g. "Articles to be split" -- $2: the formatted date, e.g. "May 2015" -- $3: preposition joining the category base and the date, e.g. "from" -- $4: optional suffix ['dated-category-format'] = '$1 $3 $2 $4', -- Default preoposition to use with the category-format message. ['dated-category-format-from'] = 'from', -- Display text for the link to the undated articles category. ['undated-articles-label'] = 'Undated articles', -- The format of categories containing all pages for a particular maintenance -- task. This message is preprocessed. -- Parameters: -- $1: The undated category ['all-articles-category-format'] = 'All {{lcfirst:$1}}', -- Heading for the "all articles" row. ['all-articles-label'] = 'All articles', -- Display text for the purge link. ['purge-link-display'] = '(refresh)', } ozus49oramgloz5om42cyy89f400fhv Template:Monthly clean up category/to add 10 47843 117160 2018-01-10T18:59:26Z en>Primefac 0 Protected "[[Template:Monthly clean up category/to add]]": [[WP:SEMI|semi-protecting]] highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or... 117160 wikitext text/x-wiki #REDIRECT [[Template:Monthly clean-up category/to add]] 6hvq350wqwb03b73gyx1nknuhgepga7 117161 117160 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean_up_category/to_add]] 117160 wikitext text/x-wiki #REDIRECT [[Template:Monthly clean-up category/to add]] 6hvq350wqwb03b73gyx1nknuhgepga7 Template:Monthly clean-up category/to add 10 47844 117162 2021-11-30T17:59:57Z en>MusikBot II 0 Changed protection settings for "[[Template:Monthly clean-up category/to add]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2512 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) 117162 wikitext text/x-wiki To add an article to this category add <code><!-- -->{{#if:{{{6|}}}| <nowiki>{{</nowiki>[[Template:{{{6}}}|{{{6}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }}<!-- -->{{#if:{{{5|}}}| <nowiki>{{</nowiki>[[Template:{{{5}}}|{{{5}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }}<!-- -->{{#if:{{{4|}}}| <nowiki>{{</nowiki>[[Template:{{{4}}}|{{{4}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }} <!-- -->{{#if:{{{3|}}}| <nowiki>{{</nowiki>[[Template:{{{3}}}|{{{3}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }} <!-- -->{{#if:{{{2|}}}| <nowiki>{{</nowiki>[[Template:{{{2}}}|{{{2}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki> or}} <!-- --> <nowiki>{{</nowiki>[[Template:{{{1}}}|{{{1}}}]]{{!}}date={{{month name}}} {{{year}}}}}</code> to the article. If you omit the date a [[Wikipedia:Bots|bot]] will add it for you at some point. rfegtcg5tld18mht5f6xcjbtbdjsbvf 117163 117162 2026-07-16T11:40:12Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/to_add]] 117162 wikitext text/x-wiki To add an article to this category add <code><!-- -->{{#if:{{{6|}}}| <nowiki>{{</nowiki>[[Template:{{{6}}}|{{{6}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }}<!-- -->{{#if:{{{5|}}}| <nowiki>{{</nowiki>[[Template:{{{5}}}|{{{5}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }}<!-- -->{{#if:{{{4|}}}| <nowiki>{{</nowiki>[[Template:{{{4}}}|{{{4}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }} <!-- -->{{#if:{{{3|}}}| <nowiki>{{</nowiki>[[Template:{{{3}}}|{{{3}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki>, }} <!-- -->{{#if:{{{2|}}}| <nowiki>{{</nowiki>[[Template:{{{2}}}|{{{2}}}]]{{!}}date={{{month name}}} {{{year}}}<nowiki>}}</nowiki> or}} <!-- --> <nowiki>{{</nowiki>[[Template:{{{1}}}|{{{1}}}]]{{!}}date={{{month name}}} {{{year}}}}}</code> to the article. If you omit the date a [[Wikipedia:Bots|bot]] will add it for you at some point. rfegtcg5tld18mht5f6xcjbtbdjsbvf Template:Articles with unsourced statements progress 10 47845 117164 2012-01-02T00:42:24Z en>Rich Farmbrough 0 117164 wikitext text/x-wiki {{Progress box|Articles with unsourced statements}}<noinclude> [[Category:Wikipedia progress templates]]</noinclude> qf2e9n9skurb3burd487asuy0cfenzg 117165 117164 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Articles_with_unsourced_statements_progress]] 117164 wikitext text/x-wiki {{Progress box|Articles with unsourced statements}}<noinclude> [[Category:Wikipedia progress templates]]</noinclude> qf2e9n9skurb3burd487asuy0cfenzg Template:Monthly clean-up category/Messages/Articles with unsourced statements 10 47846 117166 2010-10-25T14:43:42Z en>Rich Farmbrough 0 moved [[Template:Monthly clean up category/Messages/Articles with unsourced statements]] to [[Template:Monthly clean-up category/Messages/Articles with unsourced statements]]: Hyphenate per user request. 117166 wikitext text/x-wiki {{Monthly clean up category/to add|Citation needed|month name={{{month name}}}|year={{{year}}}}} oy6masbthqrsla2dcl4emsl83uelnfa 117167 117166 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/Messages/Articles_with_unsourced_statements]] 117166 wikitext text/x-wiki {{Monthly clean up category/to add|Citation needed|month name={{{month name}}}|year={{{year}}}}} oy6masbthqrsla2dcl4emsl83uelnfa Template:Filter category by topic 10 47847 117168 2025-04-13T17:52:59Z en>Katharineamy 0 117168 wikitext text/x-wiki {{cmbox |type = style |image = none |style = text-align:center |text = <span style="font-size:18px">Filter this category by topic:</span><br> {{flatlist|1= * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:biography incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Biography] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:women incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Women] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:food-and-drink incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Food and drink] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:internet-culture incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Internet culture] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:linguistics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Linguistics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:literature incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Literature] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:books incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Books] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:entertainment incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Entertainment] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:films incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Films] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:media incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Media] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:music incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Music] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:radio incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Radio] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:software incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Software] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:television incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Television] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:video-games incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Video games] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:performing-arts incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Performing arts] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:philosophy-and-religion incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Philosophy and religion] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:sports incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Sports] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:architecture incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Architecture] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:comics-and-anime incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Comics and anime] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:fashion incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Fashion] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:visual-arts incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Visual arts] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:geographical incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Geographical] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:eastern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Eastern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:northern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Northern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:western-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Western Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:north-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 North America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:south-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 South America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:east-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 East Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:north-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 North Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:south-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 South Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southeast-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southeast Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:west-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 West Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:eastern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Eastern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:northern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Northern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:western-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Western Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:oceania incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Oceania] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:business-and-economics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Business and economics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:education incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Education] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:history incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 History] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:military-and-warfare incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Military and warfare] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:politics-and-government incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Politics and government] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:society incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Society] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:transportation incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Transportation] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:biology incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Biology] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:chemistry incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Chemistry] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:computing incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Computing] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:earth-and-environment incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Earth and environment] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:engineering incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Engineering] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:libraries-and-information incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Libraries and information] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:mathematics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Mathematics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:medicine-and-health incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Medicine and health] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:physics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Physics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:stem incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 STEM] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:space incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Space] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:technology incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Technology] }} }}<noinclude> {{documentation|content= {{no documentation}} *See also [[Template:Filter deep category by topic]] which uses deepcat (recursive) searches instead. [[Category:Wikipedia administration templates]] }}</noinclude> 212dhiyp1uyner74jyajj5ylctgeo2p 117169 117168 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Filter_category_by_topic]] 117168 wikitext text/x-wiki {{cmbox |type = style |image = none |style = text-align:center |text = <span style="font-size:18px">Filter this category by topic:</span><br> {{flatlist|1= * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:biography incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Biography] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:women incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Women] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:food-and-drink incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Food and drink] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:internet-culture incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Internet culture] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:linguistics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Linguistics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:literature incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Literature] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:books incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Books] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:entertainment incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Entertainment] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:films incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Films] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:media incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Media] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:music incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Music] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:radio incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Radio] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:software incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Software] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:television incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Television] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:video-games incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Video games] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:performing-arts incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Performing arts] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:philosophy-and-religion incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Philosophy and religion] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:sports incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Sports] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:architecture incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Architecture] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:comics-and-anime incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Comics and anime] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:fashion incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Fashion] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:visual-arts incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Visual arts] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:geographical incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Geographical] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:eastern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Eastern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:northern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Northern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southern-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southern Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:western-africa incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Western Africa] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:north-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 North America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:south-america incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 South America] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:central-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Central Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:east-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 East Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:north-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 North Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:south-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 South Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southeast-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southeast Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:west-asia incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 West Asia] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:eastern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Eastern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:northern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Northern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:southern-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Southern Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:western-europe incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Western Europe] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:oceania incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Oceania] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:business-and-economics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Business and economics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:education incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Education] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:history incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 History] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:military-and-warfare incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Military and warfare] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:politics-and-government incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Politics and government] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:society incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Society] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:transportation incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Transportation] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:biology incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Biology] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:chemistry incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Chemistry] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:computing incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Computing] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:earth-and-environment incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Earth and environment] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:engineering incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Engineering] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:libraries-and-information incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Libraries and information] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:mathematics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Mathematics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:medicine-and-health incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Medicine and health] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:physics incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Physics] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:stem incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 STEM] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:space incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Space] * [https://en.wikipedia.org/w/index.php?sort=relevance&search={{urlencode:articletopic:technology incategory:"{{{1|{{PAGENAME}}}}}"}}&title=Special:Search&ns0=1 Technology] }} }}<noinclude> {{documentation|content= {{no documentation}} *See also [[Template:Filter deep category by topic]] which uses deepcat (recursive) searches instead. [[Category:Wikipedia administration templates]] }}</noinclude> 212dhiyp1uyner74jyajj5ylctgeo2p Module:Progress box/styles.css 828 47848 117170 2024-09-06T17:34:30Z en>Izno 0 dark 117170 sanitized-css text/css /* {{pp-template|small=yes}} */ .maint-cat-progress { border: 1px solid var(--border-color-base, #a2a9b1); border-spacing: 3px; background-color: var(--background-color-neutral-subtle, #f8f9fa); padding: 0.4em; font-size: 88%; line-height: 1.5em; margin: 0.5em 0; } .maint-cat-progress-header { background-color: #ddf; padding: 0.2em; font-size: 125%; font-weight: bold; } .maint-cat-progress-refresh { text-align: center; } .maint-cat-progress-subtotals { width: 100%; } .maint-cat-progress-subtotals caption { font-weight: bold; text-align: left; } .maint-cat-progress-subtotals .mw-collapsible-toggle { float: right; } .maint-cat-progress-subtotals th, .maint-cat-progress-subtotals td { vertical-align: top; } .maint-cat-progress-subtotals tr td:nth-child(2) { text-align: right; } .maint-cat-progress-total-row { font-size: 110%; font-weight: bold; display: flex; } .maint-cat-progress-total-label { flex: 1; } .maint-cat-progress-total { padding-right: 0.2em; } @media (min-width: 720px) { .maint-cat-progress { width: 22em; } .maint-cat-progress-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin-right: 1em; } .maint-cat-progress-right { /* @noflip */ margin-left: 1em; /* @noflip */ float: right; /* @noflip */ clear: right; } .maint-cat-progress-center { margin: 0.5em auto; } } @media screen { html.skin-theme-clientpref-night .maint-cat-progress-header { background-color: #003; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .maint-cat-progress-header { background-color: #003; } } 7y1m3axw6zw4sdp2guxgt26bcnr0b3b 117171 117170 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Progress_box/styles.css]] 117170 sanitized-css text/css /* {{pp-template|small=yes}} */ .maint-cat-progress { border: 1px solid var(--border-color-base, #a2a9b1); border-spacing: 3px; background-color: var(--background-color-neutral-subtle, #f8f9fa); padding: 0.4em; font-size: 88%; line-height: 1.5em; margin: 0.5em 0; } .maint-cat-progress-header { background-color: #ddf; padding: 0.2em; font-size: 125%; font-weight: bold; } .maint-cat-progress-refresh { text-align: center; } .maint-cat-progress-subtotals { width: 100%; } .maint-cat-progress-subtotals caption { font-weight: bold; text-align: left; } .maint-cat-progress-subtotals .mw-collapsible-toggle { float: right; } .maint-cat-progress-subtotals th, .maint-cat-progress-subtotals td { vertical-align: top; } .maint-cat-progress-subtotals tr td:nth-child(2) { text-align: right; } .maint-cat-progress-total-row { font-size: 110%; font-weight: bold; display: flex; } .maint-cat-progress-total-label { flex: 1; } .maint-cat-progress-total { padding-right: 0.2em; } @media (min-width: 720px) { .maint-cat-progress { width: 22em; } .maint-cat-progress-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin-right: 1em; } .maint-cat-progress-right { /* @noflip */ margin-left: 1em; /* @noflip */ float: right; /* @noflip */ clear: right; } .maint-cat-progress-center { margin: 0.5em auto; } } @media screen { html.skin-theme-clientpref-night .maint-cat-progress-header { background-color: #003; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .maint-cat-progress-header { background-color: #003; } } 7y1m3axw6zw4sdp2guxgt26bcnr0b3b Template:Purge button/styles.css 10 47849 117172 2024-12-27T16:33:38Z en>Izno 0 add that display block back 117172 sanitized-css text/css /* {{pp-template}} */ .purge-button { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: var( --background-color-interactive-subtle, #f8f9fa ); color: inherit; font-size: 85%; text-align: center; width: 70px; } .purge-button-label { font-weight: bold; line-height: 1.2em; display: block; } @media (min-width: 500px) { .purge-button-right { float: right; margin: 0 0.5em; } .purge-button-center { margin: 0 auto; } .purge-button-left { float: left; margin: 0 0.5em; } } @media print { .purge-button { display: none; } } o5n9w8mzjjyqkherik3x43heoh7ohiu 117173 117172 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Purge_button/styles.css]] 117172 sanitized-css text/css /* {{pp-template}} */ .purge-button { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: var( --background-color-interactive-subtle, #f8f9fa ); color: inherit; font-size: 85%; text-align: center; width: 70px; } .purge-button-label { font-weight: bold; line-height: 1.2em; display: block; } @media (min-width: 500px) { .purge-button-right { float: right; margin: 0 0.5em; } .purge-button-center { margin: 0 auto; } .purge-button-left { float: left; margin: 0 0.5em; } } @media print { .purge-button { display: none; } } o5n9w8mzjjyqkherik3x43heoh7ohiu Template:Hmbox/styles.css 10 47850 117174 2024-07-21T05:20:45Z en>Taavi 0 pp-template 117174 sanitized-css text/css /* {{pp-template}} */ .hmbox-outer { margin-left: 1em; } .hmbox-inner { display: inline-block; color: var( --color-base, #202122 ); border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: var( --background-color-interactive-subtle, #f8f9fa ); margin-right: 0.5em; padding: 0.3em 0.5em; } 0vplsxd0hbhhmod4a0oc85jrk92y1v4 117175 117174 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Hmbox/styles.css]] 117174 sanitized-css text/css /* {{pp-template}} */ .hmbox-outer { margin-left: 1em; } .hmbox-inner { display: inline-block; color: var( --color-base, #202122 ); border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: var( --background-color-interactive-subtle, #f8f9fa ); margin-right: 0.5em; padding: 0.3em 0.5em; } 0vplsxd0hbhhmod4a0oc85jrk92y1v4 Template:Monthly clean-up category/styles.css 10 47851 117176 2025-10-18T21:20:13Z en>Chaotic Enby 0 padlock per [[Special:PermanentLink/1317580439#Edit request 2025-10-18]] 117176 sanitized-css text/css /* {{pp-template}} */ .toc-box { display: flow-root; border: 1px solid var(--border-color-base, #a2a9b1); padding: 4px 4px; } hcc6cj9huo8k1wzl1k8w3hn0cfgm7wa 117177 117176 2026-07-16T11:40:13Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Monthly_clean-up_category/styles.css]] 117176 sanitized-css text/css /* {{pp-template}} */ .toc-box { display: flow-root; border: 1px solid var(--border-color-base, #a2a9b1); padding: 4px 4px; } hcc6cj9huo8k1wzl1k8w3hn0cfgm7wa Category:Articles with unsourced statements 14 47852 117178 2025-03-21T02:16:37Z en>Yutsi 0 copied filter template from [[Category:Articles lacking sources]] 117178 wikitext text/x-wiki {{stack begin}} {{polluted category}} {{Parent monthly clean up category|Citation needed|Unsourced Statements|shortcut=CAT:AWUS|shortcut2=CAT:CN}} Wikipedia articles that are [[Wikipedia:Cite sources|missing citations]] for specific statements belong in this category. For articles that cite some sources, but not adequately enough, use {{tlx|Refimprove}}. Please use {{tlx|Unreferenced}} for articles that do not cite any sources at all. See [[:Category:Articles lacking sources]] for pages that have no identified source material. You can also participate in [[Wikipedia:WikiProject Reliability]]. === Want to help reduce the backlog? === With over {{PAGESINCATEGORY:All articles with unsourced statements}} articles in this category, sometimes it is hard to choose which article to work on. The tool [https://tools.wmflabs.org/citationhunt/en Citation Hunt] makes that easier by suggesting random articles, which you can sort by topical category membership. (See [https://tools.theresnotime.co.uk/graphs/unsourced.php historical trends on the backlog]) <div style="text-align: center;"><span class="plainlinks">[https://tools.wmflabs.org/citationhunt/en <span class="mw-ui-button mw-ui-progressive" style ="margin:.1em">I can help! Give me a random citation to find!</span>]</span></div> __HIDDENCAT__ {{Filter category by topic|All articles with unsourced statements}} == See also == * [[Wikipedia:Template messages/Cleanup]] * [[Wikipedia:Template messages/Disputes]] {{stack end}} [[Category:Wikipedia articles with sourcing issues]] [[Category:Wikipedia editorial validation]] {{CatAutoTOC}} ei3nv96q93gmvs2drwn1s4ph5e972e4 117179 117178 2026-07-16T11:40:25Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles_with_unsourced_statements]] 117178 wikitext text/x-wiki {{stack begin}} {{polluted category}} {{Parent monthly clean up category|Citation needed|Unsourced Statements|shortcut=CAT:AWUS|shortcut2=CAT:CN}} Wikipedia articles that are [[Wikipedia:Cite sources|missing citations]] for specific statements belong in this category. For articles that cite some sources, but not adequately enough, use {{tlx|Refimprove}}. Please use {{tlx|Unreferenced}} for articles that do not cite any sources at all. See [[:Category:Articles lacking sources]] for pages that have no identified source material. You can also participate in [[Wikipedia:WikiProject Reliability]]. === Want to help reduce the backlog? === With over {{PAGESINCATEGORY:All articles with unsourced statements}} articles in this category, sometimes it is hard to choose which article to work on. The tool [https://tools.wmflabs.org/citationhunt/en Citation Hunt] makes that easier by suggesting random articles, which you can sort by topical category membership. (See [https://tools.theresnotime.co.uk/graphs/unsourced.php historical trends on the backlog]) <div style="text-align: center;"><span class="plainlinks">[https://tools.wmflabs.org/citationhunt/en <span class="mw-ui-button mw-ui-progressive" style ="margin:.1em">I can help! Give me a random citation to find!</span>]</span></div> __HIDDENCAT__ {{Filter category by topic|All articles with unsourced statements}} == See also == * [[Wikipedia:Template messages/Cleanup]] * [[Wikipedia:Template messages/Disputes]] {{stack end}} [[Category:Wikipedia articles with sourcing issues]] [[Category:Wikipedia editorial validation]] {{CatAutoTOC}} ei3nv96q93gmvs2drwn1s4ph5e972e4 Template:Parent monthly clean-up category 10 47853 117186 2026-03-26T22:44:07Z en>Anomie 0 Undid revision [[Special:Diff/1345575276|1345575276]] by [[Special:Contributions/OzmoOzmo|OzmoOzmo]] ([[User talk:OzmoOzmo|talk]]) - No indication as to what "breaks", and this isn't used anywhere else. Let's not throw random classes into widely used templates for your personal CSS. 117186 wikitext text/x-wiki {{Purge button|left}} {{Maintenance category |hidden=yes |tracking={{{tracking|}}} |container={{{container|}}} |polluted={{{polluted|}}} |shortcut={{{shortcut|}}}|shortcut1={{{shortcut1|}}}|shortcut2={{{shortcut2|}}}|shortcut3={{{shortcut3|}}}}} {{Possibly empty category}} {{#if:{{{backlog|}}}|{{backlog}}}} {{Center|{{Random page in category|{{PAGENAME}}|type=subcat|text=Random subcategory}}{{#ifexist:Category:All {{lc:{{PAGENAME}}}}|&nbsp;/ {{Random page in category|All {{lc:{{PAGENAME}}}}|text=Random page needing maintenance}}|}}}}{{#if:{{{1|}}}|Please add articles to this category by using {{tlx|{{{1|the appropriate templates}}}|{{#if:{{{arg1-1|}}}|2}}={{{arg1-1}}}}}{{#if:{{{3|}}}|&nbsp;or {{tlx|{{{3}}}}}}}{{#if:{{{4|}}}|&nbsp;or {{tlx|{{{4}}}}}}}{{#if:{{{5|}}}|&nbsp;or {{tlx|{{{5}}}}}}}.}}{{#if:{{{2|}}}|{{DEFAULTSORT:{{{2}}}}}}} {{#ifexist:Template:{{PAGENAME}} progress|<div style="float:right">{{{{PAGENAME}} progress}}</div>|To add a progress box to this parent category, create {{Tlx|{{PAGENAME}} progress}}.[[Category:Wikipedia parent monthly clean-up categories without progress boxes]]}} <includeonly>[[Category:Wikipedia maintenance categories sorted by month]]</includeonly><noinclude> {{documentation}} </noinclude> laexbq78cf0p2c21swk3kpb266v32s4 117187 117186 2026-07-16T11:40:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Parent_monthly_clean-up_category]] 117186 wikitext text/x-wiki {{Purge button|left}} {{Maintenance category |hidden=yes |tracking={{{tracking|}}} |container={{{container|}}} |polluted={{{polluted|}}} |shortcut={{{shortcut|}}}|shortcut1={{{shortcut1|}}}|shortcut2={{{shortcut2|}}}|shortcut3={{{shortcut3|}}}}} {{Possibly empty category}} {{#if:{{{backlog|}}}|{{backlog}}}} {{Center|{{Random page in category|{{PAGENAME}}|type=subcat|text=Random subcategory}}{{#ifexist:Category:All {{lc:{{PAGENAME}}}}|&nbsp;/ {{Random page in category|All {{lc:{{PAGENAME}}}}|text=Random page needing maintenance}}|}}}}{{#if:{{{1|}}}|Please add articles to this category by using {{tlx|{{{1|the appropriate templates}}}|{{#if:{{{arg1-1|}}}|2}}={{{arg1-1}}}}}{{#if:{{{3|}}}|&nbsp;or {{tlx|{{{3}}}}}}}{{#if:{{{4|}}}|&nbsp;or {{tlx|{{{4}}}}}}}{{#if:{{{5|}}}|&nbsp;or {{tlx|{{{5}}}}}}}.}}{{#if:{{{2|}}}|{{DEFAULTSORT:{{{2}}}}}}} {{#ifexist:Template:{{PAGENAME}} progress|<div style="float:right">{{{{PAGENAME}} progress}}</div>|To add a progress box to this parent category, create {{Tlx|{{PAGENAME}} progress}}.[[Category:Wikipedia parent monthly clean-up categories without progress boxes]]}} <includeonly>[[Category:Wikipedia maintenance categories sorted by month]]</includeonly><noinclude> {{documentation}} </noinclude> laexbq78cf0p2c21swk3kpb266v32s4 Template:Parent monthly clean up category 10 47854 117188 2014-12-18T06:00:52Z en>Jdaloner 0 Jdaloner moved page [[Template:Parent monthly clean up category]] to [[Template:Parent monthly clean-up category]] over redirect: To match "Monthly clean-up category" template. 117188 wikitext text/x-wiki #REDIRECT [[Template:Parent monthly clean-up category]] {{R from move}} 5fbpvpl9axqwwr8j72eofxsv9o4nd94 117189 117188 2026-07-16T11:40:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Parent_monthly_clean_up_category]] 117188 wikitext text/x-wiki #REDIRECT [[Template:Parent monthly clean-up category]] {{R from move}} 5fbpvpl9axqwwr8j72eofxsv9o4nd94 Category:Articles 14 47855 117190 2024-11-05T05:47:54Z en>Annh07 0 Reverted edit by [[Special:Contribs/109.177.145.133|109.177.145.133]] ([[User talk:109.177.145.133|talk]]) to last version by Bsoyka 117190 wikitext text/x-wiki {{for|articles outside of Wikipedia|Category:Academic journal articles|Category:Magazine articles|Category:Headlines}} {{Maintenance category|shortcut=CAT:ARTICLES|container=yes}} This is the highest-level category for all articles in Wikipedia. Articles do not appear in this category directly, but at lower levels in its hierarchy of subcategories. It should be possible to reach any article or category through this system under [[:Category:Main topic classifications]]. This begins with a large number of thematic classifications, reflecting different fields of knowledge. For alternative top-level entry points for browsing Wikipedia, see '''[[Wikipedia:Contents]]'''. {{For|pages under construction that are not yet articles|Category:Wikipedia workpages}} [[Category:Contents|Articles]] [[Category:Wikipedia namespaces]] 1qqupp3v8w6qrtw8n5ypteyjjd67o1s 117191 117190 2026-07-16T11:40:38Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Articles]] 117190 wikitext text/x-wiki {{for|articles outside of Wikipedia|Category:Academic journal articles|Category:Magazine articles|Category:Headlines}} {{Maintenance category|shortcut=CAT:ARTICLES|container=yes}} This is the highest-level category for all articles in Wikipedia. Articles do not appear in this category directly, but at lower levels in its hierarchy of subcategories. It should be possible to reach any article or category through this system under [[:Category:Main topic classifications]]. This begins with a large number of thematic classifications, reflecting different fields of knowledge. For alternative top-level entry points for browsing Wikipedia, see '''[[Wikipedia:Contents]]'''. {{For|pages under construction that are not yet articles|Category:Wikipedia workpages}} [[Category:Contents|Articles]] [[Category:Wikipedia namespaces]] 1qqupp3v8w6qrtw8n5ypteyjjd67o1s Category:Pages using duplicate arguments in template calls 14 47856 117194 2024-05-03T03:19:45Z en>Adakiko 0 Reverted edits by [[Special:Contributions/2C0F:FC89:8014:936B:1:0:FE41:232|2C0F:FC89:8014:936B:1:0:FE41:232]] ([[User talk:2C0F:FC89:8014:936B:1:0:FE41:232|talk]]): disruptive edits ([[WP:HG|HG]]) (3.4.12) 117194 wikitext text/x-wiki {{shortcut|CAT:DUPARG|WP:DUPARG}}{{polluted category}} {{Wikipedia category|hidden=yes|tracking=yes}} {{backlog|50}} {{empty category}} This category contains pages with template calls that pass the same argument (parameter value) more than once, such as <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> and <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>. When the same parameter is given a value more than once in a template, only the final value of that parameter is used to display the template. * When checking {{Keypress|Preview}}, any double parameter (and its template) will be listed in top as an error. See [[Help:Duplicate parameters]] for more details and tips. Other venues to find duplicates: * [https://petscan.wmflabs.org/?psid=6801183 Find templates in this category using PetScan] * [https://petscan.wmflabs.org/?psid=6801189 Find Featured Articles in this category using PetScan] * [https://petscan.wmflabs.org/?psid=26460 Find Featured Lists in this category using PetScan] * [https://petscan.wmflabs.org/?psid=7308 Find Good Articles in this category using PetScan] * A script tool to list the duplicate arguments on a page is available at: [[:User:Frietjes/findargdups]] * [[Wikipedia:WPCleaner|WPCleaner]] detects the duplicate arguments on analyzed pages, and is able to automatically fix some of them For a list of MediaWiki-populated tracking categories, see [[Special:TrackingCategories]]. {{Purge button|right}} __NOGALLERY__{{CatAutoTOC}} [[Category:Wikipedia template parameter issues|!duplicate]] [[Category:Tracking categories automatically populated by MediaWiki]] 2tnw7bou7hcluhe7zdaaghx8gbkw04t 117195 117194 2026-07-16T11:41:16Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Pages_using_duplicate_arguments_in_template_calls]] 117194 wikitext text/x-wiki {{shortcut|CAT:DUPARG|WP:DUPARG}}{{polluted category}} {{Wikipedia category|hidden=yes|tracking=yes}} {{backlog|50}} {{empty category}} This category contains pages with template calls that pass the same argument (parameter value) more than once, such as <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> and <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>. When the same parameter is given a value more than once in a template, only the final value of that parameter is used to display the template. * When checking {{Keypress|Preview}}, any double parameter (and its template) will be listed in top as an error. See [[Help:Duplicate parameters]] for more details and tips. Other venues to find duplicates: * [https://petscan.wmflabs.org/?psid=6801183 Find templates in this category using PetScan] * [https://petscan.wmflabs.org/?psid=6801189 Find Featured Articles in this category using PetScan] * [https://petscan.wmflabs.org/?psid=26460 Find Featured Lists in this category using PetScan] * [https://petscan.wmflabs.org/?psid=7308 Find Good Articles in this category using PetScan] * A script tool to list the duplicate arguments on a page is available at: [[:User:Frietjes/findargdups]] * [[Wikipedia:WPCleaner|WPCleaner]] detects the duplicate arguments on analyzed pages, and is able to automatically fix some of them For a list of MediaWiki-populated tracking categories, see [[Special:TrackingCategories]]. {{Purge button|right}} __NOGALLERY__{{CatAutoTOC}} [[Category:Wikipedia template parameter issues|!duplicate]] [[Category:Tracking categories automatically populated by MediaWiki]] 2tnw7bou7hcluhe7zdaaghx8gbkw04t Category:CS1 errors: dates 14 47857 117200 2026-03-30T07:09:21Z en>Headbomb 0 Undid revision [[Special:Diff/1337178592|1337178592]] by [[Special:Contributions/Meltdown627|Meltdown627]] ([[User talk:Meltdown627|talk]]) 117200 wikitext text/x-wiki {{sts|mw-pages|Pages in category}} {{Tracking category}} {{CB autoclean}} This is a tracking category for [[WP:CS1|CS1 citations]] with date-holding parameters where the date values do not comply with [[MOS:DATEFORMAT]]. {{#lst:Help:CS1 errors|bad_date_help_text}} ---- {{#lst:Help:CS1 errors|show_error_messages_help_text}} {{#lst:Help:CS1 errors|notes_help_text}} <!-- {{#lst:Help:CS1 errors|references_help_text}} --> {{CatAutoTOC}} [[Category:CS1 errors|D]] 4q3rryo6havru32cvd5f5enqxroj0nn 117201 117200 2026-07-16T11:41:52Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:CS1_errors:_dates]] 117200 wikitext text/x-wiki {{sts|mw-pages|Pages in category}} {{Tracking category}} {{CB autoclean}} This is a tracking category for [[WP:CS1|CS1 citations]] with date-holding parameters where the date values do not comply with [[MOS:DATEFORMAT]]. {{#lst:Help:CS1 errors|bad_date_help_text}} ---- {{#lst:Help:CS1 errors|show_error_messages_help_text}} {{#lst:Help:CS1 errors|notes_help_text}} <!-- {{#lst:Help:CS1 errors|references_help_text}} --> {{CatAutoTOC}} [[Category:CS1 errors|D]] 4q3rryo6havru32cvd5f5enqxroj0nn Template:Sts 10 47858 117214 2018-02-03T00:44:56Z en>Stranger195 0 +{{Rcat shell|{{R from template shortcut}}{{R from short name}}}} 117214 wikitext text/x-wiki #REDIRECT [[Template:Skip to section]] {{Rcat shell|{{R from template shortcut}}{{R from short name}}}} 3uioz6vbfylshlpv3vqigtn1huevw72 117215 117214 2026-07-16T11:41:56Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Sts]] 117214 wikitext text/x-wiki #REDIRECT [[Template:Skip to section]] {{Rcat shell|{{R from template shortcut}}{{R from short name}}}} 3uioz6vbfylshlpv3vqigtn1huevw72 Template:CB autoclean 10 47859 117230 2025-07-11T11:12:23Z en>Fayenatic london 0 Fayenatic london moved page [[Template:CB autoclean]] to [[Template:Citation bot autoclean]]: [[WP:TPN]] 117230 wikitext text/x-wiki #REDIRECT [[Template:Citation bot autoclean]] {{Redirect category shell| {{R from move}} }} 6iwxnfwvcmfgt7gq6bv6tb5zsjmwnc1 117231 117230 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:CB_autoclean]] 117230 wikitext text/x-wiki #REDIRECT [[Template:Citation bot autoclean]] {{Redirect category shell| {{R from move}} }} 6iwxnfwvcmfgt7gq6bv6tb5zsjmwnc1 Template:Citation bot autoclean 10 47860 117232 2025-07-11T11:12:23Z en>Fayenatic london 0 Fayenatic london moved page [[Template:CB autoclean]] to [[Template:Citation bot autoclean]]: [[WP:TPN]] 117232 wikitext text/x-wiki <includeonly>{{cmbox|text=Many (although not all) cases in the category can automatically be fixed by clicking '''[https://citations.toolforge.org/category.php?edit=toolbar&slow=1&cat={{urlencode:{{BASEPAGENAME}}}} here]''' to activate [[User:Citation bot]].}}</includeonly><noinclude> {{documentation}} </noinclude> 5evqo8udfxvy66cs4xr3sgx26a9nj7n 117233 117232 2026-07-16T11:41:57Z Tumbuka Arch 6863 1 revision imported from [[:en:Template:Citation_bot_autoclean]] 117232 wikitext text/x-wiki <includeonly>{{cmbox|text=Many (although not all) cases in the category can automatically be fixed by clicking '''[https://citations.toolforge.org/category.php?edit=toolbar&slow=1&cat={{urlencode:{{BASEPAGENAME}}}} here]''' to activate [[User:Citation bot]].}}</includeonly><noinclude> {{documentation}} </noinclude> 5evqo8udfxvy66cs4xr3sgx26a9nj7n Category:CS1 errors 14 47861 117234 2025-07-15T20:40:06Z en>Trappist the monk 0 Reverted edit by [[Special:Contribs/Teha barbie|Teha barbie]] ([[User talk:Teha barbie|talk]]) to last version by Izno 117234 wikitext text/x-wiki {{container category}} This is a tracking category for the various [[WP:CS1|Citation Style 1 citation]] error categories. It is distinguished from {{cl|Articles with incorrect citation syntax}} in that it contains sub-categories that are used only by [[Module:Citation/CS1]]. This category should not contain individual pages. Information about the errors is available at [[Help:CS1 errors]]. The total count of articles in subcategories of this category is '''{{#invoke:cs1 documentation support|error_cat_page_tally}}''' ({{purge|update this page}} to refresh this count). This number involves some double-counting, since a single article may appear in multiple subcategories. {{Category see also|CS1 maintenance|CS1 properties}} [[Category:CS1]] [[Category:Wikipedia errors]] [[Category:Articles with incorrect citation syntax]] [[Category:Wikipedia references cleanup]] r8ssuivdnqwdkphkeoorikk4wumdxji 117235 117234 2026-07-16T11:42:07Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:CS1_errors]] 117234 wikitext text/x-wiki {{container category}} This is a tracking category for the various [[WP:CS1|Citation Style 1 citation]] error categories. It is distinguished from {{cl|Articles with incorrect citation syntax}} in that it contains sub-categories that are used only by [[Module:Citation/CS1]]. This category should not contain individual pages. Information about the errors is available at [[Help:CS1 errors]]. The total count of articles in subcategories of this category is '''{{#invoke:cs1 documentation support|error_cat_page_tally}}''' ({{purge|update this page}} to refresh this count). This number involves some double-counting, since a single article may appear in multiple subcategories. {{Category see also|CS1 maintenance|CS1 properties}} [[Category:CS1]] [[Category:Wikipedia errors]] [[Category:Articles with incorrect citation syntax]] [[Category:Wikipedia references cleanup]] r8ssuivdnqwdkphkeoorikk4wumdxji Category:Ŵanthu ŵakumanyikwa ŵa ku America 14 47862 117248 2026-07-16T11:43:16Z Tumbuka Arch 6863 Created blank page 117248 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:Ŵanthu awo ŵakasambira ku University of Tokyo 14 47863 117249 2026-07-16T11:43:20Z Tumbuka Arch 6863 Created blank page 117249 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:Ŵakuvwira ŵanyake kufuma ku New York (boma) 14 47864 117250 2026-07-16T11:43:23Z Tumbuka Arch 6863 Created blank page 117250 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Category:Ŵakubabika mu 1948 14 47865 117251 2026-07-16T11:43:27Z Tumbuka Arch 6863 Created blank page 117251 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Module:Pagetype/setindex 828 47866 117252 2024-02-17T03:50:28Z en>Pppery 0 Changed protection settings for "[[Module:Pagetype/setindex]]": Per parent ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 117252 Scribunto text/plain -- This page contains a table of all set index templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["Set index article"] = true, ["Sia"] = true, ["Set index"] = true, ["SIA"] = true, ["Set-index"] = true, ["Setindex"] = true, ["Set-index article"] = true, ["Animal common name"] = true, ["Chemistry index"] = true, ["Chemdisambig"] = true, ["Chemistry disambiguation"] = true, ["Chemistry set index"] = true, ["Chemindex"] = true, ["Enzyme index"] = true, ["Fungus common name"] = true, ["Given name"] = true, ["First name"] = true, ["Forename"] = true, ["Greek myth index"] = true, ["Lake index"] = true, ["Lakeindex"] = true, ["Locomotive index"] = true, ["Media set index"] = true, ["Media index"] = true, ["Molecular formula index"] = true, ["MolFormDisambig"] = true, ["Molecular formula disambiguation"] = true, ["MolFormIndex"] = true, ["Mountain index"] = true, ["Mountainindex"] = true, ["Nickname"] = true, ["Painting index"] = true, ["Plant common name"] = true, ["River index"] = true, ["Road index"] = true, ["Roadindex"] = true, ["Ship index"] = true, ["Shipindex"] = true, ["Sport index"] = true, ["Sportindex"] = true, ["Storm index"] = true, ["Surname"] = true, ["Surnames"] = true, ["DisambigName"] = true, ["DisambigNm"] = true, ["DisambigN"] = true, } nn9l9r1pmrobxspg0rm1qgng5nzu19x 117253 117252 2026-07-16T11:44:43Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/setindex]] 117252 Scribunto text/plain -- This page contains a table of all set index templates and their -- redirects. Templates names are capitalized, and the Template: prefix is -- removed. Templates are grouped with the main template first, followed by -- its redirects. return { ["Set index article"] = true, ["Sia"] = true, ["Set index"] = true, ["SIA"] = true, ["Set-index"] = true, ["Setindex"] = true, ["Set-index article"] = true, ["Animal common name"] = true, ["Chemistry index"] = true, ["Chemdisambig"] = true, ["Chemistry disambiguation"] = true, ["Chemistry set index"] = true, ["Chemindex"] = true, ["Enzyme index"] = true, ["Fungus common name"] = true, ["Given name"] = true, ["First name"] = true, ["Forename"] = true, ["Greek myth index"] = true, ["Lake index"] = true, ["Lakeindex"] = true, ["Locomotive index"] = true, ["Media set index"] = true, ["Media index"] = true, ["Molecular formula index"] = true, ["MolFormDisambig"] = true, ["Molecular formula disambiguation"] = true, ["MolFormIndex"] = true, ["Mountain index"] = true, ["Mountainindex"] = true, ["Nickname"] = true, ["Painting index"] = true, ["Plant common name"] = true, ["River index"] = true, ["Road index"] = true, ["Roadindex"] = true, ["Ship index"] = true, ["Shipindex"] = true, ["Sport index"] = true, ["Sportindex"] = true, ["Storm index"] = true, ["Surname"] = true, ["Surnames"] = true, ["DisambigName"] = true, ["DisambigNm"] = true, ["DisambigN"] = true, } nn9l9r1pmrobxspg0rm1qgng5nzu19x Module:Pagetype/setindex/doc 828 47867 117254 2024-10-19T02:26:22Z en>2600 etc 0 117254 wikitext text/x-wiki {{high risk}} {{cascade-protected template|page=module}} This submodule of [[Module:Pagetype]] contains a list of templates used to identify [[Wikipedia:Set index articles|set index articles]]. It should consist of all templates in [[:Category:Set index article templates]], plus their redirects. <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> }}</includeonly> 5njqevjzkcjl9j46jvgzasbpp2sg66q 117255 117254 2026-07-16T11:44:44Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/setindex/doc]] 117254 wikitext text/x-wiki {{high risk}} {{cascade-protected template|page=module}} This submodule of [[Module:Pagetype]] contains a list of templates used to identify [[Wikipedia:Set index articles|set index articles]]. It should consist of all templates in [[:Category:Set index article templates]], plus their redirects. <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> }}</includeonly> 5njqevjzkcjl9j46jvgzasbpp2sg66q Talk:United Kingdom 1 47868 117268 2026-07-12T02:36:38Z en>Moxy 0 /* Extended-confirmed-protected edit request on 12 July 2026 */ 117268 wikitext text/x-wiki {{Skip to talk}} {{Talk header}} {{FAQ|collapsed=no}} {{British English|date=September 2010}} {{Article history |action1=PR |action1date=06:34, 3 May 2006 |action1link=Wikipedia:Peer review/United Kingdom/archive1 |action1result=reviewed |action1oldid=51316003 |action2=GAN |action2date=22:20, 22 July 2006 |action2link=Talk:United Kingdom/Archive 6#Good Article |action2result=listed |action2oldid=65278328 |action3=FAC |action3date=15:46, 30 September 2006 |action3link=Wikipedia:Featured article candidates/United Kingdom/archive1 |action3result=not promoted |action3oldid=78670594 |action4=FAC |action4date=00:11, 11 February 2007 |action4link=Wikipedia:Featured article candidates/United Kingdom/archive2 |action4result=not promoted |action4oldid=107189748 |action5=GAR |action5link=Talk:United Kingdom/GA1 |action5date=19:51, 3 October 2008 (UTC) |action5result=delisted |action5oldid=242810269 |action6=GAN |action6link=Talk:United Kingdom/GA2 |action6date=22 January 2010 |action6result=not listed |action6oldid=339258206 |action7=GAN |action7link=Talk:United Kingdom/GA3 |action7date=6 March 2015 |action7result=not listed |action7oldid=650163344 |action8=GAN |action8link=Talk:United Kingdom/GA4 |action8date=18:52, 24 September 2018 (UTC) |action8result=not listed |action8oldid=861034594 |topic=geography |currentstatus=DGA }} {{WikiProject banner shell|class=B|collapsed=yes|vital=yes|blp=No|1= {{WikiProject Countries}} {{WikiProject Europe|importance=Top}} {{WikiProject Guild of Copy Editors||user=Chaosdruid|date=17 May 2011}} {{WikiProject Politics of the United Kingdom| importance = Top}} {{WikiProject UK geography|importance=Top}} {{WikiProject United Kingdom|importance=Top}} }} {{Press|date=August 17, 2009 |url= http://www.telegraph.co.uk/technology/wikipedia/6043534/The-50-most-viewed-Wikipedia-articles-in-2009-and-2008.html |title=The 50 most-viewed Wikipedia articles in 2009 and 2008 |org=[[The Daily Telegraph]] }} {{Other banners|collapsed=yes| {{Annual report|[[Wikipedia:2007 Top 50 Report|2007]], [[Wikipedia:2008 Top 50 Report|2008]], [[Wikipedia:2009 Top 50 Report|2009]], [[Wikipedia:2010 Top 50 Report|2010]], [[Wikipedia:2011 Top 50 Report|2011]], [[Wikipedia:2012 Top 50 Report|2012]], [[Wikipedia:2013 Top 50 Report|2013]], [[Wikipedia:2014 Top 50 Report|2014]], [[Wikipedia:Top 25 Report/2016|2016]], [[Wikipedia:2021 Top 50 Report|2021]], and [[Wikipedia:2022 Top 50 Report|2022]]}} }} {{section sizes}} {{Talk:United Kingdom/archivebox}} {{User:MiszaBot/config |archiveheader = {{Automatic archive navigator}} |maxarchivesize = 150K |counter = 40 |algo = old(60d) |archive = Talk:United Kingdom/Archive %(counter)d }}{{User:HBC Archive Indexerbot/OptIn |target=Talk:United Kingdom/Archive index |mask1=Talk:United Kingdom/Archive <#> |mask2=Talk:United_Kingdom/Country, Kingdom or State Archive <#> |mask3=Talk:United_Kingdom/Terminology archive<#> |mask4=Talk:United_Kingdom/Subdivision name archive<#> |leading_zeros=0 |indexhere=yes}} == Extended-confirmed-protected edit request on 13 May 2026 == {{edit extended-protected|United Kingdom|answered=yes}} The United Kingdom is not a country. The UK is a sovereign state which is comprised of three countries, namely and in alphabetical order England, Scotland, Wales , and also Northern Ireland each of which have their own individual and unique cultures and traditions. [[Special:Contributions/&#126;2026-28729-21|&#126;2026-28729-21]] ([[User talk:&#126;2026-28729-21|talk]]) 16:00, 13 May 2026 (UTC) :[[Country]] suggests it is. Not everything is as black-and-white as you might want it to be. And it's four, not three. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:19, 13 May 2026 (UTC) :{{not done}}''':'''<!-- Template:EEp --> See question 1 in the "Frequently asked questions" banner at the top of the talk page. [[User:Day Creature|Day Creature]] ([[User talk:Day Creature|talk]]) 16:32, 13 May 2026 (UTC) == Press mention == For [[Template:Press]]: *https://www.popsci.com/technology/most-popular-wikipedia-entries/ --[[User:Another Believer|<span style="color:navy">Another Believer</span>]] <sub>([[User talk:Another Believer|<span style="color:#C60">Talk</span>]])</sub> 23:24, 24 May 2026 (UTC) == Picture of Boris == <s>Can you remove the picture of Boris Johnson from modern history? As there are already pics of the current PM. It would be nice to have something else there. [[Special:Contributions/&#126;2026-33619-46|&#126;2026-33619-46]] ([[User talk:&#126;2026-33619-46|talk]]) 19:01, 6 June 2026 (UTC)</s>{{sock vote|Lam312321321}} <small>[[User:Belbury|Belbury]] ([[User talk:Belbury|talk]]) 10:19, 18 June 2026 (UTC)</small> :That image illustrates Brexit (Johnson is signing the departure agreement). Which image from Commons would you choose for that instead? Or are you wanting to illustrate a different major event from the current century pertinent to the history of the United Kingdom? If so, which event and with which illustration? [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 07:35, 7 June 2026 (UTC) ::I think these pictures below: ::[[c:File:Inicio_de_la_vacunación_contra_la_COVID-19_en_Costa_Rica_usando_la_dosis_de_AstraZeneca_02.jpg|Image one]]: caption <nowiki>''</nowiki>The UK administered the first COVID-19 vaccine in the world, outside of clinical trials.<nowiki>''</nowiki> ::[[:File:London anti-war protest banners.jpg|Image two]]: caption: <nowiki>''</nowiki>The [[15 February 2003 anti-war protests|largest protest in British history]] in opposition to the government led by [[Tony Blair]] took place in London<nowiki>''</nowiki> [[Special:Contributions/&#126;2026-33475-81|&#126;2026-33475-81]] ([[User talk:&#126;2026-33475-81|talk]]) 12:29, 7 June 2026 (UTC) :::The first event is mentioned in the section text, but the image itself is just a generic one of some vaccines; is there one specifically illustrating the first vaccine being administered? The second is not mentioned in the section (nor should it be), and the claim you make is not clear-cut (although your actual wording is probably not what you meant). :::Let's await a while to see what other contributors think. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 14:18, 7 June 2026 (UTC) ::::The second one is mentioned in the section. [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:28, 7 June 2026 (UTC) :::::& what about [[:File:COVID-19 vaccine vial AstraZenaca 2021 (UK).jpg|this image]] for image one? [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:35, 7 June 2026 (UTC) ::::::Could be anywhere. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:51, 7 June 2026 (UTC) :It aptly illustrates one of the four events mentioned in that section, so I think, as it complies well with [[MOS:IMAGERELEVANCE]], it should stay unless an even more pertinent image is put forward. -- [[User:DeFacto|<span style="color:#3366CC;">DeFacto</span>]] ([[User Talk:DeFacto|talk]]). 14:42, 7 June 2026 (UTC) ::But the suggestions I'm making are events in the section. [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:47, 7 June 2026 (UTC) :::But neither of them are as obviously befitting. -- [[User:DeFacto|<span style="color:#3366CC;">DeFacto</span>]] ([[User Talk:DeFacto|talk]]). 15:30, 7 June 2026 (UTC) :::So far none are an improvement on the current image which shows the prime minister of the time formally committing the country to leave the European Union. You haven't yet found an image which is as illustrative of any of the other events than this. :::(I could disregard [[WP:AGF]] and interpret your eagerness to swap the image for others of lesser relevance as a result of your opinion of the person depicted, but that would be rude of me.) [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:55, 7 June 2026 (UTC) The IPs are socks of [[WP:BE|block evading]] [[User:Lam312321321]]. [[User:Mutt Lunker|Mutt Lunker]] ([[User talk:Mutt Lunker|talk]]) 21:14, 7 June 2026 (UTC) == Extended-confirmed-protected edit request on 23 June 2026 == {{edit extended-protected|United Kingdom|answered=yes}} Replace this line: When the EC became the [[European Union]] (EU) in 1992, the UK was one of the 12 founding member states. With: When the EC became the [[European Union]] (EU) in 1993, the UK was one of the 12 founding member states.<ref>{{cite web |title=European Community |url=https://www.britannica.com/topic/European-Community-European-economic-association |website=Encyclopædia Britannica |access-date=22 June 2026}}</ref> Reason: The Maastricht treaty establishing the EU was signed 7 Feb 1992, but it only went into force on 1 Nov 1993 after being ratified by all of the founding member states. Therefore the EC only became the EU on 1 Nov 1993 when the treaty went into force. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 01:45, 23 June 2026 (UTC) :{{done}}<!-- Template:EEp --> <span style="background-color: #FFCFBF; font-variant: small-caps">[[User:Destinyokhiria|Destinyokhiria]] <sub>('''[[User talk:Destinyokhiria|talk]]''' / '''[[Special:Contributions/Destinyokhiria|cont]]''')</sub></span> 02:35, 23 June 2026 (UTC) == Extended-confirmed-protected edit request on 6 July 2026 == {{edit extended-protected|United Kingdom|answered=no}} Change this line: The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the creation of the [[National Health Service]] (NHS) in 1949 is the primary healthcare provider in the United Kingdom. To this: The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the establishment of the [[National Health Service]] (NHS), which began operating in 1948<ref>{{cite web |title=The foundation of the NHS |url=https://www.nationalarchives.gov.uk/explore-the-collection/stories/the-foundation-of-the-nhs/ |publisher=The National Archives |access-date=6 July 2026}}</ref> as the primary healthcare provider. Reason: Grammar fix, the current sentence is malformed ("...in 1949 is the primary healthcare provider..."). Year correction 1949→1948, sourced to The National Archives: the NHS began operating on 5 July 1948 (the "appointed day"). Wording changed from "creation of the NHS in 1949" to "establishment of the NHS, which began operating in 1948" because the NHS was created by separate acts across the UK (England and Wales: National Health Service Act 1946; Scotland: National Health Service (Scotland) Act 1947; Northern Ireland: Health Services Act (Northern Ireland) 1948) but launched UK-wide in 1948, so "establishment" plus the 1948 operating date avoids tying creation to a single year. Also removed the redundant second mention of "United Kingdom" at the end of the sentence. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 15:59, 6 July 2026 (UTC) [[User:Lam312321321|Quack!]] [[User:Mutt Lunker|Mutt Lunker]] ([[User talk:Mutt Lunker|talk]]) 16:20, 6 July 2026 (UTC) :Hi Mutt Lunker, I understand that the "Quack!" implies I'm a returning blocked user. I'm not. This is my only account, I have no connection to any blocked or banned editor, and I've built an ordinary editing history over my time here. I'd ask that the request be judged on its substance rather than on an assumption about who I am: it's a sourced correction (the NHS began operating on 5 July 1948, per The National Archives) and a fix to a grammatically broken sentence. If anyone genuinely believes otherwise about the account, the formal process exists for that. I've said my piece here and won't belabour it further. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 16:50, 6 July 2026 (UTC) {{talk reflist}} == costal =coastal == Article locked so cannot change.[[Special:Contributions/&#126;2026-32542-29|&#126;2026-32542-29]] ([[User talk:&#126;2026-32542-29|talk]]) 03:35, 8 July 2026 (UTC) :{{fixed}} I verified that the reference it's in misspelled the name of the publisher. –[[User:LaundryPizza03|<b style="color:#77b">Laundry</b><b style="color:#fb0">Pizza</b><b style="color:#b00">03</b>]] ([[User talk:LaundryPizza03|<span style="color:#0d0">d</span>]][[Special:Contribs/LaundryPizza03|<span style="color:#0bf">c̄</span>]]) 03:51, 8 July 2026 (UTC) == Extended-confirmed-protected edit request on 12 July 2026 == {{edit extended-protected|United Kingdom|answered=yes}} Instead of "country", The United Kingdom should be called a "sovereign state" because it is a political entity made up of multiple countries and represents multiple countries in the international stage. [[User:TheCountriesoftheWorld|TheCountriesoftheWorld]] ([[User talk:TheCountriesoftheWorld|talk]]) 02:14, 12 July 2026 (UTC) :{{not done}} pls see [[Talk:United_Kingdom/Archive_30#sovereign_state,_not_country| a discussion that links to many other discussions]].<span style="display:inline-flex;rotate:-15deg;color:darkblue">'''[[User:Moxy|Moxy]]'''</span><span style="display:inline-flex;rotate:15deg;color:darkblue">[[User talk:Moxy|🍁]]</span> 02:31, 12 July 2026 (UTC) 3ka2ukak332jiyv2i475lwyrk3gv7tx 117269 117268 2026-07-16T11:45:42Z Tumbuka Arch 6863 1 revision imported from [[:en:Talk:United_Kingdom]] 117268 wikitext text/x-wiki {{Skip to talk}} {{Talk header}} {{FAQ|collapsed=no}} {{British English|date=September 2010}} {{Article history |action1=PR |action1date=06:34, 3 May 2006 |action1link=Wikipedia:Peer review/United Kingdom/archive1 |action1result=reviewed |action1oldid=51316003 |action2=GAN |action2date=22:20, 22 July 2006 |action2link=Talk:United Kingdom/Archive 6#Good Article |action2result=listed |action2oldid=65278328 |action3=FAC |action3date=15:46, 30 September 2006 |action3link=Wikipedia:Featured article candidates/United Kingdom/archive1 |action3result=not promoted |action3oldid=78670594 |action4=FAC |action4date=00:11, 11 February 2007 |action4link=Wikipedia:Featured article candidates/United Kingdom/archive2 |action4result=not promoted |action4oldid=107189748 |action5=GAR |action5link=Talk:United Kingdom/GA1 |action5date=19:51, 3 October 2008 (UTC) |action5result=delisted |action5oldid=242810269 |action6=GAN |action6link=Talk:United Kingdom/GA2 |action6date=22 January 2010 |action6result=not listed |action6oldid=339258206 |action7=GAN |action7link=Talk:United Kingdom/GA3 |action7date=6 March 2015 |action7result=not listed |action7oldid=650163344 |action8=GAN |action8link=Talk:United Kingdom/GA4 |action8date=18:52, 24 September 2018 (UTC) |action8result=not listed |action8oldid=861034594 |topic=geography |currentstatus=DGA }} {{WikiProject banner shell|class=B|collapsed=yes|vital=yes|blp=No|1= {{WikiProject Countries}} {{WikiProject Europe|importance=Top}} {{WikiProject Guild of Copy Editors||user=Chaosdruid|date=17 May 2011}} {{WikiProject Politics of the United Kingdom| importance = Top}} {{WikiProject UK geography|importance=Top}} {{WikiProject United Kingdom|importance=Top}} }} {{Press|date=August 17, 2009 |url= http://www.telegraph.co.uk/technology/wikipedia/6043534/The-50-most-viewed-Wikipedia-articles-in-2009-and-2008.html |title=The 50 most-viewed Wikipedia articles in 2009 and 2008 |org=[[The Daily Telegraph]] }} {{Other banners|collapsed=yes| {{Annual report|[[Wikipedia:2007 Top 50 Report|2007]], [[Wikipedia:2008 Top 50 Report|2008]], [[Wikipedia:2009 Top 50 Report|2009]], [[Wikipedia:2010 Top 50 Report|2010]], [[Wikipedia:2011 Top 50 Report|2011]], [[Wikipedia:2012 Top 50 Report|2012]], [[Wikipedia:2013 Top 50 Report|2013]], [[Wikipedia:2014 Top 50 Report|2014]], [[Wikipedia:Top 25 Report/2016|2016]], [[Wikipedia:2021 Top 50 Report|2021]], and [[Wikipedia:2022 Top 50 Report|2022]]}} }} {{section sizes}} {{Talk:United Kingdom/archivebox}} {{User:MiszaBot/config |archiveheader = {{Automatic archive navigator}} |maxarchivesize = 150K |counter = 40 |algo = old(60d) |archive = Talk:United Kingdom/Archive %(counter)d }}{{User:HBC Archive Indexerbot/OptIn |target=Talk:United Kingdom/Archive index |mask1=Talk:United Kingdom/Archive <#> |mask2=Talk:United_Kingdom/Country, Kingdom or State Archive <#> |mask3=Talk:United_Kingdom/Terminology archive<#> |mask4=Talk:United_Kingdom/Subdivision name archive<#> |leading_zeros=0 |indexhere=yes}} == Extended-confirmed-protected edit request on 13 May 2026 == {{edit extended-protected|United Kingdom|answered=yes}} The United Kingdom is not a country. The UK is a sovereign state which is comprised of three countries, namely and in alphabetical order England, Scotland, Wales , and also Northern Ireland each of which have their own individual and unique cultures and traditions. [[Special:Contributions/&#126;2026-28729-21|&#126;2026-28729-21]] ([[User talk:&#126;2026-28729-21|talk]]) 16:00, 13 May 2026 (UTC) :[[Country]] suggests it is. Not everything is as black-and-white as you might want it to be. And it's four, not three. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:19, 13 May 2026 (UTC) :{{not done}}''':'''<!-- Template:EEp --> See question 1 in the "Frequently asked questions" banner at the top of the talk page. [[User:Day Creature|Day Creature]] ([[User talk:Day Creature|talk]]) 16:32, 13 May 2026 (UTC) == Press mention == For [[Template:Press]]: *https://www.popsci.com/technology/most-popular-wikipedia-entries/ --[[User:Another Believer|<span style="color:navy">Another Believer</span>]] <sub>([[User talk:Another Believer|<span style="color:#C60">Talk</span>]])</sub> 23:24, 24 May 2026 (UTC) == Picture of Boris == <s>Can you remove the picture of Boris Johnson from modern history? As there are already pics of the current PM. It would be nice to have something else there. [[Special:Contributions/&#126;2026-33619-46|&#126;2026-33619-46]] ([[User talk:&#126;2026-33619-46|talk]]) 19:01, 6 June 2026 (UTC)</s>{{sock vote|Lam312321321}} <small>[[User:Belbury|Belbury]] ([[User talk:Belbury|talk]]) 10:19, 18 June 2026 (UTC)</small> :That image illustrates Brexit (Johnson is signing the departure agreement). Which image from Commons would you choose for that instead? Or are you wanting to illustrate a different major event from the current century pertinent to the history of the United Kingdom? If so, which event and with which illustration? [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 07:35, 7 June 2026 (UTC) ::I think these pictures below: ::[[c:File:Inicio_de_la_vacunación_contra_la_COVID-19_en_Costa_Rica_usando_la_dosis_de_AstraZeneca_02.jpg|Image one]]: caption <nowiki>''</nowiki>The UK administered the first COVID-19 vaccine in the world, outside of clinical trials.<nowiki>''</nowiki> ::[[:File:London anti-war protest banners.jpg|Image two]]: caption: <nowiki>''</nowiki>The [[15 February 2003 anti-war protests|largest protest in British history]] in opposition to the government led by [[Tony Blair]] took place in London<nowiki>''</nowiki> [[Special:Contributions/&#126;2026-33475-81|&#126;2026-33475-81]] ([[User talk:&#126;2026-33475-81|talk]]) 12:29, 7 June 2026 (UTC) :::The first event is mentioned in the section text, but the image itself is just a generic one of some vaccines; is there one specifically illustrating the first vaccine being administered? The second is not mentioned in the section (nor should it be), and the claim you make is not clear-cut (although your actual wording is probably not what you meant). :::Let's await a while to see what other contributors think. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 14:18, 7 June 2026 (UTC) ::::The second one is mentioned in the section. [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:28, 7 June 2026 (UTC) :::::& what about [[:File:COVID-19 vaccine vial AstraZenaca 2021 (UK).jpg|this image]] for image one? [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:35, 7 June 2026 (UTC) ::::::Could be anywhere. [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:51, 7 June 2026 (UTC) :It aptly illustrates one of the four events mentioned in that section, so I think, as it complies well with [[MOS:IMAGERELEVANCE]], it should stay unless an even more pertinent image is put forward. -- [[User:DeFacto|<span style="color:#3366CC;">DeFacto</span>]] ([[User Talk:DeFacto|talk]]). 14:42, 7 June 2026 (UTC) ::But the suggestions I'm making are events in the section. [[Special:Contributions/&#126;2026-33739-61|&#126;2026-33739-61]] ([[User talk:&#126;2026-33739-61|talk]]) 14:47, 7 June 2026 (UTC) :::But neither of them are as obviously befitting. -- [[User:DeFacto|<span style="color:#3366CC;">DeFacto</span>]] ([[User Talk:DeFacto|talk]]). 15:30, 7 June 2026 (UTC) :::So far none are an improvement on the current image which shows the prime minister of the time formally committing the country to leave the European Union. You haven't yet found an image which is as illustrative of any of the other events than this. :::(I could disregard [[WP:AGF]] and interpret your eagerness to swap the image for others of lesser relevance as a result of your opinion of the person depicted, but that would be rude of me.) [[User:Bazza_7|Bazza&nbsp;<span style="color:grey">7</span>]] ([[User_talk:Bazza_7|talk]]) 16:55, 7 June 2026 (UTC) The IPs are socks of [[WP:BE|block evading]] [[User:Lam312321321]]. [[User:Mutt Lunker|Mutt Lunker]] ([[User talk:Mutt Lunker|talk]]) 21:14, 7 June 2026 (UTC) == Extended-confirmed-protected edit request on 23 June 2026 == {{edit extended-protected|United Kingdom|answered=yes}} Replace this line: When the EC became the [[European Union]] (EU) in 1992, the UK was one of the 12 founding member states. With: When the EC became the [[European Union]] (EU) in 1993, the UK was one of the 12 founding member states.<ref>{{cite web |title=European Community |url=https://www.britannica.com/topic/European-Community-European-economic-association |website=Encyclopædia Britannica |access-date=22 June 2026}}</ref> Reason: The Maastricht treaty establishing the EU was signed 7 Feb 1992, but it only went into force on 1 Nov 1993 after being ratified by all of the founding member states. Therefore the EC only became the EU on 1 Nov 1993 when the treaty went into force. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 01:45, 23 June 2026 (UTC) :{{done}}<!-- Template:EEp --> <span style="background-color: #FFCFBF; font-variant: small-caps">[[User:Destinyokhiria|Destinyokhiria]] <sub>('''[[User talk:Destinyokhiria|talk]]''' / '''[[Special:Contributions/Destinyokhiria|cont]]''')</sub></span> 02:35, 23 June 2026 (UTC) == Extended-confirmed-protected edit request on 6 July 2026 == {{edit extended-protected|United Kingdom|answered=no}} Change this line: The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the creation of the [[National Health Service]] (NHS) in 1949 is the primary healthcare provider in the United Kingdom. To this: The modern system of [[Universal service|universal]] [[Publicly funded health care|publicly funded healthcare]] in the United Kingdom has its origins in the establishment of the [[National Health Service]] (NHS), which began operating in 1948<ref>{{cite web |title=The foundation of the NHS |url=https://www.nationalarchives.gov.uk/explore-the-collection/stories/the-foundation-of-the-nhs/ |publisher=The National Archives |access-date=6 July 2026}}</ref> as the primary healthcare provider. Reason: Grammar fix, the current sentence is malformed ("...in 1949 is the primary healthcare provider..."). Year correction 1949→1948, sourced to The National Archives: the NHS began operating on 5 July 1948 (the "appointed day"). Wording changed from "creation of the NHS in 1949" to "establishment of the NHS, which began operating in 1948" because the NHS was created by separate acts across the UK (England and Wales: National Health Service Act 1946; Scotland: National Health Service (Scotland) Act 1947; Northern Ireland: Health Services Act (Northern Ireland) 1948) but launched UK-wide in 1948, so "establishment" plus the 1948 operating date avoids tying creation to a single year. Also removed the redundant second mention of "United Kingdom" at the end of the sentence. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 15:59, 6 July 2026 (UTC) [[User:Lam312321321|Quack!]] [[User:Mutt Lunker|Mutt Lunker]] ([[User talk:Mutt Lunker|talk]]) 16:20, 6 July 2026 (UTC) :Hi Mutt Lunker, I understand that the "Quack!" implies I'm a returning blocked user. I'm not. This is my only account, I have no connection to any blocked or banned editor, and I've built an ordinary editing history over my time here. I'd ask that the request be judged on its substance rather than on an assumption about who I am: it's a sourced correction (the NHS began operating on 5 July 1948, per The National Archives) and a fix to a grammatically broken sentence. If anyone genuinely believes otherwise about the account, the formal process exists for that. I've said my piece here and won't belabour it further. [[User:Dannyjamescarter|Dannyjamescarter]] ([[User talk:Dannyjamescarter|talk]]) 16:50, 6 July 2026 (UTC) {{talk reflist}} == costal =coastal == Article locked so cannot change.[[Special:Contributions/&#126;2026-32542-29|&#126;2026-32542-29]] ([[User talk:&#126;2026-32542-29|talk]]) 03:35, 8 July 2026 (UTC) :{{fixed}} I verified that the reference it's in misspelled the name of the publisher. –[[User:LaundryPizza03|<b style="color:#77b">Laundry</b><b style="color:#fb0">Pizza</b><b style="color:#b00">03</b>]] ([[User talk:LaundryPizza03|<span style="color:#0d0">d</span>]][[Special:Contribs/LaundryPizza03|<span style="color:#0bf">c̄</span>]]) 03:51, 8 July 2026 (UTC) == Extended-confirmed-protected edit request on 12 July 2026 == {{edit extended-protected|United Kingdom|answered=yes}} Instead of "country", The United Kingdom should be called a "sovereign state" because it is a political entity made up of multiple countries and represents multiple countries in the international stage. [[User:TheCountriesoftheWorld|TheCountriesoftheWorld]] ([[User talk:TheCountriesoftheWorld|talk]]) 02:14, 12 July 2026 (UTC) :{{not done}} pls see [[Talk:United_Kingdom/Archive_30#sovereign_state,_not_country| a discussion that links to many other discussions]].<span style="display:inline-flex;rotate:-15deg;color:darkblue">'''[[User:Moxy|Moxy]]'''</span><span style="display:inline-flex;rotate:15deg;color:darkblue">[[User talk:Moxy|🍁]]</span> 02:31, 12 July 2026 (UTC) 3ka2ukak332jiyv2i475lwyrk3gv7tx Wikipedia:Namespace 4 47869 117280 2026-04-04T04:47:56Z en>8rz 0 /* Programming */ per [[WP:ANCHOR]] 117280 wikitext text/x-wiki {{Short description|Prefix before a Wikipedia page's name}} {{redirect-distinguish|WP:NS|Wikipedia:WikiProject Nova Scotia}} {{redirect-distinguish|WP:NSPACE|Wikipedia:Notability (astronomical objects)}} {{pp-semi-vandalism|small=yes}}{{pp-move-indef}} {{Infopage|WP:NS|WP:NSPACE}} {{Namespaces}} A Wikipedia '''namespace''' is a set of Wikipedia pages whose [[Help:page name|names]] begin with a reserved word, followed by a colon. The reserved word is recognized by the [[MediaWiki]] software. For example, in the ''user namespace'' all titles begin with the prefix ''User:''. In the case of the article (or main) namespace, in which encyclopedia articles appear, the reserved word and colon are absent. (Note: main space articles can optionally include a colon at the beginning with no reserved word, so <code>[<nowiki/>[Article]]</code> and <code>[<nowiki/>[:Article]]</code> are equivalent. This is usually only necessary for the advanced technique of [[WP:Transclusion|transcluding]] a main space article into a page in another namespace.) More generally, a Wikipedia '''namespace''' is a class of pages that falls under a common type. All pages in the <code>User</code> namespace, for example, are [[Wikipedia:User pages|user pages]], whereas [[WP:Drafts|Drafts]] are in the <code>Draft</code> namespace. This page is in the <code>[[WP:Project namespace|Wikipedia]]</code> namespace, for information or discussions about the project itself and its policies. Wikipedia has 30 current namespaces: 14 subject namespaces, 14 corresponding talk namespaces, and 2 virtual namespaces. These are all listed in the box to the right. While surfing Wikipedia, a list of namespaces is available in two clicks: do an empty search, then click ''Advanced'' under the search box. The list also makes itself available where needed in the dropdown menus of, for example, [[Special:PrefixIndex]], [[Special:AllPages]], [[Special:RecentChanges]], and [[Special:Contributions]]. The aliases '''WP''' for '''Wikipedia''', and '''WT''' for '''Wikipedia&nbsp;talk''', work for page names in the search box, and making links as well as inclusions. See [[#Aliases|Aliases]] below for other aliases. (The pseudo-namespaces such as '''H''' for '''Help''', and '''CAT''' for '''Category''', are extremely limited. See ''[[#Pseudo-namespaces|Pseudo-namespaces]]'' below.) The table on the right shows what number to use when you want to hide pages that are on your watchlist. See: [[Wikipedia:Hide Pages in Watchlist]] for details. == Subject namespaces == {{see|Wikipedia:Administration#Data structure and development}} [[File:Policies and guidelines indicator.png|thumb|350px|This page is in the [[Wikipedia:Project namespace|Wikipedia namespace]].]] Namespaces allow for the organization and separation of [[Wikipedia:Administration#Content namespaces|content pages]] from [[Wikipedia:Administration#Administrative namespaces|administration pages]]. Namespaces separate data into core sets, those intended for public viewing, and those intended for the editing community. Wikipedia's subject namespaces and their functions are listed below. A brief description is provided, but see the link for more information. {{anchor|subjectpage}}A namespace is sometimes called a ''space'', for short, as in "Project space". A ''subject page'' and its ''talk page'' form a pair. <!-- in order of {{NAMESPACENUMBER}} --> ===Current namespaces=== * '''[[Wikipedia:Main namespace|Main namespace]]''' (no prefix): contains all encyclopedia articles, lists, [[Wikipedia:Disambiguation|disambiguation pages]], and encyclopedia [[Wikipedia:Redirect|redirects]]. Sometimes referred to as "mainspace" or "Article". * '''[[Wikipedia:User namespace|User namespace]]''' (prefix '''User:'''): contains user pages and other pages created by individual users for their own personal use. Pages under this namespace can still be viewed and modified by others, so do not keep any of your sensitive data here. * '''[[Wikipedia:Wikipedia namespace|Wikipedia namespace]]''' or '''[[Wikipedia:Project namespace|Project namespace]]''' (prefix '''Wikipedia:'''): contains many types of pages connected with the Wikipedia project itself: information, policies, guidelines, essays, processes, discussion, etc. [[Wikipedia:Namespace#Aliases|Namespace aliases]]: '''WP:''' or '''Project:''' *{{anchor|File|File namespace}}'''[[Wikipedia:File namespace|File namespace]]''' (prefix '''File:'''): contains [[Help:File description page|description pages for media files]] (images, videos, and audio files). A link starting with <code><nowiki>[[File:</nowiki></code> will display the media at that position on the page instead of showing a wikilink that leads to the specified file description page, so if you want the latter effect, use a link beginning with <code><nowiki>[[:File:</nowiki></code> (the [[Help:Colon trick|colon trick]]). Namespace alias: '''Image:''' * '''[[Help:MediaWiki namespace|MediaWiki namespace]]''' (prefix '''MediaWiki:'''): a namespace containing interface texts, such as the links and messages that appear on automatically generated pages. Pages in this namespace are permanently [[Wikipedia:Protection policy|protected]] against editing by regular users. For a list of these messages, see [[Special:AllMessages]]. (The prefix ''cannot'' be shortened to "MW" because '''mw''' is an interwiki prefix. See ''[[#Interwiki links|Interwiki links]]'' below.) * '''[[Wikipedia:Template namespace|Template namespace]]''' (prefix '''Template:'''): contains templates&nbsp;– pages that are intended primarily to be [[Wikipedia:Transclusion|transcluded]] or [[Wikipedia:Substitution|substituted]] onto other pages to insert standard text or boxes such as infoboxes and navigation boxes. [[Wikipedia:Namespace#Aliases|Namespace alias]]: '''TM:''' * '''[[WP:Help namespace|Help namespace]]''' (prefix '''Help:'''): contains pages which provide help in using Wikipedia and its software, both for users of the encyclopedia and for editors. * '''[[Wikipedia:Category namespace|Category namespace]]''' (prefix '''Category:'''): contains category pages, which are curated lists of related pages and subcategories, along with optional additional text. A link beginning with <code><nowiki>[[Category:</nowiki></code> has the effect of adding the page the link appears on to the specified category; it will not result in a wikilink to the category page itself. If you want the latter, use the [[Help:Colon trick|colon trick]]: <code><nowiki>[[:Category:</nowiki></code>. * '''[[Wikipedia:Portal namespace|Portal namespace]]''' (prefix '''Portal:'''): for reader-oriented portals that help readers find articles related to a specific topic, and may contain links to encourage contributions to relevant [[Wikipedia:WikiProject|WikiProjects]]. See, for example, [[Portal:Cricket]] and [[Portal:Spaceflight]]. * '''[[Wikipedia:Draft namespace|Draft namespace]]''' (prefix '''Draft:'''): hosts drafts of new (potential) Wikipedia articles. * '''[[mw:Extension:TimedMediaHandler|TimedText namespace]]''' (prefix '''TimedText:'''): synchronized subtitles for media files. * '''[[Wikipedia:Module namespace|Module namespace]]''' (prefix '''Module:'''): contains [[mw:Extension:Scribunto|Scribunto]] modules&nbsp;– Lua scripts implementing special-purpose [[mw:Manual:Parser functions|parser functions]] for use in templates, beyond the [[Help:Magic words#Parser functions|basic set]] included with MediaWiki and its [[mw:Extensions FAQ|extensions]]. * {{anchor|MOS}}'''[[WP:Manual of Style|MOS namespace]]''' (prefix '''MOS:'''): contains redirects to subpages of [[WP:Manual of Style]]. Until 2024 this was a pseudo-namespace, but it was turned into a real namespace in 2024 to avoid conflicts with the [[Mooré]] Wikipedia (with the language code <code>mos:</code>).<ref>[[phab:T363538]]</ref> * '''[[Event:Sandbox|Event namespace]]''' (prefix '''Event:''') contains [[mw:Extension:CampaignEvents]] events. ===Former namespaces=== The following namespaces previously existed but no longer do: *'''[[Wikipedia:Flow|Flow namespace]]''' (prefix '''Topic:''') was a proposed talk page replacement, formerly installed on English Wikipedia by [[mw:Extension:StructuredDiscussions|Extension:StructuredDiscussions]]. It is no longer installed after being rejected by the community. * '''[[Wikipedia:Course pages|Education Program namespace]]''' (prefix '''Education Program:'''): uninstalled in 2018, and replaced with the [[wmfdashboard:|Programs & Events Dashboard]].<ref>[[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]], Wikimedia outreach</ref><ref>{{Section link|Wikipedia:Education noticeboard/Archive 18#NOTICE:_EducationProgram extension is being deprecated}}</ref> However, the namespace was re-added later that year to allow access to old talk pages in the Education program talk: namespace. The namespace was then uninstalled again in 2021 after the remaining talk pages were moved to subpages of [[Wikipedia talk:Education program archive]]. * '''[[Wikipedia:Books|Book namespace]]''' (prefix '''Book:'''): contained entries for Wikipedia books, collections of articles about one theme, which were used to generate downloadable files or printable documents or order books from PediaPress. In 2017, the online book rendering service was withdrawn, leading to the removal of most links leading to the namespace in 2019. The namespace and its transclusions were still retained in the hope that the WMF would come up with a solution,<ref>{{Section link|Wikipedia:Village pump (technical)/Archive 176|Suppress rendering of Template:Wikipedia books}}</ref> but in 2021 the namespace was uninstalled after all remaining books were moved to subpages of [[Wikipedia:Books/archive]]. * '''Gadget namespace''' (prefix '''Gadget:'''):<ref>{{Section link|Wikipedia:Village pump (technical)/Archive 139#New "Gadget:" and "Gadget definition:" namespaces?}}</ref> was intended to store [[Wikipedia:Gadget|Gadgets]], which are small [[Snippet (programming)|snippets]] enabled in [[Special:Preferences#mw-prefsection-gadgets|user preferences]], but was never used for anything other than redirects to the video game ''[[Gadget: Invention, Travel, & Adventure]]'', and for most of its existence could only be edited by WMF staff. Gadgets currently use the [[Help:MediaWiki namespace|MediaWiki namespace]] with the ''MediaWiki:Gadget-'' page name prefix. It was a [[mw:Manual:Using custom namespaces|custom namespace]] installed by the [[mw:Extension:Gadgets|Gadget extension]]. * '''Gadget definition namespace''' (prefix '''Gadget definition:'''): installed but never used; see above for more information. Gadget definitions currently use the [[MediaWiki:Gadgets-definition]] page. ===Aliases and pseudo-namespaces=== {{redirect|Wikipedia:Alias|template parameter aliases|Help:Template#Handling parameters}} An ''alias'' of a namespace is its namespace. For example, '''WP:''' is '''Wikipedia:''', and so <code><nowiki>[[</nowiki>Wikipedia:[[WP:Page name|''Page name'']]]]</code> can be abbreviated <code><nowiki>[[WP:</nowiki>[[WP:Page name|''Page name'']]]]</code>. See ''[[#Aliases|Aliases]]'' below, for a list of aliases, such as '''WT:''' for '''Wikipedia talk:'''. A ''pseudo-namespace'' is an agreement to create redirect pages named that way, each of which is a shortcut from mainspace to ''a single page in its namespace''. So an alias refers to ''any page in its namespace'', but a pseudo-namespace has far fewer pages than its real namespace. There are a few pseudo-namespace names like '''H:''' for '''Help:''', and '''CAT:''' for '''Category:''', and these can be discovered below in the section ''[[#Pseudo-namespaces|Pseudo-namespaces]]''. == <span id="Talk"></span><span id="Wikipedia talk"></span><span id="WT"></span> Talk namespaces== {{shortcut|WP:TALKSPACE}} {{main|Help:Using talk pages|Wikipedia:Talk page guidelines}} Each of the above namespaces (but not the virtual namespaces and the former Topic: namespace) has an associated [[help:talk page|talk namespace]]—these are also known as ''discussion pages''. The talk namespaces are designated by appending the word <code>talk</code> to the namespace name. For example, the talk namespace associated with the user namespace has the prefix '''User talk:'''. The talk namespace associated with the article namespace is '''Talk:'''. Most of the pages in the talk namespaces are used to discuss changes to the corresponding page in the associated namespace. Pages in the ''user talk'' namespace are used to leave messages for a particular user. The user talk namespace is special in that, whenever a user's talk page is edited, that user will see an orange box saying "You have new messages" on the top of every page that they view until they visit their talk page. By default, logged-in users will see [[Wikipedia:Notifications|a red notification square]] ''and'' a small orange box on the top right hand corner of the page; IP users will only see a wide orange box spanning the top of the page. (Minor edits made by [[Wikipedia:Bot policy|bots]] no longer set off the new message bar. For logged-in users, the new-message bar may be disabled in [[Special:Preferences]].) Note that the prefix '''WT:''' expands to '''Wikipedia talk:''', just as '''WP:''' expands to '''Wikipedia:''' (see [[#Aliases|Aliases]] below). For example, <nowiki>[[WT:Verifiability]]</nowiki> links to [[Wikipedia talk:Verifiability]]. == Virtual namespaces<span id="Special"></span> == In addition to subject namespaces, and their corresponding talk pages, there are two virtual namespaces (without corresponding talk pages) for specialist purposes: === Special === {{main|Help:Special page}} The ''Special:'' namespace consists of pages (called ''special pages'') that are created by the software on demand, such as [[Special:RecentChanges]]. These pages can be linked as usual, as with <nowiki>[[Special:RecentChanges]]</nowiki>, except when they have parameters. To use parameters, the full URL must be given as an external link. For example, https:{{SERVER}}{{SCRIPTPATH}}/index.php?title=Special:Recentchanges&days=3&limit=10, which returns the last ten changes in the last three days. You can create a [[Wikipedia:redirect|redirect]] to a Special page, but the redirect will not be followed automatically. For a list of special pages, see [[Special:SpecialPages]]. {{anchor|Media|Media namespace}} === Media === {{Main|Help:Files}} The ''Media:'' namespace can be used to link directly to a file, rather than to the file description page. == Aliases and pseudo-namespaces== {{See|Wikipedia:Shortcut#List of prefixes}} Aliases and pseudo-namespaces are not namespaces in themselves; their main role is to provide handy ways to link to actual namespaces, by providing shortened links. The main difference between them being the way they work for this purpose; while aliases directly link to namespaces, pseudo-namespaces can only link to other namespaces by using specialist [[Wikipedia:Redirect|redirect pages]] in the main namespace called [[Wikipedia:Shortcut|shortcuts]]. While aliases are also used for shortcuts, this isn't necessary if the pagename is not shortened. Pseudo-namespaces all actually reside in main namespace; but a pseudo-namespace called [[m:Help:Transwiki|Transwiki:]] exists as a pseudo-namespace before being moved to another namespace. === Aliases === {{Shortcut|WP:ALIAS}} There are seven aliases defined for namespaces, all of which are case-insensitive: {| class=wikitable !Namespace !Alias |- | rowspan="2" |Wikipedia |WP |- |Project |- | rowspan="2" |Wikipedia talk |WT |- |Project talk |- |File |Image |- |File talk |Image talk |- |Template |TM |} These aliases are automatically translated by the Wikipedia servers to the proper namespace prefix. So if a link is made to a page title beginning with one of these aliases, or else entered in the search box or used in a URL in a browser address bar, the alias links to the page with the corresponding true namespace prefix. Hence entering [[WP:External links]] or [[Project:External links]] is equivalent to entering [[Wikipedia:External links]]; and entering [[WT:External links]] or [[Project talk:External links]] is equivalent to entering [[Wikipedia talk:External links]]. An alias cannot be used as the actual namespace in a page title. For example, you cannot create page ''WP:123''; if tried, the page name is instantly converted to ''Wikipedia:123''. It ''is'', however, possible to [[Wikipedia:Page name#Changing the displayed title|change the ''displayed'' title]] on page ''Wikipedia:123'' to make it ''WP:123'' or ''Project:123''. <span class="plainlinks">This is very handy for the creation of [[Wikipedia:Shortcut|shortcuts]]. For example, the shortcut for this section is [[WP:ALIAS]], as shown in the right-side box. When the link is clicked, it is automatically translated to [https://en.wikipedia.org/w/index.php?title=Wikipedia:ALIAS&redirect=no Wikipedia:ALIAS]. At this page is a [[Help:Redirect|redirect]] to {{Section link|Wikipedia:Namespace#Aliases}}. This means that the shortcut goes directly to this section from anywhere on Wikipedia. It can also be entered as a [[URL]] in the browser address bar as https://en.wikipedia.org/wiki/WP:ALIAS .</span> === Pseudo-namespaces === <!-- This section is linked from [[Wikipedia:Glossary]] --> {{Shortcut|WP:PNS}} Apart from Wikipedia's 24 regular namespaces and their aliases, and 2 virtual ones, there are several title prefixes appearing in [[Help:Shortcut|shortcut redirects]] pointing to frequently-referred-to Wikipedia pages. These prefixes are referred to as '''pseudo-namespaces''' and include the following: * '''[[Special:Prefixindex/CAT:|CAT:]]''' for shortcuts to the [[Wikipedia:Category namespace|Category namespace]]. See also [[:Category:Redirects to category space]] * '''[[Special:Prefixindex/H:|H:]]''' for shortcuts to the [[Wikipedia:Help namespace|Help namespace]]. See also [[:Category:Redirects to help namespace]] * '''[[Special:Prefixindex/P:|P:]]''' for shortcuts to the [[Wikipedia:Portal namespace|Portal namespace]]. See also [[:Category:Redirects to portal namespace]] A more complete list is available at {{Section link|Wikipedia:Shortcut#List of prefixes}}. Pseudo-namespaces are not in any way recognised by the wiki software; they are purely a community custom. Titles in pseudo-namespaces actually belong technically in the main (article) namespace and are treated as such by the software: they are case-sensitive and appear in [[Help:Search#Syntax|search results]] restricted to the main namespace. An alias is treated like a real namespace, resulting in a search for the [[WP:page name|pagename]] in its namespace, but the "pseudo-namespace:pagename" search is in mainspace, not its pseudo-namespace. For example, searching for "H:S" will not search '''Help'''. To learn some of these shortcuts, first follow the pseudo-namespace link above, then follow one of the redirects listed on that page. It will take you to the target, where you then notice any {{tl|shortcut}} boxes to the right of the page, which may also list some additional shortcuts to that same area. By observing these steps repeatedly, you can discover ways to shorten your typing. You will use pseudo-namespace names more often if you are an advanced editor, highly active in many namespaces, or constantly linking to pages that have a pseudo-namespace shortcut. To understand the appropriateness of redirects of this type, see [[Wikipedia:Cross-namespace redirects]]. All shortcuts are discoverable by [[Help:Searching|searching]] for redirects. There is also the category [[:Category:Wikipedia redirects|Wikipedia redirects]]. As a final example, every [[Wikimedia Foundation]] project has a "[[m:Help:Transwiki|Transwiki:]]" pseudo-namespace (sometimes a real namespace) for importing articles manually. A wiki project that would manually move many pages between [[wp:sister|sister projects]] uses this tag. Redirects/shortcuts are not directly involved here, as described above. Instead, the page title is [[WP:move|move]]d to "Transwiki:''namespace:pagename''", and that content is then copied and pasted into a new page name of that temporary title on the target wiki. When it is accepted, the title is then moved out of the '''Transwiki''' pseudo-namespace there and becomes a real page name in its respective namespace. ==<span id="Interwiki links"></span>Interwiki and interlanguage links == {{see|Help:Interwiki linking|Help:Interlanguage links}} [[m:Table of Wikimedia projects|Interwiki]] and [[m:List of Wikipedias|interlanguage]] prefixes do not define namespaces, but point to pages in other Wikimedia projects, outside the en.wikipedia.org website. They are mentioned here because they use a namespace-like prefix technique for linking. Examples of interwiki prefixes include '''w:''' for Wikipedia; '''m:''' (or '''meta:''') for [[Meta-Wiki]], '''mw:''' for [[MediaWiki]], and '''wikt:''' for [[Wiktionary]]. Examples of interlanguage prefixes include '''en:''' for English language, '''fr:''' for French language, and '''de:''' for German language. Important points to note: * In the presence of an interwiki prefix and the absence of an interlanguage prefix, the link will be to a specified project in the current language. So <code><nowiki>[[w:Internet]]</nowiki></code> links to "[[w:Internet|Internet]]" on the English Wikipedia, if the link is on any English-language Wikimedia project. * In the presence of an interlanguage prefix and the absence of an interwiki prefix, the link will be to a specified language in the current project. So <code><nowiki>[[:en:Internet]]</nowiki></code> will link to "[[:en:Internet|Internet]]" on the English Wikipedia, if the link is on a Wikipedia project in any language. When making links to other language Wikipedias, add an initial colon if you want the link to appear inline rather than in the skin's sidebar under "Languages"; see [[Help:Colon trick]] for an explanation. So <code><nowiki>[[:de:Internet]]</nowiki></code> is an inline link to "[[:de:Internet|Internet]]" in the German Wikipedia; but if using an interwiki prefix this is unnecessary, for example <code><nowiki>[[w:de:Internet]]</nowiki></code> is the same inline link. Further examples: * [[m:Meta:Babel]] and [[meta:Meta:Babel]] both link to the "Babel" page in the project namespace (Meta:, the 2nd prefix) of Meta-Wiki (m: or meta:, the 1st prefix). * [[wikt:fr:Discuter:pied/fusion daf]] links to the "pied/fusion daf" page in the talk namespace (Discuter:, the 3rd prefix) of French (fr:, the 2nd prefix) Wiktionary (wikt:, the 1st prefix). Interwiki prefixes are not just for Wikimedia projects. For example, [[google:]] is the interwiki link for [[Google]]. For a complete list of interwiki prefixes, see the [[m:Interwiki map|interwiki map]] and [[m:Special:Interwiki|interwiki table]]. As with aliases, it is not possible to create a page with a title beginning with an interwiki or interlanguage prefix. It is also not possible to create redirects to interwiki pages, unless it is a [[Wikipedia:Soft redirect|soft redirect]]. == Case insensitivity == Standard namespace names, aliases and interwiki prefixes are case insensitive. The same applies to the first character after the colon. Hence the following all link to the same page: * [[Wikipedia:Afd]], [[WIKIPEDIA:Afd]], [[wIKIpedia:Afd]], [[wikipedia:afd]] * [[wP:Afd]], [[wp:Afd]], [[WP:afd]] * [[PROJECT:Afd]], [[project:Afd]], [[ProjecT:Afd]], [[Project:afd]] == Namespace-dependent functionality == The namespace name is a useful variable for searching in and reporting on sets of [[WP:Page name|pages]]. It is also used to apply features that configure the sets of pages in one namespace differently from another namespace. Using the namespace name MediaWiki can: *[[WP:Search|Search]] for pages in a particular namespace only. * [[Help:Special page|Report]] on [[Special:AllPages|content]] or [[WP:Recent changes|changes in content]] of a namespace. * Enable or disable the [[WP:Subpage|subpage]] feature, per namespace. * Offer a [[WP:Random article|random article]] for the mainspace (<kbd><nowiki>[[</nowiki>Special:Random<nowiki>]]</nowiki></kbd>), or for a namespace <kbd><nowiki>[[</nowiki>Special:Random/''Namespace'']]</kbd>. * Change the functionality of <kbd><nowiki>[[</nowiki>''wikilink''<nowiki>]]</nowiki></kbd> if it targets the '''Category''' namespace or '''File''' namespace. Normally wikilinks are activated by the mouse, but <kbd><nowiki>[[</nowiki>Category:''Pagename''<nowiki>]]</nowiki></kbd> activates software functionality when the [[WP:Category|page is saved]], and <kbd><nowiki>[[</nowiki>File:''Page name''<nowiki>]]</nowiki></kbd> activates software functionality when the [[WP:Image|page is rendered]]. * Change the functionality of <kbd><nowiki>{{</nowiki>[[WP:Transclusion|pagename]]<nowiki>}}</nowiki></kbd> so that it defaults to the set of pagenames in '''Template'''. * Tailor ''[[Wikipedia:Edit notices|edit notices]]'' to a particular namespace's edit page, informing an editor of certain aspects about the content of that namespace. * Allow ''[[Wikipedia:Templates|templates]]'' to behave differently on pages of different namespaces. The namespace functionality is often visible in the URL, where you will see a namespace number. These are given in the table below. Subpages are configured for all namespaces except Main, File, MediaWiki and Category namespaces. Subpages are configured in the software by enabling or disabling the subpage feature per namespace. This further extends the function of a namespace by extending the types of pages or topics of pages a namespace can home. For example, talk page ''/archives'' are subpages, and they are both namespace searchable and page name searchable from the search box, unlike [[WP:page history|history pages]], which are in no namespace. Another example is in the Template namespace where it is routine to put the documentation in a subpage called ''/doc''. Random pages are enabled, in the default software configuration, only for the mainspace. Searching and reporting can operate over the entire database, or they can be limited to a namespace, and so they will offer a list of all the namespaces currently configured. [[Special:WhatLinksHere]] also offers a list of namespaces. == <span class="anchor" id="Enumeration"></span> Programming == The 30 namespaces in the English Wikipedia are numbered for programming purposes. The prefix for each namespace is generated using the [[Help:Magic words#Paths|magic word]] <syntaxhighlight lang=wikitext inline>{{ns}}</syntaxhighlight>, in the form <syntaxhighlight lang=wikitext inline>{{ns:xx}}</syntaxhighlight>, as shown in the table below. {| border="0" cellpadding="4" cellspacing="0" class="wikitable" |- !Namespace variable !Result (namespace name) !Namespace variable !Result (talk namespace name) |- |<syntaxhighlight lang=wikitext inline>{{ns:-2}}</syntaxhighlight> |{{ns:-2}} | | |- |<syntaxhighlight lang=wikitext inline>{{ns:-1}}</syntaxhighlight> |{{ns:-1}} | | |- |<syntaxhighlight lang=wikitext inline>{{ns:0}}</syntaxhighlight> |{{ns:0}} (main namespace, returns empty string) |<syntaxhighlight lang=wikitext inline>{{ns:1}}</syntaxhighlight> |{{ns:1}} |- |<syntaxhighlight lang=wikitext inline>{{ns:2}}</syntaxhighlight> |{{ns:2}} |<syntaxhighlight lang=wikitext inline>{{ns:3}}</syntaxhighlight> |{{ns:3}} |- |<syntaxhighlight lang=wikitext inline>{{ns:4}}</syntaxhighlight> |{{ns:4}} |<syntaxhighlight lang=wikitext inline>{{ns:5}}</syntaxhighlight> |{{ns:5}} |- |<syntaxhighlight lang=wikitext inline>{{ns:6}}</syntaxhighlight> |{{ns:6}} |<syntaxhighlight lang=wikitext inline>{{ns:7}}</syntaxhighlight> |{{ns:7}} |- |<syntaxhighlight lang=wikitext inline>{{ns:8}}</syntaxhighlight> |{{ns:8}} |<syntaxhighlight lang=wikitext inline>{{ns:9}}</syntaxhighlight> |{{ns:9}} |- |<syntaxhighlight lang=wikitext inline>{{ns:10}}</syntaxhighlight> |{{ns:10}} |<syntaxhighlight lang=wikitext inline>{{ns:11}}</syntaxhighlight> |{{ns:11}} |- |<syntaxhighlight lang=wikitext inline>{{ns:12}}</syntaxhighlight> |{{ns:12}} |<syntaxhighlight lang=wikitext inline>{{ns:13}}</syntaxhighlight> |{{ns:13}} |- |<syntaxhighlight lang=wikitext inline>{{ns:14}}</syntaxhighlight> |{{ns:14}} |<syntaxhighlight lang=wikitext inline>{{ns:15}}</syntaxhighlight> |{{ns:15}} |- |<syntaxhighlight lang=wikitext inline>{{ns:100}}</syntaxhighlight> |{{ns:100}} |<syntaxhighlight lang=wikitext inline>{{ns:101}}</syntaxhighlight> |{{ns:101}} |- |<syntaxhighlight lang=wikitext inline>{{ns:118}}</syntaxhighlight> |{{ns:118}} |<syntaxhighlight lang=wikitext inline>{{ns:119}}</syntaxhighlight> |{{ns:119}} |- |<syntaxhighlight lang=wikitext inline>{{ns:126}}</syntaxhighlight> |{{ns:126}} |<syntaxhighlight lang=wikitext inline>{{ns:127}}</syntaxhighlight> |{{ns:127}} |- |<syntaxhighlight lang=wikitext inline>{{ns:710}}</syntaxhighlight> |{{ns:710}} |<syntaxhighlight lang=wikitext inline>{{ns:711}}</syntaxhighlight> |{{ns:711}} |- |<syntaxhighlight lang=wikitext inline>{{ns:828}}</syntaxhighlight> |{{ns:828}} |<syntaxhighlight lang=wikitext inline>{{ns:829}}</syntaxhighlight> |{{ns:829}} |- |<syntaxhighlight lang=wikitext inline>{{ns:1728}}</syntaxhighlight> |{{ns:1728}} |<syntaxhighlight lang=wikitext inline>{{ns:1729}}</syntaxhighlight> |{{ns:1729}} |} Alternative variables are available for most namespaces, for example <syntaxhighlight lang=wikitext inline>{{ns:talk}}</syntaxhighlight>, <syntaxhighlight lang=wikitext inline>{{ns:user}}</syntaxhighlight>, and <syntaxhighlight lang=wikitext inline>{{ns:user_talk}}</syntaxhighlight> for <syntaxhighlight lang=wikitext inline>{{ns:1}}</syntaxhighlight>, <syntaxhighlight lang=wikitext inline>{{ns:2}}</syntaxhighlight> and <syntaxhighlight lang=wikitext inline>{{ns:3}}</syntaxhighlight>. The portal namespace is numbered in the 100-plus range, as are all MediaWiki nonstandard namespaces. It is also possible to use {{tl|Namespace name}} for this, i.e. "<syntaxhighlight lang=wikitext inline>{{Namespace name|711}}</syntaxhighlight>" produces "{{Namespace name|711}}". All namespaces with a positive number or zero in this list are searchable. Specifically, the {{ns:-2}} and {{ns:-1}} namespaces are not searchable. The [[Help:Magic words|magic word]] <syntaxhighlight lang=wikitext inline>{{NAMESPACE}}</syntaxhighlight> returns the namespace prefix of the current page. This can be used in combination with other magic words and [[meta:Help:ParserFunctions|parser functions]] to change the appearance of [[WP:Template|templates]] depending on the namespace in which they are transcluded. Meta-templates have been created to simplify this process. These include the simple template {{tl|main other}}, and the more complex and versatile {{tl|namespace detect}}. For information on changing the appearance of a page or template by namespace based on CSS, see '''CSS''' section of [[mw:Help:Namespaces#Identifying namespaces|Identifying namespaces]] on the MediaWiki help page. == See also == {{Help desk}} * [[Wikipedia:Page name]] * [[Wikipedia:Controlling search engine indexing]] * [[mw:Help:Namespaces|MediaWiki help page on namespaces]], for general MediaWiki technical information * [[mw:Extension default namespaces]], for namespaces added by extensions * [[Special:NamespaceInfo]] - automated listing of information for configured namespaces == References == {{reflist}} {{Wikipedia technical help|collapsed}} [[Category:Wikipedia features]] [[Category:Wikipedia namespace administration| ]] p6teoq6luao5c7jfviyq13g8012eehn 117281 117280 2026-07-16T11:45:45Z Tumbuka Arch 6863 1 revision imported from [[:en:Wikipedia:Namespace]] 117280 wikitext text/x-wiki {{Short description|Prefix before a Wikipedia page's name}} {{redirect-distinguish|WP:NS|Wikipedia:WikiProject Nova Scotia}} {{redirect-distinguish|WP:NSPACE|Wikipedia:Notability (astronomical objects)}} {{pp-semi-vandalism|small=yes}}{{pp-move-indef}} {{Infopage|WP:NS|WP:NSPACE}} {{Namespaces}} A Wikipedia '''namespace''' is a set of Wikipedia pages whose [[Help:page name|names]] begin with a reserved word, followed by a colon. The reserved word is recognized by the [[MediaWiki]] software. For example, in the ''user namespace'' all titles begin with the prefix ''User:''. In the case of the article (or main) namespace, in which encyclopedia articles appear, the reserved word and colon are absent. (Note: main space articles can optionally include a colon at the beginning with no reserved word, so <code>[<nowiki/>[Article]]</code> and <code>[<nowiki/>[:Article]]</code> are equivalent. This is usually only necessary for the advanced technique of [[WP:Transclusion|transcluding]] a main space article into a page in another namespace.) More generally, a Wikipedia '''namespace''' is a class of pages that falls under a common type. All pages in the <code>User</code> namespace, for example, are [[Wikipedia:User pages|user pages]], whereas [[WP:Drafts|Drafts]] are in the <code>Draft</code> namespace. This page is in the <code>[[WP:Project namespace|Wikipedia]]</code> namespace, for information or discussions about the project itself and its policies. Wikipedia has 30 current namespaces: 14 subject namespaces, 14 corresponding talk namespaces, and 2 virtual namespaces. These are all listed in the box to the right. While surfing Wikipedia, a list of namespaces is available in two clicks: do an empty search, then click ''Advanced'' under the search box. The list also makes itself available where needed in the dropdown menus of, for example, [[Special:PrefixIndex]], [[Special:AllPages]], [[Special:RecentChanges]], and [[Special:Contributions]]. The aliases '''WP''' for '''Wikipedia''', and '''WT''' for '''Wikipedia&nbsp;talk''', work for page names in the search box, and making links as well as inclusions. See [[#Aliases|Aliases]] below for other aliases. (The pseudo-namespaces such as '''H''' for '''Help''', and '''CAT''' for '''Category''', are extremely limited. See ''[[#Pseudo-namespaces|Pseudo-namespaces]]'' below.) The table on the right shows what number to use when you want to hide pages that are on your watchlist. See: [[Wikipedia:Hide Pages in Watchlist]] for details. == Subject namespaces == {{see|Wikipedia:Administration#Data structure and development}} [[File:Policies and guidelines indicator.png|thumb|350px|This page is in the [[Wikipedia:Project namespace|Wikipedia namespace]].]] Namespaces allow for the organization and separation of [[Wikipedia:Administration#Content namespaces|content pages]] from [[Wikipedia:Administration#Administrative namespaces|administration pages]]. Namespaces separate data into core sets, those intended for public viewing, and those intended for the editing community. Wikipedia's subject namespaces and their functions are listed below. A brief description is provided, but see the link for more information. {{anchor|subjectpage}}A namespace is sometimes called a ''space'', for short, as in "Project space". A ''subject page'' and its ''talk page'' form a pair. <!-- in order of {{NAMESPACENUMBER}} --> ===Current namespaces=== * '''[[Wikipedia:Main namespace|Main namespace]]''' (no prefix): contains all encyclopedia articles, lists, [[Wikipedia:Disambiguation|disambiguation pages]], and encyclopedia [[Wikipedia:Redirect|redirects]]. Sometimes referred to as "mainspace" or "Article". * '''[[Wikipedia:User namespace|User namespace]]''' (prefix '''User:'''): contains user pages and other pages created by individual users for their own personal use. Pages under this namespace can still be viewed and modified by others, so do not keep any of your sensitive data here. * '''[[Wikipedia:Wikipedia namespace|Wikipedia namespace]]''' or '''[[Wikipedia:Project namespace|Project namespace]]''' (prefix '''Wikipedia:'''): contains many types of pages connected with the Wikipedia project itself: information, policies, guidelines, essays, processes, discussion, etc. [[Wikipedia:Namespace#Aliases|Namespace aliases]]: '''WP:''' or '''Project:''' *{{anchor|File|File namespace}}'''[[Wikipedia:File namespace|File namespace]]''' (prefix '''File:'''): contains [[Help:File description page|description pages for media files]] (images, videos, and audio files). A link starting with <code><nowiki>[[File:</nowiki></code> will display the media at that position on the page instead of showing a wikilink that leads to the specified file description page, so if you want the latter effect, use a link beginning with <code><nowiki>[[:File:</nowiki></code> (the [[Help:Colon trick|colon trick]]). Namespace alias: '''Image:''' * '''[[Help:MediaWiki namespace|MediaWiki namespace]]''' (prefix '''MediaWiki:'''): a namespace containing interface texts, such as the links and messages that appear on automatically generated pages. Pages in this namespace are permanently [[Wikipedia:Protection policy|protected]] against editing by regular users. For a list of these messages, see [[Special:AllMessages]]. (The prefix ''cannot'' be shortened to "MW" because '''mw''' is an interwiki prefix. See ''[[#Interwiki links|Interwiki links]]'' below.) * '''[[Wikipedia:Template namespace|Template namespace]]''' (prefix '''Template:'''): contains templates&nbsp;– pages that are intended primarily to be [[Wikipedia:Transclusion|transcluded]] or [[Wikipedia:Substitution|substituted]] onto other pages to insert standard text or boxes such as infoboxes and navigation boxes. [[Wikipedia:Namespace#Aliases|Namespace alias]]: '''TM:''' * '''[[WP:Help namespace|Help namespace]]''' (prefix '''Help:'''): contains pages which provide help in using Wikipedia and its software, both for users of the encyclopedia and for editors. * '''[[Wikipedia:Category namespace|Category namespace]]''' (prefix '''Category:'''): contains category pages, which are curated lists of related pages and subcategories, along with optional additional text. A link beginning with <code><nowiki>[[Category:</nowiki></code> has the effect of adding the page the link appears on to the specified category; it will not result in a wikilink to the category page itself. If you want the latter, use the [[Help:Colon trick|colon trick]]: <code><nowiki>[[:Category:</nowiki></code>. * '''[[Wikipedia:Portal namespace|Portal namespace]]''' (prefix '''Portal:'''): for reader-oriented portals that help readers find articles related to a specific topic, and may contain links to encourage contributions to relevant [[Wikipedia:WikiProject|WikiProjects]]. See, for example, [[Portal:Cricket]] and [[Portal:Spaceflight]]. * '''[[Wikipedia:Draft namespace|Draft namespace]]''' (prefix '''Draft:'''): hosts drafts of new (potential) Wikipedia articles. * '''[[mw:Extension:TimedMediaHandler|TimedText namespace]]''' (prefix '''TimedText:'''): synchronized subtitles for media files. * '''[[Wikipedia:Module namespace|Module namespace]]''' (prefix '''Module:'''): contains [[mw:Extension:Scribunto|Scribunto]] modules&nbsp;– Lua scripts implementing special-purpose [[mw:Manual:Parser functions|parser functions]] for use in templates, beyond the [[Help:Magic words#Parser functions|basic set]] included with MediaWiki and its [[mw:Extensions FAQ|extensions]]. * {{anchor|MOS}}'''[[WP:Manual of Style|MOS namespace]]''' (prefix '''MOS:'''): contains redirects to subpages of [[WP:Manual of Style]]. Until 2024 this was a pseudo-namespace, but it was turned into a real namespace in 2024 to avoid conflicts with the [[Mooré]] Wikipedia (with the language code <code>mos:</code>).<ref>[[phab:T363538]]</ref> * '''[[Event:Sandbox|Event namespace]]''' (prefix '''Event:''') contains [[mw:Extension:CampaignEvents]] events. ===Former namespaces=== The following namespaces previously existed but no longer do: *'''[[Wikipedia:Flow|Flow namespace]]''' (prefix '''Topic:''') was a proposed talk page replacement, formerly installed on English Wikipedia by [[mw:Extension:StructuredDiscussions|Extension:StructuredDiscussions]]. It is no longer installed after being rejected by the community. * '''[[Wikipedia:Course pages|Education Program namespace]]''' (prefix '''Education Program:'''): uninstalled in 2018, and replaced with the [[wmfdashboard:|Programs & Events Dashboard]].<ref>[[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]], Wikimedia outreach</ref><ref>{{Section link|Wikipedia:Education noticeboard/Archive 18#NOTICE:_EducationProgram extension is being deprecated}}</ref> However, the namespace was re-added later that year to allow access to old talk pages in the Education program talk: namespace. The namespace was then uninstalled again in 2021 after the remaining talk pages were moved to subpages of [[Wikipedia talk:Education program archive]]. * '''[[Wikipedia:Books|Book namespace]]''' (prefix '''Book:'''): contained entries for Wikipedia books, collections of articles about one theme, which were used to generate downloadable files or printable documents or order books from PediaPress. In 2017, the online book rendering service was withdrawn, leading to the removal of most links leading to the namespace in 2019. The namespace and its transclusions were still retained in the hope that the WMF would come up with a solution,<ref>{{Section link|Wikipedia:Village pump (technical)/Archive 176|Suppress rendering of Template:Wikipedia books}}</ref> but in 2021 the namespace was uninstalled after all remaining books were moved to subpages of [[Wikipedia:Books/archive]]. * '''Gadget namespace''' (prefix '''Gadget:'''):<ref>{{Section link|Wikipedia:Village pump (technical)/Archive 139#New "Gadget:" and "Gadget definition:" namespaces?}}</ref> was intended to store [[Wikipedia:Gadget|Gadgets]], which are small [[Snippet (programming)|snippets]] enabled in [[Special:Preferences#mw-prefsection-gadgets|user preferences]], but was never used for anything other than redirects to the video game ''[[Gadget: Invention, Travel, & Adventure]]'', and for most of its existence could only be edited by WMF staff. Gadgets currently use the [[Help:MediaWiki namespace|MediaWiki namespace]] with the ''MediaWiki:Gadget-'' page name prefix. It was a [[mw:Manual:Using custom namespaces|custom namespace]] installed by the [[mw:Extension:Gadgets|Gadget extension]]. * '''Gadget definition namespace''' (prefix '''Gadget definition:'''): installed but never used; see above for more information. Gadget definitions currently use the [[MediaWiki:Gadgets-definition]] page. ===Aliases and pseudo-namespaces=== {{redirect|Wikipedia:Alias|template parameter aliases|Help:Template#Handling parameters}} An ''alias'' of a namespace is its namespace. For example, '''WP:''' is '''Wikipedia:''', and so <code><nowiki>[[</nowiki>Wikipedia:[[WP:Page name|''Page name'']]]]</code> can be abbreviated <code><nowiki>[[WP:</nowiki>[[WP:Page name|''Page name'']]]]</code>. See ''[[#Aliases|Aliases]]'' below, for a list of aliases, such as '''WT:''' for '''Wikipedia talk:'''. A ''pseudo-namespace'' is an agreement to create redirect pages named that way, each of which is a shortcut from mainspace to ''a single page in its namespace''. So an alias refers to ''any page in its namespace'', but a pseudo-namespace has far fewer pages than its real namespace. There are a few pseudo-namespace names like '''H:''' for '''Help:''', and '''CAT:''' for '''Category:''', and these can be discovered below in the section ''[[#Pseudo-namespaces|Pseudo-namespaces]]''. == <span id="Talk"></span><span id="Wikipedia talk"></span><span id="WT"></span> Talk namespaces== {{shortcut|WP:TALKSPACE}} {{main|Help:Using talk pages|Wikipedia:Talk page guidelines}} Each of the above namespaces (but not the virtual namespaces and the former Topic: namespace) has an associated [[help:talk page|talk namespace]]—these are also known as ''discussion pages''. The talk namespaces are designated by appending the word <code>talk</code> to the namespace name. For example, the talk namespace associated with the user namespace has the prefix '''User talk:'''. The talk namespace associated with the article namespace is '''Talk:'''. Most of the pages in the talk namespaces are used to discuss changes to the corresponding page in the associated namespace. Pages in the ''user talk'' namespace are used to leave messages for a particular user. The user talk namespace is special in that, whenever a user's talk page is edited, that user will see an orange box saying "You have new messages" on the top of every page that they view until they visit their talk page. By default, logged-in users will see [[Wikipedia:Notifications|a red notification square]] ''and'' a small orange box on the top right hand corner of the page; IP users will only see a wide orange box spanning the top of the page. (Minor edits made by [[Wikipedia:Bot policy|bots]] no longer set off the new message bar. For logged-in users, the new-message bar may be disabled in [[Special:Preferences]].) Note that the prefix '''WT:''' expands to '''Wikipedia talk:''', just as '''WP:''' expands to '''Wikipedia:''' (see [[#Aliases|Aliases]] below). For example, <nowiki>[[WT:Verifiability]]</nowiki> links to [[Wikipedia talk:Verifiability]]. == Virtual namespaces<span id="Special"></span> == In addition to subject namespaces, and their corresponding talk pages, there are two virtual namespaces (without corresponding talk pages) for specialist purposes: === Special === {{main|Help:Special page}} The ''Special:'' namespace consists of pages (called ''special pages'') that are created by the software on demand, such as [[Special:RecentChanges]]. These pages can be linked as usual, as with <nowiki>[[Special:RecentChanges]]</nowiki>, except when they have parameters. To use parameters, the full URL must be given as an external link. For example, https:{{SERVER}}{{SCRIPTPATH}}/index.php?title=Special:Recentchanges&days=3&limit=10, which returns the last ten changes in the last three days. You can create a [[Wikipedia:redirect|redirect]] to a Special page, but the redirect will not be followed automatically. For a list of special pages, see [[Special:SpecialPages]]. {{anchor|Media|Media namespace}} === Media === {{Main|Help:Files}} The ''Media:'' namespace can be used to link directly to a file, rather than to the file description page. == Aliases and pseudo-namespaces== {{See|Wikipedia:Shortcut#List of prefixes}} Aliases and pseudo-namespaces are not namespaces in themselves; their main role is to provide handy ways to link to actual namespaces, by providing shortened links. The main difference between them being the way they work for this purpose; while aliases directly link to namespaces, pseudo-namespaces can only link to other namespaces by using specialist [[Wikipedia:Redirect|redirect pages]] in the main namespace called [[Wikipedia:Shortcut|shortcuts]]. While aliases are also used for shortcuts, this isn't necessary if the pagename is not shortened. Pseudo-namespaces all actually reside in main namespace; but a pseudo-namespace called [[m:Help:Transwiki|Transwiki:]] exists as a pseudo-namespace before being moved to another namespace. === Aliases === {{Shortcut|WP:ALIAS}} There are seven aliases defined for namespaces, all of which are case-insensitive: {| class=wikitable !Namespace !Alias |- | rowspan="2" |Wikipedia |WP |- |Project |- | rowspan="2" |Wikipedia talk |WT |- |Project talk |- |File |Image |- |File talk |Image talk |- |Template |TM |} These aliases are automatically translated by the Wikipedia servers to the proper namespace prefix. So if a link is made to a page title beginning with one of these aliases, or else entered in the search box or used in a URL in a browser address bar, the alias links to the page with the corresponding true namespace prefix. Hence entering [[WP:External links]] or [[Project:External links]] is equivalent to entering [[Wikipedia:External links]]; and entering [[WT:External links]] or [[Project talk:External links]] is equivalent to entering [[Wikipedia talk:External links]]. An alias cannot be used as the actual namespace in a page title. For example, you cannot create page ''WP:123''; if tried, the page name is instantly converted to ''Wikipedia:123''. It ''is'', however, possible to [[Wikipedia:Page name#Changing the displayed title|change the ''displayed'' title]] on page ''Wikipedia:123'' to make it ''WP:123'' or ''Project:123''. <span class="plainlinks">This is very handy for the creation of [[Wikipedia:Shortcut|shortcuts]]. For example, the shortcut for this section is [[WP:ALIAS]], as shown in the right-side box. When the link is clicked, it is automatically translated to [https://en.wikipedia.org/w/index.php?title=Wikipedia:ALIAS&redirect=no Wikipedia:ALIAS]. At this page is a [[Help:Redirect|redirect]] to {{Section link|Wikipedia:Namespace#Aliases}}. This means that the shortcut goes directly to this section from anywhere on Wikipedia. It can also be entered as a [[URL]] in the browser address bar as https://en.wikipedia.org/wiki/WP:ALIAS .</span> === Pseudo-namespaces === <!-- This section is linked from [[Wikipedia:Glossary]] --> {{Shortcut|WP:PNS}} Apart from Wikipedia's 24 regular namespaces and their aliases, and 2 virtual ones, there are several title prefixes appearing in [[Help:Shortcut|shortcut redirects]] pointing to frequently-referred-to Wikipedia pages. These prefixes are referred to as '''pseudo-namespaces''' and include the following: * '''[[Special:Prefixindex/CAT:|CAT:]]''' for shortcuts to the [[Wikipedia:Category namespace|Category namespace]]. See also [[:Category:Redirects to category space]] * '''[[Special:Prefixindex/H:|H:]]''' for shortcuts to the [[Wikipedia:Help namespace|Help namespace]]. See also [[:Category:Redirects to help namespace]] * '''[[Special:Prefixindex/P:|P:]]''' for shortcuts to the [[Wikipedia:Portal namespace|Portal namespace]]. See also [[:Category:Redirects to portal namespace]] A more complete list is available at {{Section link|Wikipedia:Shortcut#List of prefixes}}. Pseudo-namespaces are not in any way recognised by the wiki software; they are purely a community custom. Titles in pseudo-namespaces actually belong technically in the main (article) namespace and are treated as such by the software: they are case-sensitive and appear in [[Help:Search#Syntax|search results]] restricted to the main namespace. An alias is treated like a real namespace, resulting in a search for the [[WP:page name|pagename]] in its namespace, but the "pseudo-namespace:pagename" search is in mainspace, not its pseudo-namespace. For example, searching for "H:S" will not search '''Help'''. To learn some of these shortcuts, first follow the pseudo-namespace link above, then follow one of the redirects listed on that page. It will take you to the target, where you then notice any {{tl|shortcut}} boxes to the right of the page, which may also list some additional shortcuts to that same area. By observing these steps repeatedly, you can discover ways to shorten your typing. You will use pseudo-namespace names more often if you are an advanced editor, highly active in many namespaces, or constantly linking to pages that have a pseudo-namespace shortcut. To understand the appropriateness of redirects of this type, see [[Wikipedia:Cross-namespace redirects]]. All shortcuts are discoverable by [[Help:Searching|searching]] for redirects. There is also the category [[:Category:Wikipedia redirects|Wikipedia redirects]]. As a final example, every [[Wikimedia Foundation]] project has a "[[m:Help:Transwiki|Transwiki:]]" pseudo-namespace (sometimes a real namespace) for importing articles manually. A wiki project that would manually move many pages between [[wp:sister|sister projects]] uses this tag. Redirects/shortcuts are not directly involved here, as described above. Instead, the page title is [[WP:move|move]]d to "Transwiki:''namespace:pagename''", and that content is then copied and pasted into a new page name of that temporary title on the target wiki. When it is accepted, the title is then moved out of the '''Transwiki''' pseudo-namespace there and becomes a real page name in its respective namespace. ==<span id="Interwiki links"></span>Interwiki and interlanguage links == {{see|Help:Interwiki linking|Help:Interlanguage links}} [[m:Table of Wikimedia projects|Interwiki]] and [[m:List of Wikipedias|interlanguage]] prefixes do not define namespaces, but point to pages in other Wikimedia projects, outside the en.wikipedia.org website. They are mentioned here because they use a namespace-like prefix technique for linking. Examples of interwiki prefixes include '''w:''' for Wikipedia; '''m:''' (or '''meta:''') for [[Meta-Wiki]], '''mw:''' for [[MediaWiki]], and '''wikt:''' for [[Wiktionary]]. Examples of interlanguage prefixes include '''en:''' for English language, '''fr:''' for French language, and '''de:''' for German language. Important points to note: * In the presence of an interwiki prefix and the absence of an interlanguage prefix, the link will be to a specified project in the current language. So <code><nowiki>[[w:Internet]]</nowiki></code> links to "[[w:Internet|Internet]]" on the English Wikipedia, if the link is on any English-language Wikimedia project. * In the presence of an interlanguage prefix and the absence of an interwiki prefix, the link will be to a specified language in the current project. So <code><nowiki>[[:en:Internet]]</nowiki></code> will link to "[[:en:Internet|Internet]]" on the English Wikipedia, if the link is on a Wikipedia project in any language. When making links to other language Wikipedias, add an initial colon if you want the link to appear inline rather than in the skin's sidebar under "Languages"; see [[Help:Colon trick]] for an explanation. So <code><nowiki>[[:de:Internet]]</nowiki></code> is an inline link to "[[:de:Internet|Internet]]" in the German Wikipedia; but if using an interwiki prefix this is unnecessary, for example <code><nowiki>[[w:de:Internet]]</nowiki></code> is the same inline link. Further examples: * [[m:Meta:Babel]] and [[meta:Meta:Babel]] both link to the "Babel" page in the project namespace (Meta:, the 2nd prefix) of Meta-Wiki (m: or meta:, the 1st prefix). * [[wikt:fr:Discuter:pied/fusion daf]] links to the "pied/fusion daf" page in the talk namespace (Discuter:, the 3rd prefix) of French (fr:, the 2nd prefix) Wiktionary (wikt:, the 1st prefix). Interwiki prefixes are not just for Wikimedia projects. For example, [[google:]] is the interwiki link for [[Google]]. For a complete list of interwiki prefixes, see the [[m:Interwiki map|interwiki map]] and [[m:Special:Interwiki|interwiki table]]. As with aliases, it is not possible to create a page with a title beginning with an interwiki or interlanguage prefix. It is also not possible to create redirects to interwiki pages, unless it is a [[Wikipedia:Soft redirect|soft redirect]]. == Case insensitivity == Standard namespace names, aliases and interwiki prefixes are case insensitive. The same applies to the first character after the colon. Hence the following all link to the same page: * [[Wikipedia:Afd]], [[WIKIPEDIA:Afd]], [[wIKIpedia:Afd]], [[wikipedia:afd]] * [[wP:Afd]], [[wp:Afd]], [[WP:afd]] * [[PROJECT:Afd]], [[project:Afd]], [[ProjecT:Afd]], [[Project:afd]] == Namespace-dependent functionality == The namespace name is a useful variable for searching in and reporting on sets of [[WP:Page name|pages]]. It is also used to apply features that configure the sets of pages in one namespace differently from another namespace. Using the namespace name MediaWiki can: *[[WP:Search|Search]] for pages in a particular namespace only. * [[Help:Special page|Report]] on [[Special:AllPages|content]] or [[WP:Recent changes|changes in content]] of a namespace. * Enable or disable the [[WP:Subpage|subpage]] feature, per namespace. * Offer a [[WP:Random article|random article]] for the mainspace (<kbd><nowiki>[[</nowiki>Special:Random<nowiki>]]</nowiki></kbd>), or for a namespace <kbd><nowiki>[[</nowiki>Special:Random/''Namespace'']]</kbd>. * Change the functionality of <kbd><nowiki>[[</nowiki>''wikilink''<nowiki>]]</nowiki></kbd> if it targets the '''Category''' namespace or '''File''' namespace. Normally wikilinks are activated by the mouse, but <kbd><nowiki>[[</nowiki>Category:''Pagename''<nowiki>]]</nowiki></kbd> activates software functionality when the [[WP:Category|page is saved]], and <kbd><nowiki>[[</nowiki>File:''Page name''<nowiki>]]</nowiki></kbd> activates software functionality when the [[WP:Image|page is rendered]]. * Change the functionality of <kbd><nowiki>{{</nowiki>[[WP:Transclusion|pagename]]<nowiki>}}</nowiki></kbd> so that it defaults to the set of pagenames in '''Template'''. * Tailor ''[[Wikipedia:Edit notices|edit notices]]'' to a particular namespace's edit page, informing an editor of certain aspects about the content of that namespace. * Allow ''[[Wikipedia:Templates|templates]]'' to behave differently on pages of different namespaces. The namespace functionality is often visible in the URL, where you will see a namespace number. These are given in the table below. Subpages are configured for all namespaces except Main, File, MediaWiki and Category namespaces. Subpages are configured in the software by enabling or disabling the subpage feature per namespace. This further extends the function of a namespace by extending the types of pages or topics of pages a namespace can home. For example, talk page ''/archives'' are subpages, and they are both namespace searchable and page name searchable from the search box, unlike [[WP:page history|history pages]], which are in no namespace. Another example is in the Template namespace where it is routine to put the documentation in a subpage called ''/doc''. Random pages are enabled, in the default software configuration, only for the mainspace. Searching and reporting can operate over the entire database, or they can be limited to a namespace, and so they will offer a list of all the namespaces currently configured. [[Special:WhatLinksHere]] also offers a list of namespaces. == <span class="anchor" id="Enumeration"></span> Programming == The 30 namespaces in the English Wikipedia are numbered for programming purposes. The prefix for each namespace is generated using the [[Help:Magic words#Paths|magic word]] <syntaxhighlight lang=wikitext inline>{{ns}}</syntaxhighlight>, in the form <syntaxhighlight lang=wikitext inline>{{ns:xx}}</syntaxhighlight>, as shown in the table below. {| border="0" cellpadding="4" cellspacing="0" class="wikitable" |- !Namespace variable !Result (namespace name) !Namespace variable !Result (talk namespace name) |- |<syntaxhighlight lang=wikitext inline>{{ns:-2}}</syntaxhighlight> |{{ns:-2}} | | |- |<syntaxhighlight lang=wikitext inline>{{ns:-1}}</syntaxhighlight> |{{ns:-1}} | | |- |<syntaxhighlight lang=wikitext inline>{{ns:0}}</syntaxhighlight> |{{ns:0}} (main namespace, returns empty string) |<syntaxhighlight lang=wikitext inline>{{ns:1}}</syntaxhighlight> |{{ns:1}} |- |<syntaxhighlight lang=wikitext inline>{{ns:2}}</syntaxhighlight> |{{ns:2}} |<syntaxhighlight lang=wikitext inline>{{ns:3}}</syntaxhighlight> |{{ns:3}} |- |<syntaxhighlight lang=wikitext inline>{{ns:4}}</syntaxhighlight> |{{ns:4}} |<syntaxhighlight lang=wikitext inline>{{ns:5}}</syntaxhighlight> |{{ns:5}} |- |<syntaxhighlight lang=wikitext inline>{{ns:6}}</syntaxhighlight> |{{ns:6}} |<syntaxhighlight lang=wikitext inline>{{ns:7}}</syntaxhighlight> |{{ns:7}} |- |<syntaxhighlight lang=wikitext inline>{{ns:8}}</syntaxhighlight> |{{ns:8}} |<syntaxhighlight lang=wikitext inline>{{ns:9}}</syntaxhighlight> |{{ns:9}} |- |<syntaxhighlight lang=wikitext inline>{{ns:10}}</syntaxhighlight> |{{ns:10}} |<syntaxhighlight lang=wikitext inline>{{ns:11}}</syntaxhighlight> |{{ns:11}} |- |<syntaxhighlight lang=wikitext inline>{{ns:12}}</syntaxhighlight> |{{ns:12}} |<syntaxhighlight lang=wikitext inline>{{ns:13}}</syntaxhighlight> |{{ns:13}} |- |<syntaxhighlight lang=wikitext inline>{{ns:14}}</syntaxhighlight> |{{ns:14}} |<syntaxhighlight lang=wikitext inline>{{ns:15}}</syntaxhighlight> |{{ns:15}} |- |<syntaxhighlight lang=wikitext inline>{{ns:100}}</syntaxhighlight> |{{ns:100}} |<syntaxhighlight lang=wikitext inline>{{ns:101}}</syntaxhighlight> |{{ns:101}} |- |<syntaxhighlight lang=wikitext inline>{{ns:118}}</syntaxhighlight> |{{ns:118}} |<syntaxhighlight lang=wikitext inline>{{ns:119}}</syntaxhighlight> |{{ns:119}} |- |<syntaxhighlight lang=wikitext inline>{{ns:126}}</syntaxhighlight> |{{ns:126}} |<syntaxhighlight lang=wikitext inline>{{ns:127}}</syntaxhighlight> |{{ns:127}} |- |<syntaxhighlight lang=wikitext inline>{{ns:710}}</syntaxhighlight> |{{ns:710}} |<syntaxhighlight lang=wikitext inline>{{ns:711}}</syntaxhighlight> |{{ns:711}} |- |<syntaxhighlight lang=wikitext inline>{{ns:828}}</syntaxhighlight> |{{ns:828}} |<syntaxhighlight lang=wikitext inline>{{ns:829}}</syntaxhighlight> |{{ns:829}} |- |<syntaxhighlight lang=wikitext inline>{{ns:1728}}</syntaxhighlight> |{{ns:1728}} |<syntaxhighlight lang=wikitext inline>{{ns:1729}}</syntaxhighlight> |{{ns:1729}} |} Alternative variables are available for most namespaces, for example <syntaxhighlight lang=wikitext inline>{{ns:talk}}</syntaxhighlight>, <syntaxhighlight lang=wikitext inline>{{ns:user}}</syntaxhighlight>, and <syntaxhighlight lang=wikitext inline>{{ns:user_talk}}</syntaxhighlight> for <syntaxhighlight lang=wikitext inline>{{ns:1}}</syntaxhighlight>, <syntaxhighlight lang=wikitext inline>{{ns:2}}</syntaxhighlight> and <syntaxhighlight lang=wikitext inline>{{ns:3}}</syntaxhighlight>. The portal namespace is numbered in the 100-plus range, as are all MediaWiki nonstandard namespaces. It is also possible to use {{tl|Namespace name}} for this, i.e. "<syntaxhighlight lang=wikitext inline>{{Namespace name|711}}</syntaxhighlight>" produces "{{Namespace name|711}}". All namespaces with a positive number or zero in this list are searchable. Specifically, the {{ns:-2}} and {{ns:-1}} namespaces are not searchable. The [[Help:Magic words|magic word]] <syntaxhighlight lang=wikitext inline>{{NAMESPACE}}</syntaxhighlight> returns the namespace prefix of the current page. This can be used in combination with other magic words and [[meta:Help:ParserFunctions|parser functions]] to change the appearance of [[WP:Template|templates]] depending on the namespace in which they are transcluded. Meta-templates have been created to simplify this process. These include the simple template {{tl|main other}}, and the more complex and versatile {{tl|namespace detect}}. For information on changing the appearance of a page or template by namespace based on CSS, see '''CSS''' section of [[mw:Help:Namespaces#Identifying namespaces|Identifying namespaces]] on the MediaWiki help page. == See also == {{Help desk}} * [[Wikipedia:Page name]] * [[Wikipedia:Controlling search engine indexing]] * [[mw:Help:Namespaces|MediaWiki help page on namespaces]], for general MediaWiki technical information * [[mw:Extension default namespaces]], for namespaces added by extensions * [[Special:NamespaceInfo]] - automated listing of information for configured namespaces == References == {{reflist}} {{Wikipedia technical help|collapsed}} [[Category:Wikipedia features]] [[Category:Wikipedia namespace administration| ]] p6teoq6luao5c7jfviyq13g8012eehn Wikipedia talk:Namespace 5 47870 117282 2026-07-11T23:57:38Z en>Andrybak 0 Reverted 1 edit by [[Special:Contributions/~2026-39313-84|~2026-39313-84]] ([[User talk:~2026-39313-84|talk]]) to last revision by OzmoOzmo 117282 wikitext text/x-wiki {{WikiProject banner shell| {{Wikipedia Help Project|class=NA|importance=high}} }} {{old moves|list= *Wikipedia:Namespace → Help:Namespace, 13 January 2013, [[Wikipedia talk:Namespace#Requested move]] }} {{merged-from |Help:Namespace |12 June 2009}} {{Archives}} == FAQ Namespace == Where would one petition to have a FAQ namespace added? There are many articles where discussions are endlessly repeated, and calls for merges, deletions, or era changes, etc are repeated by newcomers. A few of the Talk pages I've seen recently have mentioned the desire to have a FAQ page where results of major-change discussions, or results of discussions of questions frequently asked can be placed for easy reference without having to rehash a long discussion all over again on the Talk page. Is there a place at WP where a request for a new namespace could be placed? Many thanks. — [[User:Imeriki al-Shimoni|<span style="color:#60d;font-weight:bold;text-shadow:3px 3px 2px #aaa;">al-Shimoni</span>]] ([[User talk:Imeriki al-Shimoni|talk]]) 07:51, 16 December 2011 (UTC) == Request for comment: Page move nomination == Due to the fact that this page is a how to guide, It should be moved to Help:Namespaces with a redirect. -- [[User:PythonSwarm|PythonSwarm]] <sup>[[User talk:PythonSwarm|Talk]] &#124; [[Special:Contribs/PythonSwarm|Contribs]] &#124; [[Special:CentralAuth/PythonSwarm|Global]]</sup> 01:10, 24 August 2020 (UTC) :{{u|PythonSwarm}}, this is '''almost''' a [[WP:RM|requested move]] discussion. [[User:I dream of horses|I dream of horses]] [[Special:Contribs/I dream of horses|(Contribs)]] Please [[WP:NOTIFY|notify]] me after replying off my [[User talk:I dream of horses|talk page.]] Thank you. 02:34, 24 August 2020 (UTC) === Discussion === *'''Opposed''' really only seeing infomation here rather then how to do something.--<span style="font-weight:bold;color:darkblue">[[User_talk:Moxy|Moxy]]</span> <span style="color:red">🍁</span> 03:04, 24 August 2020 (UTC) *'''Oppose''' <small>(Called forth by bot)</small> This is not a help page, it does fine in the Wikipedia namespace. We try to keep only the most relevant things in the help namespace so that our experienced hands can easily find things by searching something like "WP:NAMESPACE". I wouldn't think to search "Help:Namespace", because help pages are not really built for our experienced hands, and I don't think this page is meant as a starter guide. [[User:CaptainEek|<span style="color:#6a1f7f">'''CaptainEek'''</span>]] <sup>[[User talk:CaptainEek|<span style="font-size:82%"><span style="color:#a479e5">''Edits Ho Cap'n!''</span></span>]]</sup>[[Special:Contributions/CaptainEek|⚓]] 04:18, 24 August 2020 (UTC) *'''opposed''' This page is more than a help page. It fits this namespace well. [[User:Philoserf|—¿philoserf?]] ([[User talk:Philoserf|talk]]) 22:48, 24 August 2020 (UTC) *'''Keep'''. This page is more about the guidelines we have established for the use of namespaces on Wikipedia, than about how namespaces work within our software. --[[User:Bsherr|Bsherr]] ([[User talk:Bsherr|talk]]) 04:02, 25 August 2020 (UTC) *'''Support''', this is almost entirely a help page, and I believe these should ideally placed in the Help namespace. Almost all of it is about the technical aspects of namespaces, and there is very little policy discussion or commentary. --[[User:Mrjulesd|<span style="color:orange;">--Jules</span>]]&nbsp;[[User talk:Mrjulesd|(Mrjulesd)]] 20:59, 25 August 2020 (UTC) == RIP Gadget talk: Invention, Travel, & Adventure == GOOD NIGHT SWEET PRINCE YOU WILL BE MISSED /-_-\ / / \ / / \ \ \ / \__\__/ \\ -\\ ____ \\ / / ____ \\/___/ \ \ -// \___\//- -// \\ // //- -// // \\ \\ <b style="font-family: monospace; color:#E35BD8">[[User:JPxG|<b style="color:#029D74">jp</b>]]×[[Special:Contributions/JPxG|<b style="color: #029D74">g</b>]][[User talk:JPxG|🗯️]]</b> 07:42, 3 March 2024 (UTC) == Semi-protected edit request on 21 August 2024 == {{edit semi-protected|Wikipedia:Namespace|answered=yes}} Please change the Wikimedia Outreach reference: from <code><nowiki>[https://outreach.m.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown Education_Extension_scheduled_shutdown, Wikimedia outreach]</nowiki></code> to <code><nowiki>[https://outreach.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown "Education Extension scheduled shutdown"], Wikimedia Outreach</nowiki></code>; this removes the [[:Help:Mobile access|mobile site prefix]] that isn't optimised for desktop usage (and if browsing on a mobile, it should be automatically changed anyway), and it also doesn't display underscores in the link. [[Special:Contributions/83.28.217.24|83.28.217.24]] ([[User talk:83.28.217.24|talk]]) 09:22, 21 August 2024 (UTC) :It would be better to use <code><nowiki>[[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]]</nowiki></code> which yields [[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]]. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 16:49, 21 August 2024 (UTC) :: Agreed, {{done}}<!-- Template:ESp --> [[User:Tollens|Tollens]] ([[User talk:Tollens|talk]]) 19:32, 21 August 2024 (UTC) == Alias "cat:" == Commons already supports it, e.g., [[:c:cat:SVG numbers]] redirects to [[:c:Category:SVG numbers]] -- why not on English Wikipedia, too? [[Wikipedia_talk:Namespace/Archive_1#Integrate_pseudo-namespace_into_alias-namespace|Previous discussion]] alluded to "pollution" and the use of colon character in article titles. But the actual problem would be articles starting with "cat:", which currently are only some "pseudo-namespaces" (cross-space redirects) [https://en.wikipedia.org/wiki/Special:PrefixIndex/CAT:] . [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 02:45, 23 February 2025 (UTC) ==Discussion at [[:Wikipedia:Village pump (technical)#Adding a SecurePoll namespace|Wikipedia:Village pump (technical) §&nbsp;Adding a SecurePoll namespace]]== [[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]]&nbsp;You are invited to join the discussion at [[:Wikipedia:Village pump (technical)#Adding a SecurePoll namespace|Wikipedia:Village pump (technical) §&nbsp;Adding a SecurePoll namespace]]. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 08:06, 19 June 2025 (UTC)<!-- [[Template:Please see]] --> == Feedback requested regarding WP and Help namespaces == Your feedback would be appreciated at the following discussion: [[WP:Village pump (idea lab)#Same titled page in both WP and Help namespaces]]. Thanks, [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 09:20, 14 December 2025 (UTC) : It should be further noted that subpage [[Wikipedia:Namespace/Help vs. Wikipedia]] is featured in that discussion, and was created for it. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 10:26, 16 December 2025 (UTC) e2qkxdlgdb0fv5gimfzwdhiv3re4o5o 117283 117282 2026-07-16T11:45:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Wikipedia_talk:Namespace]] 117282 wikitext text/x-wiki {{WikiProject banner shell| {{Wikipedia Help Project|class=NA|importance=high}} }} {{old moves|list= *Wikipedia:Namespace → Help:Namespace, 13 January 2013, [[Wikipedia talk:Namespace#Requested move]] }} {{merged-from |Help:Namespace |12 June 2009}} {{Archives}} == FAQ Namespace == Where would one petition to have a FAQ namespace added? There are many articles where discussions are endlessly repeated, and calls for merges, deletions, or era changes, etc are repeated by newcomers. A few of the Talk pages I've seen recently have mentioned the desire to have a FAQ page where results of major-change discussions, or results of discussions of questions frequently asked can be placed for easy reference without having to rehash a long discussion all over again on the Talk page. Is there a place at WP where a request for a new namespace could be placed? Many thanks. — [[User:Imeriki al-Shimoni|<span style="color:#60d;font-weight:bold;text-shadow:3px 3px 2px #aaa;">al-Shimoni</span>]] ([[User talk:Imeriki al-Shimoni|talk]]) 07:51, 16 December 2011 (UTC) == Request for comment: Page move nomination == Due to the fact that this page is a how to guide, It should be moved to Help:Namespaces with a redirect. -- [[User:PythonSwarm|PythonSwarm]] <sup>[[User talk:PythonSwarm|Talk]] &#124; [[Special:Contribs/PythonSwarm|Contribs]] &#124; [[Special:CentralAuth/PythonSwarm|Global]]</sup> 01:10, 24 August 2020 (UTC) :{{u|PythonSwarm}}, this is '''almost''' a [[WP:RM|requested move]] discussion. [[User:I dream of horses|I dream of horses]] [[Special:Contribs/I dream of horses|(Contribs)]] Please [[WP:NOTIFY|notify]] me after replying off my [[User talk:I dream of horses|talk page.]] Thank you. 02:34, 24 August 2020 (UTC) === Discussion === *'''Opposed''' really only seeing infomation here rather then how to do something.--<span style="font-weight:bold;color:darkblue">[[User_talk:Moxy|Moxy]]</span> <span style="color:red">🍁</span> 03:04, 24 August 2020 (UTC) *'''Oppose''' <small>(Called forth by bot)</small> This is not a help page, it does fine in the Wikipedia namespace. We try to keep only the most relevant things in the help namespace so that our experienced hands can easily find things by searching something like "WP:NAMESPACE". I wouldn't think to search "Help:Namespace", because help pages are not really built for our experienced hands, and I don't think this page is meant as a starter guide. [[User:CaptainEek|<span style="color:#6a1f7f">'''CaptainEek'''</span>]] <sup>[[User talk:CaptainEek|<span style="font-size:82%"><span style="color:#a479e5">''Edits Ho Cap'n!''</span></span>]]</sup>[[Special:Contributions/CaptainEek|⚓]] 04:18, 24 August 2020 (UTC) *'''opposed''' This page is more than a help page. It fits this namespace well. [[User:Philoserf|—¿philoserf?]] ([[User talk:Philoserf|talk]]) 22:48, 24 August 2020 (UTC) *'''Keep'''. This page is more about the guidelines we have established for the use of namespaces on Wikipedia, than about how namespaces work within our software. --[[User:Bsherr|Bsherr]] ([[User talk:Bsherr|talk]]) 04:02, 25 August 2020 (UTC) *'''Support''', this is almost entirely a help page, and I believe these should ideally placed in the Help namespace. Almost all of it is about the technical aspects of namespaces, and there is very little policy discussion or commentary. --[[User:Mrjulesd|<span style="color:orange;">--Jules</span>]]&nbsp;[[User talk:Mrjulesd|(Mrjulesd)]] 20:59, 25 August 2020 (UTC) == RIP Gadget talk: Invention, Travel, & Adventure == GOOD NIGHT SWEET PRINCE YOU WILL BE MISSED /-_-\ / / \ / / \ \ \ / \__\__/ \\ -\\ ____ \\ / / ____ \\/___/ \ \ -// \___\//- -// \\ // //- -// // \\ \\ <b style="font-family: monospace; color:#E35BD8">[[User:JPxG|<b style="color:#029D74">jp</b>]]×[[Special:Contributions/JPxG|<b style="color: #029D74">g</b>]][[User talk:JPxG|🗯️]]</b> 07:42, 3 March 2024 (UTC) == Semi-protected edit request on 21 August 2024 == {{edit semi-protected|Wikipedia:Namespace|answered=yes}} Please change the Wikimedia Outreach reference: from <code><nowiki>[https://outreach.m.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown Education_Extension_scheduled_shutdown, Wikimedia outreach]</nowiki></code> to <code><nowiki>[https://outreach.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown "Education Extension scheduled shutdown"], Wikimedia Outreach</nowiki></code>; this removes the [[:Help:Mobile access|mobile site prefix]] that isn't optimised for desktop usage (and if browsing on a mobile, it should be automatically changed anyway), and it also doesn't display underscores in the link. [[Special:Contributions/83.28.217.24|83.28.217.24]] ([[User talk:83.28.217.24|talk]]) 09:22, 21 August 2024 (UTC) :It would be better to use <code><nowiki>[[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]]</nowiki></code> which yields [[outreach:Education/News/January 2018/Education Extension scheduled shutdown|Education Extension scheduled shutdown]]. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 16:49, 21 August 2024 (UTC) :: Agreed, {{done}}<!-- Template:ESp --> [[User:Tollens|Tollens]] ([[User talk:Tollens|talk]]) 19:32, 21 August 2024 (UTC) == Alias "cat:" == Commons already supports it, e.g., [[:c:cat:SVG numbers]] redirects to [[:c:Category:SVG numbers]] -- why not on English Wikipedia, too? [[Wikipedia_talk:Namespace/Archive_1#Integrate_pseudo-namespace_into_alias-namespace|Previous discussion]] alluded to "pollution" and the use of colon character in article titles. But the actual problem would be articles starting with "cat:", which currently are only some "pseudo-namespaces" (cross-space redirects) [https://en.wikipedia.org/wiki/Special:PrefixIndex/CAT:] . [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 02:45, 23 February 2025 (UTC) ==Discussion at [[:Wikipedia:Village pump (technical)#Adding a SecurePoll namespace|Wikipedia:Village pump (technical) §&nbsp;Adding a SecurePoll namespace]]== [[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]]&nbsp;You are invited to join the discussion at [[:Wikipedia:Village pump (technical)#Adding a SecurePoll namespace|Wikipedia:Village pump (technical) §&nbsp;Adding a SecurePoll namespace]]. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 08:06, 19 June 2025 (UTC)<!-- [[Template:Please see]] --> == Feedback requested regarding WP and Help namespaces == Your feedback would be appreciated at the following discussion: [[WP:Village pump (idea lab)#Same titled page in both WP and Help namespaces]]. Thanks, [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 09:20, 14 December 2025 (UTC) : It should be further noted that subpage [[Wikipedia:Namespace/Help vs. Wikipedia]] is featured in that discussion, and was created for it. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 10:26, 16 December 2025 (UTC) e2qkxdlgdb0fv5gimfzwdhiv3re4o5o Category:Books 14 47871 117286 2026-06-06T09:10:28Z en>~2026-26767-44 0 Remove redundant category 117286 wikitext text/x-wiki {{Portal|Books}} {{Commons category}} {{Wikisourcecat|Books}} {{Category main article|book|outline of books}} {{Distinguish|Category:Wikibooks}} {{Category see also|Literature}} {{Category diffuse}} [[Category:Documents]] [[Category:Humanities]] [[Category:Literature by medium]] [[Category:Manufactured goods]] [[Category:Media formats]] [[Category:Paper products]] [[Category:Print media]] [[Category:Publications by format]] [[Category:Publishing]] [[Category:Written communication]] 3ob5fmwcfe42c6cxa1gpe2u820ns2cj 117287 117286 2026-07-16T11:45:46Z Tumbuka Arch 6863 1 revision imported from [[:en:Category:Books]] 117286 wikitext text/x-wiki {{Portal|Books}} {{Commons category}} {{Wikisourcecat|Books}} {{Category main article|book|outline of books}} {{Distinguish|Category:Wikibooks}} {{Category see also|Literature}} {{Category diffuse}} [[Category:Documents]] [[Category:Humanities]] [[Category:Literature by medium]] [[Category:Manufactured goods]] [[Category:Media formats]] [[Category:Paper products]] [[Category:Print media]] [[Category:Publications by format]] [[Category:Publishing]] [[Category:Written communication]] 3ob5fmwcfe42c6cxa1gpe2u820ns2cj Template talk:Pagetype 11 47872 117288 2026-07-01T07:40:36Z en>MSGJ 0 /* Protected edit request on 1 July 2026 */ Removed edit request 117288 wikitext text/x-wiki {{central|Module talk:Pagetype}} {{permprot}} {{copied|from=Template:Pagetype|from_oldid=616197024|to=:incubator:Template:Wp/nod/pagetype|to_diff=4242185}} ==Books== {{tlx|editprotected}} This should be updated to account for |class=book. [[User:Headbomb|Headbomb]]&nbsp;{<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub>&nbsp;&ndash;&nbsp;[[WP:PHYS|WP Physics]]} 06:15, 11 December 2009 (UTC) :I'm not exactly sure what the behavior should be. Somewhat important when changing a template that is used 2.7 million times. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 12:45, 11 December 2009 (UTC) ::I don't think "books" is a proper classification here. Either way, these changes need to be made in a sandbox like [[Template:pagetype/sandbox]] to avoid breaking things. --[[User:MZMcBride|MZMcBride]] ([[User talk:MZMcBride|talk]]) 18:44, 11 December 2009 (UTC) ==Needed== Should {{para|class|needed}} be produce "page" or "article"? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:27, 29 April 2010 (UTC) :I thought we didn't support Needed-Class anymore. [[User:Happy-melon|<span style="color:forestgreen">'''Happy'''</span>]]‑[[User talk:Happy-melon|<span style="color:darkorange">'''melon'''</span>]] 15:24, 29 April 2010 (UTC) ::But what about all the subcategories of [[:Category:Needed-Class articles]]? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:07, 29 April 2010 (UTC) :::And the subcategories of [[:Category:Current-Class articles|Current-Class articles]], or [[:Category:Merge-Class articles|Merge-Class articles]], or any of the other custom classes?? Those classes which we said should be available for projects to use if they wish, but for which we should not bloat banner code for all projects. There are 74 Needed-Class categories, 63 of which are empty. I don't agree that we should make any move to better integrate these niche classes when that disadvantages 1,600 projects for the sake of less than a dozen. [[User:Happy-melon|<span style="color:forestgreen">'''Happy'''</span>]]‑[[User talk:Happy-melon|<span style="color:darkorange">'''melon'''</span>]] 21:31, 29 April 2010 (UTC) ::::Fair enough. I hadn't noticed that so many of them were empty. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:32, 30 April 2010 (UTC) == talkspace=yes == I think a talkspace=yes, similar to subjectspace=yes, would be useful to have as an optional parameter for this template. It should, if on a talk page, return "talk page" and otherwise return the default value. This would be useful for templates like {{Tl|Last edited by}} to be more accurate or {{Tl|In use}} so we can get rid of the switch function there. --[[User:The Evil IP address|The Evil IP address]] ([[User talk:The Evil IP address|talk]]) 18:08, 6 June 2010 (UTC) :Sorry I can't understand what you mean. Can you describe the behaviour of the template with this new parameter? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:46, 6 June 2010 (UTC) ::Currently, on a talk page, this template shows the subject namespace, for example on an article talk page, it shows "article", on a template talk page it shows "template", and so on. However, there are situations in which it would be good to return "talk page" instead, for example within {{Tl|Last edited by}}. I'd like to add this template to {{Tl|Db-meta}} in the next time (which already uses a similar hardcoded function of this template), but since db templates are also used on talk pages, showing "article" or "template" wouldn't make sense there. --[[User:The Evil IP address|The Evil IP address]] ([[User talk:The Evil IP address|talk]]) 13:10, 9 June 2010 (UTC) :::Ah now I understand. I would be open to such an addition if it can be coded cleanly without affecting the performance for the majority of uses (as this is a very widely used template!) Question: could you not just use '''<nowiki>{{NAMESPACE}} page</nowiki>''' in your case? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:36, 9 June 2010 (UTC) ::::Fixed by using [[Template:pp-meta/pagetype]] instead. [[User:Prodego|<span style="color:darkgreen;">''Prodego''</span>]] [[User talk:Prodego|<sup style="color:darkgreen;">talk</sup>]] 23:59, 12 January 2011 (UTC) == Misleading documentation == According to the documentation there's a parameter "subjectspace - If set to yes then subjectspace pages will be treated the same as talkspace pages." Without subjectspace: <nowiki>{{pagetype|page=Category:X1}} and {{pagetype|page=Category talk:X1}}</nowiki> produce "{{pagetype|page=Category:X1}}" and "{{pagetype|page=Category talk:X1}}". With subjectspace: <nowiki>{{pagetype|page=Category:X1|subjectspace=yes}} and {{pagetype|page=Category talk:X1|subjectspace=yes}}</nowiki> produce "{{pagetype|page=Category:X1|subjectspace=yes}}" and "{{pagetype|page=Category talk:X1|subjectspace=yes}}". There's an unnamed parameter, "class", but that's "optional" and the documentation suggests that it shouldn't affect the result in this case. Is the intention to require page name (which includes namespace) and namespace specified as separate parameters? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 00:01, 22 September 2013 (UTC) :I've updated the docs to match what the template does. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 00:15, 22 September 2013 (UTC) ::It's still misleading. "This template is used to identify what kind of page it or its subject page is." - but when used with a page name, it returns "Article" for a template and "Template" for a template talk page. Is there something similar to [[Template:Pp-meta/pagetype]] (mentioned above) but allowing a parameter for page name? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 08:02, 22 September 2013 (UTC) :::This template was designed for use by WikiProject banners so it was mainly just tested on talk pages and currently doesn't do very well with non-talk pages. I'll have alook at doing something better in the sandbox soon. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 08:33, 22 September 2013 (UTC) ::::I found it in use in [[Template:Edit protected]] and [[Template:Edit semi-protected]], where parameter is needed because of [https://en.wikipedia.org/w/index.php?title=MediaWiki:Protectedpagetext&diff=564379718&oldid=560600426 a change] to [[MediaWiki:Protectedpagetext]]. I've had to use TALKPAGENAME in those templates, which isn't ideal but produces the correct result (except in the unlikely event of a request for an edit to a redirected talk page). It may produce incorrect results if this template is changed, although it only affects the message and not the template's function. If improving or replacing this template, it may also be possible to use [[Module:Redirect]] to determine whether a page is a redirect, although it currently fails where "#REDIRECT:" (instead of just "#REDIRECT" is used. [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 10:12, 22 September 2013 (UTC) :::::Right, I've made some changes in the sandbox and now <nowiki>{{pagetype/sandbox|page=Category:X1}} and {{pagetype/sandbox|page=Category talk:X1}}</nowiki> produce "{{pagetype/sandbox|page=Category:X1}}" and "{{pagetype/sandbox|page=Category talk:X1}}". I've also removed the subjectspace option from the sandbox since it's not needed with the changes that I've made. Can you give it a test yourself & if you are happy, we can make it live. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:30, 22 September 2013 (UTC) ::::::It's an improvement for pages not in talk or article space, and does what the "output" section of the documentation says, with the exception of "portal" or "project" class in subjectspace - is that needed? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 15:08, 22 September 2013 (UTC) :::::::I think that's fine. I've updated the template and the docs. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:07, 22 September 2013 (UTC) == Module:Pagetype == I've created a Lua implementation of this template at [[Module:Pagetype]]. It's much more customisable than this template, and can be used to create other pagetype-like templates with different namespace configurations and custom text values. Have a look at the module documentation for details. The default settings are almost the same as this template, with one important difference - redirects are now detected and displayed as "redirect", no matter what namespace they are in. If this is undesirable I can change it, but it won't be easy to change the redirect detection on a per-namespace basis, due to the way the module hooks into [[Module:Namespace detect]]. Please have a look at the module, test it a bit, and see if there are any bugs, or anything you would like to change. You might also want to take a look at the [[Module:Pagetype/testcases|test cases]] ([[Module talk:Pagetype/testcases|results]]). If everything is ok, I plan to update {{tl|pagetype}} with this module some time this week. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:07, 4 November 2013 (UTC) :Great! I notice that {{tl|db-meta}} uses the following construction several times: <pre>{{talk other|talk page|{{pagetype|subjectspace=yes}}}}</pre> :Does your version make this simpler to do? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:23, 7 November 2013 (UTC) ::Seems as though <code><nowiki>{{#invoke:pagetype|main|talk=y}}</nowiki></code> would work here as a shorter replacement. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 12:00, 7 November 2013 (UTC) :::Yes, that's right - you could also use <code><nowiki>{{#invoke:pagetype|main|defaultns=all}}</nowiki></code>, depending on how many namespaces you want to include by default. I also wasn't aware of the {{para|subjectspace}} parameter until now, as it was removed with [https://en.wikipedia.org/w/index.php?title=Template:Pagetype&diff=574059272&oldid=541587542 this edit], so adding {{para|subjectspace|yes}} to the module won't have any effect. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:13, 7 November 2013 (UTC) ::::Ok, I've made the switch to the new module. Let me know if you spot any issues. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 07:50, 9 November 2013 (UTC) == Misleading message about redirect == {{moved from|Template talk:Edit protected|[[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 19:16, 3 April 2014 (UTC)}} If you put {{tlx|Edit protected|MediaWiki talk:Spam-blacklist/log}} on [[MediaWiki talk:Spam-blacklist]], the box begins with "It is requested that an edit be made to the fully protected redirect at MediaWiki talk:Spam-blacklist/log.". Why "redirect", when [[MediaWiki talk:Spam-blacklist/log]] isn't? See {{oldid|MediaWiki talk:Spam-blacklist|602617506#Full_log|this permalink}}. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 18:54, 3 April 2014 (UTC) :{{ping|Mr. Stradivarius}} The issue is that when p._main{page='MediaWiki talk:Spam-blacklist/log'} is called, checkRedirects instead checks to see if MediaWiki:Spam-blacklist/log is a redirect (lines 208-211). I'm not sure what the logic behind doing that that way is. Thoughts? [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 19:16, 3 April 2014 (UTC) ::Yep, that's a bug in the module. It should use the current page rather than the subject page if talk pages are allowed, but at the moment it only checks args.talk, not args.defaultns. I'll have a think about how best to fix this. (Also, your ping didn't work - not sure why.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:12, 4 April 2014 (UTC) :::Now fixed. I also uncovered a nasty bug that was introduced by the recent changes to [[Module:Namespace detect]] - this module was trying to use the # operator with the mappings table, which didn't work after it was switched to load using mw.loadData. I also split out the config data to [[Module:Pagetype/config]], loaded using mw.loadData. And I made some beautification fixes too. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 06:01, 4 April 2014 (UTC) :::I didn't get a ping either. It might be because it was a page creation? --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 10:18, 4 April 2014 (UTC) ::::{{ping|Mr. Stradivarius}} Broken in the opposite way now. [{{fullurl:Module talk:Message box|oldid=602879313#Protected_edit_request_on_5_April_2014}}] says talk page instead of module. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 16:05, 5 April 2014 (UTC) :::::Bleh. That was a bug I introduced to [[Module:Namespace detect]] this morning trying to fix an unrelated issue. That's now fixed as well. And with that, I think I shall call it a night. If you notice other similar problems, purging should fix it. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 17:13, 5 April 2014 (UTC) == Drafts == I don't think this module identifies pages in the draft namespace. Please could this be added? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:40, 3 October 2014 (UTC) :You could either use <nowiki>{{pagetype|draft=true}}</nowiki> or you could edit the cfg.defaultNamespaces section of [[Module:Pagetype/config]]. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:56, 3 October 2014 (UTC) ::{{ping|MSGJ}} Drafts are detected fine - they are one of the extended namespaces. See [[Module:Pagetype#Default namespace sets]] for a quick look at what is in what set. And if you think drafts should be in the default set instead of just the extended set, we can make the change in the module config, as WOSlinker said. (We should probably get consensus for that first, though.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 13:13, 3 October 2014 (UTC) :::Yes well, perhaps "draft" should be in that set. <s>Also I'm surprised that "file" is not there.</s> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:51, 3 October 2014 (UTC) :::Hmm I see "file" is there, but not in the "media" row so I'm a bit confused by that. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:53, 3 October 2014 (UTC) ::::{{ping|MSGJ}} That's because when you click a link to a media namespace page, you're not going to a wiki page, but you're viewing the file directly. For example: [[Media:Example.svg]]. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:00, 3 October 2014 (UTC) :::::Interesting, I didn't know that! In the meantime I've used {{para|draft|yes}} on [[Template:Importance mask]] so it works as intended. Cheers all &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:29, 4 October 2014 (UTC) == Protected edit request on 28 September 2015 == {{edit fully-protected|Module:Pagetype|answered=yes}} <!-- Begin request --> Add the Gadget and Gadget definition namespaces and make the page type the same name, but with a lowercase "G".<!-- This will mean that if a speedy deletion template is placed on a page in one of those namespaces, then the page will say "This gadget may meet Wikipedia's criteria for speedy deletion" or "This gadget definition may meet Wikipedia's criteria for speedy deletion". --> <!-- End request --> [[User:GeoffreyT2000|GeoffreyT2000]] ([[User talk:GeoffreyT2000|talk]]) 02:50, 28 September 2015 (UTC) :[[File:Yes check.svg|20px|link=]] '''Done'''<!-- Template:EP --> — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:41, 28 September 2015 (UTC) == Set index articles == {{re|Mr. Stradivarius}} Is there any way for the module to distinguish between disambiguation pages and set index articles? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 00:06, 5 July 2016 (UTC) :I asked about disambiguation pages somewhere before and was told that it is impossible ;( &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:28, 12 July 2016 (UTC) :{{ping|PC78}} see [[Module talk:Redirect#Query]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:32, 12 July 2016 (UTC) ::Hmm. The doc refers to disambiguation pages at [[Module:Pagetype/doc#Main namespace classes]]. Does this not do what I think it does? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 17:02, 12 July 2016 (UTC) :::You have to tell the module that it is a disambiguation page using the class parameter. It won't detect it automatically, which I think it what you were asking about. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:25, 12 July 2016 (UTC) ::::Ah-ha. How does the [[Wikipedia:Metadata gadget|Metadata gadget]] do it then, is that not something that can be applied to a template? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 06:49, 13 July 2016 (UTC) :::::The gadget also uses the class rating from the article's talk page, I believe! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:36, 20 April 2023 (UTC) == Detecting disambiguation pages == {{tracked|T71441}} Would it be possible to detect disambiguation pages from this module? Disambiguation pages have the page property "disambiguation". Can you retrieve page properties from Lua modules? [[User:Kaldari|Kaldari]] ([[User talk:Kaldari|talk]]) 20:44, 31 October 2016 (UTC) :Please see [[Module talk:Redirect#Query]]! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:54, 31 October 2016 (UTC) ::Thanks for the pointer. After looking at the Phab ticket and the Scribunto code, I think I actually know how this could be implemented. [[User:Kaldari|Kaldari]] ([[User talk:Kaldari|talk]]) 21:19, 31 October 2016 (UTC) == cross project calls == Should this work across wikiprojects? For example * <nowiki>{{#invoke:pagetype|main|page=Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Voy:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Voy:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=W:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=W:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main123}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main123}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=FRA}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:FRA}} * <nowiki>{{#invoke:pagetype|main|page=W:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=W:FRA}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:FRA}} * <nowiki>{{#invoke:pagetype|main|page=Voy:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Voy:FRA}} Does not appear to be giving correct results, or am I misunderstanding the syntax? --[[User:Traveler100|Traveler100]] ([[User talk:Traveler100|talk]]) 12:21, 15 February 2018 (UTC) :I don't believe this is possible and/or desirable &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:46, 20 April 2023 (UTC) == Plurals == Following a request at [[Wikipedia talk:Short description #Category fix needed]], which complained that the {{tl|Short description}} naively pluralises 'category' as '<del>categories</del><ins>categorys</ins>', I looked for a fix. As the template calls [[Template:Pagetype]] in three places, it seemed hugely inefficient to use logic to test for irregular plurals at each call, so I've implemented a boolean {{para|plural}} parameter in [[Module:Pagetype/sandbox]]. That makes use of a couple of extra variables that I've added to [[Module:Pagetype/config/sandbox]] (to allow localisation for other Wikis). I've set each respective sandbox to call the relevant sandbox. So: * <code><nowiki>{{pagetype/sandbox}}</nowiki></code> → {{pagetype/sandbox}} * <code><nowiki>{{pagetype/sandbox |plural=y}}</nowiki></code> → {{pagetype/sandbox |plural=y}} * <code><nowiki>{{pagetype/sandbox |plural=n |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype/sandbox |plural=n |page=Category:CS1 maint: archived copy as title}} * <code><nowiki>{{pagetype/sandbox |plural=y |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype/sandbox |plural=y |page=Category:CS1 maint: archived copy as title}} It seems to work without problem on each type of page, including redirects where I've previewed the above code. It fails the same four testcases at [[Module talk:Pagetype/testcases]] that were failing before (pages that are now redirects). As I'm not familiar with the uses of the less common parameters (although there ''should'' be no interaction as I've coded the changes at the output of the main function), I'm flagging this up for review and to seek consensus for the changes to be made. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:16, 24 May 2020 (UTC) Sorry, I should have pinged {{u|Mr. Stradivarius}} as the author of the module. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:19, 24 May 2020 (UTC) :I support this change, with a minor note that for posterity, I think your original description of the error should read {{tq|naively pluralises 'category' as 'categorys'}} (note the misspelled last word). I was going to strike it out for you, but I might be misunderstanding the situation entirely. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 23:40, 24 May 2020 (UTC) :: Thanks for spotting that, {{u|Jonesey95}} – my internal spell-checker clearly took over (either that or my senility is progressing faster than I thought). Cheers --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:50, 24 May 2020 (UTC) :::{{ping|RexxS}} thanks for coding this, and please do implement &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:25, 9 June 2020 (UTC) :::: Apologies, I did that last week, but forgot to update this thread. This template now accepts the {{para|plural}} parameter: ::::* <code><nowiki>{{pagetype}}</nowiki></code> → {{pagetype}} ::::* <code><nowiki>{{pagetype |plural=y}}</nowiki></code> → {{pagetype |plural=y}} ::::* <code><nowiki>{{pagetype |plural=n |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype |plural=n |page=Category:CS1 maint: archived copy as title}} ::::* <code><nowiki>{{pagetype |plural=y |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype |plural=y |page=Category:CS1 maint: archived copy as title}} :::: I've updated the documentation at [[Template:Pagetype/doc #Plurals]]. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 16:07, 9 June 2020 (UTC) == Protected edit request on 18 June 2020 == {{edit fully-protected|Module:Pagetype|answered=yes}} Implement the change I've made at [[Module:Pagetype/sandbox]]; specifically, the addition of a {{para|caps}} parameter, that capitalises the first letter of the output. The change is very simple; below line 209, insert the following: <syntaxhighlight lang="lua" line start="210"> if yesno(args.caps, false) then pagetype = mw.ustring.upper(mw.ustring.sub(pagetype, 1, 1)) .. mw.ustring.sub(pagetype, 2) end </syntaxhighlight> <small>The indentation on the output above is... interesting... but the correct indentation is used in the wikitext.</small> You can see this working in the [[Module talk:Pagetype/testcases|test cases]], where I've written specific tests for it; it plays nicely with the {{para|plural}} parameter, as you'd expect. It is worthy of note that I've [https://en.wikipedia.org/w/index.php?title=Module%3APagetype%2Ftestcases&type=revision&diff=963243595&oldid=963242397 had to separately fix some of the other testcases], as the pages that they depended on have changed since the last time the testcases were used. Please let me know once this is sorted so I can update the documentation for the new parameter. Thanks! [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 18:40, 18 June 2020 (UTC) [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 18:40, 18 June 2020 (UTC) : : The code works fine, but is there a use case for it? As an aside, <code>:gsub("^(%l)", string.upper)</code> is a compact way of doing ucfirst (that's %'lower-case-L' in the pattern). --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 20:27, 18 June 2020 (UTC) ::{{re|RexxS}} The intended use case would be to have templates that either categorise pages, or link to categories of pages, shown correctly with the capitalisation of the first letter of the category. In the first case, which was actually what prompted me to propose this change, there's not much practical difference, because MediaWiki doesn't care about first letter capitalisation, and categories are processed through it. In the second, however, there's a visible difference for people looking at the link. It's no big deal, but it's a nice thing to have, and for the few lines of code it takes to support it, I figured why not {{=)}}{{pb}}Thanks for the tip about ucfirst - I'd not thought of just using a gsub, good shout! [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 21:06, 18 June 2020 (UTC) ::: {{re|Naypta}} I've implemented your change and tidied the odd indent. Please check it over and update the documentation when you get a chance. Cheers. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 21:28, 18 June 2020 (UTC) ::::{{re|RexxS}} [https://en.wikipedia.org/w/index.php?title=Template:Pagetype/doc&type=revision&diff=963273850&oldid=960209712&diffmode=source Done] and [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/doc&action=historysubmit&type=revision&diff=963273701&oldid=960209682&diffmode=source dusted] - cheers! I've also added TemplateData for {{para|plural}}, and tidied up the documentation on the template to use examples of template code rather than of module code. {{=)}} [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 21:37, 18 June 2020 (UTC) == Question regarding the use of the dab parameter == I'm not sure I understand how the {{para|dab}} parameter works. I have a usecase that I want to check if a page is an actual article or a dab or redirect. If I understand correctly from the docs I should do: * <code><nowiki>{{Pagetype|page=AC|dab}}</nowiki></code>, which produces: {{Pagetype|page=AC|dab}} * <code><nowiki>{{Pagetype|page=Air conditioning|dab}}</nowiki></code>, which produces: {{Pagetype|page=Air conditioning|dab}} The first is a dab while the second is an article. What am I doing wrong? --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 10:42, 2 July 2020 (UTC) :I don't think there is any way to check if a page is a disambig automatically, so what you are doing above is passing in the class value and because the class value you've passed is "dab", it outputs "page". If you have passed "start" for example then it would have output "article". :* <code><nowiki>{{Pagetype|page=AC|start}}</nowiki></code>, which produces: {{Pagetype|page=AC|start}} :You can see what's possible against the Title object in the [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects LUA reference manual] and you'll see that there are items to check for redirects but nothing for disambig. Also see [https://phabricator.wikimedia.org/T71441 phabricator T71441].-- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:42, 2 July 2020 (UTC) ::Yeah I know there is no direct access, but I thought there was some backend manipulation the page content. So I'm not sure what the point is of the dab class. If I already know what the page type is, why would I send the page type, or even use this template in the first place? I feel like I'm missing something here. --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 13:51, 2 July 2020 (UTC) ::: A couple of hacks come to mind that could determine whether a page is a dab page: :::* Using a call to a Scribunto module that fetches the content of the page, <code>titleobject.getcontent()</code>, and then looks for the {{tl|disambiguation}} template in it. Heavy and expensive. :::* If you're checking from Wikidata from an entity, use the fact that <code>titleobject.redirectTarget</code> returns false if the page is not a redirect; and <code>mw.wikibase.getSitelink(qid)</code> returns nil if the page has no Wikidata sitelink. If an article page has no Wikidata sitelink and is not a redirect, it is almost certainly a dab. ::: There are possibly others, but I'm not aware of any 100% guaranteed way that doesn't depend on some assumptions. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 15:49, 2 July 2020 (UTC) ::::{{Ping|RexxS}}, thanks. I've been looking into the page:content() before I came here. Can you explain to me what's the purpose of the dab parameter? --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 16:04, 2 July 2020 (UTC) :::::There's more than just the disambiguation template to look for, there's some of the [https://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Dmbox&namespace=10&limit=110&hidelinks=1 following] templates that are also used for that purpose as well. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:40, 2 July 2020 (UTC) :::The main purpose of the Pagetype template is to be used on the project banners to show either "article" or "page" in the banner text. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:33, 2 July 2020 (UTC) :::: {{re|Gonnym}} As an example, if this template is used inside a WikiProject template, it can read the {{para|class}} parameter (passed into the WikiProject template) like this: <code><nowiki>{{pagetype|{{{class|}}} }}</nowiki></code> and then might be used to create a category name that the article should belong to, given that if the class is given as dab or n/a, the template will then return "page" instead of "article". There is the ability to specify custom text for either dab or n/a, depending on the naming convention required for the category name. Does that make sense? --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 20:42, 2 July 2020 (UTC) :::::Yes, thanks! --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 22:25, 2 July 2020 (UTC) == Erroneous entries in WhatLinksHere == Using this template on a file talk page causes [[Special:WhatLinksHere]] for the file page to report the talk page linking to the file page. If this is fixable, please do. See also [[Template talk:WPBannerMeta#Protected edit request on 29 July 2021]]. — <span style="color:#e08020">Alexis Jazz</span> ([[User talk:Alexis Jazz|talk]] or ping me) 11:36, 29 July 2021 (UTC) == Protected edit request on 2 May 2022 == {{edit fully-protected|Template:Pagetype|answered=yes}} Change page's main title Sterling Entertainment Group to United American Video and lock the page from further editing. The information on this page is wildly inaccurate and most of it has now been edited for accuracy except for the main title. United American Video was never Sterling Entertainment Group. I should know I was a founder from 1984 to 2005. [[User:Jpettus1|Jpettus1]] ([[User talk:Jpettus1|talk]]) 16:29, 2 May 2022 (UTC) :{{not done}} this has nothing to do with editing [[Template:Pagetype]]; try the talk page attached to whichever article you want to change. — [[User:Xaosflux|<span style="color:#FF9933; font-weight:bold; font-family:monotype;">xaosflux</span>]] <sup>[[User talk:Xaosflux|<span style="color:#009933;">Talk</span>]]</sup> 18:31, 2 May 2022 (UTC) == Use [[Module:Disambiguation]] == I propose using [[Module:Disambiguation]] to automatically detect disambiguation pages, as currently used on [[Module:Class mask]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:50, 20 April 2023 (UTC) :@[[User:Mr. Stradivarius|Mr. Stradivarius]]: any chance you could look at this, because I think you wrote this module initialy? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:21, 10 May 2023 (UTC) :@[[User:Mr. Stradivarius|Mr. Stradivarius]]: if you do have time to look at this module, it would be appreciated. It does have a significant effect because importance is not being correctly autoclassified as NA on disambiguation talk pages. Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:47, 18 May 2023 (UTC) ::Time is one thing I don't have the luxury of right now... but perhaps I can take a look at some point in the next few weeks. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 00:25, 19 May 2023 (UTC) :::@[[User:Mr. Stradivarius|Mr. Stradivarius]] just a little reminder if you have time to look at this :) Would it also be possible for {{para|defaultns|extended}} to produce "disambiguation page" in this case? Thank you. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 05:10, 19 August 2023 (UTC) ::::{{ping|MSGJ}} I have implemented disambiguation page detection at [[Module:Pagetype/sandbox]]. At the moment, this still outputs the default "page" for disambiguation pages. Disambiguation detection works like redirect detection - it is on by default, and is checked before looking at {{para|defaultns}} or explicit namespace arguments. This means that if we are going to change the module to produce "disambiguation page" for disambiguation pages, with the current implementation this would be independent of the value of {{para|defaultns}}. (It can be done by editing the <code>cfg.dabDefault</code> value in [[Module:Pagetype/config/sandbox]].) <p>Using "disambiguation page" could be a breaking change for some users, as previously disambiguation pages specified by the first positional parameter have been output as "page". Before changing it, we should probably check to see whether anything is likely to break, and have a wider discussion. In the meantime, you can always change it on a per-template basis by using {{para|dab|disambiguation page}}.</p> <p>My edits to the sandbox have also removed the dependency on [[Module:Namespace detect]], and I also changed [[Module:Pagetype/testcases]] to use [[Module:Mock title]] so that the test cases won't break if anyone edits any pages mentioned in them. Let me know if you spot any issues with any of this, and if not I'll go ahead and deploy the sandbox version to the main module. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:34, 27 August 2023 (UTC)</p> :::::I have gone ahead and deployed the changes to the main module. Please let me know if you spot any issues. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:39, 28 August 2023 (UTC) ::::::Thanks very much. I'll test it very soon when I get some time. I can use {{para|dab|disambguation}} for now but it would be great if defaultns could be used later, if that is possible &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:56, 28 August 2023 (UTC) :::::::{{ping|MSGJ}} I think changing the default would break too many things. Changing to automatic disambiguation page detection has already [[Wikipedia talk:Short description#Category transclusion|broken the categories]] used by [[Template:Short description]], and it is difficult to tell what else might break by changing the default wording from "page" to "disambiguation page". — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:19, 29 August 2023 (UTC) ::::::::{{ping|Mr. Stradivarius|MSGJ}} The WikiProject classification for some disambiguation pages such as [[Dragon Quest Heroes]] moved from being "NA-importance" by default to "Unknown-importance" as of today; since no change was made to Wikiproject banner shell, I think that this change may have affected that template/module. In looking at what moved and what didn't, it appears that "set index articles" are now no longer "NA" by default, while "normal" disambiguation articles are still handled correctly. I'm presuming that the fix needs to be applied to Wikiproject banner shell, not here, but replying here since there was an active discussion. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 02:21, 30 August 2023 (UTC) :::::::::{{ping|PresN}} I tracked the problem down to [[Module:WikiProject banner]]. It uses [[Module:Pagetype]] [[Module:WikiProject banner#L-109|here]], and then compares the result to the string "article" [[Module:WikiProject banner#L-312|here]]. This should probably be changed to a namespace check. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 02:55, 30 August 2023 (UTC) ::::::::::{{re|Mr. Stradivarius}} I think it's actually that [[Module:Disambiguation]] only looks for ''disambiguation'' templates, but set index pages have ''set index'' templates, so they don't get counted by the module as a disambiguation page, so Module:Pagetype is saying they're "article". Either Module:Disambiguation should treat those like disambig pages, or else Module:Pagetype should call a [[Module:Set index]] with its own regex patterns to handle set index pages. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 11:48, 30 August 2023 (UTC) :::::::::::{{ping|PresN}} Hm, you are right: <code><nowiki>{{pagetype|page=Dragon Quest Heroes}}</nowiki></code> produces "article". This means that the recent change to [[Module:Pagetype]] won't have affected it (unless it was passing "dab" as the first positional parameter, which not many pages do). So there must be another reason for the change from "NA-importance" to "Unknown-importance". By the way, I don't think that set index articles not being detected as disambiguation pages by [[Module:Disambiguation]] is an error. From [[WP:SETINDEX]]: {{tq|A set index article (SIA) is a ''list article'' about a set of items of a specific type that also share the same (or similar) name}} (italics mine). Also, there's an entire section [[WP:SETNOTDAB]] explaining that set index articles are not disambiguation pages. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:26, 30 August 2023 (UTC) ::::::::::::{{re|Mr. Stradivarius}} Hmm. Given the definition and examples at that page (e.g. [[List of peaks named Signal]]), I see the argument for pagetype treating them as "article" rather than "disambiguation". I also don't think the pages I was looking at are really SIAs by that definition, but should be disambiguation pages. I'll adjust in that direction, and we can leave pagetype as it is. Still not sure what caused banner shell to stop treating them as disambiguation (I don't see anything in the code change that would cause it), but if its more correct this way then that's fine. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 13:52, 30 August 2023 (UTC) :::::::::::::I must admit that the definition of set index articles confuses me, but the "article" in its name makes it clear that they are articles so I don't there is an error here. I also don't see how the recent change could have affected this &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:30, 30 August 2023 (UTC) ::::::::::::::I'm still confused how it did, but there were some SIAs where the talk page template said "|class=Disambiguation" with no importance listed, and yesterday they moved from defaulting as NA-importance to being Unknown-importance. It was consistent on the 1.0 Bot assessment logs. It appears that the current state of things is the correct and intended way, and whatever was treating SIAs as disambiguation pages instead of lists was wrong, so nothing further to do here. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 21:41, 30 August 2023 (UTC) :Lots of [[WP:Set index]] articles are marked as disambiguation at WikiData... (maybe this isn't about WikiData, but I think I saw another post about it) [[User:Christian75|Christian75]] ([[User talk:Christian75|talk]]) 10:39, 18 May 2023 (UTC) ::No, we are not currently using wikidata. That was an option explored at [[Module:Disambiguation]] but it seems not worthwhile. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:42, 18 May 2023 (UTC) == Detecting pages with [[Template:Wiktionary redirect]] and other soft redirects == {{moved from|Template talk:Class mask}} @[[User:PARAKANYAA|PARAKANYAA]] suggested at [[Wikipedia talk:Content assessment]] that we should automatically detect pages using [[Template:Wiktionary redirect]] and its redirects, and automatically classify them as redirects. It seems we could the same with [[Template:Soft redirect]] and its redirects. Are there any other relevant templates? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:16, 9 January 2024 (UTC) :@[[User:MSGJ|MSGJ]] I think all the templates are listed at [[Wikipedia:Wikimedia sister projects#Specialized soft redirect templates]]. [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:22, 9 January 2024 (UTC) ::Wow okay, and you can bet that each template has about 10 redirects, so that's quite a lot of searching in the page text &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:23, 9 January 2024 (UTC) :::Sorry D: [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:37, 9 January 2024 (UTC) ::::I have created [[Module:Pagetype/setindex]] and [[Module:Pagetype/softredirect]] in preparation. Are there any other types that we could auto-classify? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:07, 17 January 2024 (UTC) Code now ready for testing in [[Module:Pagetype/sandbox]]. Some tests can be seen at the bottom of [[Template:Pagetype/testcases]]. If {{ul|Mr. Stradivarius}} was more active, I might ask him to check my code. My intention is to remove the call to [[Module:Disambiguation]] altogether as the code is mostly duplicated &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:34, 19 January 2024 (UTC) :{{ping|MSGJ}} Could you also add test cases to [[Module:Pagetype/testcases]]? There should be test cases there as well so that future updates to the code don't break the functionality you are adding. I designed the test cases so that you can specify an arbitrary "group name" (just a short description of the general kind of thing the test is testing), the arguments to the template, and the expected result. If you add more tests like that to the <code>tests</code> table they should just work. Also, please add any titles you use in the tests to the <code>mMockTitle.registerMockTitles</code> call at the top of the test cases and mock any fields that you will use. This ensures that the tests won't break if someone edits the actual wiki page in the future. You can see [[Module:Mock title]] for the different options you can use, but probably I guess you just need to copy the entry for "Alien" (a disambiguation page) and change the content. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 00:26, 20 January 2024 (UTC) ::Sure, will look at that. Can I ask a question? I assume that lines 25-27 of [[Module:Disambiguation]] are not needed here because we are already checking for redirects in line 210. Also, why are you using <code>mRedirect.getTargetFromText(content) ~= nil</code> rather than just <code>luaIsRedirect</code> in there? ::And if this works out well, can we get your bot to update these lists like it currently does for the dab pages? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:30, 20 January 2024 (UTC) :::{{tq|I assume that lines 25-27 of [[Module:Disambiguation]] are not needed here because we are already checking for redirects in line 210.}} Yes, that looks right to me. We shouldn't need a duplicate check. {{tq|1=Also, why are you using <code>mRedirect.getTargetFromText(content) ~= nil</code> rather than just <code>luaIsRedirect</code> in there?}} I don't remember the reason I wrote it that way. Maybe something to do with double redirects? There was definitely something that you had to parse the content for, rather than just checking the title object, but I don't remember the details, and I'm not sure if it still applies today. {{tq|And if this works out well, can we get your bot to update these lists like it currently does for the dab pages?}} Yes, it should be fairly easy to adapt (especially if we use the same format for all the data pages), and I would be willing to run it on the additional pages. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:24, 20 January 2024 (UTC) :::Also, one thing I noticed about the code - you can add a <code>break</code> statement after [[Special:Permalink/1197292991#L-142|line 142]], which will stop the algorithm checking all of the templates on a page if it finds a match. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:28, 20 January 2024 (UTC) ::@[[User:Mr. Stradivarius|Mr. Stradivarius]] for some reason when I added [[Module:Pagetype/testcases#L-44]] as a mock title, suddenly 7 unrelated tests failed. They seem to be all the tests which do not specify the page name. All my new tests are working correctly. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:47, 21 January 2024 (UTC) :::{{ping|MSGJ}} This indicates a bug somewhere, but I don't have time right now to look through the code to find out where it is. I might have another look tomorrow. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:15, 22 January 2024 (UTC) ::::Okay thanks. I suspect a bug in [[Module:Mock title]] rather than this module &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:38, 22 January 2024 (UTC) :::::{{ping|MSGJ}} I found the issue. You added the string <code><nowiki>{{Soft redirect|meta:Wikipedia usage statistics}}</nowiki></code> to [[Module:Pagetype/testcases]], and as the module treats [[Module talk:Pagetype/testcases]] as the current page, it looks through the content of [[Module:Pagetype/testcases]], finds that string, and assumes that the module must be a soft redirect. This wasn't a problem with disambiguation templates as the check for those was limited to the main namespace, but soft redirect detection is done in every namespace. <p>I'm in two minds as to how to fix this. The obvious way would be to also check the page's content model before doing the template check, but checking the content model [[mw:LUAREF#Expensive properties|increments the expensive function count]] for pages other than the current page, which might cause problems in templates that depend on this module. The alternative is to exclude namespaces that typically have different content models, like module space, <del>and userspace JS/CSS pages</del>. This will be more of a pain to code and will be wrong for pages that have their content model changed manually, but it will avoid breaking dependent templates. I think the latter solution will be better, as I think there is a high probability of pages being broken by the increase in expensive function count if we choose the former. (This is just an assumption, however; I haven't checked in detail.)</p> <p>While I am thinking about it, there is also a similar problem with {{tag|nowiki}} tags; it is possible to write {{tag|nowiki|content=&#123;&#123;soft redirect&#125;&#125;}} on a wiki page, and this will not be parsed as a soft redirect, but this module will treat it as one. To avoid false positives in discussions etc. where people are talking about soft redirects, we should also detect whether template invocations are contained in {{tag|nowiki}} blocks or not. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:15, 23 January 2024 (UTC)</p> ::::::Actually, userspace CSS/JS pages should not be excluded, as they are actually categorised if you add a comment like <code><nowiki>/* {{soft redirect}} */</nowiki></code> to them. If I remember correctly, this is behaviour from before content models were added to MediaWiki; the ability to categorise JS/CSS pages was briefly removed, but enabled again after users complained. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:29, 23 January 2024 (UTC) ::::::I added two new test cases and updated the rest of the tests to make it more obvious what is causing the test failures. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 08:14, 23 January 2024 (UTC) ::::::Thanks for looking into this. Alternatively we could just restrict the soft redirect detection to mainspace. I think we may be opening a can of worms by trying to ignore code like nowiki which deactivates the template. There are numerous other ways it can be done, e.g. with pre tags or HTML comments. Sounds like a coder's nightmare! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:04, 23 January 2024 (UTC) :::::::I have another suggestion. We can use the size of the page to determine whether it is likely to be soft redirect. I would suspect anything greater than 1000 bytes is extremely unlikely to be a soft redirect. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:51, 24 January 2024 (UTC) ::::::::{{ping|MSGJ}} I had a go at stripping out nowiki, pre, syntaxhighlight and source tags, as well as HTML comments. The code is in the sandbox, and the tests are all passing now. The parsing isn't perfect, but it should work for 99% of cases. Are there any other tags or markup that we should filter out? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 09:14, 25 January 2024 (UTC) :::::::::Wow, okay. No I can't think of any others. Can I just check if <code><nowiki><!--xxx-->{{soft redirect}}<!--xxx--></nowiki></code> will be detected or will it be greedy and ignore everything between the first open and last close? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:20, 25 January 2024 (UTC) :::::::::To avoid reinventing the wheel, you might look at [[Module:Wikitext Parsing#PrepareText]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:31, 25 January 2024 (UTC) ::::::::::I've added this to the sandbox and the testcases seem to be working okay &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:17, 31 January 2024 (UTC) ::::::::::{{done}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:26, 31 January 2024 (UTC) :::::::::::@[[User:MSGJ|MSGJ]] On the initial example I used, [['Murica]], it seems to have had a... strange result. The shell now ''says'' redirect, but still classifies as unassessed and the shell doesn't show the redirect icon. If I'm missing something, sorry. [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:22, 31 January 2024 (UTC) ::::::::::::Yes I think I might need to update [[Module:Class mask]] and/or [[Module:Banner shell]] as well &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:27, 31 January 2024 (UTC) ::::::::::::Working now I think @[[User:PARAKANYAA|PARAKANYAA]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:48, 1 March 2024 (UTC) :::::::::::::@[[User:MSGJ|MSGJ]] Thank you very much :) [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 21:16, 1 March 2024 (UTC) {{ul|Mr. Stradivarius}} when you have a chance, can you get your bot working on [[Module:Pagetype/setindex]], [[Module:Pagetype/softredirect]] and [[Module:Pagetype/disambiguation]]. Maybe look at moving [[Module:Disambiguation/templates]] over? Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:28, 31 January 2024 (UTC) :Filed a BRFA [[Wikipedia:Bots/Requests for approval/StradBot 2|here]]. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:24, 17 February 2024 (UTC) :Also, I don't think moving [[Module:Disambiguation/templates]] is necessary, as it is also being used in [[Module:Disambiguation]]. The situation now seems fine to me. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:27, 17 February 2024 (UTC) ::I guess I was wondering if [[Module:Disambiguation]] was still needed, given how we have moved most of its functionality here? It might make sense to move the isDisambiguationPage function to [[Module:Pagetype]] to avoid duplication of code. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:48, 1 March 2024 (UTC) == Recent change causing some problems with reports and bot actions == I am unable to find the discussion that led to [https://en.wikipedia.org/w/index.php?title=Module%3APagetype&diff=1202783627&oldid=1201502469 this change], but it may be causing [[Wikipedia_talk:Database_reports#Wikipedia:Database_reports/Unused_templates_(filtered)_update_related_to_Module:Pagetype|problems with reports]] and [https://en.wikipedia.org/w/index.php?title=User_talk:Legobot&curid=17932426&diff=1207949444&oldid=1206725690 bot actions]. {{U|Plastikspork}}, do you have a link to the discussion? – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:07, 16 February 2024 (UTC) :It's at [[User talk:MSGJ#Module:Pagetype]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:18, 16 February 2024 (UTC) :: [[User:Jonesey95|Jonesey95]], that change should have reduced transclusions, by eliminating some transclusions of non-existing pages. But, the change right before it may have increased transclusions. Thanks! [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 15:04, 16 February 2024 (UTC) :::All I know is that the database report changed on the day after the second edit to this module. I know there are sometimes delays, but usually the simple explanation is the one to look at. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 16:31, 16 February 2024 (UTC) == Request update of Module:Pagetype/setindex (18 February 2024) == {{edit fully-protected|Module:Pagetype/setindex|answered=yes}} Bot comment: StradBot has detected that [[Module:Pagetype/setindex]] needs to be updated. This is due to a template being added or removed from [[:Category:Set index article templates]], or to a redirect to one of those templates being added or removed. The bot has saved the new page content in [[Module:Pagetype/setindex/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Module%3APagetype%2Fsetindex&page2=Module%3APagetype%2Fsetindex%2Fsandbox diff]). Please review this and update the module if necessary. [[User:StradBot|StradBot]] ([[User talk:StradBot|talk]]) 16:07, 18 February 2024 (UTC) :Note: the [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/setindex/sandbox&diff=cur&oldid=prev last sandbox edit] should be easier to read than the diff between the sandbox and the main module. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:14, 18 February 2024 (UTC) :: {{ping|Mr. Stradivarius}} This added [[Template:Infobox family name/doc]] to the list of templates, which is clearly wrong. It was previously a redirect with content, which may have caused confusion, and I've now replaced it with a bare redirect. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:58, 18 February 2024 (UTC) :: It also added [[Template:family name]], a redirect to [[Template:infobox name]], which is used on pages like [[Smith (surname)]] that are clearly not set indices. Those seem to be the only two additions, neither of which is useful IMO, so {{not done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:02, 18 February 2024 (UTC) ::: {{ping|Pppery}} Thanks for looking into this. I'll think of the best way to address this tomorrow. Could you also check if [[Module:Pagetype/softredirect/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Module:Pagetype/softredirect/sandbox&diff=prev&oldid=1208716631 diff]) looks OK? There was a Pywikibot issue preventing me from saving the edit request for that page, but the module sandbox itself was saved successfully. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 17:11, 18 February 2024 (UTC) :::: Sorry, no. I see nonsense like [[Template:Barcelona Metro line 10]] and [[Template:Taxonomy/Olindiasidae]]. I would also weakly prefer to exclude templates like [[Template:Soft redirect with Wikidata item]] from the list, since they indicate the page is already a soft redirect because of another template rather than itself making the page a soft redirect, but if that's not possible to code up I would be fine with adding them. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:17, 18 February 2024 (UTC) ::::: I fixed the bot - the issue was that I was using Pywikibot's BasePage.backlinks method instead of the BasePage.redirects method. There are more details [https://github.com/mrstradivarius/stradbot/issues/1 on GitHub]. [[Module:Pagetype/softredirect/sandbox]] should also be improved, but the Pywikibot issue that prevented me from saving the second edit request is still occurring, so the bot failed to leave an edit request for it; I will also need to get that fixed before finishing the trial. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:04, 20 February 2024 (UTC) == Request update of Module:Pagetype/setindex (20 February 2024) == {{edit fully-protected|Module:Pagetype/setindex|answered=yes}} Bot comment: StradBot has detected that [[Module:Pagetype/setindex]] needs to be updated. This is due to a template being added or removed from [[:Category:Set index article templates]], or to a redirect to one of those templates being added or removed. The bot has saved the new page content in [[Module:Pagetype/setindex/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Module%3APagetype%2Fsetindex&page2=Module%3APagetype%2Fsetindex%2Fsandbox diff]). Please review this and update the module if necessary. [[User:StradBot|StradBot]] ([[User talk:StradBot|talk]]) 15:38, 20 February 2024 (UTC) :This edit wouldn't change the content of the setindex module, only the order and the formatting. As it would only be a cosmetic edit, I am deactivating this edit request. Future bot runs will only leave an edit request if the sandbox version changes, so no other action is necessary. The bot will leave its next edit request when the sandbox needs updating (i.e. when any of the templates in [[:Category:Set index article templates]] or their redirects change). — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 15:57, 20 February 2024 (UTC) == Protected edit request on 21 March 2024 - Improve execution time == {{edit fully-protected|Module:Pagetype|answered=yes}} Improves the execution time of this module by about 2 to 3 times by merging repeat calls to some intensive functions and calculating all templates once to avoid excessive calls to gmatch/ustring. Quite important for [[Module:WikiProject banner]], which has started to rarely hit the lua timeout error from time to time on large pages like [[Talk:List of common misconceptions]], with a significant amount of the execution time being this module. No change to any output or functionality (passes all testcases). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:58, 21 March 2024 (UTC) :Temporarily disabled since I intend to make further changes. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 12:27, 22 March 2024 (UTC) ::Re-activated the edit request. Now has better performance in extremely specific circumstances and also fixes a bug in parseContent where explicitly not allowing soft redirect/sia/dab would not work and would revert to giving the default (this bug existed before my changes, there was just no testcase for that specific case). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 17:30, 22 March 2024 (UTC) :{{done}}<!-- Template:EP --> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:28, 22 March 2024 (UTC) == Pages under discussion == When a redirect is proposed for deletion, it stops being detected as a redirect. Would it be possible to fix this, perhaps by looking for the literal text #REDIRECT on the page? There might be other cases, e.g. disambiguation pages too &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:47, 3 May 2024 (UTC) :{{ping|MSGJ}} Currently we just check if the title object itself considers the page a redirect for calculating that. Searching for just the literal string <code>#REDIRECT</code> by itself would be a bad idea (this page itself would pick up if we did that), and searching for #REDIRECT in the correct context probably wouldn't be a great idea for the same reason (easy to false flag). If the only issue is redirect pages that are under discussion, the simplest solution would be to just add a check for the RfD template onto the existing parseContent system, which shouldn't be difficult to implement. Does that sound like it'd fix your issue? Also, I'm unsure what you mean when you reference disambiguation pages. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:33, 5 May 2024 (UTC) ::Yes, that should work. I think the code to look for would be <code><nowiki>#invoke:RfD</nowiki></code>. Forget about dab pages, wasn't thinking straight. Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:00, 6 May 2024 (UTC) :::I've made changes in the sandbox and created [[Module:Pagetype/rfd]], and it should be ready for proper testing (I've only done simplistic testcases so far). If everything works, then this is fine to move to live, since there's no other parts needed. The output of it can be controlled by setting the <code>|rfd=</code> parameter and by default it returns <code>redirect</code>. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 22:42, 6 May 2024 (UTC) ::::On second thought, it would probably be more intuitive if rfds followed the same classification as a regular redirect if <code>|redirect=</code> is used instead of having a seperate param (<code>|rfd=</code>) for this very specific case, so I've changed that to be the case instead. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 22:59, 6 May 2024 (UTC) :::::All looks good to me. Thanks for your help &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:52, 7 May 2024 (UTC) :::::I've deployed this, thanks again! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:52, 9 May 2024 (UTC) == Subpages of talk pages == Subpages in Main talk space are currently classified as articles but their respective subject page is not an article, it usually doesn't exist (e.g. [[Talk:Multiverse (Marvel Cinematic Universe)/FAQ]]). It is not clear how we should classify them but they should probably return "page" instead of "article" &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:55, 7 May 2024 (UTC) :Had a play around but not sure how to achieve this. Detecting whether it's a subpage does not work because we are usually looking at the subject page not the talk page. Checking the existence of the page would work, but I don't really want to add an expensive parser function to every call of this module ... &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:58, 7 May 2024 (UTC) :[[AC/DC]] is an article but [[Multiverse (Marvel Cinematic Universe)/FAQ]] is not an article &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:00, 7 May 2024 (UTC) ::I agree with wanting to avoid adding an expensive call to every use, however it turns out the check for <code>title.isRedirect</code> in <code>detectRedirects</code> (the first check done) is already expensive, so this might not be an issue. Still thinking of a nice way to solve this issue, but nothing's come to mind yet. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:20, 7 May 2024 (UTC) :::Can <code>title.isSubpage</code> help here (with maybe checking <code>title.inNamespace</code> with it)? [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 07:20, 8 May 2024 (UTC) ::::I don't think so, unfortunately. I created [[Module:IsSubpage]] to test this. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Multiverse (Marvel Cinematic Universe)/FAQ}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Multiverse (Marvel Cinematic Universe)/FAQ}}, because it's in mainspace which can't have subpages. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=AC/DC}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=AC/DC}}, ditto. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Talk:Multiverse (Marvel Cinematic Universe)/FAQ}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Talk:Multiverse (Marvel Cinematic Universe)/FAQ}}, which is correct. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Talk:AC/DC}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Talk:AC/DC}}, which is basically a bug in MediaWiki software. ::::The best solution I can think of, is to use <code>title.exists</code> when the talk page title looks like it ''might'' be a subpage. If it doesn't exist then it's probably not an article &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:29, 8 May 2024 (UTC) :::::Actually we can use <code><title.exists</code> if there is a forward slash anywhere in the title, and it's in mainspace &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:14, 9 May 2024 (UTC) :::::Suggested code [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/sandbox&diff=prev&oldid=1223164223] makes all the testcases work &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:59, 10 May 2024 (UTC) ::::::Aidan, do you know if the title.exists is evaluated if the first condition is false? I am trying to avoid unnecessary expensive functions. If it is evaluated, then I will put it in a separate "if" block &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:05, 10 May 2024 (UTC) :::::::I can't read the exact code since im on phone right now, but if the statement is like <code>if A and B then</code> then B won't be evaluated if A is false/nil. The same logic applies in reverse for an or (B won't evaluate if A is anything other than false/nil). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:08, 10 May 2024 (UTC) ::::::::Thanks. Yes you've guessed the situation correctly. But now I have read more, I think we don't need to worry about adding an expensive function. Because we have already called .isRedirect on the same page, so calling .exists will not increment the expensive counter again. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:10, 10 May 2024 (UTC) Deployed code. Now pages in mainspace which do not exist are not classified as articles &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:47, 12 May 2024 (UTC) Proposed improved code on the sandbox. Adds support for specific output for non-existent pages using a {{para|nonexistent}} parameter. This will allow {{tl|WikiProject banner shell}} to treat these pages slightly differently. I have also been doing some code simplification. Will not be deployed until I work out why [[Module talk:Pagetype/testcases|testcase 204]] is not working anymore. Seems to be a strange issue with the mock title code (because it works outside the testcases), but will keep playing &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:19, 15 May 2024 (UTC) :[[Special:Diff/1223642991]] appears to be the change that broke it, though I'm struggling to figure out why and I won't be able to test further until later on. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:34, 15 May 2024 (UTC) ::Ok, perhaps the issue may be the mock titles. It appears that when the code grabs <code>title.subjectPageTitle</code> in <code>getTitle</code>, this title will be the real one, regardless of if a mock title was defined for that name. Whether or not this is the issue thats failing the test case I'm not too sure, but I wouldn't be surprised if it was. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:06, 15 May 2024 (UTC) :::The <code>patchTitleConstructors</code> function of [[Module:Mock title]] is supposed to take care of this, but I don't know enough about it. It seems to work okay in every other namespace though. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:09, 15 May 2024 (UTC) ::::Other namespaces are still broken, its just it appears them returning "page" due to not existing (even if we said they actually do) appears to still be valid for the given testcases. It's just this specific TimedText case where we start seeing bad behaviour. <code>patchTitleConstructors</code> doesn't currently hook the xyzTitle properties, so this is just missing functionality. I can try implement it, but it might take a bit to work out. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:16, 15 May 2024 (UTC) :::Hang on. That is actually the only page which does not exist in reality. In which case, could it true that the mock titles have never worked properly? But then why does 205 work? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:17, 15 May 2024 (UTC) ::::Since 205 has the ability to be classified by it being a talk page, pagetype runs through its logic using the talk page title instead of the subject page title. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:21, 15 May 2024 (UTC) :::::Well, I'm astounded that @[[User:Mr. Stradivarius|Mr. Stradivarius]] did not implement this correctly. For now I have replaced the tests with a TimedText page which does actually exist, and all tests are passing. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:26, 15 May 2024 (UTC) ::::::I've made an update to the mock title module in [[Special:Diff/1223977125]] which fixes this edge case of escaping mock titles, and the testcase now works as expected (Strad, if you do see this, maybe review this change, since the hooking is a little bit aggressive and it might have a better implementation). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:34, 15 May 2024 (UTC) :::::::Maybe one day I'll understand what you did there. But for now, thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:38, 15 May 2024 (UTC) :::::::This is a great start - thank you for the edit. One of the goals of the module is to be able to revert title objects to their original state after each test. To do this, I think you would need to keep track of each title object that is altered when being hooked. I will have a think about how best to do this. At the moment, I think normal title objects which have mock titles hooked in one of their properties will remain altered after the patching function exits. Also, a similar hooking process needs to be implemented for [[mw:LUAREF#Title objects|Title.subPageTitle( text )]], as that method returns other title objects. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 15:25, 17 May 2024 (UTC) ::::::It's more "not yet implemented" than "not implemented correctly". Patches are welcome. :) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 14:59, 17 May 2024 (UTC) == Interface messages == There are three different types of page in this namespace: # [[MediaWiki:Filetype-missing]] - valid message but has not been created to override default # [[MediaWiki:Duplicate-args-warning]] - has been created to override default # [[Mediawiki:Fghghghg]] - invalid and non-existent I notice that ifexist returns false on the first type. This is a valid message and a blue link, containing the default text for this message. You would only create it to overridge that default. I think I would prefer pagetype to identify this as an interface page rather than a non-existent page. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:32, 17 May 2024 (UTC) :Perhaps <code>title.isLocal</code> can be used to distinguish between some of these types &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:01, 17 May 2024 (UTC) :Proposed amended code on sandbox. A valid system message will be treated as an interface page even if it does not exist locally &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:34, 20 May 2024 (UTC) Also added a fix for files hosted on Commons, which were being classified as non-existent pages. All testcases are now working, so will deploy this later &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:06, 21 May 2024 (UTC) == Sandbox page protection fix == {{Edit fully-protected|Module:Pagetype/sandbox|answered=yes|force=yes<!--not a TPER matter-->}} Could the template protection that got automatically applied to the sandbox be removed? Someone presumably accidentally included it in a major module, but this got quickly fixed and the transclusions have already dropped to just 37. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:16, 10 October 2024 (UTC) :{{done}} -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:36, 10 October 2024 (UTC) :Yes that was probably [[Template:WikiProject Cycling]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:46, 11 October 2024 (UTC) == Invalid pages == The module fails badly when {{para|page}} is set to an invalid page, e.g. <code><nowiki>{{pagetype|page=Talk:Talk:Granville Gee Bee Model A}}</nowiki></code> produces {{pagetype|page=Talk:Talk:Granville Gee Bee Model A}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:55, 10 November 2024 (UTC) :Because that title is a bad title (mediawiki refuses to resolve it, e.g. [[Talk:Talk:Test]] will not link), <code>mw.title.new</code> is returning nil. How you'd want to handle this in the context of page types I'm not sure (an error probably makes sense tbh). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 15:01, 10 November 2024 (UTC) ::Why not just the same as any other non-existent page, e.g. <nowiki>Gjdeoofg</nowiki> does not cause an error &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:26, 10 November 2024 (UTC) :::That's just a page that doesn't exist. It's still a valid possible page and therefore has resolvable properties, like a subject title. Pages that e.g. stack namespaces (see [https://en.wikipedia.org/wiki/Talk:Talk:A]) or contain invalid characters like <code>></code> (see [https://en.wikipedia.org/wiki/Tempalte:%3E]) ''can't'' exist per the mediawiki software, so <code>mw.title.new</code> returns nil for them, since it doesn't make sense to resolve them. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 20:34, 10 November 2024 (UTC) ::::Okay fair enough. I actually didn't know that you couldn't create certain pages &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:11, 10 November 2024 (UTC) :::::It would be nice to handle the nil value gracefully, but the coding is beyond my skills. And FWIW, I have created pages with stacked namespaces in error in the past, during page moves. [[Template:Template:A]] is a valid page name, for example. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 13:41, 11 November 2024 (UTC) ::::::The graceful handling makes sense, I could sandbox that if no one else does. It seems that the namespace stacking is mostly only an issue if the first namespace is <code>Talk:</code>, since it would be the talk page of an impossible to resolve article, since it wouldn't be an article if it started with a namespace (for all other namespaces this doesn't appear to be an issue, e.g. [[Template talk:Talk:E]] can easily associate with [[Template:Talk:E]]). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 13:51, 11 November 2024 (UTC) :::::::I've changed the sandbox such that the error at least points out the exact issue instead of just erroring later on (see [[Special:Permalink/1257015583|test page]]). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 19:32, 12 November 2024 (UTC) ::::::::{{thumbsup}} Looks good &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:39, 12 November 2024 (UTC) == class parameter == In olden days, we had no way of detecting disambiguation pages and other types of page so we used to pass the {{para|class}} parameter to this module. I'm wondering if this is still needed now &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:02, 16 November 2024 (UTC) :As far as I can tell the functionality boils down to "if parameter 1 is <code>na</code> and the page is in mainspace, return <code>page</code> (or something custom) instead of <code>article</code>", and that's it. It does give me the vibe of an old hacky-ish fix that implemented na-rating handling possibly at a lower level than it should've been. It's hard to tell how in use it currently is without adding a category, but [https://en.wikipedia.org/w/index.php?search=hastemplate%3Apagetype+insource%3A%2F%5C%7B%5C%7B%5BPp%5Dagetype+%2A%5C%7C%5B%5E%7C%3D%5D%2B%5C%7C%2F&title=Special:Search&profile=advanced&fulltext=1&ns0=1&ns2=1&ns4=1&ns6=1&ns8=1&ns10=1&ns12=1&ns14=1&ns100=1&ns118=1&ns126=1&ns710=1&ns828=1&limit=500 this insource search] suggests it's still in use in quite a few templates (majoritively wikiprojects, some of which still have a lot of transclusions like {{tl|WikiProject Biography}} and {{tl|WikiProject Television}}), so a decent amount of initial conversion work would probably be required before removing it. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:46, 16 November 2024 (UTC) ::Yes, it's in [[Module:Banner shell]] but is causing unexpected results so I will be removing it shortly &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:52, 16 November 2024 (UTC) czg80houtb95mzxooldhtawsarfnd8x 117289 117288 2026-07-16T11:45:47Z Tumbuka Arch 6863 1 revision imported from [[:en:Template_talk:Pagetype]] 117288 wikitext text/x-wiki {{central|Module talk:Pagetype}} {{permprot}} {{copied|from=Template:Pagetype|from_oldid=616197024|to=:incubator:Template:Wp/nod/pagetype|to_diff=4242185}} ==Books== {{tlx|editprotected}} This should be updated to account for |class=book. [[User:Headbomb|Headbomb]]&nbsp;{<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub>&nbsp;&ndash;&nbsp;[[WP:PHYS|WP Physics]]} 06:15, 11 December 2009 (UTC) :I'm not exactly sure what the behavior should be. Somewhat important when changing a template that is used 2.7 million times. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 12:45, 11 December 2009 (UTC) ::I don't think "books" is a proper classification here. Either way, these changes need to be made in a sandbox like [[Template:pagetype/sandbox]] to avoid breaking things. --[[User:MZMcBride|MZMcBride]] ([[User talk:MZMcBride|talk]]) 18:44, 11 December 2009 (UTC) ==Needed== Should {{para|class|needed}} be produce "page" or "article"? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:27, 29 April 2010 (UTC) :I thought we didn't support Needed-Class anymore. [[User:Happy-melon|<span style="color:forestgreen">'''Happy'''</span>]]‑[[User talk:Happy-melon|<span style="color:darkorange">'''melon'''</span>]] 15:24, 29 April 2010 (UTC) ::But what about all the subcategories of [[:Category:Needed-Class articles]]? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:07, 29 April 2010 (UTC) :::And the subcategories of [[:Category:Current-Class articles|Current-Class articles]], or [[:Category:Merge-Class articles|Merge-Class articles]], or any of the other custom classes?? Those classes which we said should be available for projects to use if they wish, but for which we should not bloat banner code for all projects. There are 74 Needed-Class categories, 63 of which are empty. I don't agree that we should make any move to better integrate these niche classes when that disadvantages 1,600 projects for the sake of less than a dozen. [[User:Happy-melon|<span style="color:forestgreen">'''Happy'''</span>]]‑[[User talk:Happy-melon|<span style="color:darkorange">'''melon'''</span>]] 21:31, 29 April 2010 (UTC) ::::Fair enough. I hadn't noticed that so many of them were empty. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:32, 30 April 2010 (UTC) == talkspace=yes == I think a talkspace=yes, similar to subjectspace=yes, would be useful to have as an optional parameter for this template. It should, if on a talk page, return "talk page" and otherwise return the default value. This would be useful for templates like {{Tl|Last edited by}} to be more accurate or {{Tl|In use}} so we can get rid of the switch function there. --[[User:The Evil IP address|The Evil IP address]] ([[User talk:The Evil IP address|talk]]) 18:08, 6 June 2010 (UTC) :Sorry I can't understand what you mean. Can you describe the behaviour of the template with this new parameter? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:46, 6 June 2010 (UTC) ::Currently, on a talk page, this template shows the subject namespace, for example on an article talk page, it shows "article", on a template talk page it shows "template", and so on. However, there are situations in which it would be good to return "talk page" instead, for example within {{Tl|Last edited by}}. I'd like to add this template to {{Tl|Db-meta}} in the next time (which already uses a similar hardcoded function of this template), but since db templates are also used on talk pages, showing "article" or "template" wouldn't make sense there. --[[User:The Evil IP address|The Evil IP address]] ([[User talk:The Evil IP address|talk]]) 13:10, 9 June 2010 (UTC) :::Ah now I understand. I would be open to such an addition if it can be coded cleanly without affecting the performance for the majority of uses (as this is a very widely used template!) Question: could you not just use '''<nowiki>{{NAMESPACE}} page</nowiki>''' in your case? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:36, 9 June 2010 (UTC) ::::Fixed by using [[Template:pp-meta/pagetype]] instead. [[User:Prodego|<span style="color:darkgreen;">''Prodego''</span>]] [[User talk:Prodego|<sup style="color:darkgreen;">talk</sup>]] 23:59, 12 January 2011 (UTC) == Misleading documentation == According to the documentation there's a parameter "subjectspace - If set to yes then subjectspace pages will be treated the same as talkspace pages." Without subjectspace: <nowiki>{{pagetype|page=Category:X1}} and {{pagetype|page=Category talk:X1}}</nowiki> produce "{{pagetype|page=Category:X1}}" and "{{pagetype|page=Category talk:X1}}". With subjectspace: <nowiki>{{pagetype|page=Category:X1|subjectspace=yes}} and {{pagetype|page=Category talk:X1|subjectspace=yes}}</nowiki> produce "{{pagetype|page=Category:X1|subjectspace=yes}}" and "{{pagetype|page=Category talk:X1|subjectspace=yes}}". There's an unnamed parameter, "class", but that's "optional" and the documentation suggests that it shouldn't affect the result in this case. Is the intention to require page name (which includes namespace) and namespace specified as separate parameters? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 00:01, 22 September 2013 (UTC) :I've updated the docs to match what the template does. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 00:15, 22 September 2013 (UTC) ::It's still misleading. "This template is used to identify what kind of page it or its subject page is." - but when used with a page name, it returns "Article" for a template and "Template" for a template talk page. Is there something similar to [[Template:Pp-meta/pagetype]] (mentioned above) but allowing a parameter for page name? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 08:02, 22 September 2013 (UTC) :::This template was designed for use by WikiProject banners so it was mainly just tested on talk pages and currently doesn't do very well with non-talk pages. I'll have alook at doing something better in the sandbox soon. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 08:33, 22 September 2013 (UTC) ::::I found it in use in [[Template:Edit protected]] and [[Template:Edit semi-protected]], where parameter is needed because of [https://en.wikipedia.org/w/index.php?title=MediaWiki:Protectedpagetext&diff=564379718&oldid=560600426 a change] to [[MediaWiki:Protectedpagetext]]. I've had to use TALKPAGENAME in those templates, which isn't ideal but produces the correct result (except in the unlikely event of a request for an edit to a redirected talk page). It may produce incorrect results if this template is changed, although it only affects the message and not the template's function. If improving or replacing this template, it may also be possible to use [[Module:Redirect]] to determine whether a page is a redirect, although it currently fails where "#REDIRECT:" (instead of just "#REDIRECT" is used. [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 10:12, 22 September 2013 (UTC) :::::Right, I've made some changes in the sandbox and now <nowiki>{{pagetype/sandbox|page=Category:X1}} and {{pagetype/sandbox|page=Category talk:X1}}</nowiki> produce "{{pagetype/sandbox|page=Category:X1}}" and "{{pagetype/sandbox|page=Category talk:X1}}". I've also removed the subjectspace option from the sandbox since it's not needed with the changes that I've made. Can you give it a test yourself & if you are happy, we can make it live. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:30, 22 September 2013 (UTC) ::::::It's an improvement for pages not in talk or article space, and does what the "output" section of the documentation says, with the exception of "portal" or "project" class in subjectspace - is that needed? [[User:Peter James|Peter&#160;James]] ([[User talk:Peter James|talk]]) 15:08, 22 September 2013 (UTC) :::::::I think that's fine. I've updated the template and the docs. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:07, 22 September 2013 (UTC) == Module:Pagetype == I've created a Lua implementation of this template at [[Module:Pagetype]]. It's much more customisable than this template, and can be used to create other pagetype-like templates with different namespace configurations and custom text values. Have a look at the module documentation for details. The default settings are almost the same as this template, with one important difference - redirects are now detected and displayed as "redirect", no matter what namespace they are in. If this is undesirable I can change it, but it won't be easy to change the redirect detection on a per-namespace basis, due to the way the module hooks into [[Module:Namespace detect]]. Please have a look at the module, test it a bit, and see if there are any bugs, or anything you would like to change. You might also want to take a look at the [[Module:Pagetype/testcases|test cases]] ([[Module talk:Pagetype/testcases|results]]). If everything is ok, I plan to update {{tl|pagetype}} with this module some time this week. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:07, 4 November 2013 (UTC) :Great! I notice that {{tl|db-meta}} uses the following construction several times: <pre>{{talk other|talk page|{{pagetype|subjectspace=yes}}}}</pre> :Does your version make this simpler to do? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:23, 7 November 2013 (UTC) ::Seems as though <code><nowiki>{{#invoke:pagetype|main|talk=y}}</nowiki></code> would work here as a shorter replacement. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 12:00, 7 November 2013 (UTC) :::Yes, that's right - you could also use <code><nowiki>{{#invoke:pagetype|main|defaultns=all}}</nowiki></code>, depending on how many namespaces you want to include by default. I also wasn't aware of the {{para|subjectspace}} parameter until now, as it was removed with [https://en.wikipedia.org/w/index.php?title=Template:Pagetype&diff=574059272&oldid=541587542 this edit], so adding {{para|subjectspace|yes}} to the module won't have any effect. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:13, 7 November 2013 (UTC) ::::Ok, I've made the switch to the new module. Let me know if you spot any issues. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 07:50, 9 November 2013 (UTC) == Misleading message about redirect == {{moved from|Template talk:Edit protected|[[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 19:16, 3 April 2014 (UTC)}} If you put {{tlx|Edit protected|MediaWiki talk:Spam-blacklist/log}} on [[MediaWiki talk:Spam-blacklist]], the box begins with "It is requested that an edit be made to the fully protected redirect at MediaWiki talk:Spam-blacklist/log.". Why "redirect", when [[MediaWiki talk:Spam-blacklist/log]] isn't? See {{oldid|MediaWiki talk:Spam-blacklist|602617506#Full_log|this permalink}}. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 18:54, 3 April 2014 (UTC) :{{ping|Mr. Stradivarius}} The issue is that when p._main{page='MediaWiki talk:Spam-blacklist/log'} is called, checkRedirects instead checks to see if MediaWiki:Spam-blacklist/log is a redirect (lines 208-211). I'm not sure what the logic behind doing that that way is. Thoughts? [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 19:16, 3 April 2014 (UTC) ::Yep, that's a bug in the module. It should use the current page rather than the subject page if talk pages are allowed, but at the moment it only checks args.talk, not args.defaultns. I'll have a think about how best to fix this. (Also, your ping didn't work - not sure why.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:12, 4 April 2014 (UTC) :::Now fixed. I also uncovered a nasty bug that was introduced by the recent changes to [[Module:Namespace detect]] - this module was trying to use the # operator with the mappings table, which didn't work after it was switched to load using mw.loadData. I also split out the config data to [[Module:Pagetype/config]], loaded using mw.loadData. And I made some beautification fixes too. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 06:01, 4 April 2014 (UTC) :::I didn't get a ping either. It might be because it was a page creation? --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 10:18, 4 April 2014 (UTC) ::::{{ping|Mr. Stradivarius}} Broken in the opposite way now. [{{fullurl:Module talk:Message box|oldid=602879313#Protected_edit_request_on_5_April_2014}}] says talk page instead of module. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 16:05, 5 April 2014 (UTC) :::::Bleh. That was a bug I introduced to [[Module:Namespace detect]] this morning trying to fix an unrelated issue. That's now fixed as well. And with that, I think I shall call it a night. If you notice other similar problems, purging should fix it. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 17:13, 5 April 2014 (UTC) == Drafts == I don't think this module identifies pages in the draft namespace. Please could this be added? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:40, 3 October 2014 (UTC) :You could either use <nowiki>{{pagetype|draft=true}}</nowiki> or you could edit the cfg.defaultNamespaces section of [[Module:Pagetype/config]]. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:56, 3 October 2014 (UTC) ::{{ping|MSGJ}} Drafts are detected fine - they are one of the extended namespaces. See [[Module:Pagetype#Default namespace sets]] for a quick look at what is in what set. And if you think drafts should be in the default set instead of just the extended set, we can make the change in the module config, as WOSlinker said. (We should probably get consensus for that first, though.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 13:13, 3 October 2014 (UTC) :::Yes well, perhaps "draft" should be in that set. <s>Also I'm surprised that "file" is not there.</s> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:51, 3 October 2014 (UTC) :::Hmm I see "file" is there, but not in the "media" row so I'm a bit confused by that. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:53, 3 October 2014 (UTC) ::::{{ping|MSGJ}} That's because when you click a link to a media namespace page, you're not going to a wiki page, but you're viewing the file directly. For example: [[Media:Example.svg]]. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 14:00, 3 October 2014 (UTC) :::::Interesting, I didn't know that! In the meantime I've used {{para|draft|yes}} on [[Template:Importance mask]] so it works as intended. Cheers all &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:29, 4 October 2014 (UTC) == Protected edit request on 28 September 2015 == {{edit fully-protected|Module:Pagetype|answered=yes}} <!-- Begin request --> Add the Gadget and Gadget definition namespaces and make the page type the same name, but with a lowercase "G".<!-- This will mean that if a speedy deletion template is placed on a page in one of those namespaces, then the page will say "This gadget may meet Wikipedia's criteria for speedy deletion" or "This gadget definition may meet Wikipedia's criteria for speedy deletion". --> <!-- End request --> [[User:GeoffreyT2000|GeoffreyT2000]] ([[User talk:GeoffreyT2000|talk]]) 02:50, 28 September 2015 (UTC) :[[File:Yes check.svg|20px|link=]] '''Done'''<!-- Template:EP --> — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:41, 28 September 2015 (UTC) == Set index articles == {{re|Mr. Stradivarius}} Is there any way for the module to distinguish between disambiguation pages and set index articles? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 00:06, 5 July 2016 (UTC) :I asked about disambiguation pages somewhere before and was told that it is impossible ;( &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:28, 12 July 2016 (UTC) :{{ping|PC78}} see [[Module talk:Redirect#Query]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:32, 12 July 2016 (UTC) ::Hmm. The doc refers to disambiguation pages at [[Module:Pagetype/doc#Main namespace classes]]. Does this not do what I think it does? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 17:02, 12 July 2016 (UTC) :::You have to tell the module that it is a disambiguation page using the class parameter. It won't detect it automatically, which I think it what you were asking about. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:25, 12 July 2016 (UTC) ::::Ah-ha. How does the [[Wikipedia:Metadata gadget|Metadata gadget]] do it then, is that not something that can be applied to a template? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 06:49, 13 July 2016 (UTC) :::::The gadget also uses the class rating from the article's talk page, I believe! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:36, 20 April 2023 (UTC) == Detecting disambiguation pages == {{tracked|T71441}} Would it be possible to detect disambiguation pages from this module? Disambiguation pages have the page property "disambiguation". Can you retrieve page properties from Lua modules? [[User:Kaldari|Kaldari]] ([[User talk:Kaldari|talk]]) 20:44, 31 October 2016 (UTC) :Please see [[Module talk:Redirect#Query]]! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:54, 31 October 2016 (UTC) ::Thanks for the pointer. After looking at the Phab ticket and the Scribunto code, I think I actually know how this could be implemented. [[User:Kaldari|Kaldari]] ([[User talk:Kaldari|talk]]) 21:19, 31 October 2016 (UTC) == cross project calls == Should this work across wikiprojects? For example * <nowiki>{{#invoke:pagetype|main|page=Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Voy:Frankfurt}}</nowiki> gives: {{#invoke:pagetype|main|page=Voy:Frankfurt}} * <nowiki>{{#invoke:pagetype|main|page=Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=W:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=W:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main123}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:Frankfurt/Main123}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:Frankfurt/Main}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:Frankfurt/Main}} * <nowiki>{{#invoke:pagetype|main|page=FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=FRA}} * <nowiki>{{#invoke:pagetype|main|page=Wikipedia:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikipedia:FRA}} * <nowiki>{{#invoke:pagetype|main|page=W:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=W:FRA}} * <nowiki>{{#invoke:pagetype|main|page=Wikivoyage:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Wikivoyage:FRA}} * <nowiki>{{#invoke:pagetype|main|page=Voy:FRA}}</nowiki> gives: {{#invoke:pagetype|main|page=Voy:FRA}} Does not appear to be giving correct results, or am I misunderstanding the syntax? --[[User:Traveler100|Traveler100]] ([[User talk:Traveler100|talk]]) 12:21, 15 February 2018 (UTC) :I don't believe this is possible and/or desirable &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:46, 20 April 2023 (UTC) == Plurals == Following a request at [[Wikipedia talk:Short description #Category fix needed]], which complained that the {{tl|Short description}} naively pluralises 'category' as '<del>categories</del><ins>categorys</ins>', I looked for a fix. As the template calls [[Template:Pagetype]] in three places, it seemed hugely inefficient to use logic to test for irregular plurals at each call, so I've implemented a boolean {{para|plural}} parameter in [[Module:Pagetype/sandbox]]. That makes use of a couple of extra variables that I've added to [[Module:Pagetype/config/sandbox]] (to allow localisation for other Wikis). I've set each respective sandbox to call the relevant sandbox. So: * <code><nowiki>{{pagetype/sandbox}}</nowiki></code> → {{pagetype/sandbox}} * <code><nowiki>{{pagetype/sandbox |plural=y}}</nowiki></code> → {{pagetype/sandbox |plural=y}} * <code><nowiki>{{pagetype/sandbox |plural=n |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype/sandbox |plural=n |page=Category:CS1 maint: archived copy as title}} * <code><nowiki>{{pagetype/sandbox |plural=y |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype/sandbox |plural=y |page=Category:CS1 maint: archived copy as title}} It seems to work without problem on each type of page, including redirects where I've previewed the above code. It fails the same four testcases at [[Module talk:Pagetype/testcases]] that were failing before (pages that are now redirects). As I'm not familiar with the uses of the less common parameters (although there ''should'' be no interaction as I've coded the changes at the output of the main function), I'm flagging this up for review and to seek consensus for the changes to be made. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:16, 24 May 2020 (UTC) Sorry, I should have pinged {{u|Mr. Stradivarius}} as the author of the module. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:19, 24 May 2020 (UTC) :I support this change, with a minor note that for posterity, I think your original description of the error should read {{tq|naively pluralises 'category' as 'categorys'}} (note the misspelled last word). I was going to strike it out for you, but I might be misunderstanding the situation entirely. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 23:40, 24 May 2020 (UTC) :: Thanks for spotting that, {{u|Jonesey95}} – my internal spell-checker clearly took over (either that or my senility is progressing faster than I thought). Cheers --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 23:50, 24 May 2020 (UTC) :::{{ping|RexxS}} thanks for coding this, and please do implement &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:25, 9 June 2020 (UTC) :::: Apologies, I did that last week, but forgot to update this thread. This template now accepts the {{para|plural}} parameter: ::::* <code><nowiki>{{pagetype}}</nowiki></code> → {{pagetype}} ::::* <code><nowiki>{{pagetype |plural=y}}</nowiki></code> → {{pagetype |plural=y}} ::::* <code><nowiki>{{pagetype |plural=n |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype |plural=n |page=Category:CS1 maint: archived copy as title}} ::::* <code><nowiki>{{pagetype |plural=y |page=Category:CS1 maint: archived copy as title}}</nowiki></code> → {{pagetype |plural=y |page=Category:CS1 maint: archived copy as title}} :::: I've updated the documentation at [[Template:Pagetype/doc #Plurals]]. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 16:07, 9 June 2020 (UTC) == Protected edit request on 18 June 2020 == {{edit fully-protected|Module:Pagetype|answered=yes}} Implement the change I've made at [[Module:Pagetype/sandbox]]; specifically, the addition of a {{para|caps}} parameter, that capitalises the first letter of the output. The change is very simple; below line 209, insert the following: <syntaxhighlight lang="lua" line start="210"> if yesno(args.caps, false) then pagetype = mw.ustring.upper(mw.ustring.sub(pagetype, 1, 1)) .. mw.ustring.sub(pagetype, 2) end </syntaxhighlight> <small>The indentation on the output above is... interesting... but the correct indentation is used in the wikitext.</small> You can see this working in the [[Module talk:Pagetype/testcases|test cases]], where I've written specific tests for it; it plays nicely with the {{para|plural}} parameter, as you'd expect. It is worthy of note that I've [https://en.wikipedia.org/w/index.php?title=Module%3APagetype%2Ftestcases&type=revision&diff=963243595&oldid=963242397 had to separately fix some of the other testcases], as the pages that they depended on have changed since the last time the testcases were used. Please let me know once this is sorted so I can update the documentation for the new parameter. Thanks! [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 18:40, 18 June 2020 (UTC) [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 18:40, 18 June 2020 (UTC) : : The code works fine, but is there a use case for it? As an aside, <code>:gsub("^(%l)", string.upper)</code> is a compact way of doing ucfirst (that's %'lower-case-L' in the pattern). --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 20:27, 18 June 2020 (UTC) ::{{re|RexxS}} The intended use case would be to have templates that either categorise pages, or link to categories of pages, shown correctly with the capitalisation of the first letter of the category. In the first case, which was actually what prompted me to propose this change, there's not much practical difference, because MediaWiki doesn't care about first letter capitalisation, and categories are processed through it. In the second, however, there's a visible difference for people looking at the link. It's no big deal, but it's a nice thing to have, and for the few lines of code it takes to support it, I figured why not {{=)}}{{pb}}Thanks for the tip about ucfirst - I'd not thought of just using a gsub, good shout! [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 21:06, 18 June 2020 (UTC) ::: {{re|Naypta}} I've implemented your change and tidied the odd indent. Please check it over and update the documentation when you get a chance. Cheers. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 21:28, 18 June 2020 (UTC) ::::{{re|RexxS}} [https://en.wikipedia.org/w/index.php?title=Template:Pagetype/doc&type=revision&diff=963273850&oldid=960209712&diffmode=source Done] and [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/doc&action=historysubmit&type=revision&diff=963273701&oldid=960209682&diffmode=source dusted] - cheers! I've also added TemplateData for {{para|plural}}, and tidied up the documentation on the template to use examples of template code rather than of module code. {{=)}} [[User:Naypta|Naypta]] ☺ &#124; <small>[[User talk:Naypta|✉ talk page]]</small> &#124; 21:37, 18 June 2020 (UTC) == Question regarding the use of the dab parameter == I'm not sure I understand how the {{para|dab}} parameter works. I have a usecase that I want to check if a page is an actual article or a dab or redirect. If I understand correctly from the docs I should do: * <code><nowiki>{{Pagetype|page=AC|dab}}</nowiki></code>, which produces: {{Pagetype|page=AC|dab}} * <code><nowiki>{{Pagetype|page=Air conditioning|dab}}</nowiki></code>, which produces: {{Pagetype|page=Air conditioning|dab}} The first is a dab while the second is an article. What am I doing wrong? --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 10:42, 2 July 2020 (UTC) :I don't think there is any way to check if a page is a disambig automatically, so what you are doing above is passing in the class value and because the class value you've passed is "dab", it outputs "page". If you have passed "start" for example then it would have output "article". :* <code><nowiki>{{Pagetype|page=AC|start}}</nowiki></code>, which produces: {{Pagetype|page=AC|start}} :You can see what's possible against the Title object in the [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects LUA reference manual] and you'll see that there are items to check for redirects but nothing for disambig. Also see [https://phabricator.wikimedia.org/T71441 phabricator T71441].-- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:42, 2 July 2020 (UTC) ::Yeah I know there is no direct access, but I thought there was some backend manipulation the page content. So I'm not sure what the point is of the dab class. If I already know what the page type is, why would I send the page type, or even use this template in the first place? I feel like I'm missing something here. --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 13:51, 2 July 2020 (UTC) ::: A couple of hacks come to mind that could determine whether a page is a dab page: :::* Using a call to a Scribunto module that fetches the content of the page, <code>titleobject.getcontent()</code>, and then looks for the {{tl|disambiguation}} template in it. Heavy and expensive. :::* If you're checking from Wikidata from an entity, use the fact that <code>titleobject.redirectTarget</code> returns false if the page is not a redirect; and <code>mw.wikibase.getSitelink(qid)</code> returns nil if the page has no Wikidata sitelink. If an article page has no Wikidata sitelink and is not a redirect, it is almost certainly a dab. ::: There are possibly others, but I'm not aware of any 100% guaranteed way that doesn't depend on some assumptions. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 15:49, 2 July 2020 (UTC) ::::{{Ping|RexxS}}, thanks. I've been looking into the page:content() before I came here. Can you explain to me what's the purpose of the dab parameter? --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 16:04, 2 July 2020 (UTC) :::::There's more than just the disambiguation template to look for, there's some of the [https://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Dmbox&namespace=10&limit=110&hidelinks=1 following] templates that are also used for that purpose as well. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:40, 2 July 2020 (UTC) :::The main purpose of the Pagetype template is to be used on the project banners to show either "article" or "page" in the banner text. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:33, 2 July 2020 (UTC) :::: {{re|Gonnym}} As an example, if this template is used inside a WikiProject template, it can read the {{para|class}} parameter (passed into the WikiProject template) like this: <code><nowiki>{{pagetype|{{{class|}}} }}</nowiki></code> and then might be used to create a category name that the article should belong to, given that if the class is given as dab or n/a, the template will then return "page" instead of "article". There is the ability to specify custom text for either dab or n/a, depending on the naming convention required for the category name. Does that make sense? --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 20:42, 2 July 2020 (UTC) :::::Yes, thanks! --[[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 22:25, 2 July 2020 (UTC) == Erroneous entries in WhatLinksHere == Using this template on a file talk page causes [[Special:WhatLinksHere]] for the file page to report the talk page linking to the file page. If this is fixable, please do. See also [[Template talk:WPBannerMeta#Protected edit request on 29 July 2021]]. — <span style="color:#e08020">Alexis Jazz</span> ([[User talk:Alexis Jazz|talk]] or ping me) 11:36, 29 July 2021 (UTC) == Protected edit request on 2 May 2022 == {{edit fully-protected|Template:Pagetype|answered=yes}} Change page's main title Sterling Entertainment Group to United American Video and lock the page from further editing. The information on this page is wildly inaccurate and most of it has now been edited for accuracy except for the main title. United American Video was never Sterling Entertainment Group. I should know I was a founder from 1984 to 2005. [[User:Jpettus1|Jpettus1]] ([[User talk:Jpettus1|talk]]) 16:29, 2 May 2022 (UTC) :{{not done}} this has nothing to do with editing [[Template:Pagetype]]; try the talk page attached to whichever article you want to change. — [[User:Xaosflux|<span style="color:#FF9933; font-weight:bold; font-family:monotype;">xaosflux</span>]] <sup>[[User talk:Xaosflux|<span style="color:#009933;">Talk</span>]]</sup> 18:31, 2 May 2022 (UTC) == Use [[Module:Disambiguation]] == I propose using [[Module:Disambiguation]] to automatically detect disambiguation pages, as currently used on [[Module:Class mask]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:50, 20 April 2023 (UTC) :@[[User:Mr. Stradivarius|Mr. Stradivarius]]: any chance you could look at this, because I think you wrote this module initialy? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:21, 10 May 2023 (UTC) :@[[User:Mr. Stradivarius|Mr. Stradivarius]]: if you do have time to look at this module, it would be appreciated. It does have a significant effect because importance is not being correctly autoclassified as NA on disambiguation talk pages. Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:47, 18 May 2023 (UTC) ::Time is one thing I don't have the luxury of right now... but perhaps I can take a look at some point in the next few weeks. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 00:25, 19 May 2023 (UTC) :::@[[User:Mr. Stradivarius|Mr. Stradivarius]] just a little reminder if you have time to look at this :) Would it also be possible for {{para|defaultns|extended}} to produce "disambiguation page" in this case? Thank you. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 05:10, 19 August 2023 (UTC) ::::{{ping|MSGJ}} I have implemented disambiguation page detection at [[Module:Pagetype/sandbox]]. At the moment, this still outputs the default "page" for disambiguation pages. Disambiguation detection works like redirect detection - it is on by default, and is checked before looking at {{para|defaultns}} or explicit namespace arguments. This means that if we are going to change the module to produce "disambiguation page" for disambiguation pages, with the current implementation this would be independent of the value of {{para|defaultns}}. (It can be done by editing the <code>cfg.dabDefault</code> value in [[Module:Pagetype/config/sandbox]].) <p>Using "disambiguation page" could be a breaking change for some users, as previously disambiguation pages specified by the first positional parameter have been output as "page". Before changing it, we should probably check to see whether anything is likely to break, and have a wider discussion. In the meantime, you can always change it on a per-template basis by using {{para|dab|disambiguation page}}.</p> <p>My edits to the sandbox have also removed the dependency on [[Module:Namespace detect]], and I also changed [[Module:Pagetype/testcases]] to use [[Module:Mock title]] so that the test cases won't break if anyone edits any pages mentioned in them. Let me know if you spot any issues with any of this, and if not I'll go ahead and deploy the sandbox version to the main module. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:34, 27 August 2023 (UTC)</p> :::::I have gone ahead and deployed the changes to the main module. Please let me know if you spot any issues. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:39, 28 August 2023 (UTC) ::::::Thanks very much. I'll test it very soon when I get some time. I can use {{para|dab|disambguation}} for now but it would be great if defaultns could be used later, if that is possible &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:56, 28 August 2023 (UTC) :::::::{{ping|MSGJ}} I think changing the default would break too many things. Changing to automatic disambiguation page detection has already [[Wikipedia talk:Short description#Category transclusion|broken the categories]] used by [[Template:Short description]], and it is difficult to tell what else might break by changing the default wording from "page" to "disambiguation page". — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:19, 29 August 2023 (UTC) ::::::::{{ping|Mr. Stradivarius|MSGJ}} The WikiProject classification for some disambiguation pages such as [[Dragon Quest Heroes]] moved from being "NA-importance" by default to "Unknown-importance" as of today; since no change was made to Wikiproject banner shell, I think that this change may have affected that template/module. In looking at what moved and what didn't, it appears that "set index articles" are now no longer "NA" by default, while "normal" disambiguation articles are still handled correctly. I'm presuming that the fix needs to be applied to Wikiproject banner shell, not here, but replying here since there was an active discussion. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 02:21, 30 August 2023 (UTC) :::::::::{{ping|PresN}} I tracked the problem down to [[Module:WikiProject banner]]. It uses [[Module:Pagetype]] [[Module:WikiProject banner#L-109|here]], and then compares the result to the string "article" [[Module:WikiProject banner#L-312|here]]. This should probably be changed to a namespace check. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 02:55, 30 August 2023 (UTC) ::::::::::{{re|Mr. Stradivarius}} I think it's actually that [[Module:Disambiguation]] only looks for ''disambiguation'' templates, but set index pages have ''set index'' templates, so they don't get counted by the module as a disambiguation page, so Module:Pagetype is saying they're "article". Either Module:Disambiguation should treat those like disambig pages, or else Module:Pagetype should call a [[Module:Set index]] with its own regex patterns to handle set index pages. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 11:48, 30 August 2023 (UTC) :::::::::::{{ping|PresN}} Hm, you are right: <code><nowiki>{{pagetype|page=Dragon Quest Heroes}}</nowiki></code> produces "article". This means that the recent change to [[Module:Pagetype]] won't have affected it (unless it was passing "dab" as the first positional parameter, which not many pages do). So there must be another reason for the change from "NA-importance" to "Unknown-importance". By the way, I don't think that set index articles not being detected as disambiguation pages by [[Module:Disambiguation]] is an error. From [[WP:SETINDEX]]: {{tq|A set index article (SIA) is a ''list article'' about a set of items of a specific type that also share the same (or similar) name}} (italics mine). Also, there's an entire section [[WP:SETNOTDAB]] explaining that set index articles are not disambiguation pages. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 13:26, 30 August 2023 (UTC) ::::::::::::{{re|Mr. Stradivarius}} Hmm. Given the definition and examples at that page (e.g. [[List of peaks named Signal]]), I see the argument for pagetype treating them as "article" rather than "disambiguation". I also don't think the pages I was looking at are really SIAs by that definition, but should be disambiguation pages. I'll adjust in that direction, and we can leave pagetype as it is. Still not sure what caused banner shell to stop treating them as disambiguation (I don't see anything in the code change that would cause it), but if its more correct this way then that's fine. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 13:52, 30 August 2023 (UTC) :::::::::::::I must admit that the definition of set index articles confuses me, but the "article" in its name makes it clear that they are articles so I don't there is an error here. I also don't see how the recent change could have affected this &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:30, 30 August 2023 (UTC) ::::::::::::::I'm still confused how it did, but there were some SIAs where the talk page template said "|class=Disambiguation" with no importance listed, and yesterday they moved from defaulting as NA-importance to being Unknown-importance. It was consistent on the 1.0 Bot assessment logs. It appears that the current state of things is the correct and intended way, and whatever was treating SIAs as disambiguation pages instead of lists was wrong, so nothing further to do here. --'''[[User:PresN|<span style="color:green">Pres</span>]][[User talk:PresN|<span style="color:blue">N</span>]]''' 21:41, 30 August 2023 (UTC) :Lots of [[WP:Set index]] articles are marked as disambiguation at WikiData... (maybe this isn't about WikiData, but I think I saw another post about it) [[User:Christian75|Christian75]] ([[User talk:Christian75|talk]]) 10:39, 18 May 2023 (UTC) ::No, we are not currently using wikidata. That was an option explored at [[Module:Disambiguation]] but it seems not worthwhile. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:42, 18 May 2023 (UTC) == Detecting pages with [[Template:Wiktionary redirect]] and other soft redirects == {{moved from|Template talk:Class mask}} @[[User:PARAKANYAA|PARAKANYAA]] suggested at [[Wikipedia talk:Content assessment]] that we should automatically detect pages using [[Template:Wiktionary redirect]] and its redirects, and automatically classify them as redirects. It seems we could the same with [[Template:Soft redirect]] and its redirects. Are there any other relevant templates? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:16, 9 January 2024 (UTC) :@[[User:MSGJ|MSGJ]] I think all the templates are listed at [[Wikipedia:Wikimedia sister projects#Specialized soft redirect templates]]. [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:22, 9 January 2024 (UTC) ::Wow okay, and you can bet that each template has about 10 redirects, so that's quite a lot of searching in the page text &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:23, 9 January 2024 (UTC) :::Sorry D: [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:37, 9 January 2024 (UTC) ::::I have created [[Module:Pagetype/setindex]] and [[Module:Pagetype/softredirect]] in preparation. Are there any other types that we could auto-classify? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:07, 17 January 2024 (UTC) Code now ready for testing in [[Module:Pagetype/sandbox]]. Some tests can be seen at the bottom of [[Template:Pagetype/testcases]]. If {{ul|Mr. Stradivarius}} was more active, I might ask him to check my code. My intention is to remove the call to [[Module:Disambiguation]] altogether as the code is mostly duplicated &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:34, 19 January 2024 (UTC) :{{ping|MSGJ}} Could you also add test cases to [[Module:Pagetype/testcases]]? There should be test cases there as well so that future updates to the code don't break the functionality you are adding. I designed the test cases so that you can specify an arbitrary "group name" (just a short description of the general kind of thing the test is testing), the arguments to the template, and the expected result. If you add more tests like that to the <code>tests</code> table they should just work. Also, please add any titles you use in the tests to the <code>mMockTitle.registerMockTitles</code> call at the top of the test cases and mock any fields that you will use. This ensures that the tests won't break if someone edits the actual wiki page in the future. You can see [[Module:Mock title]] for the different options you can use, but probably I guess you just need to copy the entry for "Alien" (a disambiguation page) and change the content. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 00:26, 20 January 2024 (UTC) ::Sure, will look at that. Can I ask a question? I assume that lines 25-27 of [[Module:Disambiguation]] are not needed here because we are already checking for redirects in line 210. Also, why are you using <code>mRedirect.getTargetFromText(content) ~= nil</code> rather than just <code>luaIsRedirect</code> in there? ::And if this works out well, can we get your bot to update these lists like it currently does for the dab pages? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:30, 20 January 2024 (UTC) :::{{tq|I assume that lines 25-27 of [[Module:Disambiguation]] are not needed here because we are already checking for redirects in line 210.}} Yes, that looks right to me. We shouldn't need a duplicate check. {{tq|1=Also, why are you using <code>mRedirect.getTargetFromText(content) ~= nil</code> rather than just <code>luaIsRedirect</code> in there?}} I don't remember the reason I wrote it that way. Maybe something to do with double redirects? There was definitely something that you had to parse the content for, rather than just checking the title object, but I don't remember the details, and I'm not sure if it still applies today. {{tq|And if this works out well, can we get your bot to update these lists like it currently does for the dab pages?}} Yes, it should be fairly easy to adapt (especially if we use the same format for all the data pages), and I would be willing to run it on the additional pages. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:24, 20 January 2024 (UTC) :::Also, one thing I noticed about the code - you can add a <code>break</code> statement after [[Special:Permalink/1197292991#L-142|line 142]], which will stop the algorithm checking all of the templates on a page if it finds a match. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:28, 20 January 2024 (UTC) ::@[[User:Mr. Stradivarius|Mr. Stradivarius]] for some reason when I added [[Module:Pagetype/testcases#L-44]] as a mock title, suddenly 7 unrelated tests failed. They seem to be all the tests which do not specify the page name. All my new tests are working correctly. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:47, 21 January 2024 (UTC) :::{{ping|MSGJ}} This indicates a bug somewhere, but I don't have time right now to look through the code to find out where it is. I might have another look tomorrow. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:15, 22 January 2024 (UTC) ::::Okay thanks. I suspect a bug in [[Module:Mock title]] rather than this module &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:38, 22 January 2024 (UTC) :::::{{ping|MSGJ}} I found the issue. You added the string <code><nowiki>{{Soft redirect|meta:Wikipedia usage statistics}}</nowiki></code> to [[Module:Pagetype/testcases]], and as the module treats [[Module talk:Pagetype/testcases]] as the current page, it looks through the content of [[Module:Pagetype/testcases]], finds that string, and assumes that the module must be a soft redirect. This wasn't a problem with disambiguation templates as the check for those was limited to the main namespace, but soft redirect detection is done in every namespace. <p>I'm in two minds as to how to fix this. The obvious way would be to also check the page's content model before doing the template check, but checking the content model [[mw:LUAREF#Expensive properties|increments the expensive function count]] for pages other than the current page, which might cause problems in templates that depend on this module. The alternative is to exclude namespaces that typically have different content models, like module space, <del>and userspace JS/CSS pages</del>. This will be more of a pain to code and will be wrong for pages that have their content model changed manually, but it will avoid breaking dependent templates. I think the latter solution will be better, as I think there is a high probability of pages being broken by the increase in expensive function count if we choose the former. (This is just an assumption, however; I haven't checked in detail.)</p> <p>While I am thinking about it, there is also a similar problem with {{tag|nowiki}} tags; it is possible to write {{tag|nowiki|content=&#123;&#123;soft redirect&#125;&#125;}} on a wiki page, and this will not be parsed as a soft redirect, but this module will treat it as one. To avoid false positives in discussions etc. where people are talking about soft redirects, we should also detect whether template invocations are contained in {{tag|nowiki}} blocks or not. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:15, 23 January 2024 (UTC)</p> ::::::Actually, userspace CSS/JS pages should not be excluded, as they are actually categorised if you add a comment like <code><nowiki>/* {{soft redirect}} */</nowiki></code> to them. If I remember correctly, this is behaviour from before content models were added to MediaWiki; the ability to categorise JS/CSS pages was briefly removed, but enabled again after users complained. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 07:29, 23 January 2024 (UTC) ::::::I added two new test cases and updated the rest of the tests to make it more obvious what is causing the test failures. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 08:14, 23 January 2024 (UTC) ::::::Thanks for looking into this. Alternatively we could just restrict the soft redirect detection to mainspace. I think we may be opening a can of worms by trying to ignore code like nowiki which deactivates the template. There are numerous other ways it can be done, e.g. with pre tags or HTML comments. Sounds like a coder's nightmare! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:04, 23 January 2024 (UTC) :::::::I have another suggestion. We can use the size of the page to determine whether it is likely to be soft redirect. I would suspect anything greater than 1000 bytes is extremely unlikely to be a soft redirect. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:51, 24 January 2024 (UTC) ::::::::{{ping|MSGJ}} I had a go at stripping out nowiki, pre, syntaxhighlight and source tags, as well as HTML comments. The code is in the sandbox, and the tests are all passing now. The parsing isn't perfect, but it should work for 99% of cases. Are there any other tags or markup that we should filter out? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 09:14, 25 January 2024 (UTC) :::::::::Wow, okay. No I can't think of any others. Can I just check if <code><nowiki><!--xxx-->{{soft redirect}}<!--xxx--></nowiki></code> will be detected or will it be greedy and ignore everything between the first open and last close? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:20, 25 January 2024 (UTC) :::::::::To avoid reinventing the wheel, you might look at [[Module:Wikitext Parsing#PrepareText]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:31, 25 January 2024 (UTC) ::::::::::I've added this to the sandbox and the testcases seem to be working okay &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:17, 31 January 2024 (UTC) ::::::::::{{done}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:26, 31 January 2024 (UTC) :::::::::::@[[User:MSGJ|MSGJ]] On the initial example I used, [['Murica]], it seems to have had a... strange result. The shell now ''says'' redirect, but still classifies as unassessed and the shell doesn't show the redirect icon. If I'm missing something, sorry. [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 22:22, 31 January 2024 (UTC) ::::::::::::Yes I think I might need to update [[Module:Class mask]] and/or [[Module:Banner shell]] as well &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:27, 31 January 2024 (UTC) ::::::::::::Working now I think @[[User:PARAKANYAA|PARAKANYAA]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:48, 1 March 2024 (UTC) :::::::::::::@[[User:MSGJ|MSGJ]] Thank you very much :) [[User:PARAKANYAA|PARAKANYAA]] ([[User talk:PARAKANYAA|talk]]) 21:16, 1 March 2024 (UTC) {{ul|Mr. Stradivarius}} when you have a chance, can you get your bot working on [[Module:Pagetype/setindex]], [[Module:Pagetype/softredirect]] and [[Module:Pagetype/disambiguation]]. Maybe look at moving [[Module:Disambiguation/templates]] over? Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:28, 31 January 2024 (UTC) :Filed a BRFA [[Wikipedia:Bots/Requests for approval/StradBot 2|here]]. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:24, 17 February 2024 (UTC) :Also, I don't think moving [[Module:Disambiguation/templates]] is necessary, as it is also being used in [[Module:Disambiguation]]. The situation now seems fine to me. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 03:27, 17 February 2024 (UTC) ::I guess I was wondering if [[Module:Disambiguation]] was still needed, given how we have moved most of its functionality here? It might make sense to move the isDisambiguationPage function to [[Module:Pagetype]] to avoid duplication of code. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:48, 1 March 2024 (UTC) == Recent change causing some problems with reports and bot actions == I am unable to find the discussion that led to [https://en.wikipedia.org/w/index.php?title=Module%3APagetype&diff=1202783627&oldid=1201502469 this change], but it may be causing [[Wikipedia_talk:Database_reports#Wikipedia:Database_reports/Unused_templates_(filtered)_update_related_to_Module:Pagetype|problems with reports]] and [https://en.wikipedia.org/w/index.php?title=User_talk:Legobot&curid=17932426&diff=1207949444&oldid=1206725690 bot actions]. {{U|Plastikspork}}, do you have a link to the discussion? – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:07, 16 February 2024 (UTC) :It's at [[User talk:MSGJ#Module:Pagetype]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:18, 16 February 2024 (UTC) :: [[User:Jonesey95|Jonesey95]], that change should have reduced transclusions, by eliminating some transclusions of non-existing pages. But, the change right before it may have increased transclusions. Thanks! [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 15:04, 16 February 2024 (UTC) :::All I know is that the database report changed on the day after the second edit to this module. I know there are sometimes delays, but usually the simple explanation is the one to look at. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 16:31, 16 February 2024 (UTC) == Request update of Module:Pagetype/setindex (18 February 2024) == {{edit fully-protected|Module:Pagetype/setindex|answered=yes}} Bot comment: StradBot has detected that [[Module:Pagetype/setindex]] needs to be updated. This is due to a template being added or removed from [[:Category:Set index article templates]], or to a redirect to one of those templates being added or removed. The bot has saved the new page content in [[Module:Pagetype/setindex/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Module%3APagetype%2Fsetindex&page2=Module%3APagetype%2Fsetindex%2Fsandbox diff]). Please review this and update the module if necessary. [[User:StradBot|StradBot]] ([[User talk:StradBot|talk]]) 16:07, 18 February 2024 (UTC) :Note: the [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/setindex/sandbox&diff=cur&oldid=prev last sandbox edit] should be easier to read than the diff between the sandbox and the main module. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:14, 18 February 2024 (UTC) :: {{ping|Mr. Stradivarius}} This added [[Template:Infobox family name/doc]] to the list of templates, which is clearly wrong. It was previously a redirect with content, which may have caused confusion, and I've now replaced it with a bare redirect. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:58, 18 February 2024 (UTC) :: It also added [[Template:family name]], a redirect to [[Template:infobox name]], which is used on pages like [[Smith (surname)]] that are clearly not set indices. Those seem to be the only two additions, neither of which is useful IMO, so {{not done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:02, 18 February 2024 (UTC) ::: {{ping|Pppery}} Thanks for looking into this. I'll think of the best way to address this tomorrow. Could you also check if [[Module:Pagetype/softredirect/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Module:Pagetype/softredirect/sandbox&diff=prev&oldid=1208716631 diff]) looks OK? There was a Pywikibot issue preventing me from saving the edit request for that page, but the module sandbox itself was saved successfully. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 17:11, 18 February 2024 (UTC) :::: Sorry, no. I see nonsense like [[Template:Barcelona Metro line 10]] and [[Template:Taxonomy/Olindiasidae]]. I would also weakly prefer to exclude templates like [[Template:Soft redirect with Wikidata item]] from the list, since they indicate the page is already a soft redirect because of another template rather than itself making the page a soft redirect, but if that's not possible to code up I would be fine with adding them. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:17, 18 February 2024 (UTC) ::::: I fixed the bot - the issue was that I was using Pywikibot's BasePage.backlinks method instead of the BasePage.redirects method. There are more details [https://github.com/mrstradivarius/stradbot/issues/1 on GitHub]. [[Module:Pagetype/softredirect/sandbox]] should also be improved, but the Pywikibot issue that prevented me from saving the second edit request is still occurring, so the bot failed to leave an edit request for it; I will also need to get that fixed before finishing the trial. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 16:04, 20 February 2024 (UTC) == Request update of Module:Pagetype/setindex (20 February 2024) == {{edit fully-protected|Module:Pagetype/setindex|answered=yes}} Bot comment: StradBot has detected that [[Module:Pagetype/setindex]] needs to be updated. This is due to a template being added or removed from [[:Category:Set index article templates]], or to a redirect to one of those templates being added or removed. The bot has saved the new page content in [[Module:Pagetype/setindex/sandbox]] ([https://en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Module%3APagetype%2Fsetindex&page2=Module%3APagetype%2Fsetindex%2Fsandbox diff]). Please review this and update the module if necessary. [[User:StradBot|StradBot]] ([[User talk:StradBot|talk]]) 15:38, 20 February 2024 (UTC) :This edit wouldn't change the content of the setindex module, only the order and the formatting. As it would only be a cosmetic edit, I am deactivating this edit request. Future bot runs will only leave an edit request if the sandbox version changes, so no other action is necessary. The bot will leave its next edit request when the sandbox needs updating (i.e. when any of the templates in [[:Category:Set index article templates]] or their redirects change). — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 15:57, 20 February 2024 (UTC) == Protected edit request on 21 March 2024 - Improve execution time == {{edit fully-protected|Module:Pagetype|answered=yes}} Improves the execution time of this module by about 2 to 3 times by merging repeat calls to some intensive functions and calculating all templates once to avoid excessive calls to gmatch/ustring. Quite important for [[Module:WikiProject banner]], which has started to rarely hit the lua timeout error from time to time on large pages like [[Talk:List of common misconceptions]], with a significant amount of the execution time being this module. No change to any output or functionality (passes all testcases). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:58, 21 March 2024 (UTC) :Temporarily disabled since I intend to make further changes. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 12:27, 22 March 2024 (UTC) ::Re-activated the edit request. Now has better performance in extremely specific circumstances and also fixes a bug in parseContent where explicitly not allowing soft redirect/sia/dab would not work and would revert to giving the default (this bug existed before my changes, there was just no testcase for that specific case). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 17:30, 22 March 2024 (UTC) :{{done}}<!-- Template:EP --> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:28, 22 March 2024 (UTC) == Pages under discussion == When a redirect is proposed for deletion, it stops being detected as a redirect. Would it be possible to fix this, perhaps by looking for the literal text #REDIRECT on the page? There might be other cases, e.g. disambiguation pages too &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:47, 3 May 2024 (UTC) :{{ping|MSGJ}} Currently we just check if the title object itself considers the page a redirect for calculating that. Searching for just the literal string <code>#REDIRECT</code> by itself would be a bad idea (this page itself would pick up if we did that), and searching for #REDIRECT in the correct context probably wouldn't be a great idea for the same reason (easy to false flag). If the only issue is redirect pages that are under discussion, the simplest solution would be to just add a check for the RfD template onto the existing parseContent system, which shouldn't be difficult to implement. Does that sound like it'd fix your issue? Also, I'm unsure what you mean when you reference disambiguation pages. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:33, 5 May 2024 (UTC) ::Yes, that should work. I think the code to look for would be <code><nowiki>#invoke:RfD</nowiki></code>. Forget about dab pages, wasn't thinking straight. Thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:00, 6 May 2024 (UTC) :::I've made changes in the sandbox and created [[Module:Pagetype/rfd]], and it should be ready for proper testing (I've only done simplistic testcases so far). If everything works, then this is fine to move to live, since there's no other parts needed. The output of it can be controlled by setting the <code>|rfd=</code> parameter and by default it returns <code>redirect</code>. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 22:42, 6 May 2024 (UTC) ::::On second thought, it would probably be more intuitive if rfds followed the same classification as a regular redirect if <code>|redirect=</code> is used instead of having a seperate param (<code>|rfd=</code>) for this very specific case, so I've changed that to be the case instead. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 22:59, 6 May 2024 (UTC) :::::All looks good to me. Thanks for your help &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:52, 7 May 2024 (UTC) :::::I've deployed this, thanks again! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:52, 9 May 2024 (UTC) == Subpages of talk pages == Subpages in Main talk space are currently classified as articles but their respective subject page is not an article, it usually doesn't exist (e.g. [[Talk:Multiverse (Marvel Cinematic Universe)/FAQ]]). It is not clear how we should classify them but they should probably return "page" instead of "article" &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:55, 7 May 2024 (UTC) :Had a play around but not sure how to achieve this. Detecting whether it's a subpage does not work because we are usually looking at the subject page not the talk page. Checking the existence of the page would work, but I don't really want to add an expensive parser function to every call of this module ... &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:58, 7 May 2024 (UTC) :[[AC/DC]] is an article but [[Multiverse (Marvel Cinematic Universe)/FAQ]] is not an article &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:00, 7 May 2024 (UTC) ::I agree with wanting to avoid adding an expensive call to every use, however it turns out the check for <code>title.isRedirect</code> in <code>detectRedirects</code> (the first check done) is already expensive, so this might not be an issue. Still thinking of a nice way to solve this issue, but nothing's come to mind yet. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:20, 7 May 2024 (UTC) :::Can <code>title.isSubpage</code> help here (with maybe checking <code>title.inNamespace</code> with it)? [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 07:20, 8 May 2024 (UTC) ::::I don't think so, unfortunately. I created [[Module:IsSubpage]] to test this. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Multiverse (Marvel Cinematic Universe)/FAQ}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Multiverse (Marvel Cinematic Universe)/FAQ}}, because it's in mainspace which can't have subpages. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=AC/DC}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=AC/DC}}, ditto. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Talk:Multiverse (Marvel Cinematic Universe)/FAQ}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Talk:Multiverse (Marvel Cinematic Universe)/FAQ}}, which is correct. ::::* <code><nowiki>{{#invoke:IsSubpage|main|page=Talk:AC/DC}}</nowiki></code> produces {{#invoke:IsSubpage|main|page=Talk:AC/DC}}, which is basically a bug in MediaWiki software. ::::The best solution I can think of, is to use <code>title.exists</code> when the talk page title looks like it ''might'' be a subpage. If it doesn't exist then it's probably not an article &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:29, 8 May 2024 (UTC) :::::Actually we can use <code><title.exists</code> if there is a forward slash anywhere in the title, and it's in mainspace &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:14, 9 May 2024 (UTC) :::::Suggested code [https://en.wikipedia.org/w/index.php?title=Module:Pagetype/sandbox&diff=prev&oldid=1223164223] makes all the testcases work &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:59, 10 May 2024 (UTC) ::::::Aidan, do you know if the title.exists is evaluated if the first condition is false? I am trying to avoid unnecessary expensive functions. If it is evaluated, then I will put it in a separate "if" block &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:05, 10 May 2024 (UTC) :::::::I can't read the exact code since im on phone right now, but if the statement is like <code>if A and B then</code> then B won't be evaluated if A is false/nil. The same logic applies in reverse for an or (B won't evaluate if A is anything other than false/nil). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:08, 10 May 2024 (UTC) ::::::::Thanks. Yes you've guessed the situation correctly. But now I have read more, I think we don't need to worry about adding an expensive function. Because we have already called .isRedirect on the same page, so calling .exists will not increment the expensive counter again. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:10, 10 May 2024 (UTC) Deployed code. Now pages in mainspace which do not exist are not classified as articles &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:47, 12 May 2024 (UTC) Proposed improved code on the sandbox. Adds support for specific output for non-existent pages using a {{para|nonexistent}} parameter. This will allow {{tl|WikiProject banner shell}} to treat these pages slightly differently. I have also been doing some code simplification. Will not be deployed until I work out why [[Module talk:Pagetype/testcases|testcase 204]] is not working anymore. Seems to be a strange issue with the mock title code (because it works outside the testcases), but will keep playing &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:19, 15 May 2024 (UTC) :[[Special:Diff/1223642991]] appears to be the change that broke it, though I'm struggling to figure out why and I won't be able to test further until later on. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:34, 15 May 2024 (UTC) ::Ok, perhaps the issue may be the mock titles. It appears that when the code grabs <code>title.subjectPageTitle</code> in <code>getTitle</code>, this title will be the real one, regardless of if a mock title was defined for that name. Whether or not this is the issue thats failing the test case I'm not too sure, but I wouldn't be surprised if it was. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:06, 15 May 2024 (UTC) :::The <code>patchTitleConstructors</code> function of [[Module:Mock title]] is supposed to take care of this, but I don't know enough about it. It seems to work okay in every other namespace though. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:09, 15 May 2024 (UTC) ::::Other namespaces are still broken, its just it appears them returning "page" due to not existing (even if we said they actually do) appears to still be valid for the given testcases. It's just this specific TimedText case where we start seeing bad behaviour. <code>patchTitleConstructors</code> doesn't currently hook the xyzTitle properties, so this is just missing functionality. I can try implement it, but it might take a bit to work out. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:16, 15 May 2024 (UTC) :::Hang on. That is actually the only page which does not exist in reality. In which case, could it true that the mock titles have never worked properly? But then why does 205 work? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:17, 15 May 2024 (UTC) ::::Since 205 has the ability to be classified by it being a talk page, pagetype runs through its logic using the talk page title instead of the subject page title. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:21, 15 May 2024 (UTC) :::::Well, I'm astounded that @[[User:Mr. Stradivarius|Mr. Stradivarius]] did not implement this correctly. For now I have replaced the tests with a TimedText page which does actually exist, and all tests are passing. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:26, 15 May 2024 (UTC) ::::::I've made an update to the mock title module in [[Special:Diff/1223977125]] which fixes this edge case of escaping mock titles, and the testcase now works as expected (Strad, if you do see this, maybe review this change, since the hooking is a little bit aggressive and it might have a better implementation). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 14:34, 15 May 2024 (UTC) :::::::Maybe one day I'll understand what you did there. But for now, thanks &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:38, 15 May 2024 (UTC) :::::::This is a great start - thank you for the edit. One of the goals of the module is to be able to revert title objects to their original state after each test. To do this, I think you would need to keep track of each title object that is altered when being hooked. I will have a think about how best to do this. At the moment, I think normal title objects which have mock titles hooked in one of their properties will remain altered after the patching function exits. Also, a similar hooking process needs to be implemented for [[mw:LUAREF#Title objects|Title.subPageTitle( text )]], as that method returns other title objects. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 15:25, 17 May 2024 (UTC) ::::::It's more "not yet implemented" than "not implemented correctly". Patches are welcome. :) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 14:59, 17 May 2024 (UTC) == Interface messages == There are three different types of page in this namespace: # [[MediaWiki:Filetype-missing]] - valid message but has not been created to override default # [[MediaWiki:Duplicate-args-warning]] - has been created to override default # [[Mediawiki:Fghghghg]] - invalid and non-existent I notice that ifexist returns false on the first type. This is a valid message and a blue link, containing the default text for this message. You would only create it to overridge that default. I think I would prefer pagetype to identify this as an interface page rather than a non-existent page. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:32, 17 May 2024 (UTC) :Perhaps <code>title.isLocal</code> can be used to distinguish between some of these types &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:01, 17 May 2024 (UTC) :Proposed amended code on sandbox. A valid system message will be treated as an interface page even if it does not exist locally &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:34, 20 May 2024 (UTC) Also added a fix for files hosted on Commons, which were being classified as non-existent pages. All testcases are now working, so will deploy this later &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:06, 21 May 2024 (UTC) == Sandbox page protection fix == {{Edit fully-protected|Module:Pagetype/sandbox|answered=yes|force=yes<!--not a TPER matter-->}} Could the template protection that got automatically applied to the sandbox be removed? Someone presumably accidentally included it in a major module, but this got quickly fixed and the transclusions have already dropped to just 37. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:16, 10 October 2024 (UTC) :{{done}} -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:36, 10 October 2024 (UTC) :Yes that was probably [[Template:WikiProject Cycling]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 10:46, 11 October 2024 (UTC) == Invalid pages == The module fails badly when {{para|page}} is set to an invalid page, e.g. <code><nowiki>{{pagetype|page=Talk:Talk:Granville Gee Bee Model A}}</nowiki></code> produces {{pagetype|page=Talk:Talk:Granville Gee Bee Model A}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:55, 10 November 2024 (UTC) :Because that title is a bad title (mediawiki refuses to resolve it, e.g. [[Talk:Talk:Test]] will not link), <code>mw.title.new</code> is returning nil. How you'd want to handle this in the context of page types I'm not sure (an error probably makes sense tbh). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 15:01, 10 November 2024 (UTC) ::Why not just the same as any other non-existent page, e.g. <nowiki>Gjdeoofg</nowiki> does not cause an error &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:26, 10 November 2024 (UTC) :::That's just a page that doesn't exist. It's still a valid possible page and therefore has resolvable properties, like a subject title. Pages that e.g. stack namespaces (see [https://en.wikipedia.org/wiki/Talk:Talk:A]) or contain invalid characters like <code>></code> (see [https://en.wikipedia.org/wiki/Tempalte:%3E]) ''can't'' exist per the mediawiki software, so <code>mw.title.new</code> returns nil for them, since it doesn't make sense to resolve them. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 20:34, 10 November 2024 (UTC) ::::Okay fair enough. I actually didn't know that you couldn't create certain pages &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:11, 10 November 2024 (UTC) :::::It would be nice to handle the nil value gracefully, but the coding is beyond my skills. And FWIW, I have created pages with stacked namespaces in error in the past, during page moves. [[Template:Template:A]] is a valid page name, for example. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 13:41, 11 November 2024 (UTC) ::::::The graceful handling makes sense, I could sandbox that if no one else does. It seems that the namespace stacking is mostly only an issue if the first namespace is <code>Talk:</code>, since it would be the talk page of an impossible to resolve article, since it wouldn't be an article if it started with a namespace (for all other namespaces this doesn't appear to be an issue, e.g. [[Template talk:Talk:E]] can easily associate with [[Template:Talk:E]]). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 13:51, 11 November 2024 (UTC) :::::::I've changed the sandbox such that the error at least points out the exact issue instead of just erroring later on (see [[Special:Permalink/1257015583|test page]]). [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 19:32, 12 November 2024 (UTC) ::::::::{{thumbsup}} Looks good &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:39, 12 November 2024 (UTC) == class parameter == In olden days, we had no way of detecting disambiguation pages and other types of page so we used to pass the {{para|class}} parameter to this module. I'm wondering if this is still needed now &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:02, 16 November 2024 (UTC) :As far as I can tell the functionality boils down to "if parameter 1 is <code>na</code> and the page is in mainspace, return <code>page</code> (or something custom) instead of <code>article</code>", and that's it. It does give me the vibe of an old hacky-ish fix that implemented na-rating handling possibly at a lower level than it should've been. It's hard to tell how in use it currently is without adding a category, but [https://en.wikipedia.org/w/index.php?search=hastemplate%3Apagetype+insource%3A%2F%5C%7B%5C%7B%5BPp%5Dagetype+%2A%5C%7C%5B%5E%7C%3D%5D%2B%5C%7C%2F&title=Special:Search&profile=advanced&fulltext=1&ns0=1&ns2=1&ns4=1&ns6=1&ns8=1&ns10=1&ns12=1&ns14=1&ns100=1&ns118=1&ns126=1&ns710=1&ns828=1&limit=500 this insource search] suggests it's still in use in quite a few templates (majoritively wikiprojects, some of which still have a lot of transclusions like {{tl|WikiProject Biography}} and {{tl|WikiProject Television}}), so a decent amount of initial conversion work would probably be required before removing it. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:46, 16 November 2024 (UTC) ::Yes, it's in [[Module:Banner shell]] but is causing unexpected results so I will be removing it shortly &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:52, 16 November 2024 (UTC) czg80houtb95mzxooldhtawsarfnd8x TimedText:Imagine (John Lennon song - sample).ogg.en.srt 710 47873 117290 2025-03-06T05:32:08Z en>Anthony2106 0 I don't think its common to use italics for a fade out 117290 wikitext text/x-wiki 1 00:00:3,300 --> 00:00:7,280 Imagine all the people 2 00:00:8,900 --> 00:00:13,860 Living life in peace 3 00:00:13,860 --> 00:00:16,430 Yoo-hoo oooh 4 00:00:16,430 --> 00:00:17,727 You may say... s7l0wzqg1wcw6xd3w9bij6mz93dn1mu 117291 117290 2026-07-16T11:45:48Z Tumbuka Arch 6863 1 revision imported from [[:en:TimedText:Imagine_(John_Lennon_song_-_sample).ogg.en.srt]] 117290 wikitext text/x-wiki 1 00:00:3,300 --> 00:00:7,280 Imagine all the people 2 00:00:8,900 --> 00:00:13,860 Living life in peace 3 00:00:13,860 --> 00:00:16,430 Yoo-hoo oooh 4 00:00:16,430 --> 00:00:17,727 You may say... s7l0wzqg1wcw6xd3w9bij6mz93dn1mu Module talk:Pagetype 829 47874 117292 2016-07-12T11:31:48Z en>MSGJ 0 merged and redirecting to [[Template talk:Pagetype]] 117292 wikitext text/x-wiki #redirect[[Template talk:Pagetype]] npcgub7r5guarll28w8m8q1yqahi5j1 117293 117292 2026-07-16T11:45:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Module_talk:Pagetype]] 117292 wikitext text/x-wiki #redirect[[Template talk:Pagetype]] npcgub7r5guarll28w8m8q1yqahi5j1 Module:Pagetype/disambiguation 828 47875 117294 2024-02-23T03:46:01Z en>Pppery 0 Use built-in redirect syntax 117294 Scribunto text/plain return require [[Module:Disambiguation/templates]] i5ooe2bqffrglszpd82v0i3pqyp187b 117295 117294 2026-07-16T11:45:48Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:Pagetype/disambiguation]] 117294 Scribunto text/plain return require [[Module:Disambiguation/templates]] i5ooe2bqffrglszpd82v0i3pqyp187b Elizabeth Christ Trump 0 47876 117297 2026-07-16T11:50:58Z Tumbuka Arch 6863 Created page with "{{Short description|Mubizinesi wa ku Germany na America (1880–1966)}} {{redirect|Elizabeth Trump|muzukuru wake, Elizabeth Trump Grau|Trump family}} {{Infobox person | name = Elizabeth Trump | image = Elisabeth_Christ.jpg | caption = Trump mu 1902 | birth_name = Elisabeth Christ | birth_date = {{birth date|1880|10|10}} | birth_place = [[Kallstadt]], [[Ufumu wa Bavaria]], Germany | death_date = {{death date and age|1966|6|6|1880|10|10}}..." 117297 wikitext text/x-wiki {{Short description|Mubizinesi wa ku Germany na America (1880–1966)}} {{redirect|Elizabeth Trump|muzukuru wake, Elizabeth Trump Grau|Trump family}} {{Infobox person | name = Elizabeth Trump | image = Elisabeth_Christ.jpg | caption = Trump mu 1902 | birth_name = Elisabeth Christ | birth_date = {{birth date|1880|10|10}} | birth_place = [[Kallstadt]], [[Ufumu wa Bavaria]], Germany | death_date = {{death date and age|1966|6|6|1880|10|10}} | death_place = [[Manhasset, New York]], United States | burial_place = [[All Faiths Cemetery]], New York City | citizenship = {{hlist|Germany|United States}} | occupation = Mubizinesi | spouse = {{marriage|[[Frederick Trump]]|1902|1918|end=d}} | children = 3, kusazgapo [[Fred Trump|Fred]] na [[John G. Trump|John]] | family = [[Trump family]] }} '''Elizabeth Christ Trump''' ({{née|'''Elisabeth Christ'''}}; October 10, 1880 – June 6, 1966) wakaŵa mubizinesi wa ku Germany na America. Mu 1902, wakatora [[Frederick Trump]], uyo wakafwa mu 1918. Pamanyuma pa nyifwa ya mfumu wake, wakambiska pamoza kampani ya kuzenga malo yakucemeka [[E. Trump & Son]] na mwana wake [[Fred Trump|Fred]], kuti yiwonelele na kusazgirako chuma ca malo ico ŵakaŵa naco. Kwizira mwa Fred, wakaŵa ambuya wa ubaba wa [[Donald Trump]], pulezidenti wa 45 na wa 47 wa [[United States]].<ref>{{cite book|first=Gwenda|last=Blair|title=[[The Trumps: Three Generations That Built an Empire]]|publisher=[[Simon and Schuster]]|date=2000}}</ref> == Umoyo wa pakwamba == Elisabeth Christ wakababika ku [[Kallstadt]], mu [[Ufumu wa Bavaria]], Germany. Ŵapapi ŵake ŵakaŵa Philipp Christ na Anna Maria ({{née|Anthon}}).<ref>{{cite web|title=List of Donald Trump's ancestors from his father's side}}</ref> Mbumba ya Christ yikaŵa na munda mucoko wa [[mpheska]]. Kweni ndalama izo zikafumanga mu munda uwu zikakwananga yayi pa vyakukhumbikwa vya mbumba, ntheura Philipp Christ wakagwiranga nchito ya kunozga na kupoleska vinthu vyakale vya visulo kweniso kuguliska miphika na viŵiya. Wakagwiliskiranga nchito nyumba yake pa Freinsheimer Strasse mu Kallstadt, iyo yikaŵa pafupi na nyumba ya Katharina Trump, mwanakazi mucekuru uyo wakakhalanga na ŵana ŵake ŵankhondi na ŵaŵiri, kusazgapo Frederick.<ref name="Blair1">{{cite book|first=Gwenda|last=Blair|title=[[The Trumps: Three Generations That Built an Empire]]|publisher=[[Simon and Schuster]]|location=New York City|date=2000|isbn=978-0743210799}}</ref> ==Nthengwa na mbumba== Mwana wa Katharina Trump, [[Frederick Trump]], wakasamukira ku North America mu 1885 apo wakaŵa na vyaka 16 ndipo wakasanga usambazi wake kwizira mu maresitiranti na [[Nyumba zakugonerapo mahule|nyumba zakugonerapo mahule]] pa nyengo ya [[Klondike Gold Rush]] kumpoto cha kumanjiliro gha dazi kwa Canada. Wakati wawelera ku Germany mu 1901, wakakhumbanga kutora Elisabeth nangauli anyina ŵakamususka, chifukwa ŵakawonanga kuti mwana wawo uyo wakaŵa musambazi wakeneranga kusanga mwanakazi wa mbumba yakukhupuka chomene na yakuzirwa kuluska ya Elisabeth. Nangauli, Friedrich na Elisabeth ŵakatorana pa 26 Ogasiti 1902.<ref name=Blair1/> Pa nyengo iyo, iyo wakaŵa na vyaka 33 ndipo iyo wakaŵa na vyaka 21. Friedrich na Elisabeth ŵakasamira ku New York ndipo ŵakakhazikika mu nyumba ya lendi mu chigaŵa cha [[Morrisania]] mu [[the Bronx]], icho chikaŵa na Ŵajeremani ŵanandi. Elizabeth (umo zina lake likalembekanga mu United States) wakendeskanga nyumba, apo Friedrich wakagwiranga ntchito ya kusenga sisi na kwendeska hotelo-restaurant. Mwana wawo wakwamba, Elisabeth, wakababika pa Epulero 30, 1904.<ref name=Blair1/> Nangauli ŵakakhalanga mu chigaŵa cha Ŵajeremani, Elizabeth wakasuzgikanga chifukwa cha kukhumba kwawo. Mbumba iyi yikawelera ku Kallstadt mu 1904, kuguliska vinthu vyawo mu America. Chifukwa ŵalara ŵa ku Bavaria ŵakaghanaghananga kuti wakafumamo mu Germany kuti waleke kuluta ku nkhondo ya [[Gulu la nkhondo la Germany (Ufumu wa Germany)|nkhondo ya Ufumu wa Germany]], Friedrich wakazomerezgeka yayi kukhala mu Germany, ntheura mbumba iyi yikawelera ku United States mu 1905.<ref name=Blair1/> Mwana wawo wachiŵiri, [[Fred Trump|Fred]], wakababika, ndipo ŵakakhazikika mu msewu wa 177th Street mu Bronx. Pamanyuma pakuti Elizabeth wababa mwana wawo wacitatu, [[John G. Trump|John]], mbumba iyi yikasamira ku [[Queens]], uko Friedrich wakamba kuzenga nyumba. Mu 1918, wakafwa na nthenda ya [[influenza]] pa nyengo ya [[mliri wa flu wa 1918]], ndipo wakasiya chuma chakuyana na $31,359 (panji pafupifupi {{Inflation|US-GDP|31359|1918|fmt=eq}}).<ref>{{Cite web|url=http://www.gothamcenter.org/1/post/2018/02/friedrich-trump-establishes-a-dynasty.html|title=Friedrich Trump Establishes a Dynasty|website=The Gotham Center for New York City History}}{{Dead link|date=March 2021 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Trump wakawonekanga nga ni mama mulara wa [[mbumba ya Trump]].<ref name = "Barrett">{{cite book|first=Wayne|last=Barrett|author-link=Wayne Barrett|title=Trump: The Greatest Show on Earth: The Deals, the Downfall, the Reinvention|publisher=[[Simon & Schuster]]|location=New York|year=2016|orig-date=1st pub. 1992|url=https://books.google.com/books?id=ZQ_9CwAAQBAJ|isbn=978-1942872979}}</ref> Wakakhalanga pafupi na mwana wake Fred umoyo wake wose.<ref name=Blair1/> ==E. Trump & Son== {{further|Fred Trump|Bungwe la Trump}} [[File:FredTrump1950-02.png|thumb|upright=.45|Mwana wa Elizabeth, [[Fred Trump]] {{circa|1950}}]] Pamanyuma pa nyifwa ya mfumu wake, Elizabeth Trump wakalutilira bizinesi ya nyumba izo mfumu wake wakamba. Wakaphangiska ŵazengi kuti ŵazenge nyumba pa malo ghambura kanthu agho Friedrich wakaŵa nagho, wakaguliskanga nyumba izo, ndipo wakasanganga ndalama kufuma ku ngongoli za nyumba izo wakapelekanga ku awo ŵakagulanga. Chilato chake chikaŵa chakuti ŵana ŵake ŵatatu ŵalutilire bizinesi ya mbumba.<ref name="Blair1" /> Pakwamba, wakagwiranga ntchito pasi pa zina lakuti "E. Trump" ilo likaŵa lilije chizindikiro cha mwanalume panji mwanakazi.<ref>{{cite news|work=The Brooklyn Daily Eagle|title=Real Estate News|date=1918-08-03|page=16|url=https://www.newspapers.com/image/55626090/?terms=%22e%20trump%22&match=1}}</ref><ref>{{cite news|work=The New York Times|title=Real Estate Field|date=1918-11-22|page=18|url=https://www.newspapers.com/image/26761488/?terms=%22e%20trump%22&match=1}}</ref> Mu 1924, wakasintha kuŵa "E.&nbsp;Trump & Son" kuti wagwiliskire ntchito pa malonda,<ref>{{cite news|url=https://www.newspapers.com/image/576094536/?terms=%22E.%20Trump%20%26%20Son%22&match=1|date=1924-08-16|work=The Chat|title=Classified ad|location=Brooklyn, NY|page=53}}</ref> pamanyuma "Sons",<ref>{{cite news|url=https://www.newspapers.com/image/576538520/?terms=%22e.%20trump%20%26%20sons%22|date=1926-11-20|work=The Chat|title=Classified ad|location=Brooklyn, NY|page=108}}</ref> ndipo pamanyuma wakaweleraso ku zina laumoza apo vikawoneka kuti mwana wake wakwamba pera, Fred, ndiyo wazamutorana nayo. Mu mafunso gha pamanyuma, Fred wakajiyika pakati, wakayowoya kuti nyengo zose wakakhumbanga kuŵa muzengi; kuti wakamalizga nyumba yake yakwamba mu 1924, chaka chimoza pera pamanyuma pa kumaliza sukulu ya sekondare; ndipo kuti amama ŵake ŵakanjizgikamo chifukwa wakaŵa na msinkhu wakuti "wasayine macheke".<ref name="whitman">{{cite news|title=A Builder Looks Back—and Moves Forward|newspaper=The New York Times|first=Alden|last=Whitman|date=January 28, 1973|url=https://www.nytimes.com/1973/01/28/archives/a-builder-looks-backand-moves-forward-builder-looks-back-but-moves.html|access-date=October 8, 2018}}</ref> Kweni pali ukaboni wakulongora kuti Fred wakamba mwakuduka,<ref>{{harvnb|Barrett|2016}}: "[P]ublic records established that he'd only been an active builder from 1927 to 1932."</ref> ndipo Elizabeth wakapeleka vinandi, kusazgapo ndalama zakwamba.<ref>{{cite news|title=Biggest one-man building show|newspaper=American Builder and Building Age|first=Joseph B.|last=Mason|date=December 1, 1940|quote=When [Fred Trump] was 27 years old he started his first small home building job on his own, but with some financial backing from his mother.|id={{ProQuest|853825839}}}} {{subscription required}}</ref><ref>{{cite news|date=1964-07-21|agency=UPI|work=The Town Talk|location=Alexandria, LA|title=Builder Turns Slum Areas into Profitable Apartments|first1=Gerald S.|last1=Snyder|url=https://www.newspapers.com/image/214047694/?terms=%22fred%20c.%20trump%22%20woodhaven%20mother&match=1}}</ref> Apo bizinesi iyi yikasazgika mwalamulo mu 1927, Fred wakaŵa na msinkhu wakuti wasayine macheke, kweni "E.&nbsp;Trump & Son" ndilo likalutilira kuŵa zina.<ref>{{cite news |date=April 16, 1927 |title=New concerns function with Queens capital |page=16 |work=The Daily Star |url= http://fultonhistory.com/highlighter/highlight-for-xml?altUrl=http%3A%2F%2Ffultonhistory.com%2FNewspaper%252015%2FBrooklyn%2520NY%2520Daily%2520Star%2FBrooklyn%2520NY%2520Daily%2520Star%25201927%2FBrooklyn%2520NY%2520Daily%2520Star%25201927%2520-%25200653.pdf&xml=http%3A%2F%2Ffultonhistory.com%2FdtSearch%2Fdtisapi6.dll%3Fcmd%3Dgetpdfhits%26u%3D6c404f01%26Do |quote=E. Trump & Son Company, Inc., of Jamaica, has been formed with $50,000 capital to deal in realty.}}</ref> "Zikaŵa zina lambura kupusiska yayi," wakalemba mulembi wa mbiri ya umoyo wake [[Wayne Barrett]], "iyo wakanjizgikanga chomene mu bizinesi."{{Sfn|Barrett|2016}} Elizabeth Trump wakalutilira kunjizgikamo mu bizinesi ya mbumba umoyo wake wose. Mu vyaka vyake vya m'ma 70, wakuti wakatoranga ndalama za tumakobiri kufuma ku [[malo ghakuchapirako malaya]] mu nyumba za Trump.<ref name = "Blair1"/> (Mulembi wa mbiri ya mbumba ya Trump [[Gwenda Blair]] wakapulika ichi kufuma ku ŵana ŵa Elizabeth.){{Sfn|Blair|2000|p=510}} Kutora ndalama za tumakobiri kufuma ku malo ghakuchapirako malaya kweniso kukukhumbikwa na ŵanthu ŵanyake mu mbumba. [[Harry Hurt&nbsp;III]] wakuti [[Mary Anne MacLeod Trump|Mary Trump]], muwoli wa mwana wa Elizabeth, Fred, "wakendanga uku na uku pakati pa mapulojekiti gha nyumba za mfumu wake mu Rolls-Royce, kutora ndalama za makina ghakuchapira malaya mu vipinda vya kuchapiramo malaya",<ref>{{cite book |title=Lost Tycoon: The Many Lives of Donald J. Trump|publisher=W.W. Norton |author=Harry Hurt |year=1993 |isbn=9780393030297}}</ref> ndipo pa nyengo ya [[Kampeni ya Donald Trump ya visola vya pulezidenti vya 2016|kampeni yake ya visola vya pulezidenti vya 2016]], muzukuru wa Elizabeth, [[Donald Trump]] wakaphalira mzinda wa [[Staten Island]] kuti wakamalanga "panji nyengo zinkhondi" za uwanangwa wake wa ubwana apo wakatoranga ndalama za tumakobiri kufuma ku makina ghakuchapira malaya gha awiske.<ref>{{cite news|url=https://www.nytimes.com/2016/04/19/us/politics/new-york-primary-trump-clinton-sanders.html|title=Our Woman in New York: Donald Trump, Hillary Clinton and Bernie Sanders on Friendly Turf|work=[[The New York Times]]|date=April 18, 2016|first1=Maggie|last1=Haberman}}</ref> == Vyakukumbuska == {{notelist}} == Ukaboni == {{reflist}} ==Vigaŵa vya pa intaneti== * {{Find a Grave|105719858|Elizabeth Christ Trump}} {{Mbumba ya Trump}} {{DEFAULTSORT:Trump, Elizabeth Christ}} [[Category:Ŵakubabika mu 1880]] [[Category:Ŵakufwa mu 1966]] [[Category:Ŵamalonda ŵa ku America mu bizinesi ya nyumba]] [[Category:Ŵanakazi ŵa ku America ŵa maudindo gha bizinesi]] [[Category:Ŵalongozgi ŵa bizinesi ŵa ku America]] [[Category:Ŵanthu ŵakafuma mu Ufumu wa Germany kuluta ku United States]] [[Category:Ŵamalonda ŵa ku New York City]] [[Category:Ŵanthu ŵa ku chigaŵa cha Bad Dürkheim]] [[Category:Mbumba ya Trump|Elizabeth]] kisbd7z7qmqj743wyr32t3z77ydo90x Module:InfoboxImage/data 828 47877 117298 2025-10-21T23:10:59Z en>Pppery 0 Changed protection settings for "[[Module:InfoboxImage/data]]": Match the protection level of the parent ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) 117298 Scribunto text/plain local placeholderList = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } local placeholder_image = {} for _, val in ipairs(placeholderList) do placeholder_image[val] = true end local categories = { url_image_links = "[[Category:Pages using infoboxes with URL in image parameter]]", thumbnail_images = "[[Category:Pages using infoboxes with thumbnail images]]", } return { placeholder_image = placeholder_image, categories = categories } 4h39dpz9m6jxmu0vznaup0kyz6rbh4y 117299 117298 2026-07-16T11:51:27Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:InfoboxImage/data]] 117298 Scribunto text/plain local placeholderList = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } local placeholder_image = {} for _, val in ipairs(placeholderList) do placeholder_image[val] = true end local categories = { url_image_links = "[[Category:Pages using infoboxes with URL in image parameter]]", thumbnail_images = "[[Category:Pages using infoboxes with thumbnail images]]", } return { placeholder_image = placeholder_image, categories = categories } 4h39dpz9m6jxmu0vznaup0kyz6rbh4y Module:InfoboxImage/data/doc 828 47878 117304 2025-10-21T23:10:02Z en>Pppery 0 [[WP:AES|←]]Created page with '{{used in system}}' 117304 wikitext text/x-wiki {{used in system}} 8z10e5kya927282xzyfgpfs8msnfrql 117305 117304 2026-07-16T11:51:28Z Tumbuka Arch 6863 1 revision imported from [[:en:Module:InfoboxImage/data/doc]] 117304 wikitext text/x-wiki {{used in system}} 8z10e5kya927282xzyfgpfs8msnfrql Template:Mbumba ya Trump 10 47879 117306 2026-07-16T11:53:37Z Tumbuka Arch 6863 Redirected page to [[Template:Trump family]] 117306 wikitext text/x-wiki #REDIRECT [[Template:Trump family]] 5lbh3vpjjk6qo9udcq1f436pkta385e Vanessa Trump 0 47880 117307 2026-07-16T11:56:34Z Tumbuka Arch 6863 Created page with "{{Short description|Muwoli wakale wa Donald Trump Jr. (wakababika mu 1977)}} {{Use American English|date=April 2026}} {{Use mdy dates|date=July 2024}} {{Infobox person | name = Vanessa Trump | image = Vanessa Trump (1).jpg | caption = Trump mu 2017 | birth_name = Vanessa Kay Pergolizzi | birth_date = {{birth date and age|1977|12|18}} | birth_place = [[Msumba wa New York]], U.S. | alma_mater = [[Marymount Manhattan College]]..." 117307 wikitext text/x-wiki {{Short description|Muwoli wakale wa Donald Trump Jr. (wakababika mu 1977)}} {{Use American English|date=April 2026}} {{Use mdy dates|date=July 2024}} {{Infobox person | name = Vanessa Trump | image = Vanessa Trump (1).jpg | caption = Trump mu 2017 | birth_name = Vanessa Kay Pergolizzi | birth_date = {{birth date and age|1977|12|18}} | birth_place = [[Msumba wa New York]], U.S. | alma_mater = [[Marymount Manhattan College]] | political_party = [[Chipani cha Republican (United States)|Republican]] | spouse = {{marriage|[[Donald Trump Jr.]]|2005|2018|reason=div.}} | partner = [[Khalid bin Bandar Al Saud (wakababika mu 1977)| Khalid bin Bandar Al Saud]] (1998–2001)<br/>[[Tiger Woods]] (2024–sono) | children = 5, kusazgapo [[Kai Trump|Kai]] | relatives = [[Kai Ewans]] (sekuru) | family = [[Mbumba ya Trump]] (pa nyengo ya nthengwa) }} '''Vanessa Kay Trump'''<ref>{{cite magazine|url=https://www.vanityfair.com/style/2018/03/vanessa-trump-might-have-been-the-most-interesting-one-in-the-family|title=Turns Out Vanessa Trump Might Have Been the Most Interesting One in the Family|magazine=Vanity Fair|first=Erika|last=Harwood|date=March 16, 2018|access-date=July 9, 2018}}</ref> ([[née]] '''Pergolizzi''', pamanyuma '''Haydon'''; wakababika pa Disembala 18, 1977) ni mwanakazi wa ku America uyo wakagwiranga ntchito ya umoŵa. Iyo ni muwoli wakale wa [[Donald Trump Jr.|Donald Trump Jr.]] Ŵakatorana kufuma mu 2005 mpaka 2018, ndipo ŵakaŵa na ŵana ŵankhondi. == Umoyo wa apo wakaŵa mwana == Vanessa Kay Pergolizzi<ref>{{Cite news |last=Norman |first=Lianna |date=July 18, 2024 |title=Who is Kai Trump? What we know about Trump's oldest grandchild who lives in Florida |url=https://www.palmbeachpost.com/story/news/2024/07/18/trump-family-who-kai-trump-republican-convention/74453527007/ |access-date=July 18, 2024 |work=[[The Palm Beach Post]] |quote=...former model Vanessa Kay Trump, formerly Vanessa Kay Pergolizzi.}}</ref> wakakulira mu nyumba ya muthengere pa [[Upper East Side|Upper East Side of Manhattan]]<ref>{{cite news|url=https://www.nytimes.com/2006/11/19/fashion/19trumps.html|title=A Name He Can Build On|newspaper=The New York Times|first=Alex|last=Williams|date=November 19, 2006}}</ref> ndipo wakasambira ku [[The Dwight School]],<ref name="NYT-Divorce">{{cite web|first1=Katharine|last1=Rosman|first2=Jacob|last2=Bernstein|url=https://www.nytimes.com/2018/03/22/style/vanessa-trump-divorce.html|title=Unbecoming a Trump: The Vanessa Trump Divorce|newspaper=[[The New York Times]]|date=March 22, 2018|access-date=May 4, 2018}}</ref> sukulu yapadera. Ŵadada ŵake ŵa pakati, Charles Haydon, ŵakaŵa loya.<ref>{{cite magazine|url=https://www.gq.com/story/real-story-of-donald-trump-jr|title=The Real Story of Donald Trump Jr.|magazine=[[GQ]]|first=Julia|last=Ioffe|date=June 20, 2018|access-date=July 9, 2018}}</ref>{{efn|Nkhani zinyake za manyuzipepara zayimika mwakubudika Charles Haydon kuŵa adada ŵake.<ref>{{cite web |last1=Rosman |first1=Katherine |last2=Bernstein |first2=Jacob |title=Unbecoming a Trump: The Vanessa Trump Divorce |url=https://www.nytimes.com/2018/03/22/style/vanessa-trump-divorce.html |work=[[The New York Times]] |access-date=January 13, 2021 |date=March 22, 2018 }}</ref><ref>{{cite web |title=Vanessa Haydon, Donald Trump Jr. |url=https://www.nytimes.com/2005/11/13/fashion/weddings/vanessa-haydon-donald-trump-jr.html |work=[[The New York Times]] |access-date=January 13, 2021 |date=November 13, 2005 }}</ref>}} Anyina, Bonnie Kay Haydon, wakendeskanga Kay Models, kampani ya umoŵa, ndipo wakafuma ku [[Denmark|Denmark]] na [[Sweden|Sweden]].<ref>{{cite web |title=Vidtse du det? Her er Trumps danske forbindelse |url=http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx |website=avisen.dk |date=March 30, 2016 |access-date=July 25, 2017 |language=da-DK |url-status=live |archive-url=https://web.archive.org/web/20161230085933/http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx |archive-date=December 30, 2016 }}</ref><ref name="svigerdatter">{{cite web |title=Trumps svigerdatter på hemmeligt besøg på lille dansk ø. Den familiære forbindelse mellem Danmark og den amerikanske præsident er tættere end hidtil antaget |url=http://www.dr.dk/nyheder/regionale/sjaelland/trumps-svigerdatter-paa-hemmeligt-besoeg-paa-lille-dansk-oe |website=dr.dk |date=June 2017 |access-date=July 25, 2017 |language=da-DK |url-status=live |archive-url=https://web.archive.org/web/20170617230655/http://www.dr.dk/nyheder/regionale/sjaelland/trumps-svigerdatter-paa-hemmeligt-besoeg-paa-lille-dansk-oe |archive-date=June 17, 2017 }}</ref> Sekuru wake wa ku nyina wakaŵa Kai Ewans, wakwimba wa jazz wa ku Denmark.<ref name="svigerdatter"/><ref>{{cite web |title=Vidtse du det? Her er Trumps danske forbindelse |url=http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx |website=Avisen.dk |date=March 30, 2016 |trans-title=Did you know? Here is Trump's Danish connection |access-date=July 25, 2017 |first=Freja |last=Wedenborg |language=da-DK |url-status=live |archive-url=https://web.archive.org/web/20161230085933/http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx |archive-date=December 30, 2016 }}</ref> Adada ŵake ŵakubabika nawo ŵakaŵa ŵa ku Italy.<ref>{{Cite web |date=2025-03-24 |title=Tiger Woods and Vanessa Trump, an unexpected pair |url=https://www.ilmessaggero.it/en/tiger_woods_and_vanessa_trump_an_unexpected_pair-8734798.html |access-date= |website=Il Messaggero |language=en}}</ref> == Ntchito == Vanessa wakagwiranga ntchito ya udesi wa malaya (model) mu nyengo yake ya usungwana na vyaka vyake vya m'ma 20.<ref>{{Cite web|url=https://www.metro.us/entertainment/celebrities/vanessa-haydon-before-trump|title=See Vanessa Haydon before she became a Trump|publisher=Metro|first=Linnea|last=Zielinski|date=2018-03-16}}</ref> ndipo wakasayinika na [[Wilhelmina Models]].<ref name="auto">{{cite news|url=https://www.mercurynews.com/2018/03/23/vanessa-trumps-early-bids-for-fame-included-getting-known-as-leonardo-dicaprios-favorite-girlfriend/|title=Vanessa Trump's early bids for fame included getting known as Leonardo DiCaprio's favorite girlfriend|newspaper=[[The Mercury News]]|first=Martha|last=Ross|date=2018-03-23}}{{failed verification|date=July 2022}}</ref> Vanessa wakawoneka mu chigaŵa chimoza cha filimu ''[[Something's Gotta Give (filimu)|Something's Gotta Give]]'' (2003).<ref>{{cite magazine|url=https://www.bustle.com/p/vanessa-trumps-career-included-a-minor-role-in-a-movie-you-might-remember-69739|title=Vanessa Trump Was In A Movie You Might Remember|first=Madhuri|last=Sathish|magazine=[[Bustle (website)|Bustle]]|date=2015-07-12|access-date=2018-05-04}}</ref> Mu chihanya cha 2003, Vanessa na mudumbu wake Veronika ŵakajura kilabu ya usiku yakuchemeka Sessa.<ref>{{Cite web|url=http://wwd.com/eye/people/models-inc-758988/|title=Models Inc.|publisher=WWD|date=2003-01-13}}</ref> Mu 2011, Vanessa wakawoneka mu chigaŵa cha ''[[The Apprentice (American TV series)|The Apprentice]]'', iyo yikalongozgekanga na mkwe wake, [[Donald Trump]]. Wakaso wakawoneka mu chigaŵa cha ''[[Bret Michaels: Life as I Know It]]'' (2010).<ref name="auto" />{{failed verification|date=July 2022}} Kufuma mu 2010 mpaka 2013, Vanessa wakambiska mtundu wake wa mathumba gha m'manja wakachemeka La Poshett.<ref>{{Cite web|url=https://www.elitedaily.com/news/politics/donald-trump-jr-s-wife-shows-hes-really-following-fathers-footsteps/2014368|title=Donald Trump Jr.'s Wife Shows He's Really Following In His Father's Footsteps|first=John|last=Haltiwanger|website=Elite Daily|date=2017-07-11 }}</ref> == Umoyo wamunthu == === Maubwezi === Mu nyengo yake ya usungwana, Vanessa wakayananga na chigawenga cha mu misewu Valentín Rivera, uyo wakaŵa membala wa gulu la [[Latin Kings]].<ref>{{cite web |last=Coleman |first=Oli |url=https://pagesix.com/2018/05/08/vanessa-trumps-first-love-was-member-of-violent-street-gang/ |title=Vanessa Trump's first love was member of violent street gang |publisher=Page Six |date=2018-05-08 }}</ref> Mwakuyana na ivyo Rivera wakayowoya, iyo wakamara ubwezi uwu pamanyuma pakuti ''[[New York Post]]'' yalemba nkhani yakuti Vanessa wakaŵa mu ubwezi wa chitemwa na [[Leonardo DiCaprio]] (wakumanyiska wa DiCaprio wakakana ubwezi uwu).<ref>{{cite web |last=McAfee |first=Tierney |url=https://people.com/politics/vanessa-trump-love-letters-latin-king-ex-boyfriend-baby-18/ |title=Inside Vanessa Trump's Teen Love Letters: She Allegedly Told Latin King Ex-Boyfriend She Wanted a Baby at 18 |publisher=People |date=2018-05-10 }}</ref> Kufuma mu 1998 mpaka 2001, Vanessa wakayananga na kalonga wa ku Saudi [[Khalid bin Bandar bin Sultan Al Saud]].<ref>{{cite magazine|url=https://people.com/politics/vanessa-trump-almost-married-a-saudi-prince-donald-trump-jr/|title=Vanessa Trump Almost Married a Saudi Prince Before Donald Trump Jr.: Report|magazine=People|date=2018-05-14 }}</ref> Ubwezi uwu ukamara mu 2001, apo Khalid bin Bandar wakafumapo ku U.S. pamanyuma pakuti awiske, uyo wakaŵa kazembe wa Saudi, [[Bandar bin Sultan Al Saud]], wakakayikirika kuti wakaŵa na kukolerana mwambura kwambura mwakudunjika na ŵanthu awo ŵakakolerana na ŵanthu ŵakupoka ndege mu [[Al Qaeda]] [[Hijackers in the September 11 attacks|pa kuwukira kwa September 11]].<ref>{{cite magazine|url=https://www.vanityfair.com/style/2018/05/did-911-keep-vanessa-trump-from-marrying-a-saudi-prince|title=Did 9/11 Keep Vanessa Trump from Marrying a Saudi Prince?|magazine=[[Vanity Fair (magazini)|Vanity Fair]]|first=Erika|last=Harwood|date=2018-05-14}}</ref> Pa November 12, 2005, wakatora nthengwa na Donald Trump Jr. Nthengwa iyi yikachitikira ku kilabu cha [[Mar-a-Lago]] mu Florida; mwambo wa nthengwa ukalongozgeka na nyina wa Donald Trump Jr., Judge [[Maryanne Trump Barry]].<ref>{{cite magazine|archive-url=https://web.archive.org/web/20160817150902/http://www.people.com/people/article/0,,661670_1129629,00.html?cid=redirect-articles%2F |url=http://www.people.com/people/article/0,,661670_1129629,00.html?cid=redirect-articles/ |title=Donald Trump Jr. Marries Model Girlfriend |magazine=[[People (magazini)|People]] |date=2005-11-14 |last=Silverman |first=Stephen M. |access-date=2008-07-14 |url-status=dead|archive-date=2016-08-17 }}</ref> Trump Jr. wakamupempha na mphete ya US$100,000 ({{Inflation|US|100000|2005|fmt=eq|r=-3}}) iyo wakapokera nga ntchizgiro kufuma kwa munthu wakuguliska vito, chifukwa wakapempha Vanessa pa maso pa ŵanthu ŵakujambula zithuzi (paparazzi) kuwaro kwa sitolo ya munthu uyu ku [[The Mall at Short Hills|Short Hills mall]] mu [[New Jersey]].<ref>{{cite web|first=Gwenda|last=Blair|url=https://www.politico.com/magazine/story/2017/07/13/donald-trump-junior-russia-215370/|title=How Donald Trump Jr. Got Stuck In His Father's Shadow|website=[[Politico]]|date=July 13, 2017|access-date=August 4, 2019}}</ref> Ŵakutorana aŵa ŵali na ŵana ŵankhondi, ndipo mukuru wawo ni [[Kai Trump]], uyo wakababika mu Meyi 2007.<ref>{{cite magazine|title=Donald Trump Jr. Welcomes Son Donald John III|url=https://people.com/parents/donald-trump-jr-welcomes-son-donald-john-iii/|date=February 18, 2009|magazine=[[People (magazini)|People]]}}</ref><ref>{{cite magazine|url=https://www.usmagazine.com/celebrity-moms/news/vanessa-donald-trump-jr-welcome-baby-boy-tristan-2011310/|title=Vanessa, Donald Trump Jr. Welcome Baby Boy Tristan Milos|date=October 3, 2011|first=Justin|last= Ravitz|magazine=[[US Magazine]]}}</ref><ref>{{cite magazine |url=https://people.com/parents/donald-trump-vanessa-trump-welcome-daughter-chloe-sophia/ |title=Donald and Vanessa Trump Welcome Daughter Chloe Sophia |last=Michaud |first=Sarah |date=June 18, 2014 |magazine=[[People (magazini)|People]] |access-date=September 28, 2014 |url-status=live |archive-url=https://web.archive.org/web/20141021170703/http://celebritybabies.people.com/2014/06/18/donald-trump-vanessa-trump-welcome-daughter-chloe-sophia/ |archive-date=October 21, 2014 }}</ref> Pa March 15, 2018, wakalemba pempho la kupatana mu nthengwa kwambura kususkika mu [[New York (boma)|New York]].<ref name="NYT-Divorce" /><ref>{{Cite web|url=http://www.nydailynews.com/new-york/donald-trump-jr-s-wife-files-divorce-article-1.3876829|title=Donald Trump Jr.'s wife Vanessa files for divorce|newspaper=[[NY Daily News]]|first=Stephen Rex|last=Brown|date=March 15, 2018}}</ref> Mu Julayi 2018, ŵakamariska nkhani ya uŵavyara wa ŵana,<ref>{{cite web|first=Larry|last=Neumeister|title=Trump Jr, wife resolve child custody amid divorce|url=https://www.apnews.com/be31034c4e6a4800b4fe3582ca8587b1|work=[[Associated Press]]|date=July 26, 2018|access-date=August 4, 2019}}</ref> ndipo kupatana kwa nthengwa kukamalizgika kuumaliro wa 2018.<ref>{{cite news |last1=Vulpo |first1=Mike |title=Donald Trump Jr. and Vanessa Trump Finalize Their Divorce |url=https://www.eonline.com/news/1017355/donald-trump-jr-and-vanessa-trump-finalize-their-divorce |access-date=June 23, 2023 |work=E! Online |date=February 22, 2019 |archive-date=June 23, 2023 |archive-url=https://web.archive.org/web/20230623123741/https://www.eonline.com/news/1017355/donald-trump-jr-and-vanessa-trump-finalize-their-divorce |url-status=live }}</ref> Trump wakuti wakamba ubwezi na munthu wakuseŵera gofu mwaluso [[Tiger Woods]] mu November 2024. Ubwezi uwu ukamanyikwa pa wumba mu March 2025, apo Woods wakawupharazga kwizira pa Instagram.<ref>{{cite news|url=https://www.bbc.com/news/articles/cm2n7d03x8xo|title=Tiger Woods confirms relationship with Trump's ex daughter-in-law|date=March 24, 2025|first=Frances |last=Mao|publisher=[[BBC]]}}</ref> Kwambira March 2026, Trump na Woods ŵakaŵa ŵachali mu ubwezi.<ref>{{cite news|url=https://www.palmbeachpost.com/story/sports/pga/2026/03/25/tiger-woods-and-vanessa-trump-share-a-kiss-at-tgl-finals-in-florida/89316510007/|title=Tiger Woods and Vanessa Trump share a kiss at TGL finals in Florida|first1=Laura|last1=Lordi|first2=Greg|last2=Lovett|first3=Jennifer|last3=Sangalang|publisher=Palm Beach Post|date=March 25, 2026|accessdate=March 28, 2026}}</ref> === Umoyo === Mu Meyi 2026, Vanessa wakapharazga kuti ŵakamusanga na [[chitemwa cha khansa ya mabere]].<ref>{{cite news|url=https://www.cbsnews.com/news/vanessa-trump-breast-cancer-diagnosis/|title=Vanessa Trump announces breast cancer diagnosis|work=CBS News|first=Melissa |last=Gaffney|date=May 20, 2026|access-date=May 21, 2026}}</ref> == Vyakukumbuska == {{notelist}} == Ukaboni == {{Reflist}} == Pa intaneti == * {{commons-inline}} {{Authority control}} {{DEFAULTSORT:Trump, Vanessa}} [[Category:Ŵakubabika mu 1977]] [[Category:Ŵanthu ŵa ku Dwight School]] [[Category:Ŵanthu ŵamoyo]] [[Category:Ŵanthu ŵa ku Marymount Manhattan College]] [[Category:Ŵanthu ŵa ku Upper East Side]] [[Category:Ŵanthu ŵakumanyikwa mu New York City]] [[Category:Ŵanthu ŵa ku America ŵa chiyuda cha Denmark]] [[Category:Ŵanthu ŵa ku America ŵa chiyuda cha Italy]] [[Category:Ŵanthu ŵa ku America ŵa chiyuda cha Sweden]] [[Category:Ŵana ŵa ma model ŵa ku America]] [[Category:Ŵanakazi ŵa ma model kufuma ku New York (boma)]] [[Category:Mbumba ya Trump]] 2d42ofmrtn236iz3li0tphrvhx5yflo Kai Ewans 0 47881 117308 2026-07-16T11:58:00Z Tumbuka Arch 6863 Created page with "{{Short description|Muzikaji wa maŵimbo wa ku Denmark na ku America (1906–1988)}} {{Use American English|date=April 2026}} {{Use dmy dates|date=May 2025}} {{Infobox person | name = Kai Ewans | birth_name = Kai Peter Anthon Nielsen | birth_date = {{Birth date|df=y|1906 |04|10}} | birth_place = [[Hørsholm]], Denmark | death_date = {{Death date and age|df=y|1988|04|04|1906|04|10}} | death_place = [[Connecticut]], U.S...." 117308 wikitext text/x-wiki {{Short description|Muzikaji wa maŵimbo wa ku Denmark na ku America (1906–1988)}} {{Use American English|date=April 2026}} {{Use dmy dates|date=May 2025}} {{Infobox person | name = Kai Ewans | birth_name = Kai Peter Anthon Nielsen | birth_date = {{Birth date|df=y|1906 |04|10}} | birth_place = [[Hørsholm]], Denmark | death_date = {{Death date and age|df=y|1988|04|04|1906|04|10}} | death_place = [[Connecticut]], U.S. | style = [[Jazi]] | relatives = [[Vanessa Trump]] (muzukuru)<br>[[Kai Trump]] (mzukulu wa muzukuru) }} '''Kai Peter Anthon Ewans''' (wakababika '''Nielsen'''; 10 Epulero 1906 – 4 Epulero 1988) wakaŵa muzika wa ku Denmark na ku America uyo wakaseŵeranga vyakwimba vya [[jazi]].<ref name="Grove">{{Cite encyclopedia |last=Wiedemann |first=Erik |title=Ewans, Kai |date=2003 |entry=Ewans, Kai [Nielsen, Kai (Peter Anthon)] |encyclopedia=Grove Music Online|publisher=Oxford University Press |doi=10.1093/gmo/9781561592630.article.J143200 }}</ref> ==Umoyo na ntchito== ===Sumu=== Ewans wakababikira mu [[Hørsholm]], Denmark mu 1906.<ref name="Grove" /> Pakwamba wakaseŵeranga banjo, kweni mu 1923 wakasintha na kwamba kuseŵera saxophone apo wakapanganga Blues Jazz Band.<ref name="Grove" /> Gulu ili likamara mu 1924, ndipo pamanyuma Ewans wakaŵa mu gulu la [[Valdemar Eiberg]] kufuma mu 1924 m'paka 1926.<ref name="Grove" /> Wakatora zina lakuti Ewans mu 1927, ndipo wakalongozga gulu lakwamba la [[big band]] mu Denmark mu 1927–1928, pamanyuma wakalongozga magulu ku Belgium na Germany m'paka mu 1931.<ref name="Grove" /> Pamanyuma pa ichi wakaseŵera na [[Bernard Etté]], Kai Julian (1931–1932), na [[Erik Tuxen]] (1932–1936).<ref name="Grove" /> Wakakhazikiska gulu linyake mu 1936 ilo likaŵa na ŵaseŵera ŵanandi kufuma mu gulu la Tuxen, ndipo wakajambulanga sumu na [[Benny Carter]] mu chaka chenechicho.<ref name="Grove" /> Gulu ili likajambulanga mu ma 1940.<ref name="Grove" /> [[AllMusic]] likalemba kuti: "Ewans wakaŵa nkhongono yikuru pakukura kwa chitemwa cha jazi, chomenechomene mu [[big band]] na [[Swing music|sumu za nyengo ya swing]] mu Denmark. Magulu ghake ghakaŵa ghakulongozgeka makora, ghakusambizgika makora na ghakuŵa na chitatata, ndipo ghakalongoranga mikhaliro yiwemi ya mulongozgi."<ref name="AM">{{cite web |url=https://www.allmusic.com/artist/kai-ewans-mn0001501967 |title=Kai Ewans |website=[[AllMusic]] |access-date=September 1, 2020 |archive-date=April 22, 2019 |archive-url=https://web.archive.org/web/20190422154543/https://www.allmusic.com/artist/kai-ewans-mn0001501967 |url-status=live }}</ref> ===Bizinesi=== Gulu la big band likamara mu 1947, ndipo pamanyuma pa ichi Ewans wakagwira ntchito za bizinesi ku U.S., kusamukira ku California mu 1956.<ref name="Grove" /> Kufuma mu 1960 m'paka 1964 wakalondezga resitiranti pamoza na Carter ku [[Beverly Hills, California|Beverly Hills]] ndipo pamanyuma mu vyaka vya m'ma 1960 wakawelera ku Copenhagen kuti wakaseŵere so.<ref name="Grove" /> ==Kuleka ntchito na nyifwa== Wakasiya ntchito mu vyaka vyake vyaumaliro ndipo wakakhala ku [[Connecticut]], uko wakafwira pa 4 Epulero 1988, mazuŵa 6 pera pambere wandafiske vyaka 82.<ref name="Grove" /> ==Mbumba== Mzukuru wake, [[Vanessa Trump]], wakatora [[Donald Trump Jr.]], mwana mukuru wa Purezidenti [[Donald Trump]].<ref name="family" /> [[Kai Trump]], mwana wa Vanessa ndipo ntheura mzukuru wa Ewans, wakapika zina lake mwakumukumbukira iyo.<ref name="family">{{cite web|url=http://www.avisen.dk/loekke-om-trump-sejr-det-lykkes-sjaeldent-en-mand-at_414814.aspx|title=Løkke om Trump-sejr: Det lykkes sjældent én mand at rive det hele ned|date=9 November 2016 |publisher=}}</ref><ref>{{cite web|url=http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx|title=Vidtse du det? Her er Trumps danske forbindelse|date=30 March 2016 |publisher=|access-date=2017-03-30|archive-date=2016-12-30|archive-url=https://web.archive.org/web/20161230085933/http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx|url-status=live}}</ref> ==Wonaniso== * [[Jazi ya ku Denmark]] * [[Mbumba ya Trump]] ==Ukaboni== {{Reflist}} {{Authority control}} {{DEFAULTSORT:Ewans, Kai}} [[Category:Ŵakubabika mu 1906]] [[Category:Ŵakufwa mu 1988]] [[Category:Ŵaseŵeri ŵa saxophone ŵa jazi ŵa ku Denmark]] [[Category:Ŵaseŵeri ŵa saxophone ŵanalume]] [[Category:Ŵasamukira ku United States kufuma ku Denmark]] [[Category:Mbumba ya Trump]] [[Category:Ŵaseŵeri ŵa saxophone ŵa mu vyaka vya m'ma 1900]] [[Category:Ŵanthu ŵanalume ŵa sumu za jazi]] [[Category:Ŵanthu ŵanalume ŵa sumu ŵa mu vyaka vya m'ma 1900]] cow0y7jz686xyiao7onumq4dsffp63l 117309 117308 2026-07-16T11:58:16Z Tumbuka Arch 6863 117309 wikitext text/x-wiki {{Short description|Muzikaji wa maŵimbo wa ku Denmark na ku America (1906–1988)}} {{Use dmy dates|date=May 2025}} {{Infobox person | name = Kai Ewans | birth_name = Kai Peter Anthon Nielsen | birth_date = {{Birth date|df=y|1906 |04|10}} | birth_place = [[Hørsholm]], Denmark | death_date = {{Death date and age|df=y|1988|04|04|1906|04|10}} | death_place = [[Connecticut]], U.S. | style = [[Jazi]] | relatives = [[Vanessa Trump]] (muzukuru)<br>[[Kai Trump]] (mzukulu wa muzukuru) }} '''Kai Peter Anthon Ewans''' (wakababika '''Nielsen'''; 10 Epulero 1906 – 4 Epulero 1988) wakaŵa muzika wa ku Denmark na ku America uyo wakaseŵeranga vyakwimba vya [[jazi]].<ref name="Grove">{{Cite encyclopedia |last=Wiedemann |first=Erik |title=Ewans, Kai |date=2003 |entry=Ewans, Kai [Nielsen, Kai (Peter Anthon)] |encyclopedia=Grove Music Online|publisher=Oxford University Press |doi=10.1093/gmo/9781561592630.article.J143200 }}</ref> ==Umoyo na ntchito== ===Sumu=== Ewans wakababikira mu [[Hørsholm]], Denmark mu 1906.<ref name="Grove" /> Pakwamba wakaseŵeranga banjo, kweni mu 1923 wakasintha na kwamba kuseŵera saxophone apo wakapanganga Blues Jazz Band.<ref name="Grove" /> Gulu ili likamara mu 1924, ndipo pamanyuma Ewans wakaŵa mu gulu la [[Valdemar Eiberg]] kufuma mu 1924 m'paka 1926.<ref name="Grove" /> Wakatora zina lakuti Ewans mu 1927, ndipo wakalongozga gulu lakwamba la [[big band]] mu Denmark mu 1927–1928, pamanyuma wakalongozga magulu ku Belgium na Germany m'paka mu 1931.<ref name="Grove" /> Pamanyuma pa ichi wakaseŵera na [[Bernard Etté]], Kai Julian (1931–1932), na [[Erik Tuxen]] (1932–1936).<ref name="Grove" /> Wakakhazikiska gulu linyake mu 1936 ilo likaŵa na ŵaseŵera ŵanandi kufuma mu gulu la Tuxen, ndipo wakajambulanga sumu na [[Benny Carter]] mu chaka chenechicho.<ref name="Grove" /> Gulu ili likajambulanga mu ma 1940.<ref name="Grove" /> [[AllMusic]] likalemba kuti: "Ewans wakaŵa nkhongono yikuru pakukura kwa chitemwa cha jazi, chomenechomene mu [[big band]] na [[Swing music|sumu za nyengo ya swing]] mu Denmark. Magulu ghake ghakaŵa ghakulongozgeka makora, ghakusambizgika makora na ghakuŵa na chitatata, ndipo ghakalongoranga mikhaliro yiwemi ya mulongozgi."<ref name="AM">{{cite web |url=https://www.allmusic.com/artist/kai-ewans-mn0001501967 |title=Kai Ewans |website=[[AllMusic]] |access-date=September 1, 2020 |archive-date=April 22, 2019 |archive-url=https://web.archive.org/web/20190422154543/https://www.allmusic.com/artist/kai-ewans-mn0001501967 |url-status=live }}</ref> ===Bizinesi=== Gulu la big band likamara mu 1947, ndipo pamanyuma pa ichi Ewans wakagwira ntchito za bizinesi ku U.S., kusamukira ku California mu 1956.<ref name="Grove" /> Kufuma mu 1960 m'paka 1964 wakalondezga resitiranti pamoza na Carter ku [[Beverly Hills, California|Beverly Hills]] ndipo pamanyuma mu vyaka vya m'ma 1960 wakawelera ku Copenhagen kuti wakaseŵere so.<ref name="Grove" /> ==Kuleka ntchito na nyifwa== Wakasiya ntchito mu vyaka vyake vyaumaliro ndipo wakakhala ku [[Connecticut]], uko wakafwira pa 4 Epulero 1988, mazuŵa 6 pera pambere wandafiske vyaka 82.<ref name="Grove" /> ==Mbumba== Mzukuru wake, [[Vanessa Trump]], wakatora [[Donald Trump Jr.]], mwana mukuru wa Purezidenti [[Donald Trump]].<ref name="family" /> [[Kai Trump]], mwana wa Vanessa ndipo ntheura mzukuru wa Ewans, wakapika zina lake mwakumukumbukira iyo.<ref name="family">{{cite web|url=http://www.avisen.dk/loekke-om-trump-sejr-det-lykkes-sjaeldent-en-mand-at_414814.aspx|title=Løkke om Trump-sejr: Det lykkes sjældent én mand at rive det hele ned|date=9 November 2016 |publisher=}}</ref><ref>{{cite web|url=http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx|title=Vidtse du det? Her er Trumps danske forbindelse|date=30 March 2016 |publisher=|access-date=2017-03-30|archive-date=2016-12-30|archive-url=https://web.archive.org/web/20161230085933/http://www.avisen.dk/det-vidste-du-ikke-om-trump-her-er-hans-danske-jazz_414849.aspx|url-status=live}}</ref> ==Wonaniso== * [[Jazi ya ku Denmark]] * [[Mbumba ya Trump]] ==Ukaboni== {{Reflist}} {{Authority control}} {{DEFAULTSORT:Ewans, Kai}} [[Category:Ŵakubabika mu 1906]] [[Category:Ŵakufwa mu 1988]] [[Category:Ŵaseŵeri ŵa saxophone ŵa jazi ŵa ku Denmark]] [[Category:Ŵaseŵeri ŵa saxophone ŵanalume]] [[Category:Ŵasamukira ku United States kufuma ku Denmark]] [[Category:Mbumba ya Trump]] [[Category:Ŵaseŵeri ŵa saxophone ŵa mu vyaka vya m'ma 1900]] [[Category:Ŵanthu ŵanalume ŵa sumu za jazi]] [[Category:Ŵanthu ŵanalume ŵa sumu ŵa mu vyaka vya m'ma 1900]] 1b5rve2ub62hbhwtx2xsjbfl2w3xbvd